Repository navigation
feat(v3): parser staging — runtime_mirrors carriers, parse_generated, regen_parse (not SG-2b) - #589
Conversation
|
This is useful SG-2b groundwork, but it is not SG-2b hard cutover yet. The SG-2b brief was: retire
So from my side this should either be re-scoped as |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: edb6413bf9
ℹ️ 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".
| type SurfaceLiteral | ||
| = IntLit(Int) | ||
| | BoolLit(Bool) | ||
| | StringLit(String) |
There was a problem hiding this comment.
Align SurfaceLiteral variants with existing AST names
parse.dag is introduced as the authority for the parse-layer carriers, but this enum renames literals to IntLit/BoolLit/StringLit instead of the existing Int/Bool/String shape used by the current parser and lowerer. When SG-2b starts generating parse_generated.rs from this file, the generated SurfaceLiteral API will diverge from downstream matches and constructor sites, causing compile-time breakage during the cutover rather than a mechanical replacement.
Useful? React with 👍 / 👎.
|
ChatGPT review in progress... (view conversation) Check back in ~30 minutes for the full review. |
This comment has been minimized.
This comment has been minimized.
|
ChatGPT review in progress... (view conversation) Check back in ~30 minutes for the full review. |
This comment has been minimized.
This comment has been minimized.
|
Latest diff read: this is no longer prep-only, but it still does not converge to SG-2b parse hard cutover as originally briefed. What landed is parser staging:
That means the merged-state authority is no longer handwritten Direction:
So my convergence read is: useful and honest as staging; not converged as SG-2b hard cutover. |
This comment has been minimized.
This comment has been minimized.
briansrls
left a comment
There was a problem hiding this comment.
codex · gpt-5.4 · 4914b7cc
✅ Review (blocking: 0, non-blocking: 1+/1-)
Non-blocking — Strengths
src/v3/compiler/parse.dagThis keeps SG-2b at the right layer:parse.dagowns only the surface carriers, while the recursive-descent body stays implementation detail and the existing parse→lower fact set survives intact.
Non-blocking — Improvements (fix in-PR if easy, else defer to roadmap)
src/v3/compiler/src/bin/regen_parse.rsemit_surface_typesstill mirrors the authority through a hardcoded root-type roster and std-name matches (SurfaceModule,Int,List, etc.), so an SG-2 follow-up should derive the reachable declarations and primitive mapping from the compiled Dag instead of parallel Rust strings.
✅ I did not find a blocking thesis/invariant violation in this SG-2b cutover.
Non-blocking review: emit_surface_types hardcodes root types and stringly primitive mapping parallel to parse.dag; document deferral and point emit_surface_types readers at roadmap-active-deferrals. Made-with: Cursor
|
Wrap-up direction from re-review: I do not think this is converged as What is good in the current diff:
What still blocks convergence:
To get this PR to convergence, pick one of these two endings and make it explicit:
Given the size of the current branch, I recommend option 1 for this PR: land it honestly as staging, then dispatch the remaining parser-authority move as the next lane. So the shortest path to convergence here is: rename/reframe as parser staging, name the scaffold and dissolution trigger, and stop claiming full SG-2b closure. |
Non-blocking review: emit_surface_types hardcodes root types and stringly primitive mapping parallel to parse.dag; document deferral and point emit_surface_types readers at roadmap-active-deferrals. Made-with: Cursor
eaa9924 to
6a7ac7b
Compare
|
Meta-review in progress... (view conversation) Loop-health check: is this review cycle making forward progress, or shifting debt? Posts in ~5-15 minutes. |
|
|
|
|
Record chatgpt-meta-review pending stub at c0161eb… (2026-04-20T04:20:18Z) plus dashboard +3 queued note; pointer-only per session-relay-queue policy. Made-with: Cursor
Record chatgpt-review-error rate_limit for sha 18dfc88… (gunbc-secondary cooldown) and +2 queued dashboard note; pointer-only. Made-with: Cursor
Record chatgpt-review-error rate_limit for meta parent SHA prefix c0161eb… (8min discard) and +1 queued note; pointer-only. Made-with: Cursor
Non-blocking review: emit_surface_types hardcodes root types and stringly primitive mapping parallel to parse.dag; document deferral and point emit_surface_types readers at roadmap-active-deferrals. Made-with: Cursor
Record chatgpt-meta-review pending stub at c0161eb… (2026-04-20T04:20:18Z) plus dashboard +3 queued note; pointer-only per session-relay-queue policy. Made-with: Cursor
90d91f5 to
d394fb6
Compare
Record chatgpt-review-error rate_limit for sha 18dfc88… (gunbc-secondary cooldown) and +2 queued dashboard note; pointer-only. Made-with: Cursor
Record chatgpt-review-error rate_limit for meta parent SHA prefix c0161eb… (8min discard) and +1 queued note; pointer-only. Made-with: Cursor
d7d84b4 to
6a2572e
Compare
briansrls
left a comment
There was a problem hiding this comment.
codex · gpt-5.4 · c0161ebd
✅ Review (blocking: 0, non-blocking: 1+/1-)
Non-blocking — Strengths
src/v3/compiler/parse_parser_body.txtThe staged parser body is documented as temporary semantic authority with a concrete dissolution trigger, so this lands as tracked scaffold rather than hidden dual authority.
Non-blocking — Improvements (fix in-PR if easy, else defer to roadmap)
docs/history/roadmap-active-deferrals.mdThe new SG-2 staging summary says runtime_mirrors.dag is omitted from the bootstrap COMPILER_FILES bundle, but build.rs/bootstrap.rs now keep it in the normal bootstrap and omit it only in the dedicated compile_runtime_mirrors_authority_dag path; fix the prose so the authority story stays factual.
ROADMAP — Verified
- regen_parse string-mirror paydown: The follow-up now explicitly names the hardcoded root roster/std-name mapping, bounds the debt, and gives a named dissolution trigger.
ROADMAP — Incomplete
- SG-2b hard cutover: The PR correctly leaves SG-2b open because parse_parser_body.txt still holds semantic parse logic.
✅ The parser-staging cutover is honestly scoped, the handwritten parser authority is retired cleanly, and I did not find a blocking thesis/invariant violation in the diff target.
This comment has been minimized.
This comment has been minimized.
- session-relay-queue: Codex c0161eb… (0 blocking, non-blocking doc + strengths). - roadmap-active-deferrals: runtime_mirrors.dag is in production COMPILER_FILES; tokenize.dag omitted; regen_parse uses compile_runtime_mirrors_authority_dag alternate bootstrap (Codex factual correction). Made-with: Cursor
briansrls
left a comment
There was a problem hiding this comment.
codex · gpt-5.4 · 0ed8784f
✅ Review (blocking: 0, non-blocking: 3+/0-)
Non-blocking — Strengths
src/v3/compiler/src/lib.rscompile_runtime_mirrors_authority_dagstays fail-closed by routing the special bootstrap path through tokenize, parse, strict lower finalization, and infer instead of introducing a second semantic shortcut.src/v3/compiler/parse_parser_body.txtThis is tracked scaffold rather than hidden debt: the file names its temporary authority role, bounds it to parser logic, and gives a concrete SG-2b dissolution trigger.src/v3/compiler/tests/integration/sg2_parse_authority_test.rsThe new SG-2 ratchet covers both halves of the staging contract by checking thatruntime_mirrors.dagcompiles on the fixture-skipping path and thatregen_parsereproduces the checked-in generated module.
ROADMAP — Verified
- regen_parse authority debt tracking: The remaining
regen_parseRust-string mirroring from prior review is now explicitly documented, bounded, and tied to the nextruntime_mirrors.dagchange or a dedicated SG-2 follow-up.
✅ I did not find a new blocking thesis or invariant violation in this parser-staging cutover.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
The conversation page did not render any content. The bot will start a fresh conversation on the next push. |
|
The conversation page did not render any content. The bot will start a fresh conversation on the next push. |
|
The conversation page did not render any content. The bot will start a fresh conversation on the next push. |
briansrls
left a comment
There was a problem hiding this comment.
codex · gpt-5.4 · 8100b9a8
✅ Review (blocking: 0, non-blocking: 2+/0-)
Non-blocking — Strengths
src/v3/compiler/src/lib.rscompile_runtime_mirrors_authority_dag keeps parser staging on the normal fail-closed tokenize to parse to lower to infer path instead of introducing a parallel unchecked compile boundary.src/v3/compiler/tests/integration/sg2_parse_authority_test.rsThe SG-2 ratchet now checks both the filtered authority compile path and the checked-in parse_generated.rs snapshot using an in-memory render.
ROADMAP — Verified
- parser staging framing: docs/design-pure-bootstrap.md, docs/history/roadmap-active-deferrals.md, and src/v3/SELF_HOSTING.md now consistently describe this lane as parser staging rather than SG-2b closure.
- regen_parse mirror paydown: docs/history/roadmap-active-deferrals.md documents the hardcoded root and type-mapping mirror in regen_parse_emit.rs, bounds it to staging, and gives a concrete dissolution trigger.
ROADMAP — Incomplete
- SG-2b hard cutover: src/v3/compiler/parse_parser_body.txt still owns parser semantics, so the PR correctly lands as parser staging rather than .dag-owned parse logic.
✅ The current +lines read as an honestly scoped parser-staging cutover, and I do not see a new blocking thesis, invariant, or modeling-discipline violation.
|
✅ Review (blocking: 0, non-blocking: 2+/0-) Non-blocking — Strengths
ROADMAP — Verified
ROADMAP — Incomplete
✅ The current +lines read as an honestly scoped parser-staging cutover, and I do not see a new blocking thesis, invariant, or modeling-discipline violation. |
Findings
Good things worth calling out:
VerdictAPPROVE_WITH_COMMENTS. Scoped, honest parser-staging cutover with dissolution receipts addressed. Two clean-ups before merge (drop the |
…#589) - Remove .claude/scheduled_tasks.lock from version control (session-local; .claude/ remains gitignored). - runtime_mirrors.dag: expand SurfaceItem scaffold receipt to separate SG-2b carrier trigger from DB-16 FnExternalBody cases 1 / 2a / 2c, citing design-fn-external-body-reconciliation.md and roadmap-active-deferrals. - Refresh parse_corpus_manifest.txt (runtime_mirrors line fnv drift). Made-with: Cursor
FindingsNothing blocking in this diff. On the prior blocking concern (Codex
On the prior non-hermetic snapshot concern: On scaffold boundaries ( On fail-closed / facts flow forward: Exploratory observations
VerdictAPPROVE_WITH_COMMENTS — the prior blocking coproduct-ledger gap is resolved, the |
v3 CI failed check-test-timeout: p0_std_render_repeat_string_test:: std_render_repeat_string_and_indent_text_match_interpreter reported ~50s on ubuntu-latest. Add to slow-test-exemptions with ROADMAP/P0 brief authority (same pattern as other cold harness rows). Made-with: Cursor
|
Looking at pr-589.diff directly. What I verified against the reference docs:
Non-blocking observations:
Verdict: APPROVE_WITH_COMMENTS. The prior blocking concern (missing dissolution ledgers on new |
FindingsNothing in this diff that I'd call a concrete violation of the cited documents. The substrate coproducts added to The sg2 authority test is hermetic now: Exploratory observations
VerdictAPPROVE_WITH_COMMENTS — parser staging is honestly framed, new |
Keeps the SG-3f-prep snapshot ratchet aligned with canonical lower.rs after the parser/surface pipeline merge. Made-with: Cursor
Add claude-opus-4-7 api-review row to the #589 relay index; mark prior dashboard relay note on sg2 snapshot hermeticity as superseded. Made-with: Cursor
|
Review metadata
Findings
Verdict APPROVE_WITH_COMMENTS — The parser-staging cutover itself reads cleanly: the new Exploratory observations
|
|
Review metadata
Findings
Verdict: APPROVE_WITH_COMMENTS The parser-staging cutover otherwise reads clean to me: the dedicated bootstrap carve-out is localized, and |
What this is (convergence framing)
This PR converges as parser staging, not as full SG-2b closure. The merged claim matches the diff: Surface carrier shapes are substrate-authoritative in
src/v3/compiler/runtime_mirrors.dag;src/v3/compiler/src/parse_generated.rsis producer-owned generated output fromregen_parse; parse semantics still live in a checked-in Rust fragment until a later lane makes parse logic structurally.dag-owned.Temporary semantic authority
src/v3/compiler/parse_parser_body.txtis the temporary semantic authority for the recursive-descent parse algorithm.regen_parsesplices that fragment intoparse_generated.rsafter emittedSurface*definitions. It is explicit scaffolding with a named paydown (see the file header), not final parser.dagauthority.Named dissolution trigger
Remove
parse_parser_body.txtwhen parse logic is structurally.dag-owned (src/v3/SELF_HOSTING.md§6 — Phase 4a direct port or Phase 4b grammar-as-data) and the regen path emits the full module without any external Rust body fragment, leavingparse_generated.rsas projection only (not a spliced Rust-body host). Same trigger is stated in the header ofparse_parser_body.txt.Ratchets (unchanged intent)
SG-0 / generated-file census and freshness ratchets stay as implemented so this staged boundary stays mechanically honest. Roadmap deferrals for the string-mirror paydown in
regen_parseremain documented indocs/history/roadmap-active-deferrals.md.Opened from session-dashboard for session
quiet-owl-783; body updated for merge convergence.