Files
linus-dandClaude Opus 4.8 f4c75fc8cf Audit pass: full-corpus evidence, full-gate mutation, 3-way metamorphic, recomputable causal, bundle attestation
1 (artifact bundle): ci_reports writes evidence/MANIFEST.tsv (content hash+len of
  every evidence file); attestation verifies completeness+integrity; merge-gates
  requires the bundle.
2 (every leaf full evidence): run_all_to streams a full trace+delta record for
  EVERY leaf (base 'b' and perturbation 'p'), not a sample.
3 (attestation completeness): attestation enforces a leaf<->trace bijection
  (traces == leaves and covered set == leaf set), not just consistency.
4 (collapse derives from full traces): trace_feature_row single-sourced into
  collapse_analysis; attestation recomputes each collapse row from the retained
  full trace and requires bit-exact match.
5 (mutants through full gates): evaluate_mutants runs each mutant through
  engine_acceptance over 128 generated cases (trace/equivalence/domain/
  metamorphic/causal), replacing the 64-input local predicates.
6 (trace+delta+future): metamorphic enforces consumed->trace per-case plus
  consumed-aggregate delta (>=0.65) and future (>=0.80) rates.
7 (recomputable causal): per-edge intervention records written to
  evidence/causal_evidence.tsv; attestation RE-EXECUTES each from its seed and
  recomputes base_dv/alt_dv.
8 (no string/comment proof): removed web_assets JS-substring test and the
  tautological string assert in ci_reports.

Verified at fast scale end-to-end: 6600/6600 traces reconstructed, leaf
bijection, 1600/1600 causal records recomputed, 600/600 collapse rows derived,
bundle intact.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21 23:39:50 -07:00

94 lines
3.9 KiB
YAML

name: magicka-merge-gates
# The merge-blocking enforcement point for the Phase 0/1 acceptance gates.
# Per the spec's compliance model, acceptance may NOT be satisfied by a locally
# runnable binary, a default (fast) profile, or a documentation claim. This
# workflow is the enforcement: the `merge-gates` job below runs the full merge
# profile (1,000,000 executions, 10 perturbations each, 100% reference/runtime
# comparison, 10,000 persisted replay cases, >=500 mutants) and must be a
# REQUIRED status check on the protected branch / merge queue. If it fails or is
# absent, merge is blocked.
on:
pull_request:
branches: [main]
merge_group: # GitHub merge queue — the merge-blocking entry point
push:
branches: [main]
jobs:
# Advisory PR feedback only. The spec permits a 10% fast slice for PR signal,
# but this job is explicitly NOT acceptance and never substitutes for the
# merge profile.
advisory-fast:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Unit tests (incl. negative controls)
run: cargo test --release --workspace
- name: Fast advisory gate run
env:
MAGICKA_PROFILE: fast
run: cargo run --release -p ci_reports --bin ci
# The acceptance gate. Required on merge_group / protected main.
merge-gates:
if: github.event_name == 'merge_group' || github.event_name == 'push'
runs-on: ubuntu-latest
timeout-minutes: 1440
steps:
- uses: actions/checkout@v4
- name: Verify committed replay corpus has >= 10,000 cases
run: |
lines=$(grep -vcE '^(#|master)' crates/replay_corpus/corpus/replay_corpus.tsv)
echo "replay corpus cases: $lines"
test "$lines" -ge 10000
- name: Unit tests (incl. negative controls)
run: cargo test --release --workspace
# plan2.md Phase H: the protocol + socket + replay/visibility gates are
# merge-blocking. These run the full HTTP/WebSocket/protocol/runtime path
# headlessly over real sockets (1k matches, 10k fuzz, 100 e2e, leak +
# resilience). The rendered-browser layer is NOT gated here — see
# web-gates.yml (advisory, blocked on CI infrastructure).
- name: Web protocol + socket gates (merge-blocking)
run: cargo test --release -p protocol -p game_runtime -p server -p web_assets -p web_client -p web_tests
- name: Full merge-blocking acceptance gates
env:
MAGICKA_PROFILE: merge
MAGICKA_OUT: ci_out
run: cargo run --release -p ci_reports --bin ci
- name: Enforce required artifacts exist
run: |
for r in domain_participation_report causal_rank_report \
causal_explanation_report \
compression_resistance_report metamorphic_response_report \
mutation_survivor_report runtime_equivalence_report \
replay_report coverage_report provenance_report \
compliance_report; do
test -s "ci_out/${r}.json" || { echo "MISSING ARTIFACT: ${r}.json"; exit 1; }
done
for e in leaves.tsv traces.tsv causal_evidence.tsv collapse_feature_rows.tsv MANIFEST.tsv claims.tsv; do
test -s "ci_out/evidence/${e}" || { echo "MISSING EVIDENCE: ${e}"; exit 1; }
done
# Independent attestation (findings 2, 3): a SEPARATE process recomputes
# the Merkle root from the retained leaves and checks it against the
# producer's claim. It never reads compliance_report.json. A producer that
# reported a root inconsistent with its own leaves fails here.
- name: Independent attestation of evidence
run: cargo run --release -p attestation --bin attest -- ci_out
- name: Upload acceptance evidence
if: always()
uses: actions/upload-artifact@v4
with:
name: magicka-acceptance-evidence
path: ci_out/