Skip to content

C2.5: generated partition artifact parity with live derived authority - #7948

Closed
briansrls wants to merge 13 commits into
mainfrom
session/quiet-eagle-748
Closed

briansrls wants to merge 13 commits into
mainfrom
session/quiet-eagle-748

Conversation

@briansrls

@briansrls briansrls commented Aug 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add stage0_partition_emitted_membership_oracle_holds in v2.workflow.rust_crate_partition: compares committed gunbc.stage0_crate_partition_generated.generated_partition_crate_rows against live stage0_partition_crate_rows_outcome per package_name (modules + reexport_packages as order-independent sets).
  • Enroll discriminating witness stage0_partition_emitted_reference_oracle_test.dag with RED controls for planted module-list mismatch and row-level divergence.
  • Independent of C2's frozen baseline receipt — this catches stale or hand-edited generated artifacts that diverge from the authority derivation.

Stack note: This branch includes the C2 derived-membership commits (quiet-lark-120) that C3 builds on. Merge C2 first, or land this stack together.

Worker attestation

  • Title describes the change (not the session id or branch).
  • PR body summarises what and why.
  • Tests run: claim_batch on stage0_partition_emitted_reference_oracle_test.dag — 6/6 PASS.
  • No secrets / credentials / large binaries staged.

Test plan

  • claim_batch --source-root dag --source-root src/v2 --entry src/v2/test/claim/stage0_partition_emitted_reference_oracle_test.dag --functions stage0_partition_emitted_membership_oracle_holds_witness,stage0_partition_emitted_membership_oracle_refusal_propagates_witness_holds,stage0_partition_emitted_membership_oracle_row_count_holds,stage0_partition_emitted_membership_oracle_red_wrong_module_holds,stage0_partition_emitted_membership_oracle_red_missing_module_holds,stage0_partition_emitted_row_matches_authority_row_red_holds — all 6 PASS

@gunbai-bot gunbai-bot Bot changed the title C3: emitted-reference oracle for partition membership C3: emitted-reference oracle for stage0 partition membership Aug 6, 2026
@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review August 6, 2026 23:10
@gunbai-bot

gunbai-bot Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Addressed review 49718: removed both duplicate stage0_unit_reexports_package definitions from rust_crate_partition.dag (lines 767 and 818 on the reviewed SHA). Verified neither was called — the only live path is stage0_derivation_unit_reexports_package at the shared-dependency disposition site. Re-ran C3 witnesses (6/6 PASS) and a C2 membership sample (3/3 PASS) on 86618e2cad.

— sent from quiet-eagle-748

@gunbai-bot
gunbai-bot Bot marked this pull request as draft August 7, 2026 05:01
@gunbai-bot gunbai-bot Bot changed the title C3: emitted-reference oracle for stage0 partition membership C2.5: generated partition artifact parity with live derived authority Aug 7, 2026
Brian Searls and others added 13 commits August 7, 2026 17:20
…e graph.

Dissolve hand-maintained per-crate module rosters by computing raw per-unit reaches, applying a global owner rule with typed SharedDependencyThroughPackage | AssignmentConflict collision policy, and refusing on non-convergence instead of returning truncated closures.

Co-authored-by: Cursor <cursoragent@cursor.com>
…ivation.

AssignmentConflict now carries the actual reacher unit list instead of fabricated runtime-vs-std_core placeholders, with witnesses proving the assign-module refusal path reports truthful reachers. Roster registration stays DeclaredFrontier until edge census derives from source imports.

Co-authored-by: Cursor <cursoragent@cursor.com>
Review 49652: compare derived membership to a frozen origin/main baseline instead of row.modules (same derivation), and route emitted crate rows through stage0_unit_reexport_packages so ownership and emit metadata cannot drift.

Co-authored-by: Cursor <cursoragent@cursor.com>
The prior control compared derived to derived-plus-one-element (always true). Now asserts synthetic_unassigned_module is absent from every unit's derived membership; execution-confirmed red when seeded into runtime reach.

Co-authored-by: Cursor <cursoragent@cursor.com>
Names 34210a0 as the pre-C2 hand-roster snapshot, and records that baseline updates must be graph-authored reviewable diffs — never pasted derivation output.

Co-authored-by: Cursor <cursoragent@cursor.com>
…fixtures.

Refusal now propagates through stage0_partition_crate_rows_outcome instead of collapsing to empty rows; reach dispositions populate SharedDependencyThroughPackage; enrolled witnesses plus an independent planted graph fixture exercise the mechanism.

Co-authored-by: Cursor <cursoragent@cursor.com>
…omes.

Remove stage0_interim_explicit_assignment, stage0_partition_parameter, and the two list projections that collapsed Stage0DerivedPartitionRefused; receipt and R4 now call stage0_interim_explicit_assignment_outcome directly and the carrier note matches the code.

Co-authored-by: Cursor <cursoragent@cursor.com>
Compare committed generated_partition_crate_rows against the live
stage0_partition_crate_rows_outcome authority so stale or hand-edited
generated artifacts cannot drift silently from derived membership.

Co-authored-by: Cursor <cursoragent@cursor.com>
C2 refactor left two identical fn names in rust_crate_partition.dag;
call sites already route through stage0_derivation_unit_reexports_package.

Co-authored-by: Cursor <cursoragent@cursor.com>
Replace count+any matching with duplicate-key refusal and per-key authority lookup so two emitted rows cannot both satisfy one authority row.

Co-authored-by: Cursor <cursoragent@cursor.com>
Build the real C3 oracle as v2.workflow.stage0_partition_emitted_reference_oracle: observe committed partition crate lib.rs pub mod declarations via filesystem_read, identity-join against stage0_partition_crate_rows_outcome derived membership (empty observation refuses first), and verify use crate:: top-level references resolve inside derived membership or declared reexport closure. Move C2.5 committed-artifact parity to v2.workflow.stage0_partition_generated_parity so rust_crate_partition authority no longer imports its own generated projection; fix duplicate-blind set equality in stage0_string_lists_equal_as_sets.

Co-authored-by: Cursor <cursoragent@cursor.com>
…ed partition.

Regen verify failed because gunbc_stage0_crate_partition_generated.rs and stage0_std_core lib.rs pub mod order drifted from fresh self-compile after C2 derivation changes.

Co-authored-by: Cursor <cursoragent@cursor.com>
@gunbai-bot
gunbai-bot Bot force-pushed the session/quiet-eagle-748 branch from 36aae9a to 0ed0525 Compare August 7, 2026 17:21
@gunbai-bot

gunbai-bot Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Wind-down close (operator directive, still-bat-561)

State: cleanly closed — not merge-ready. Head 0ed0525def.

What was established (green by local claim_batch, enrolled witnesses)

C2.5 — generated-artifact parity (v2.workflow.stage0_partition_generated_parity):

  • Separate checker imports both gunbc.stage0_crate_partition_generated and live stage0_partition_crate_rows_outcome; authority no longer imports its own generated projection.
  • Compares all shared fields: package_name, crate_dir, kind, modules, reexport_packages, carries_non_empty_wrappers.
  • Duplicate-safe set equality via shared stage0_string_lists_equal_as_sets (duplicate-blind fix in rust_crate_partition).
  • 5/5 witnesses PASS locally (stage0_partition_generated_parity_test.dag).
  • Roster registration not promoted to ByDerivation.

C3 — emitted-reference oracle (built on same branch, separate from C2.5 scope):

  • v2.workflow.stage0_partition_emitted_reference_oracle + stage0_partition_emitted_observation_parse: independent lib.rs pub mod observations via filesystem_read, identity-join against derived membership (empty observation refuses first), use crate:: top-level reference resolution.
  • 12/12 witnesses PASS locally (stage0_partition_emitted_reference_oracle_test.dag).

Regen: gunbc_stage0_crate_partition_generated.rs + stage0_std_core/src/lib.rs module-order sync (0ed0525def); regen_stage0 --verify passes locally. CI regen job green on this head.

Rebase: merged cleanly onto current main at 0ed0525def (C1 conflict in rust_crate_partition.dag resolved — C1 helpers route through outcome API).

What was NOT done (six C2.5 corrections — operator verdict msg_94fa5ba2)

# Correction Status
1 Rebase after C2 (#7936) and remove stacked C2 diff from this PR Not done — branch still carries 10 C2 commits (cabcefba8a…8b42d3d62e) atop main; should be C2.5-only delta after C2 lands
2 Checker outside rust_crate_partition Done
3 Compare every shared semantic field Done
4 Duplicate-safe set equality (shared helper) Done
5 Do not promote roster to ByDerivation Done
6 Do not claim C3 completion in PR body/carrier Not done — body still describes pre-rescope oracle; branch also contains full C3 implementation mixed with C2.5

CI status at close

  • build, regen, heal_generated_artifacts: pass
  • ci floor: fail — unrelated witness budget flake: cross_module_qualified_reference_emits_call_from_correct_module (qualified_declaration_reference_emit_witness_test.dag) killed at 5168ms > 5000ms budget (run 31201921687). All partition witnesses (C2.5 + C3 + C1 compile gate) passed in that run. This is host-variance infrastructure, not a defect in the partition gates — but head is not green-by-execution.

Cold-start pickup for a future session

  1. Land C2 (C2: derive stage0 partition membership from module graph #7936) / ensure main has derived membership.
  2. Open C2.5-only PR: cherry-pick or restack commits stage0_partition_generated_parity + duplicate-blind fix + witnesses only (no C2 stack, no C3).
  3. Open separate C3 PR from stage0_partition_emitted_reference_oracle commits if still wanted.
  4. Update PR body to match C2.5 scope; keep draft until CI green on exact head.

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