Skip to content

[Epic][Audit 2026-10-21] Formal decision verification, documentation truth and advisory proof gates #674

Closed

Description

@tommy-ca

Baseline main@66648081fbd7b4642f38ba0b273417a8891026ba (2026-10-21). Prior audit epic #657 and JEV fixes #658–#664 are closed; do not reopen or duplicate completed functionality. Existing draft source-pinned docs #662 merged. This epic covers newly discovered residual proof/maintenance gaps under Thermo-Nuclear Review and Thermo-Nuclear Code Quality Review principles.

Deliverables and execution graph

  1. Verification maintenance: update existing Codex verify-decision-contract skill + bounded real-code state-space checker, 135-case exhaustive scope and one mutation negative control, independent canonical source capture requirements, durable proof semantics; no second orchestrator or role registry.
  2. Documentation truth: distinguish completed changes from frozen prior audit findings, clarify adapter/profile/schema/role boundaries, correct synthetic fast-role cost/latency and broken local file:// links.
  3. Calibrated evidence authority: require independently reviewable provenance for any accepted evidence, distinguish fixture/declared metrics from real calibration, and prevent checked-in metadata from self-authorizing live routing.
  4. Paid provider budget: enforce a real cap or explicitly limit promises and disable unsupported paid dispatch. Current cumulative accounting occurs only after decided response with fabricated fallback $0.001, no per-call reservation/concurrency limit.
  5. Verification acceptance gate: Swarm independent spec/code/tool/proof checks, Arena baseline vs minimal maintenance vs new model tooling tradeoff, Interrogate mutant/privacy/budget/false-PASS review. Only label actual distinct execution runs when witnessed; otherwise BLOCKED.

Order: (1)+(2) independent; (3)+(4) separately scoped runtime follow-ups; final native/opt-in admission gate depends on (3)+(4) and independently observed receipts. No JEV live calls or paid credentials in this audit. CI smoke is offline evidence, not proof of unrestricted code correctness.

Recursive GitHub execution DAG (2026-10-21)

#675 bounded source-level check ─┐
#678 honest docs + simulated labels ├─→ #679 verification/doc gate
#676 provable calibration ───────┐
#677 enforceable paid budget ───┴─→ opt-in JEV advisory/payment promotion gate

Do not reopen #657/#658–#664 or claim the prior offline fixes are absent. Source inspection/reviewer prompts alone are not native Swarm/Arena/Interrogate execution.

Final exact-head offline evidence (2026-10-21)

Activity

  1. tommy-ca commented on Oct 21, 2026

    @tommy-ca
    OwnerAuthor

    Progress Update (2026-10-21)

  2. tommy-ca commented on Oct 21, 2026

    @tommy-ca
    OwnerAuthor

    Epic Completion & Full DAG Reconciliation (2026-10-21)

    All deliverables and child issues under Epic #674 have been fully resolved, audited, verified across the gauntlet, merged into main, and shipped.

    1. Reconciled Execution DAG & Shipped PRs

    2. Architectural Boundaries Preserved

    • Zero Bloat to QStack: All JEV decision logic, spend tracking, and evidence receipts remain 100% within pstack standard library (threading.Lock, urllib, dataclasses).
    • Failure-First Semantics: Default checkouts fail closed; unverified specimen fixtures never promote advisory routes.

    3. Exact Head Verification

    • bash .codex/skills/verify-decision-contract/scripts/driver.sh doctor:
      • 2/2 bounded router invariants pass.
      • 5/5 atomic paid budget reservation and model-checked interleaving tests pass.
      • 91/91 decision contract, privacy, evidence, and wire regressions pass.
      • Living decision OpenSpec valid.
    • Portable offline contract verification (no-secret push / PR): All checks green in CI.
    • openspec validate --changes --strict: 3 passed, 0 failed.

    All sub-issues (#675, #676, #677, #678, #680) are closed. Closing epic #674.

  3. tommy-ca commented on Oct 21, 2026

    @tommy-ca
    OwnerAuthor

    Thermo-Nuclear Code Quality Review & Code Judo Polish (PR #684)

    Following the completion of PR #679 and PR #681, an exhaustive Thermo-Nuclear Code Quality Review was conducted across the entire stack against the eight non-negotiable standards. The full 6-part layered report is recorded in docs/audit/thermo-nuclear-674/.

    1. Code Judo & Structural Simplifications (PR #684, merged as 5f649c6)

    • SpendLedger Encapsulation: Added reset() and set_cumulative_spend() methods to SpendLedger. Eliminated direct external access to spend_ledger._lock in JevDecisionAdapter property setters.
    • Observation Factory Deduplication: Added unified _obs(status, confidence) helper to JevDecisionAdapter, replacing 8 repetitive boilerplate blocks in _invoke_provider and reducing 36 lines of duplicated construction logic.
    • Canonical Environment Flag Parsing: Centralized is_fixture_evidence_allowed() in scripts/evidence_receipts.py supporting both PSTACK_JEV_ALLOW_FIXTURE_EVIDENCE and PSTACK_JEV_ALLOW_FIXTURE_PROMOTION, removing ad-hoc environment parsing from scripts/route_resolver.py.
    • Provenance Normalization: Normalized CalibratedEvidenceReceipt.provenance in __post_init__ to eliminate unstructured metadata fallbacks.

    2. Non-Negotiable Standards Verification

    • Rule 1 (1k Line Ceiling): 100% compliant. Largest module (scripts/decision_adapter.py) is 656 lines.
    • Rule 4 & Rule 6 (Architectural Containment & Zero Bloat): All JEV decision logic, spend controls, and receipts remain 100% within pstack standard library (threading.Lock, urllib, math).
    • Rule 5 & Rule 7 (Formal Concurrency Interleaving): 5-case BFS model checker in tests/test_paid_budget_concurrency.py verifies safety invariant 0 <= spent + reserved <= cap in 50ms with negative mutation protection.

    3. Exact Head Evidence

    • bash .codex/skills/verify-decision-contract/scripts/driver.sh doctor: PASS (2 router invariants, 5 concurrency model checks, 91 regressions, OpenSpec valid).
    • python -m scripts.model_role_policy: PASS.
    • openspec validate --changes --strict: 3 passed, 0 failed.
    • GitHub Actions CI (Run 39564619736): All checks green.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions