chore(docs): sync v0.11.6 batch into SPEC + SKILL.md#337
Merged
Conversation
Adds a row to the Cross-language gotchas table linking to ILO-P021 with the canonical fix (negate the sum: `- 0 +*a b *c d`), plus a short prose note explaining why the trap is silent without the diagnostic. Mirror in SKILL.md as gotcha #13. Spec source for the v0.11.6 batch.
#332 widened parse_prefix_binop to dispatch to call parsing when the ident at the operand cursor is a known-arity fn or builtin and the next token can start another operand. Update the Operands section to match: `wh >len q 0{body}` now parses as expected instead of tripping ILO-P003, and the bind-first guidance is reframed as the fallback for shadow/arity cases, not the always-rule. Parallels the prefix-?? widening from #310.
#330 sugared `?h a b` (bool subject, no leading comparison op, no braces) to ternary parsing. The brace form `?h{a}{b}` and the comparison-led prefix form `?=h true a b` were already documented; fill in the third shape next to them with the rationale (6 chars for `?h 1 0` vs 8 for braces / 12 for the eq-prefix form) and a note on how the match/ternary disambiguator routes each variant.
#335 threaded span_bits through 12 JIT runtime-error helpers so the `labels` array in JSON diagnostics is populated for the same shapes that tree and VM already covered. Note the parity in the Error output formats section, with the helper list and the pre-v0.11.6 empty-labels symptom to help agents notice stale binaries.
Two CLI changes from the v0.11.6 batch: - #329: `--run-tree` / `--run-vm` / `--run-cranelift` now auto-pick `main` on multi-fn files, matching the default engine. The pre- v0.11.6 behaviour of picking the first declared fn surfaced as three different symptoms (misleading arity error, silent nil, bare 'compilation failed' string). - #328: looks_like_subcommand_name accepts hyphenated idents per the SPEC `[a-z][a-z0-9]*(-[a-z0-9]+)*` shape, so `list-orders` reads as a subcommand. Non-ident shapes (`/tmp/data.json`, numbers, trailing/doubled dashes) still route to main as positional args. Spec out both rules in the CLI invocation section and refresh the SKILL.md Running block with worked examples.
Picks up the v0.11.6 doc-sync edits in the preceding commits. Pure build.rs output; no manual changes.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
danieljohnmorris
added a commit
that referenced
this pull request
May 17, 2026
fifteen fixes since 0.11.5, all from rerun5/rerun6 personas plus standing asks: ListView foundation (#334), window-text-perf reshape via ListView (#336), inner-flt predicate inlining (#340), double-minus trap ILO-P021 (#331), bare-ident bang silent-nil regression (#324), Cranelift JIT span plumbing (#335), bool-prefix ternary (#330), wh prefix-cond reparse (#332), --run-engine auto-pick main (#329), subcommand helper hyphens+non-ident (#328), runtime error spans (#335), persona-diagnostic batch 3 (#327), rgxall1+ct (#333), single-line body diagnostic (#322 carry), lambda type-var defensive test (#326), N-deep prefix arity error (#339), prefix-minus span column drift (#338), doc-sync (#337).
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.
Summary
Doc-sync PR closing the gaps surfaced by the v0.11.6 PR completeness audit. Six items landed in the parser / CLI / runtime but the SPEC and SKILL.md descriptions still reflected pre-v0.11.6 behaviour. No code changes; SPEC.md is the source of truth and
build.rsregeneratesai.txt+ the SKILL.md spec mirror from it.What's in the diff
One focused commit per item, plus a final regen commit:
docs: note ILO-P021 double-minus prefix-binop trap in SPEC + SKILL.md(fix: reject double-minus prefix-binop trap (ILO-P021) #331)docs: prefix-binop operands now expand known-arity calls(fix: prefix-binop operand expands known-arity calls #332)wh >len q 0{...}parses as intended. Reframes the bind-first rule as the fallback for shadow / arity cases.docs: document bare-bool prefix ternary shape `?h a b`(parser: bare-bool prefix ternary?h a b#330)?h{a}{b}and the eq-prefix?=h true a b, with the 6/8/12-char rationale and a note on how the match/ternary disambiguator routes each variant.docs: Cranelift JIT runtime errors now carry source spans(Thread source spans through Cranelift JIT runtime-error helpers #335)docs: CLI auto-picks main on engine flags + subcommand dispatch rules(cli: hyphenated subcommands + non-ident positionals route to main (#320 follow-up) #328, cli: auto-pick main on --run-tree / --run-vm / --run-cranelift #329)--run-tree/--run-vm/--run-craneliftnow auto-pick main on multi-fn files. Hyphenated idents likelist-ordersroute to a subcommand fn; non-ident shapes (paths, sigils, numbers) route to main as positional args. SKILL.md Running block refreshed with worked examples.build: regenerate ai.txt and SKILL.md spec mirrorbuild.rsoutput catching the preceding SPEC edits.Test plan
cargo test --release --features cranelift --test skill_mdpasses (9/9).cargo build --release --features craneliftafter each SPEC edit confirmsai.txt+ SKILL.md mirror stay consistent (so the CIgit diff --exit-code ai.txtcheck will be clean).ai.txt: ILO-P021, bare-bool prefix ternary, prefix-binop call expansion, Cranelift labels, auto-pick-main, and subcommand dispatch all present.Follow-ups
None planned. If a future feature adds a stable error-codes registry section to SPEC.md, the ILO-P021 note could move there from the Cross-language gotchas table.