Skip to content

feat: add completion-verification runtime gate (spec 079)#83

Open
robertotru wants to merge 1 commit into
mainfrom
079-completion-verification-runtime
Open

feat: add completion-verification runtime gate (spec 079)#83
robertotru wants to merge 1 commit into
mainfrom
079-completion-verification-runtime

Conversation

@robertotru

Copy link
Copy Markdown
Contributor

Problem: Boundline can currently mark a task, stage, or run as complete even when the claimed outcome has no fresh proof from the current working state. This undermines delivery integrity.

Solution: A runtime-owned verification gate that:

  • Derives the concrete claim being made at closeout (explicit task metadata, or inferred from context with operator confirmation when ambiguous)
  • Selects the narrowest available falsifying proof command for that claim
  • Runs it against the current working state
  • Captures evidence (command, exit code, summary, fingerprint)
  • Refuses closeout when proof is missing, stale, or failed

Key Design Decisions

Decision Rationale
Normalized workspace fingerprint for staleness Any tracked or non-ignored untracked file change invalidates a prior proof
Four initial claim kinds tests_pass, bug_fixed, build_clean, migration_valid — deterministic proof per claim
Claim inference with operator confirmation guard Low-confidence or ambiguous inference prompts the operator before proving
Stage/run aggregation over child tasks Child proof remains authoritative; parent claims add to, not replace, child verification
No new CLI command status, inspect, and orchestrate surface the new projections additively
Canon boundary preserved Boundline owns proof execution and evidence; Canon owns packet semantics and readiness

User Stories

  1. Block Unsafe Completion (P1) — Task stays open when proof is missing/stale/failed
  2. Prove the Claimed Outcome (P1) — Runtime runs the selected proving command, captures evidence
  3. Surface Verification State (P2) — status/inspect show completion_verification_state, findings, blocked claims
  4. Preserve Canon Boundary (P3) — Emit claim → proof → evidence_ref without taking over Canon packet semantics

@robertotru robertotru self-assigned this Jun 13, 2026
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
9.2% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

Introduce a runtime-owned completion-verification gate that blocks task,
stage, and run closeout until a claim-matched proof has been executed
freshly in the current working state.

- Add typed completion-verification models in
  src/domain/completion_verification.rs (ClaimKind, ProofCommand,
  CompletionVerificationState, VerificationFinding)
- Implement claim-source resolution, proof-command registry, and
  confirmation-policy helpers
- Add normalized workspace content fingerprint with claim-relevant
  documentation inclusion rules
- Extend persisted task, session, and trace records with
  completion-verification projections
- Add closeout gating for task/stage/run transitions in
  src/orchestrator/session_runtime_finalization.rs
- Surface blocked, stale, failed, and missing-proof reasons through
  status, inspect, and orchestrate projections
- Four initial claim kinds: tests_pass, bug_fixed, build_clean,
  migration_valid — each with a deterministic proof-selection path
- Integrate with existing task lifecycle without a new CLI command;
  keep Canon as the governed owner of packet semantics and readiness

Closes spec 079.
@robertotru robertotru force-pushed the 079-completion-verification-runtime branch from d4d2117 to 5d5f940 Compare June 13, 2026 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant