Repository navigation
Conversation
…ot the undefined bash_lex_rule (main-red fix) #5347 (slice 5d Exit) left `bash_exit_code_lex()` calling a `bash_lex_rule(...)` constructor that is defined nowhere in the tree. The whole-tree CI floor resolves every *_test.dag closure, so this dangling call failed `resolve` for bash_emit_command_test.dag and turned main RED for every open PR (since #5347 merged at 01:12 UTC; pre-#5347 5c493fc was green). Fix per §3 single authority (lexing.dag LexicalPhrase): the lex rule set PROJECTS from the construct's FIXED-spelling spans via `phrase_to_lex_rules(p: phrase([...]))`, exactly as the bound-token sibling `bash_env_prefixed_cargo_lex` does — NOT a direct rule constructor (the "authored three times that could silently disagree" anti-pattern). Only the `exit ` keyword is a fixed span; the exit code is an emit-time BOUND token (^bash_token_exit_code via binding_spellings), so it contributes no literal lex rule — preserving the original single-rule behavior bit-for-bit. NOTE: this is a tighter fix than the two-span suggestion (incl. the code span) — a LexicalPhrase is fixed-spelling-only by contract, so the bound code cannot be a span; a literal span for it would over-generate a spurious rule. Confirmed with the bash arc owner (warm-badger-46) who also cleared the colliding bash_lex_rule constructor in #5363. Verified by execution (prebuilt claim_batch, --source-root dsl --source-root src/v2): - bash_emit_command_test.dag now RESOLVES clean (43 modules, was resolve-FAIL) - bash_emit_command_accepts / bash_emit_bound_words: PASS - bash_emit_exit_code_{0,1}: PASS - bash_emit_exit_code_1_quoted_wrong_{ne_correct,model,rejects}: PASS (discriminating RED intact) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
Author
|
Superseded — #5356 merged first (01:58Z) carrying a byte-identical inline copy of this one-span |
7 of 8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
main is RED — this unblocks the whole tree
#5347(bash slice 5d Exit) merged afn bash_exit_code_lex()that calls abash_lex_rule(...)constructor defined nowhere in the tree (bash.dag:1095). The whole-tree CI floor resolves every*_test.dagclosure, so this dangling call failsresolveforbash_emit_command_test.dagand turns main RED for every open PR.0624060e90+#5347b9386b8bcf→ failure; the commit just before Bash dissolution slice 5d (Exit — LAST emit-vocab construct): migrate ShellStmt Exit{code:Int} (renders 'exit <code>', e.g. 'exit 1'; live consumer dsl/tools/host_prelude.dag) from the serialize_bash sidecar into a v2 emit row. READ FIRST memory bash-sidecar-dissolution-arc-ownership §5d DISPATCH BR #53475c493fcf3e→ success.Fix (§3 single authority)
lexing.dag'sLexicalPhraseis the single authority — lex rules project from the construct's fixed-spelling spans viaphrase_to_lex_rules(p: phrase([...])), exactly as the bound-token siblingbash_env_prefixed_cargo_lexdoes. A direct rule constructor is the "authored three times that could silently disagree" anti-pattern that comment forbids.Only the
exitkeyword is a fixed span; the exit code is an emit-time bound token (^bash_token_exit_codeviabinding_spellings), so it contributes no literal lex rule — preserving the original single-rule behavior bit-for-bit.Verified by execution
claim_batch --source-root dsl --source-root src/v2:bash_emit_command_test.dagnow RESOLVES clean (43 modules; was resolve-FAIL)bash_emit_command_accepts,bash_emit_bound_words: PASSbash_emit_exit_code_{0,1}: PASSbash_emit_exit_code_1_quoted_wrong_{ne_correct,model,rejects}: PASS (discriminating RED intact)🤖 Generated with Claude Code