Skip to content

Verify parity inputs before tagging and carry the bound payload - #169

Merged
luisleo526 merged 8 commits into
mainfrom
parity-test-dependencies
Nov 8, 2026
Merged

luisleo526 merged 8 commits into
mainfrom
parity-test-dependencies

Conversation

@luisleo526

Copy link
Copy Markdown
Contributor

Capable releases verify the engine's tagged parity sources and package bytes before version/tag changes or dispatch. The image carries the bound descriptor, checksums and six payload files, and verifies installed bytes before runtime smoke.

The copy step now installs a root-owned 0755 directory and 0644 files so the default runtime user can read the payload. Regression tests execute the actual copy, sync and binding text with valid, changed and damaged inputs, preserving legacy release behavior and the existing refusal boundaries.

Validation: 434 method runs across ten scoped invocations passed, alongside six passing controls and six named mutation kills. A real arm64 release-stage build using the published engine/codegen 1.10.0 payloads confirmed default-user listing and byte-inventory reads. This real build proves the copy and default-user boundary; wire eligibility, HPO compatibility, multi-architecture publishing and pushed-digest smoke remain normal release gates.

🤖 Generated with Claude Code

Verify canonical source identities and preserve historical manifest replay.
Synchronize and verify tagged parity sources before producer authorization,
preserve legacy package-byte refusals, and bind the parity carrier through
image construction and child verification. Exercise release-version cutoff
boundaries without duplicating the canonical capability threshold.
Scope mutations to named jobs and steps and require complete consumer sets.
Keep independent refusal cases for parity synchronization, completing-engine
verification, token permissions and tag ordering.

@graphify-labs graphify-labs Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Graphify reviewed this change.

Worth a look — the grounded gate found no coupling regressions or blocking issues, but 4 advisory finding(s) below merit a look before merge.

Not checked: tests were not run; formal verification proved 0 of 10 changed function(s) (10 not verified).

Formal verification. PR-changed functions: 0/10 verified (0 proven, 0 may-equivalent, 0 distinguished) · 10 not verified (10 vacuous).

Not verified on this run: producer (vacuous: never exercised), pair\_payload (vacuous: never exercised), validate (vacuous: never exercised), validate\_candidate (vacuous: never exercised), bindings (vacuous: never exercised), finalize (vacuous: never exercised), main (vacuous: never exercised), reconcile (vacuous: never exercised), main (vacuous: never exercised), verify\_runtime (vacuous: never exercised).


Graphify review — findings

Adds a parity carrier to the release image: publish.yml syncs the reviewed parity bundle from the immutable engine tag, validates the producer binding, and passes the descriptor hash and carrier flag as build args, while the Dockerfile copies the bundle into /opt/pineforge/parity and refuses any extra, missing, empty or symlinked file. The check trusts a PARITY-SHA256SUMS file that ships inside the bundle and hashes only the descriptor against the binding, so the six payloads are verified by a self-referential list. Releases before the parity cutoff build with the carrier off and fail if a descriptor or parity field shows up unexpectedly. Adds scripts/parity_bundle.py to fetch, verify and atomically install that bundle, with the release pipeline and test suites extended to match. handle-upstream.yml also makes a codegen or HPO event that completes the pair prove the pinned engine before tagging, but the step runs only in bump mode, so retag recovery goes without it.

Worth a look

  • Binding step reads undefined TAG environment variable — .github/workflows/publish.yml:309 · Escalate · high
    • NOT verified (no proof, no reproducing execution) — needs human review
  • Parity payload integrity relies only on the unbound, self-referential SUMS file — docker/Dockerfile:228 · Escalate · medium
    • NOT verified (no proof, no reproducing execution) — needs human review
  • Engine verification runs only for 'bump' mode, so retag recovery is skipped despite the stated intent — .github/workflows/handle-upstream.yml:331 · Escalate · medium
    • NOT verified (no proof, no reproducing execution) — needs human review
  • Installed parity bundle directory inherits 0700 mode from TemporaryDirectory — scripts/parity_bundle.py · Escalate · medium
    • NOT verified (no proof, no reproducing execution) — needs human review

Review partial — this diff was larger than one review pass covers, so later files were not reviewed; some findings may be missing.

Analysis details — impact, health, verification

Impact & health

Graphify review

Impact — 1084 functions depend on the 954 functions this change touches.

Health — this change adds coupling hotspots:

  • new: wire_case() — 10 callers, 4 callees
  • new: finalization_case() — 5 callers, 6 callees
  • new: sync_parity_bundle() — 5 callers, 5 callees
  • worse: validate() — 3 callers, 8 callees
  • worse: validate_candidate() — 3 callers, 8 callees
  • new: validate_parity() — 4 callers, 6 callees
  • worse: pair_payload() — 2 callers, 7 callees
  • worse: verify_runtime() — 1 callers, 8 callees
  • …and 1 more — each is listed as a finding

Verification — 1084 functions in the blast radius were not formally verified this run (proofs are advisory here).

Gate & verification

graphify gate

PASS — objectively clean (no health regressions, tests not run — proofs not run this pass (advisory)). Grounded, not self-assessed.

Advisory (not blocking):

  • verification_scope: 1057 function(s) in the blast radius were not formally verified this run

Docs that may be stale (advisory)

…and 10 more.

Formal verification

Could not verify: Could not verify producer.

The verifier did not have enough to check producer, so it is saying so rather than guessing. No false assurance is the whole point.

Guarantee: No guarantee either way, this is an honest abstention, not a pass.

Note: Reason: not verifiable: all 264 sampled inputs raised on both versions — the function never executed, so 'no divergence' would be vacuous (mostly NameError — names the real obstacle, not a sampling gap)

Could not verify: Could not verify pair\_payload.

The verifier did not have enough to check pair\_payload, so it is saying so rather than guessing. No false assurance is the whole point.

Guarantee: No guarantee either way, this is an honest abstention, not a pass.

Note: Reason: not verifiable: all 82 sampled inputs raised on both versions — the function never executed, so 'no divergence' would be vacuous (mostly TypeError — names the real obstacle, not a sampling gap)

Could not verify: Could not verify validate.

The verifier did not have enough to check validate, so it is saying so rather than guessing. No false assurance is the whole point.

Guarantee: No guarantee either way, this is an honest abstention, not a pass.

Note: Reason: not verifiable: all 59 sampled inputs raised on both versions — the function never executed, so 'no divergence' would be vacuous (mostly Invalid — names the real obstacle, not a sampling gap)

Could not verify: Could not verify validate\_candidate.

The verifier did not have enough to check validate\_candidate, so it is saying so rather than guessing. No false assurance is the whole point.

Guarantee: No guarantee either way, this is an honest abstention, not a pass.

Note: Reason: not verifiable: all 59 sampled inputs raised on both versions — the function never executed, so 'no divergence' would be vacuous (mostly Invalid — names the real obstacle, not a sampling gap)

Could not verify: Could not verify bindings.

The verifier did not have enough to check bindings, so it is saying so rather than guessing. No false assurance is the whole point.

Guarantee: No guarantee either way, this is an honest abstention, not a pass.

Note: Reason: not verifiable: all 264 sampled inputs raised on both versions — the function never executed, so 'no divergence' would be vacuous (mostly NameError — names the real obstacle, not a sampling gap)

Could not verify: Could not verify finalize.

The verifier did not have enough to check finalize, so it is saying so rather than guessing. No false assurance is the whole point.

Guarantee: No guarantee either way, this is an honest abstention, not a pass.

Note: Reason: not verifiable: all 264 sampled inputs raised on both versions — the function never executed, so 'no divergence' would be vacuous (mostly AttributeError — names the real obstacle, not a sampling gap)

Could not verify: Could not verify main.

The verifier did not have enough to check main, so it is saying so rather than guessing. No false assurance is the whole point.

Guarantee: No guarantee either way, this is an honest abstention, not a pass.

Note: Reason: not verifiable: all 1 sampled inputs raised on both versions — the function never executed, so 'no divergence' would be vacuous (mostly NameError — names the real obstacle, not a sampling gap)

Could not verify: Could not verify reconcile.

The verifier did not have enough to check reconcile, so it is saying so rather than guessing. No false assurance is the whole point.

Guarantee: No guarantee either way, this is an honest abstention, not a pass.

Note: Reason: not verifiable: all 254 sampled inputs raised on both versions — the function never executed, so 'no divergence' would be vacuous (mostly NameError — names the real obstacle, not a sampling gap)

Could not verify: Could not verify main.

The verifier did not have enough to check main, so it is saying so rather than guessing. No false assurance is the whole point.

Guarantee: No guarantee either way, this is an honest abstention, not a pass.

Note: Reason: not verifiable: all 1 sampled inputs raised on both versions — the function never executed, so 'no divergence' would be vacuous (mostly SystemExit — names the real obstacle, not a sampling gap)

Could not verify: Could not verify verify\_runtime.

The verifier did not have enough to check verify\_runtime, so it is saying so rather than guessing. No false assurance is the whole point.

Guarantee: No guarantee either way, this is an honest abstention, not a pass.

Note: Reason: not verifiable: all 264 sampled inputs raised on both versions — the function never executed, so 'no divergence' would be vacuous (mostly NameError — names the real obstacle, not a sampling gap)

· 7 grounded finding(s) anchored inline below; 2 more finding(s) on lines outside this diff (see the check run).

Comment thread scripts/parity_bundle.py
return raw


def read_source_manifest(client, commit):

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Health regression — read_source_manifest()

fans out to 6 callees (efferent coupling).

Grounded coupling-delta finding (deterministic), not an LLM guess.

Comment thread scripts/parity_bundle.py
raise OSError(code, os.strerror(code))


def sync_parity_bundle(client, engine_tag, destination, *, release_mode=True, proof_commit=None):

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Health regression — sync_parity_bundle()

high coupling complexity (Ca·Ce = 25).

Grounded coupling-delta finding (deterministic), not an LLM guess.

return version(release) >= version(PARITY_CAPABILITY_FROM)


def validate_parity(engine, inventories=_INVENTORIES_UNSET):

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Health regression — validate_parity()

fans out to 6 callees (efferent coupling).

Grounded coupling-delta finding (deterministic), not an LLM guess.

return children


def validate(manifest):

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Health regression — validate()

fans out to 8 callees (efferent coupling).

Grounded coupling-delta finding (deterministic), not an LLM guess.

Comment thread scripts/release_smoke.py
@@ -30,7 +99,13 @@ def inspect_index(digest):

def verify_runtime(image, versions, hub_commit, release_version, inventories):

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Health regression — verify_runtime()

fans out to 8 callees (efferent coupling).

Grounded coupling-delta finding (deterministic), not an LLM guess.

return {**descriptor, "descriptor_sha256": digest(raw), "sums_sha256": digest(sums)}


def wire_case(root, *, release=PARITY_CAPABILITY_FROM):

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Health regression — wire_case()

10 callers depend on it (afferent coupling).

Grounded coupling-delta finding (deterministic), not an LLM guess.

return manifest, built, identity, inventory


def finalization_case(manifest, built, *, published=None):

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Health regression — finalization_case()

fans out to 6 callees (efferent coupling).

Grounded coupling-delta finding (deterministic), not an LLM guess.

@luisleo526
luisleo526 merged commit 83580ac into main Nov 8, 2026
11 checks passed
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