fix: P2 bundled diagnostic improvements from rerun7#342
Merged
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Personas reaching for Haskell/Rust-style \x{body} or \x -> body inside
HOFs (map, flt, srt) saw a bare ILO-L001 'unexpected token \' with no
path forward. Logos rejects the leading backslash before we ever see the
intended shape, so the agent's first retry was a guess.
Detect the shape at the L001 site: \ followed by an ident-shaped run and
then { or ->. Emit ILO-L001 pointing at the canonical parenthesised
lambda (x:t>r;body) with a concrete map example. Lone \ and \foo with
no brace/arrow fall back to the generic hint.
Add the entry to the Cross-language gotchas table in SPEC.md (which
mirrors into ai.txt and SKILL.md via build.rs) and to the numbered
gotchas list in SKILL.md. New examples/backslash-lambda-hint.ilo
demonstrates the three common shapes (map, flt, srt) and runs across
every engine via the example harness.
quant-trader rerun7.
detect_prefix_precedence_trap suppresses on LParen predecessor since the
parenthesised form is the canonical disambiguation the hint itself
suggests. But authors using list literals ([*/a b c]) or brace-bodied
expressions ({*/a b c}) have applied the same explicit-grouping
discipline, just with different delimiters. The hint still fired and
spammed those shapes with self-contradictory advice.
Extend the immediate-predecessor suppression list to include LBracket
and LBrace alongside LParen. Bare *\/a b c after =/;/etc still fires.
Adds three regression tests (bracket-grouped at all four pair shapes,
nested paren-inside-brackets, unit-level pin for both new openers).
content-mod, ab-tester, logs-forensics, scientific-researcher rerun7.
ensure-ilo.sh compared CURRENT_VER and LATEST with string equality only. A dev build ahead of the published release (local 0.11.6 vs published 0.11.5) hit the not-equal branch and printed 'Updating ilo from 0.11.6 to 0.11.5...' before downloading the older binary over the newer one. Add a sort -V comparison after the equality check: skip the upgrade when CURRENT_VER sorts strictly after LATEST. The original 'Updating ...' message only prints when the local version is genuinely behind. streaming-tail rerun7.
242b1de to
0b5dd38
Compare
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
Three rerun7 P2 diagnostic / scripting fixes in one PR. Each is small, isolated, and addresses a specific persona-reported false-positive or missing hint.
\x{body}Haskell/Rust lambda shorthand hint (quant-trader rerun7) - lexer hits\followed by ident-then-{(or->) and emits ILO-L001 pointing at the canonical parenthesised lambda(x:t>r;body). Manifesto win: persona's first retry is the right shape.detect_prefix_precedence_trapwas suppressed inside(...)but still spammed[*/a b c]and brace-bodied uses with self-contradictory advice. Extend the immediate-predecessor suppression list to includeLBracketandLBracealongsideLParen.ensure-ilo.shdirection swap (streaming-tail rerun7) - the script used string-equality only for version compare. A dev build ahead of the published release (local 0.11.6 vs published 0.11.5) hit the not-equal branch and tried to "Update from 0.11.6 to 0.11.5". Now usessort -Vto skip the upgrade when local is newer.Repro before / after
Item 1:
Item 2:
Item 3:
What's in the diff (per commit)
lexer: hint at parenthesised lambda for \x{body} shorthand- newbackslash_lambda_hinthelper, detection at the L001 site, five regression tests (brace, arrow, space-param, lone backslash, ident-no-brace fallback). SPEC.md gets the entry in the Cross-language gotchas table (mirrors into ai.txt and SKILL.md via build.rs). SKILL.md numbered gotchas list gets entry 8a. Newexamples/backslash-lambda-hint.iloruns across every engine via the example harness.main: suppress prefix-precedence hint inside [ and { grouping- one-line extension of the predecessor match indetect_prefix_precedence_trap. Three regression tests cover bracket-grouped at all four pair shapes, nested paren-inside-brackets, and a unit-level pin for both new openers.scripts: skip ensure-ilo upgrade when local is newer than published-sort -Vcomparison after the equality check.Test plan
cargo test --release --features cranelift- all 351+ tests passcargo clippy --release --features cranelift -- -D warnings- cleancargo fmt --check- cleanbackslash-lambda-hint.iloacross every engine (tree, VM, Cranelift)Follow-ups
None. Each fix is self-contained.