Skip to content

Freeze the practical v0 completion contract - #135

Merged
alexlopashev merged 7 commits into
mainfrom
codex/v0-completion-contract
Jul 20, 2026
Merged

Freeze the practical v0 completion contract#135
alexlopashev merged 7 commits into
mainfrom
codex/v0-completion-contract

Conversation

@alexlopashev

@alexlopashev alexlopashev commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Closes #99

Outcome

  • Adds a machine-checked practical-v0 completion manifest covering 36 stable issue keys, 99 normative scenario instances, all 17 wire roots, ten pipeline stages, and 23 linked reference artifacts.
  • Freezes a nontrivial reference program spanning definitions, nested goals, typed ownership/data flow, direct limits and decreasing recursion, exact effect authority, layered policy and an applied exact waiver, profiles, a content-bound derived extension, planning, execution, and per-obligation evidence.
  • Keeps current maturity honest: the partial front end must reject the reference program at its first unsupported definition.

Red-to-green evidence

  • Red: mise exec -- cargo test --test v0_completion_contract failed all three initial tests because the completion manifest and reference-program artifacts did not exist.
  • Green: the focused target passes 4/4, including omission, duplicate, unknown scenario/owner, root-inventory, typed artifact validation, cross-artifact linkage, types/limits/effects/recursion/reducer signatures, ownership/data flow, policy scope and waiver application, producer bindings, and the fail-closed front-end boundary.
  • Integration red: cargo test --all-targets caught the new target missing from the hosted test partition plan.
  • Integration green: the CI-plan exact test passes after assigning v0_completion_contract to the semantic/conformance shard.

Review resolution

  • Replaced invalid governance shorthand with source accepted by the current parser/composer and checked its exact effective capabilities, per-goal scopes, prohibition, base limit, and applied 2-to-3 waiver.
  • Rebuilt the program and reviewed typed projection so definitions/types close, limits are direct Boolean bounds, recursion carries a checked decreasing measure, exact versioned effect IDs match applicable policy scopes, and owned values move exactly once.
  • Connected syntax/profile projections, canonical and alternate sources, planner/execution inputs, and explicit policy-evidence producer bindings through one exact registry.
  • Replaced the invalid identity extension with a kernel-signature reducer, a bhcp/meta.network-shape@0 lowerer, and five byte-exact SHA3-512-bound rule artifacts.
  • Separated obligation states from the eight required planning/execution outcome categories.
  • Replaced marker-only checks with typed validators, exact semantic projections/inventories/registries, path confinement, and adversarial mutations of policy shape/scope, ownership, types, limits, recursion, effects, reducer signatures, and producer bindings.

Full validation

  • mise exec -- cargo fmt --check
  • mise exec -- cargo clippy --all-targets -- -D warnings
  • mise exec -- cargo test --all-targets
  • mise exec -- cargo build --release
  • mise exec -- cargo test --test schema_fixtures
  • git diff --check

All passed at the exact head below.

Documentation impact

  • Reconciles SEMANTICS S12, README, VISION, the conformance catalog, and the project profile.
  • The wiki remains marked planned and will be reconciled in the required post-merge consistency audit.

Residual risk

  • The reference source is intentionally ahead of the partial parser; this PR freezes and validates the target but does not claim end-to-end execution.
  • Stable roadmap keys and reviewed semantic projection rows are deliberately pinned, so an intentional contract change must update them under review.

Head SHA: 73d7095

@alexlopashev alexlopashev left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent review task identity: /root/review_pr_88

Reviewed exact head 58d5c7ea6bb1aa08bdd5b18434c7261213874f31 against current origin/main, issue #99, SEMANTICS, the v0 wire contract, conformance catalog, CI test plan, and public documentation.

The inventory/counting portion is coherent: the focused completion-contract test and CI-plan test pass, the 99 expanded scenario IDs match the normative catalog, all 17 wire roots are present, the hosted target is assigned exactly once, and the protected checks are green. However, the reference artifacts are not a valid frozen future end-to-end subject, and the current validator accepts those semantic contradictions through substring checks. The inline findings are merge blockers.

Validation performed:

  • cargo test --test v0_completion_contract: 3/3 passed
  • cargo test --test ci_workflow: 6/6 passed
  • Existing public policy CLI against the frozen policy: rejected at line 3 with BHCP8001: limit policy value dimension must be a symbol-id
  • git diff --check: clean

This is a review comment rather than an approval because the GitHub account is shared.

Comment thread conformance/v0/reference-program/policy.bhcp Outdated
Comment thread conformance/v0/reference-program/program.bhcp Outdated
Comment thread conformance/v0/completion-manifest.txt Outdated
Comment thread conformance/v0/reference-program/expected-obligations.txt Outdated
Comment thread tests/v0_completion_contract.rs

@alexlopashev alexlopashev left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent re-review task identity: /root/review_pr_88

Re-reviewed exact head 72e0932dbebdaddf128f07f46b01218adc6c089a against current origin/main, issue #99/#132, SEMANTICS S3–S10, the v0 schema/model boundary, conformance catalog, CI plan, and AGENTS.md.

Two prior P1s are resolved and their threads were closed:

  • the policy now uses canonical typed values and passes the public parser/composer;
  • obligations use valid obligation states, with operational outcomes separated into the eight-case matrix.

Focused evidence:

  • cargo test --test v0_completion_contract: 4/4 passed
  • cargo test --test ci_workflow: 6/6 passed
  • public policy composition: passed
  • git diff --check: clean

The replacement still is not a valid frozen end-to-end target. Three semantic blockers and the validator gap are recorded inline. The program/feature/validator threads remain unresolved. I did not approve or merge; the shared GitHub account cannot provide independent author approval.

Comment thread conformance/v0/reference-program/program.bhcp Outdated
Comment thread conformance/v0/reference-program/extension.bhcp Outdated
Comment thread conformance/v0/reference-program/policy.bhcp Outdated
Comment thread tests/v0_completion_contract.rs

@alexlopashev alexlopashev left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent re-review task identity: /root/review_pr_88

Re-reviewed exact head d220bbb. The four findings from review 4737396985 are materially addressed: direct Boolean bounds and a decreasing recursion measure are frozen; reducer/lowerer signatures and all five rule content references are present; exact effect IDs and effective goal scopes now agree; the waiver engine actually produces ceiling 3; and the policy-evidence mapping is explicit.

Focused evidence passes: v0_completion_contract 4/4, ci_workflow 6/6, public policy composition, and git diff --check. Protected checks are still completing.

The exact head remains unmergeable because the program/input is not a closed typed subject, the semantic projection can drift from owner-scoped source declarations, and the chain shape conflicts with the normative executable chain slice. Inline P1 findings describe each blocker. I did not resolve threads, approve, or merge.

Comment thread conformance/v0/reference-program/program.bhcp Outdated
Comment thread conformance/v0/reference-program/program.bhcp Outdated
Comment thread tests/v0_completion_contract.rs

@alexlopashev alexlopashev left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent re-review task identity: /root/review_pr_88

Re-reviewed exact head 76d4870 against origin/main, issue #99, SEMANTICS S3-S12, the complete reference inventory, and all prior review findings.

The resource/input and S8.1 chain blockers are fixed, and I resolved those plus the genuinely satisfied earlier program/profile/recursion/extension/policy threads. The exact head is unchanged. The canonical local gate passes in full, git diff --check is clean, public policy composition passes, and every protected check is green.

One semantic-projection blocker remains inline. The new owner-scoped checks are one-way: they validate only rows already present in the hand-authored projection, so source obligations, type-definition shapes, and extra facts can still drift without rejection. I kept the validator threads unresolved and did not approve or merge. This is a review comment because the GitHub account is shared with the author.

Comment thread tests/v0_completion_contract.rs

@alexlopashev alexlopashev left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent re-review task identity: /root/review_pr_88

Re-reviewed exact head 2e1264e. The three concrete mutations from comment 3616531482 are now rejected with the projection fixed: deleting Persist stored fails the clause inventory, changing Delivery.sequence Text to Bool fails the definition digest, and adding a StartDelivery input fails the typed-fact inventory. The complete canonical local gate passes, git diff --check is clean, policy composition passes, all protected checks are green, and the remote head remains exact.

I did not resolve comment 3616531482, approve, or merge because the new source commitment still omits unrecognized top-level constructs. The inline P1 shows a concrete bypass that changes the source while preserving every recorded definition digest and inventory row. This is a review comment because the GitHub account is shared with the author.

Comment thread tests/v0_completion_contract.rs Outdated

@alexlopashev alexlopashev left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent re-review task identity: /root/review_pr_88

Re-reviewed exact head 55b3bd7. The requested unindented between-definition insertions for waiver, policy, syntax, and unknown top-level forms are now rejected by the same closed-kind branch; the focused test and complete canonical local gate pass, git diff --check is clean, and the remote head is unchanged.

I did not resolve comment 3616613966, approve, or merge. The latest fix still scans only column-zero § lines and the hashes start at the first recognized marker, leaving a leading-whitespace top-level construct before the first definition uncommitted. That concrete fail-open case is inline. Two protected shards were still running when this review was recorded; every completed check was green. This is a review comment because the GitHub account is shared with the author.

Comment thread tests/v0_completion_contract.rs

@alexlopashev alexlopashev left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent final re-review task identity: /root/review_pr_88

Reviewed exact head 73d7095da24d0169776b80e295693934182a3b05 against current origin/main, the complete PR diff, all prior findings, and the source/projection fail-closed boundary. No actionable findings remain.

The exact indented prefix mutation with program-contract.txt fixed now fails on the raw whole-source digest. Independent SHA3-512 calculation matches the reviewed commitments for all 4,217 bytes of program.bhcp and all 885 bytes of extension.bhcp; duplicate, omitted, extra, or altered file-hash rows are rejected by exact map equality. The alternate presentation remains exact through its fixed preamble and exact mapped-body equality.

Evidence: focused mutation test passed; the canonical local gate (fmt, clippy with warnings denied, all targets, release build, schema fixtures) passed; git diff --check is clean; every protected check is green; and the remote head remains exact. The cumulative validator threads are materially satisfied. This is a comment review because the GitHub account is shared with the author; the independent reviewer identity is recorded here.

@alexlopashev
alexlopashev merged commit 9c8fd92 into main Jul 20, 2026
12 checks passed
@alexlopashev
alexlopashev deleted the codex/v0-completion-contract branch July 20, 2026 18:44
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.

Freeze the end-to-end v0 completion contract and reference program

1 participant