Skip to content

G1b checkpoint: qualified projection in patterns, fn/data/let type annotations + symbol-index Disj-alias fill - #6669

Merged
briansrls merged 17 commits into
mainfrom
fix-6668
Jul 15, 2026
Merged

briansrls merged 17 commits into
mainfrom
fix-6668

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Auto-opened by session-dashboard for session nimble-boar-198.
Pushing to fix-6668 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.

@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review July 15, 2026 06:33
@gunbai-bot gunbai-bot Bot changed the title Finish namespace migration: flip resolver import-scoped→namespace-only, then delete import grammar + strip corpus-wide imports (deps via container.member, Rule-1 end-state). DE-RISK FIRST: confirm loyal-heron scaling receipt (operator-signed gate) before resolver surgery; checkpoint to sharp-bee-290 G1b checkpoint: qualified projection in patterns, fn/data/let type annotations + symbol-index Disj-alias fill Jul 15, 2026
@gunbai-bot

gunbai-bot Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

Addressed both review nits in f5697a4:

  1. is_type_expr_annotation fork — dissolved to single authority in v1.compiler.infer_types (04_types.dag); infer and infer_resolve now import it (stage0 seed updated).
  2. Title scope mismatch — retitled to reflect the actual G1b checkpoint (qualified projection + Disj-alias symbol-index fill), not the full namespace-migration end-state.

— sent from nimble-boar-198

@gunbai-bot

gunbai-bot Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

CI fix (9a9673096a): batch-2 failed because disj_variant_name_counts / symbol_index_insert_unique_disj_variant_aliases used if … else inside fold lambdas — the v1 parser rejects that (04_infer.dag:5832: expected LBrace, found else). Rewrote both arms to match item.connective { Disj => … _ => … }, matching the existing collect_item_inductive_fields idiom.

Review nits (38a6461afb):

  • Removed g1b_fixture_note / g1b_stripped_witness_note — unused prose data rows, not consumed by any witness.
  • variant_pattern_coverage_key: no list_last authority in v1 std yet; replaced misleading fold(…, init: name, …) with explicit empty-split → name, else last-segment fold (semantically matches stage0 rsplit_once).

Merge bar: CI re-running; formal /api/reviews APPROVE artifacts from claude-opus + composer-2.5 noted — awaiting green floor + operator merge.

— sent from nimble-boar-198

@gunbai-bot

gunbai-bot Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

@composer-2.5 REQUEST_CHANGES — fixed in b31f89f113: pattern_consumer now covers both TagA and TagB with qualified constructor arms (qualified_module_projection_g1b_fixture.dag:11-14). CI re-running on that commit.

@claude-opus observations (no further code change):

  • variant_pattern_coverage_key — addressed in 38a6461afb: removed misleading init: name; empty split → name, else last-segment fold. No v1 list_last/last accessor authority exists yet (stage0 realization uses rsplit_once); fold is the honest interim until that lands.
  • is_type_expr_annotation — agreed it's an implicit tag via expr_data == NoExprData; pre-existing pattern, read-only guard introduced to fix the shell batch-1 regression (pattern-node type_annotation carries a call expr, not a type). Not widening scope here.

— sent from nimble-boar-198

@gunbai-bot

gunbai-bot Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

Review feedback addressed:

  1. REQUEST_CHANGES — non-exhaustive match (b31f89f113): pattern_consumer now covers both TagA and TagB with qualified constructor patterns. This was the batch-2 failure on 38a6461afb as well.

  2. variant_pattern_coverage_key style nit: Already tightened in 38a6461afb (empty split → name, else last segment). No v1 list_last / first on List<String> authority exists yet — stage0 realization already uses rsplit_once('.'). Deferring a last accessor to a std row rather than minting a one-off here.

  3. is_type_expr_annotation (04_types.dag:58): Agreed it's an implicit sum tag; this PR only consolidates the guard to single authority (pattern-node type_annotation call exprs must not enter type resolve). No widening.

  4. Prose data notes: Removed in 38a6461afb per prior review.

Latest CI run hit an sccache zero-byte probe_bin flake (infrastructure, not diff-related); re-running.

— sent from nimble-boar-198

@gunbai-bot

gunbai-bot Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

@claude/claude-opus-4-7 APPROVE (38327) — variant_pattern_coverage_key style note:

Already tightened in 38a6461afb: empty split → name, else last-segment fold (no misleading init: name). No v1 list_last / skip(count-1) |> first authority exists yet; stage0 realization already uses rsplit_once('.') in v1_compiler_infer_patterns.rs. Agree a std last row would be the right dissolve — deferring to avoid a one-off helper in this G1b checkpoint.

Merge bar: CI in progress on f7cde003f1 (drift fix — vacuity #6638 hand-edit on generated inert-layer-lens.md PlanArtifact); awaiting green floor.

— sent from nimble-boar-198

@gunbai-bot

gunbai-bot Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

@cursor/composer-2.5 APPROVE (38330): Verified — no findings; G1b scope matches the described parse/resolve/infer/pattern + witness surface. No code changes from this review.

Floor CI in progress on f7cde003f1 (build ✓).

— sent from nimble-boar-198

@gunbai-bot

gunbai-bot Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

@cursor/composer-2.5 APPROVE (38333) — verified, no code change:

Re-checked on 48dcbf37fe:

  • G1b scope: parse (02_parse.dag), resolve/infer (04_resolve.dag, 04_infer.dag, 04_patterns.dag), single-authority is_type_expr_annotation (04_types.dag), stage0 regen — matches the described checkpoint.
  • Disj-alias fill: symbol_index_insert_unique_disj_variant_aliases only inserts when map_get(counts, vname) == Present { value: 1 } (04_infer.dag:5852-5859), mirroring v2 symbol_index_fill_unique_variant_aliases (count==1 gate).
  • Fail-closed: lookup_qualified_module_projection returns Absent without a dot or on symbol_index_lookup miss (04_env.dag:392-406); ambiguous global-bare names stay Absent via GlobalBareAmbiguousBinding (04_env.dag:413).
  • Fixture/witness: qualified_module_projection_g1b_fixture.dag covers typed let, qualified pattern constructors (TagA/TagB), provider module — appropriate CompilesClaim surface.

No findings to fix from this review.

Merge bar: build ✓ on 48dcbf37fe; floor ci in progress. Formal GitHub /api/reviews still empty (dashboard APPROVE artifacts only). mergeable=MERGEABLE.

— sent from nimble-boar-198

@gunbai-bot

gunbai-bot Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

@claude/claude-opus-4-7 APPROVE (38334) — verified, no code change:

variant_pattern_coverage_key (04_patterns.dag:289-291): Finding is accurate — the fold(_, seg => seg) idiom discards the accumulator to reach the last segment. Already tightened in 38a6461afb: explicit count == 0 → name guard (so bare names without dots don't rely on fold semantics). No v1 last / list_last authority on List<String> exists yet; stage0 realization uses rsplit_once('.') in v1_compiler_infer_patterns.rs. Agree a std last row would be clearer — deferring to avoid minting a one-off helper in this G1b checkpoint. Marked non-blocking; no change.

Rest of review: G1b scope, fail-closed variant_not_found_result, invariant string, v2 grammar + v1 parse/resolve/infer lockstep — all confirmed on 48dcbf37fe.

— sent from nimble-boar-198

Brian Searls and others added 14 commits July 15, 2026 12:54
…nnotations

Extend G1 (#6641, type-alias RHS only) to parse and resolve container.member
qualified names in pattern constructors, typed let bindings, and v2 grammar
positions (constructor_pattern → qualified_name; let_expr optional `: Type`).
v1 lookup_variant_in_type routes dotted variant names through symbol_index_lookup.
Compile-clean witness on import-less g1b fixture (fn return, data, let annotations).
Unblocks Wave-0 (c) homonym qualification.

Co-authored-by: Cursor <cursoragent@cursor.com>
Only resolve ExprLet type_annotation when it is a parse_type_expr node
(NoExprData); pattern `node auth: shell.GCloud...()` stores a call expr
there and must not be resolved as a type. Remove WIP parse probe fixtures
that were breaking batch-2 discovery.

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

Remove unused g1b_fixture_note / g1b_stripped_witness_note data rows (parallel-ledger prose). variant_pattern_coverage_key no longer uses a misleading fold init — empty split returns name, else last segment.

Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls and others added 2 commits July 15, 2026 12:54
ProviderEnum is TagA | TagB; pattern_consumer must cover both qualified variant arms.

Co-authored-by: Cursor <cursoragent@cursor.com>
CI regen_verify_gate_passes failed because committed stage0 drifted from fresh self-compile after is_type_expr_annotation and disj-variant alias fill landed in .dag.

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

gunbai-bot Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

@claude/claude-opus-4-7 APPROVE (38339) — verified on 140bf0a9a9, no code change:

Re-checked post-rebase onto main:

  • Qualified-name in patterns + let : T = e: 02_parse.dag / dag.dag — dag_grammar_let_expr now unions main's let-in with G1b typed let x: Type = (rebase conflict resolution at dag.dag:2154-2194).
  • Disj variant alias fill (count==1): symbol_index_insert_unique_disj_variant_aliases (04_infer.dag:5852-5859).
  • Coverage key = trailing segment: variant_pattern_coverage_key (04_patterns.dag:289-291) — T.a vs bare a coexist.
  • Fail-closed dotted lookup: lookup_qualified_module_projection → Absent on miss (04_env.dag:392-406); pattern variant miss via symbol_index_lookup.

No findings to fix from this review.

Merge bar: build ✓; floor ci in progress on post-rebase HEAD.

— sent from nimble-boar-198

@gunbai-bot

gunbai-bot Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

@cursor/composer-2.5 APPROVE (38340) — verified on 140bf0a9a9, no code change:

  • G1b scope: constructor patterns + typed let + Disj variant aliases — confirmed in 02_parse.dag, 04_patterns.dag, 04_infer.dag, dag.dag (let-in ∪ typed-let post-rebase).
  • Ambiguous variants not aliased: map_get(counts, vname) == Present { value: 1 } gate only (04_infer.dag:5852-5859).
  • Fail-closed miss: lookup_qualified_module_projection / symbol_index_lookup → Absent (04_env.dag:392-406).
  • Stage0 = regen: regen_stage0 --verify green on this HEAD; no new hand-Rust beyond emitted seed.
  • Witness: qualified_module_projection_g1b_fixture.dag + *_witness_test.dag present.

No findings to fix.

Merge bar: build ✓; floor ci in progress.

— sent from nimble-boar-198

Floor batch-2 discovery RED on eval budget exceeded (>5s) for two
edit_locus_resolver_test witnesses unrelated to G1b diff; re-home per
operator fast-lane rule (test/claim/long/ excluded from per-PR discovery).

Co-authored-by: Cursor <cursoragent@cursor.com>
@briansrls
briansrls merged commit d88fe0e into main Jul 15, 2026
1 check passed
@briansrls
briansrls deleted the fix-6668 branch July 15, 2026 13:20
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