Skip to content

Lane 2 witness fan-out: field_access + complement family suites (emit-on-demand kernel extension) - #6893

Merged
briansrls merged 3 commits into
mainfrom
witness-family-fanout-lane1
Jul 20, 2026
Merged

briansrls merged 3 commits into
mainfrom
witness-family-fanout-lane1

Conversation

@briansrls

@briansrls briansrls commented Jul 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Extends the merged emit-on-demand kernel witness pattern (#6879) to lane 2 of the ratified width-5 partition: emit_host_field_access and emit_host_complement.

Adds two execution witness suites mirroring the kernel template (P3 ACCEPT matrix: agreement, cold→warm, content-change MISS, wrong-oracle RED, plus pure Share/Recompute/budget-refusal subtests). Updates v1_deletion_plan lane state and emit_on_demand module note.

Not in scope (dissolved per parent handoff): custom partition proposal — stern-lark-430's width-5 partition is ratified; lanes 3–5 are sibling sessions.

Known gap: wet agreement/cold-warm/content-change subtests for field_access and complement RED locally — the base emit_host_*_equals_eval_all_holds claims also fail on main (da0e7c3d), indicating an emitter gap for these families, not a regression from this PR. Pure subtests and the kernel (emit_host_add) suite pass. Execution witnesses remain excluded from floor discovery (witness_exclusion_substrings).

Handoff posted on #6879: #6879 (comment)

Test plan

  • CI green on 9b3f987 (build + ci floor, run 29696710863)
  • Local claim_batch: emit_on_demand_kernel_witnesses PASS; lane 2 pure subtests PASS
  • Local wet subtests for field_access/complement — RED (pre-existing emit-vs-eval gap on main; witness scaffold lands ahead of emitter fix)

@gunbai-bot gunbai-bot Bot changed the title Witness family fan-out lane 1 + width-5 partition proposal: extend the merged kernel (#6879, da0e7c3d) to the next witness family end-to-end, and post the family partition for lanes 2-5 (claim families / wet receipts / lens gates per v1_deletion_plan witness_family_fanout) Lane 2 witness fan-out: field_access + complement family suites (emit-on-demand kernel extension) Jul 19, 2026
@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review July 19, 2026 17:34
@gunbai-bot

gunbai-bot Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Review 39935 (claude-opus APPROVE) — verified, no code changes.

Checked against 9b3f987:

  • Diff is additive only: two lane-2 witness suites (emit_on_demand_field_access_family_witness_test.dag, emit_on_demand_complement_family_witness_test.dag) plus v1_deletion_plan.dag lane_state and emit_on_demand_module_note.
  • Structure mirrors emit_on_demand_kernel_witness_test.dag (imports, P3 ACCEPT matrix, wet-before-share ordering, ReadsLiveTree disposition).
  • Imports resolve to existing fixtures (emit_host_field_access_equals_eval, emit_host_complement_equals_eval, rust_field_access_target_model_staging, rust_logic_complement_target_model_staging).
  • dag_compile_clean on the four touched files: pass.
  • CI run 29697101408: build + ci green (probe_bin sccache annotation present but job passed).

No substrate churn; finding is valid as approval — no fix commit warranted.

— sent from swift-stag-662

@gunbai-bot

gunbai-bot Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Review 39941 (composer APPROVE) — verified, no code changes.

Checked against e23751e (includes review 39937 fix):

  • Lane-2 suites mirror kernel witness pattern; store_over_provider import present in both files.
  • Wet execution: ReadsLiveTree disposition; cold/warm compile_skipped witnesses; wrong-fixture semantic-mismatch RED controls.
  • Planning rows in v1_deletion_plan.dag and emit_on_demand_module_note match lane-2 intent.
  • CI 29697582762 green; mergeable=CLEAN.

Review 39937 (missing import) addressed in e23751e; this approval supersedes it. Merge criteria met from dashboard reviews (39935 + 39941 APPROVE).

— sent from swift-stag-662

@cursor

cursor Bot commented Jul 19, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@gunbai-bot

gunbai-bot Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Review 39949 (claude-opus APPROVE) — verified on 7e3c06f.

Claims checked:

  • Lane-2 fan-out mirrors kernel pattern (field_access + complement witness suites)
  • 10 wet subtests on QuarantineProbeExpectRed in ci_layer_roots.dag with owner/dissolve-on in known_red_frontier_note
  • witness_admission_test.dag consumer row at field_access agreement
  • emit_on_demand_module_note records fan-out ratification
  • v1_deletion_plan.dag edit dropped per your directive (not in diff)
  • Accidentally committed verdict-diagnosis scratch removed in 7e3c06f (investigation artifact only)

No further code changes warranted by this approval.

— sent from swift-stag-662

…esses

Rebased onto main (#6894 lane 3 + #6895 lane 4 landed). Adds native
cold/warm P3 witness suites for field_access and complement families,
quarantine-probe enrollment for pre-red wet subtests, and witness
admission receipt — preserving lane 3 fold_closure probe rows.

Co-authored-by: Cursor <cursoragent@cursor.com>
@gunbai-bot
gunbai-bot Bot force-pushed the witness-family-fanout-lane1 branch from a866974 to a54bd73 Compare July 19, 2026 20:05
@gunbai-bot

gunbai-bot Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Review 39980 (claude-opus APPROVE) — verified on a54bd73, no code changes.

Checked against current HEAD after rebase onto main (#6894 + #6895):

  • Scaffold-only diff (5 files): two new lane-2 witness suites (emit_on_demand_field_access_family_witness_test.dag, emit_on_demand_complement_family_witness_test.dag) mirroring emit_on_demand_kernel_witness_test.dag; store_over_provider import present in both.
  • Quarantine admission: 10 probe_red rows at ci_layer_roots.dag:148-157 for wet P3 subtests (agreement, native cold/warm/cold-then-warm, content-change cold rebuild × 2 families). Lane 3 fold_closure probe rows at :145-147 preserved from main.
  • known_red_frontier_note: per-file diagnosis + owner (swift-stag-662) + dissolve-on (emit_host_field_access_equals_eval_all_holds / emit_host_complement_equals_eval_all_holds greening on main).
  • witness_admission_test.dag: witness_field_access_wet_quarantine_consumer_holds() wired into aggregate.
  • emit_on_demand.dag: one-line lane-2 fan-out note only.
  • Typed verdicts: Accepted/Rejected, Share/Recompute, BudgetRefused/PackedWidth/MaturationReserve — no absorbing fallbacks, no hand-Rust.

Rebase note: prior reviews (39935/39937/39941/39949) were on pre-rebase history; this commit is a clean squash on current main. Awaiting second api-review approval + CI green.

— sent from swift-stag-662

Review 39983: parameterize expected_octet like lane-4 classical_not
witness — primary fixture [0,9,0,0,0] per rust_field_access_emit_host_main_suffix
and emit_host_field_access_equals_eval eval oracle; alt wrong-field uses 1.

Co-authored-by: Cursor <cursoragent@cursor.com>
@gunbai-bot

gunbai-bot Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Review 39983 (composer REQUEST_CHANGES) — fixed in 4c2ec10.

Finding verified: native cold/warm/content-change probes used [0, 0, 0, 0, 0] copied from complement, but rust_field_access_emit_host_main_suffix calls get((9,)) with r.0 (rust_test.dag:1444, rust_field_access_source_text) → stdout [0, 9, 0, 0, 0], matching emit_host_field_access_equals_eval_test.dag eval oracle (emit_field_eval_octet_value(n: 9) for ^dag_binding_param_r).

Fix: parameterize expected_octet on field_access_family_cached_run_with_source / _checks / _cold_then_warm (same pattern as emit_on_demand_classical_not_ingested_family_witness_test.dag). Primary fixture uses 9; content-change alt (wrong-field / pick_lit_one) uses 1.

— sent from swift-stag-662

@gunbai-bot

gunbai-bot Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Review 39986 (claude-opus APPROVE) — verified on 4c2ec10, no code changes.

Checked against current HEAD (includes review 39983 fix: expected_octet on field_access native probes — primary 9 per get((9,)) / rust_field_access_emit_host_main_suffix, alt wrong-field 1):

  • Parallel witness suites for emit_host_field_access + emit_host_complement mirror kernel pattern (emit_on_demand_kernel_witness_test.dag).
  • 10 wet probe_red rows at ci_layer_roots.dag:148-157; known_red_frontier_note carries owner (swift-stag-662), diagnosis, dissolve-on per family.
  • witness_admission_test.dag wires quarantine consumer.
  • Verdicts stay typed (Accepted/Rejected → false); no fail-open arms, no hand-Rust, no new coproducts.
  • Lane 3 fold_closure probe rows preserved at :145-147.

Awaiting second api-review APPROVE + CI green on 4c2ec10.

— sent from swift-stag-662

@gunbai-bot

gunbai-bot Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Review 39987 (composer APPROVE) — verified on 4c2ec10, no code changes.

Confirms review 39983 resolution and overall lane-2 scaffold:

  • field_access + complement suites mirror emit_on_demand_kernel_witness_test.dag
  • 10 wet probe_red rows with owner/dissolve-on in known_red_frontier_note
  • Pure subtests offline via test/claim/execution/ exclusion
  • Field-access native oracle: expected_octet 9 (primary / get((9,)) → [0,9,0,0,0]) and 1 (wrong-field alt → [0,1,0,0,0]) — matches staging rustc suffix + eval oracle
  • No hand-Rust, no parallel authorities, no fail-open arms

With review 39986, api-review bar is 2/2 APPROVE on current HEAD pending CI green.

— sent from swift-stag-662

@briansrls
briansrls merged commit 883cdd9 into main Jul 20, 2026
3 checks passed
@briansrls
briansrls deleted the witness-family-fanout-lane1 branch July 20, 2026 02:51
gunbai-bot Bot pushed a commit that referenced this pull request Jul 20, 2026
…-on-demand kernel extension) (#6893)

* Witness fan-out lane 2: field_access + complement emit-on-demand witnesses

Rebased onto main (#6894 lane 3 + #6895 lane 4 landed). Adds native
cold/warm P3 witness suites for field_access and complement families,
quarantine-probe enrollment for pre-red wet subtests, and witness
admission receipt — preserving lane 3 fold_closure probe rows.

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

* fix: field_access native stdout oracle matches staging host get((9,))

Review 39983: parameterize expected_octet like lane-4 classical_not
witness — primary fixture [0,9,0,0,0] per rust_field_access_emit_host_main_suffix
and emit_host_field_access_equals_eval eval oracle; alt wrong-field uses 1.

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

---------

Co-authored-by: Brian Searls <briansearls1@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls added a commit that referenced this pull request Jul 21, 2026
…s (9/9 families)

The emit-on-demand native_content_change_cold_rebuild legs in the
field_access and complement families (landed in #6893) reused each
family's semantic-mismatch RED fixture as the "different content" tree
and asserted a SUCCESSFUL native run — but a refusal fixture is not a
valid alternative program:

- field_access: the wrong-field tree emits fn get(r: (i32,)) -> i32
  { r.1 } — rustc E0609 (no field 1 on a 1-tuple) -> RunFailed. The
  domain conj models exactly ONE field (r: Rec realized "(i32,)"), so
  no 2-field reading exists; the emitter truncates nothing.
- complement: the swapped-arms tree IS a valid program (the identity
  fn), but the helper hardwired the primary's octets [0,0,0,0,0] while
  identity(True) natively yields [0,1,0,0,0].

Fix mirrors the passing kernel and meet_join legs:

- field_access: new emit_field_eval_alt_descent_producer_tree — same
  root, facts differing only in the descent ranking symbol (digested
  via ranking_dimension_digest) -> different inferred_tree_digest ->
  new native key, emitted Rust stays the valid r.0 program (octet 9).
  Exactly kernel_alt_subject_tree's same-root/different-facts pattern.
  The now-dead wrong-field arrow producer is deleted (the wrong-field
  BODY stays as the eval-side RED control in wrong_fixture_refuses).
- complement: thread expected_octet per tree (meet_join pattern);
  primary legs expect 0, the swapped-arms alt run expects its derived
  1. The swapped fixture keeps its RED role in the equals-claim leg.

Verified by execution on srv1 (fix-test @ c7d53ac + this change):
both previously-red legs PASS, and all 7 aggregate fns PASS wet —
kernel 100.8s, field_access 88.6s, complement 90.2s, match_loop_fold
105.3s, meet_join 87.0s, variant_construct 88.1s,
classical_not_ingested 127.9s — 9/9 witness families executed as
emitted native Rust agreeing with the interpreted oracle.
cargo fmt --all --check clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
briansrls added a commit that referenced this pull request Jul 22, 2026
…em on the falsifier wet cadence (#6990)

* Fix native witness path: sort EmitHostTransportResult fields at construction

fields_get resolves record fields by binary search on Symbol id, so a
multi-field intrinsic record must be sorted at construction. Both
EmitHostTransportResult builders (emit_host_run_transport + _cached) built
their 7-field vec in declaration order, which is interning-order-dependent:
it happened to be sorted until #6904's admission wiring interned additional
symbols first, after which .success lookups failed ('no field success on
type EmitHostTransportResult') and all 9 emit-on-demand families broke on
their wet legs — invisible to CI because test/claim/execution/ is excluded
from both hermetic discovery and the offline roster. Wrap both in
sorted_fields (the existing invariant helper). Class audit: these were the
only multi-field raw-vec Record constructions in the interpreter; the other
16 raw sites are 0/1-field (trivially sorted).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* Fix content-change legs: valid alt trees, not the RED refusal fixtures (9/9 families)

The emit-on-demand native_content_change_cold_rebuild legs in the
field_access and complement families (landed in #6893) reused each
family's semantic-mismatch RED fixture as the "different content" tree
and asserted a SUCCESSFUL native run — but a refusal fixture is not a
valid alternative program:

- field_access: the wrong-field tree emits fn get(r: (i32,)) -> i32
  { r.1 } — rustc E0609 (no field 1 on a 1-tuple) -> RunFailed. The
  domain conj models exactly ONE field (r: Rec realized "(i32,)"), so
  no 2-field reading exists; the emitter truncates nothing.
- complement: the swapped-arms tree IS a valid program (the identity
  fn), but the helper hardwired the primary's octets [0,0,0,0,0] while
  identity(True) natively yields [0,1,0,0,0].

Fix mirrors the passing kernel and meet_join legs:

- field_access: new emit_field_eval_alt_descent_producer_tree — same
  root, facts differing only in the descent ranking symbol (digested
  via ranking_dimension_digest) -> different inferred_tree_digest ->
  new native key, emitted Rust stays the valid r.0 program (octet 9).
  Exactly kernel_alt_subject_tree's same-root/different-facts pattern.
  The now-dead wrong-field arrow producer is deleted (the wrong-field
  BODY stays as the eval-side RED control in wrong_fixture_refuses).
- complement: thread expected_octet per tree (meet_join pattern);
  primary legs expect 0, the swapped-arms alt run expects its derived
  1. The swapped fixture keeps its RED role in the equals-claim leg.

Verified by execution on srv1 (fix-test @ c7d53ac + this change):
both previously-red legs PASS, and all 7 aggregate fns PASS wet —
kernel 100.8s, field_access 88.6s, complement 90.2s, match_loop_fold
105.3s, meet_join 87.0s, variant_construct 88.1s,
classical_not_ingested 127.9s — 9/9 witness families executed as
emitted native Rust agreeing with the interpreted oracle.
cargo fmt --all --check clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* Enroll the 9 emit-on-demand native families on the falsifier wet cadence

The 2026-07-20 breakage proved this class invisible to CI. The nightly wet
lane is the established home (same emit->build->run->equals class as the
self-host template row); per-PR stays hermetic. Full CI-on-v2 (P6) remains
gated on the is_hermetic->Admitted flip + the result store.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* Effects flip + declared durable native cache (CI-on-v2 P6 rails)

FLIP (build_transport_admission.dag:20's declared step, operator-assigned):
emit_host_run_transport(_cached) intrinsics gain a leading admission argument
and run ONLY on an Admitted verdict, in every mode — the blanket is_hermetic()
early-returns are deleted (the law is path containment, not a mode bit).
emit_host.dag threads the verdict from the Admitted match arm; the only two
raw call sites live inside run_host_process_admitted. Unit tests: Admitted
passes hermetic; EffectOutsideGrant/missing verdict refuse typed, every mode.

DURABLE CACHE (first PerRunnerFilesystem realization row):
- GUNBC_NATIVE_CACHE_ROOT rebases the declared /tmp/gunbc_ scratch prefix
  (root is WHERE, never WHAT — content-hash path components stay the key);
  exported in the shared CI prelude at RUNNER_TOOL_CACHE/gunbc-native, which
  survives the RUNNER_TEMP wipe.
- GUNBC_CI_NATIVE_CACHE_COLD_CONTROL falsifier step (widen-only, the
  compile-clean cold-control pattern) re-runs the wet receipt batch cold via
  gunbc_falsifier_native_cache_cold_batches.
- [native-cache] key/compile_skipped receipt line per cached invocation.
- extdeps/realization/native_artifact_cache.dag: the catalog row (eviction:
  Manual — honest today; SizeBounded is the named dissolve-on).
- 7 family cache-root literals consolidated onto std.emit_on_demand
  emit_on_demand_family_cache_root (single prefix authority).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* cargo fmt: flip unit-test asserts

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* Native-cache evict intrinsic: one rebase authority for both lifecycle sides

With GUNBC_NATIVE_CACHE_ROOT set, a raw shell.Remove on the .dag-composed
/tmp path would miss the rebased workspace and falsely leave it warm — the
cold/content-change legs would red on the second run. Extract the rebase
into native_cache_rebase_workspace_dir and route eviction through a new
emit_host_native_cache_evict intrinsic (wet-only, idempotent) sharing it
with the cached transport. Registry row in 04_method.dag (regen to follow).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* Regen seed: emit_host_native_cache_evict registry row

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* Regen ci.yml + falsifier.yml: native-cache root export + cold-control step

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* Cold-control roster: only cold-valid legs (agreement + native_cold)

Probe receipt: under GUNBC_CI_NATIVE_CACHE_COLD_CONTROL=1 the cold_then_warm
legs correctly FAIL (the control destroys the warm-ness they assert), so the
falsifier cold step must not run the full aggregates — it runs the 9-leg
cold-valid roster (falsifier_native_cache_cold_entries) instead. The warm
nightly batch keeps the full aggregates.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* Reconcile merge-crossed witnesses: backstop sum gains native-cache cold-control term; template roster 2 -> 9

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Sudoers roster lambda: named-helper inference (closure-order-sensitive 'T' failure) + regen deploy scripts

The unannotated field-access lambda (#7047's form) fails inference as 'no
field command_path on type T' when this branch's added modules shift the
closure; a named helper with explicit params gives inference the call-arg
constraint both parse paths accept. Generator ExitSuccess on the merged
tree (srv1 receipt); seed regen at fixed point (99 files, 0 diffs).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Witness admission: cold roster is an explicit falsifier consumer; family rows expect FalsifierSelfHostWet

Main's new admission test asserted the family rows as OfflineLocalRecipe —
written against pre-enrollment main. The rows now have real executing
consumers: the wet template (aggregates) and the native-cache cold roster
(agreement legs), which consumer_for_explicit_rosters previously did not
consult (misclassifying falsifier-executed rows as offline).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Brian Searls <searlsbrian@gmail.com>
Co-authored-by: gunbai-bot[bot] <289086189+gunbai-bot[bot]@users.noreply.github.com>
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