Skip to content

Adopt orphaned #11998 and #12050: re-merge onto main after #12033/#12108/P4 - #12177

Closed
briansrls wants to merge 39 commits into
mainfrom
adopt-12050
Closed

briansrls wants to merge 39 commits into
mainfrom
adopt-12050

Conversation

@briansrls

Copy link
Copy Markdown
Contributor

Auto-opened by session-dashboard for session merry-lark-444.
Pushing to adopt-12050 advances this PR.

Worker attestation

Before flipping this PR to ready for review, confirm each item:

  • Title describes the change (not the session id or branch).
  • PR body summarises what and why (replace the TODO below).
  • Tests run: name the command (e.g. npm test, cargo test) and the result.
  • If this closes a work item, the body contains a Closes #N directive.
  • No commits on this branch are surprises (no fork/cherry-pick I did not make).
  • No secrets / credentials / large binaries staged.

Summary

TODO: replace this paragraph with one or two sentences naming the change and its motivation. Reviewers read this first.

Test plan

  • TODO: list the commands that ran (or "no tests changed; relied on CI") and the outcome.

briansrls and others added 30 commits September 21, 2026 10:00
…'s already is

The rendered main decided the verb itself: it read argv, compared the first word
against three literals, and refused inline at three points with its own message
and its own status. Each of those is a DECISION taken in emitted Rust, where no
.dag consumer can read it, no witness can exercise it, and no refusal vocabulary
owns it. gunbc.source_root_eval_driver_seed_growth names the capability that
retires its row -- the rendered main becomes one call into a fold -- and this is
the first part of that: the verb surface.

The shape is not invented. v2.cli.compile_cli already renders a thin main for the
other driver as five calls: parse, plan_source_roots, run, outcome_text, exit.
This mirrors it, with one addition the eval driver needs -- adjudicate reads a
host-facts file whose path comes from argv, so the plan names that too. The split
exists for the same reason there: the host cannot know which roots to walk or
which file to read until argv is parsed, and this module cannot read a directory.

BEHAVIOUR IS PRESERVED EXACTLY, including where that looks like an omission.
`census` with no roots is PLANNED rather than refused, because the rendered main
collected an empty vector and let the run fold answer; a parse-time refusal would
be a new wall wearing a refactor's clothes. The three refusal messages are
carried verbatim. Exit 2 is the cited misuse code the rendered main used for all
three.

Evidence: ten arms in v2.test.claim.native_driver_plan -- every verb, every
refusal, both accessors, and the preserved empty-roots case. 10 PASS.
Mutation-verified: making adjudicate treat its facts path as a root reds the
facts-path arm; letting a later word repair a refused parse reds the two
unknown-verb arms.

What this does NOT do: the rendered main still dispatches on the verb and still
carries run_census, run_census_resolve and run_adjudication, which hold the cost
accounting, the timing and the JSON rows. Those are the next parts, and each is
separable from this one.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…ispatch is deleted

Review 69524: the plan had no production consumer and the emitted main kept
the same three literals and messages. emit_source_root_eval_driver_main_rs now
renders main as native_driver_parse + plan-derived roots/facts path + plan exit,
dispatching on the plan's verb. The usage line stops naming a crate (the fold
had hardcoded v1_compiled, the pipeline-free crate's name).

Stage0 mirror regen follows.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…hority

Review 69567: native_driver_plan_facts_path had no production consumer (the
rendered main reads facts_path from the Adjudicate verb). Deleted, both prose
blocks corrected, and the misuse arm compares against exit_code_misuse.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Review 69580: the cutover removed main's closing brace with the old tail.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…an-spine

# Conflicts:
#	src/v1/stage0/src/v1_compiler_emit_rust.rs
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…an-spine

# Conflicts:
#	src/v2/compiler/00_compile.dag
…iverse

The driver plan's adjudicate is now: adjudicate <host-facts.tsv> <target-pattern>
<source-root>... The pattern is parsed by extdeps.bazel.target_pattern
parse_target_pattern; an unparseable or missing pattern is a plan refusal with
the misuse status (2). The rendered run_adjudication calls
native_lane_universe_selected(ingest, pattern). The seed lane runner passes the
default //v2/test/... (mirror of native_route_default_pattern).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
(cherry picked from commit 0d10ab3)
…nd over merged main

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…e frontier for unlowered variant fields

Side-chat hold on 318a377: the leading | now has its own production
(type_alias_rhs_lead) lowered by sugar to its rhs, so '= | A | B' and
'= A | B' normalize to the same provenance-free tree. Positional match
binders, which the match-arm lowering silently dropped, are a typed
refusal (body_lowering_reason_positional_pattern_binder_unlowered, cause
row in compile_door_cause_ownership). Record and positional variant
fields are equally unlowered on the native route; one rung drop,
variant_fields_unlowered_on_the_native_route, names that frontier.
Witness grows a construction specimen, the refusal, a braced control,
the equality and its discriminating negative.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
… loses nothing and lowers

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…g it; witness cites the lead production by its real name (review 69768)

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
… the type decl, the construction specimen (an ordinary call) is removed, the positional control is pipe-free

Four identities were refused at the enrolment margin on f49dd9e.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Ledger-Repair-Judged: docs/design-rung-drops.md
Ledger-Rows-Repaired: docs/design-rung-drops.md variant_fields_unlowered_on_the_native_route
Heal-Candidate-Run: 35663756236
…onal refusal removed, braced-green witness deleted, the drop row names the silent shadowing case

The match-arm lowering drops every pattern binder, braced and positional
alike. Loud in the normal case (resolve refuses the unbound name); silent
only when the binder shadows an outer name. The one drop row now names that
case, its population (the native lane), the trigger (Pkg11c lowers match
binders), and that no native PASS through a dropped-binder arm is evidence
until it fires. docs/design-rung-drops.md regenerated.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…ed drop row

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…-ai/gunbc into session/loyal-bear-675

# Conflicts:
#	src/v2/compiler/00_compile.dag
…ssion/loyal-bear-675

# Conflicts:
#	docs/design-rung-drops.md
…ule as a value, anonymous record type, admit_callers clause, else-less if refused at lowering

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…namespace_graft consumes it instead of a _node_projection suffix test

An authored declaration named *_node_projection (v2.std.runtime) was dissolved
at the module body: one silently, two into an ill-formed Conj. Witnesses: the
two-declaration and single-declaration forms, plus a control that restoring the
suffix test turns red.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…ction for heal to re-derive

Two review findings on #12050 (review 69969):

- docs/design-rung-drops.md was stale in both directions: the branch adds two
  rung-drop rows to the roster and the projection gained neither, while its only
  edit reverted a standing drop's section against a pre-live-pair base. The
  generated-artifact driver refused the merge here rather than picking a side, so
  this takes the BASE side verbatim per its declared repair route and leaves the
  re-derivation to heal. Verified by set difference over row identities -- both
  the `slug` bullet and the `### Title — declared ...` heading forms -- that no
  row from either side went dark; a count would not have named which.

- closure_parse_batch_two_test.dag used `Symbol` without importing it. It
  resolved anyway, because the resolver falls through to a global spelling search
  and a .dag import list does not bind today (rostered as
  shadowing_body_local_bypassed_by_global_call_fallback and
  resolution_scope_conflated_with_ownership_scope; #12009 deletes that search).
  So the green proved nothing about the import, and every sibling claim imports
  Symbol explicitly. Bound at the use site.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…alias, three stages ask the parser

Review 69988 on #12050: the migration stopped one link short. Landing the
parser-owned roster while leaving namespace_graft_parse_projection_edge as a
pure pass-through left one concept under two names, and the two downstream
stages consumed the roster THROUGH the graft module rather than from its
producer -- so 02_parse's own annotation ("Every later stage ... asks THIS
predicate") described a state the tree did not hold.

Deleted the wrapper and pointed all seven call sites at
v2.compiler.parse parse_tree_projection_edge: three in namespace_graft, one in
03_name_resolve, one in symbol_index_fill, and the two importing blocks.
symbol_index_fill imported nothing else from namespace_graft, so that import
becomes a direct import of the producer. No new cycle: 02_parse imports neither
consumer, and namespace_graft already imported the predicate.

The annotation at 02_parse:964 is now true as written rather than aspirational;
the stale reference in the batch-two witness annotation is corrected to name the
three consuming stages instead of the deleted alias.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
gunbai-bot Bot and others added 9 commits September 22, 2026 07:12
Ledger-Repair-Judged: docs/design-rung-drops.md
Ledger-Rows-Repaired: docs/design-rung-drops.md variant_fields_unlowered_on_the_native_route
Ledger-Rows-Repaired: docs/design-rung-drops.md admit_callers_discarded_on_the_native_route
Heal-Candidate-Run: 35693269149
# Conflicts:
#	docs/design-rung-drops.md
…ep this branch's two new rows

The merge resolution took the ours side wholesale, and ours was regenerated from a
pre-#12009 base: native_lane_live_pair_expected_red declares standing: Retired, and its
heading lost the RETIRED suffix and its RETIRED block, so the rostered document DESIGN
§4b points readers to reported a retired drop as standing (review 70173).

The resolution now verifies CONTENT, not membership. The earlier check only established
that every row had a heading; that passes while a heading carries the wrong standing.
Every subject across dag/gunbc/rung_drop/ is now joined to its heading and its
standing: Retired compared against the rendered · RETIRED suffix: 77 subjects, 0
mismatches.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
# Conflicts:
#	src/v2/extdeps/languages/dag.dag
…kg11b batch 2

Kept vs superseded, per conflicted path:
- rung_drop roster, languages/dag.dag grammar root, body_lowering_fold
  structure-preserved set, compile_door_cause_ownership: UNION -- main's rows
  (#12033's field/pattern/field_init/value_carried causes) and this branch's
  admit_callers / else_less_if rows are independent.
- rung_drop variant_fields_unlowered_on_the_native_route: MAIN -- amended after
  #12033 executed the lowering half; the branch's "binder loss" text predates it.
- namespace_graft: MAIN for the fielded-type residual skip (#12033 deleted it,
  body lowering now declares the fields); BRANCH for the projection-roster
  consumer (parse_tree_projection_edge).
- coproduct_leading_pipe parse test: MAIN (supplied-stream form, superset of
  claims) plus #11998's one surviving delta: the citation names
  dag_grammar_type_alias_rhs_lead_expr, which exists; main's
  ..._after_eq_expr does not.
- docs/design-rung-drops.md: generated; left for heal to re-derive.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…o over supplied streams

- compile_door_cause_ownership: the union resolution joined the else_less_if row and
  #12033's field_decl row inside one record (duplicate `cause`), which is the floor
  and emit-build red on 44a910c. Two records again.
- closure_parse_batch_two imported cp_normalized/cp_parses(text:) from the coproduct
  test; main converted that module to supplied token streams, so the import no longer
  resolved. The stream -> parse -> normalize route now lives once in
  v2.test.parse.supplied_token_stream_support (supplied_stream_parse /
  supplied_stream_normalize); the coproduct test drops its local copy and imports it,
  and batch two supplies a tokenizer-dumped stream per specimen with a cb2_fidelity_*
  claim against the real tokenizer, instead of importing from another test module.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Ledger-Repair-Judged: docs/design-rung-drops.md
Ledger-Rows-Repaired: docs/design-rung-drops.md admit_callers_discarded_on_the_native_route
Heal-Candidate-Run: 35858188885
# Conflicts:
#	dag/gunbc/rung_drop/roster.dag
#	docs/design-rung-drops.md
Four batch-two claims each paid a full parse+normalize to inspect one result
shape and breached the new-witness eval-step budget. Per DESIGN section 3 the
input is supplied at the claimed interface instead: nullary cb2_parsed_N /
cb2_normalized_N producers (normalized derives from parsed, so each specimen is
parsed once) are enrolled in floor_cross_claim_pure_producers_warm beside the
coproduct test's cps_* rows. The real prepared-grammar parse and normalize still
execute in those producers over streams the cb2_fidelity_* claims prove equal to
the real tokenizer's. No debt row. supplied_token_stream_support now exposes
supplied_parsed_normalize (parse outcome -> normalize) for that derivation.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@briansrls
briansrls marked this pull request as ready for review September 23, 2026 20:40
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-23T20:52:00.689632Z 4a4d922 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@gunbai-bot

gunbai-bot Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Closing: this PR opened automatically on merry-lark-444's archived branch (adopt-12050). Its head 4a4d922 is a pre-heal head of #12050, which has already landed. The branch is stale, and its two-dot diff against main is revert-shaped (178 files, +1372/-11680). Nothing to land. — sent from neat-boar-16

@gunbai-bot gunbai-bot Bot closed this Sep 23, 2026

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4a4d9228b6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

right: dag_grammar_sequence(
left: dag_grammar_terminal(token_class: ^dag_token_lbracket),
right: dag_grammar_sequence(
left: dag_grammar_nonterminal(production: ^dag_production_expr),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Keep admission expressions out of function-body discovery

When an admit_callers item contains a block-bearing expression, such as admit_callers: [{ 1 }], this unrestricted expr creates a dag_surface_fn_body before the declaration's actual body in the parse tree. body_lower_body_from_fn_captured then performs a recursive first-match search for that surface and lowers the admission-list block as the function body, silently ignoring the authored body (for example, { 2 }). Constrain entries to the supported decl_ref shape or navigate positionally to the body after the admission slot.

Useful? React with 👍 / 👎.

Comment on lines +1095 to +1096
left: dag_grammar_nonterminal(production: ^dag_production_expr),
right: dag_grammar_nonterminal(production: ^dag_production_fn_body)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Prevent guard parsing from consuming an empty body

For an else-less guard with an empty block, such as if x {}, parsing the condition through the full expr production consumes x {} as a brace-suffix record construction because empty field-init lists are valid. The following fn_body then sees no opening brace, so this newly supported statement is rejected even though stmt_seq explicitly permits an empty body and the v1 parser disambiguates the condition with its no-brace expression route. Use an equivalent no-brace condition production here.

Useful? React with 👍 / 👎.

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