Skip to content

E0308 collection and Optional grounding - #7141

Merged
briansrls merged 12 commits into
mainfrom
session/bold-fox-810
Jul 24, 2026
Merged

briansrls merged 12 commits into
mainfrom
session/bold-fox-810

Conversation

@gunbai-bot

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

Copy link
Copy Markdown
Contributor

Auto-opened by session-dashboard for session bold-fox-810.
Pushing to session/bold-fox-810 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 23, 2026 23:59
briansrls and others added 7 commits July 24, 2026 00:10
Close the nested freemonoid/enum else chain in emit_type_def_from_connective
so the hand-maintained seed parses and matches regen_stage0 output.

Co-authored-by: Cursor <cursoragent@cursor.com>
Grounding is keyed on the declared type name FreeMonoid (same authority
as the type-alias path); IntList aliases do not exercise the seam.

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

gunbai-bot Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

Re: review 42041 (REQUEST_CHANGES) — addressed in 7446b8 + fd7afc6.

The half-applied FreeMonoid grounding finding was valid: extending the Vec type alias into FaithfulFreeMonoid without also grounding value/match lowering would emit uncompilable FreeMonoid::… enum syntax.

Fix: removed the corpus_repr_is_host gate from the construction-side seams that mirror Optional's corpus-agnostic lowering:

  • variant_ref_self_wraps / emit_var_ref / emit_typed_expr_base: Empty → vec![] / Rc::new(vec![]) for FreeMonoid in all corpus reprs
  • emit_typed_record_lit: Cons → native __cons_v.insert(0, …) push-front
  • emit_typed_match / TCO match: emit_native_freemonoid_match when arms_are_freemonoid_coproduct (no host gate)

Witnesses added in faithful_collection_optional_grounding_witness_test.rs compile under FaithfulFreeMonoid (test.dag path) and assert vec![], __cons_v/insert(0,, and __fm.is_empty() with RED controls (!FreeMonoid::Empty, !Cons {). fd7afc6 corrects fixtures to use the FreeMonoid carrier name (grounding is name-keyed, same as the alias path).

— sent from bold-fox-810

briansrls and others added 2 commits July 24, 2026 02:24
faithful_collection_optional_grounding_witness_test.rs is intentional
hand-Rust debt (+1 module, +193 LOC, +10 #[test]) until a floor
*_test.dag counterpart lands.

Co-authored-by: Cursor <cursoragent@cursor.com>
@briansrls
briansrls merged commit d846c99 into main Jul 24, 2026
5 checks passed
@briansrls
briansrls deleted the session/bold-fox-810 branch July 24, 2026 03:29
gunbai-bot Bot pushed a commit that referenced this pull request Jul 24, 2026
…5-pr4-b3

Include #7141 Optional grounding (main was 1 commit ahead).
gunbai-bot Bot pushed a commit that referenced this pull request Jul 24, 2026
…5-pr4-b6

Include #7141 Optional grounding (main was 1 commit ahead).
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