fix(runner): search for the substrings a review declares with mark: - #28
Merged
Conversation
Signals: mark:comptime is the example docs/RUNS.md and prompt.Signals both give, and it could not work. peek recorded matches under the built-in table's category labels -- http, sql, concurrent -- and matchDeclared looked a declared value up in that same map, so a review's own mark: matched only if it happened to spell one of those labels. comptime is not one, so the documented example matched nothing, ever. That path is the only way a project's own prompt is reachable through --suggest-agent gauntlet, so the reviews it was written for were silently unproposable. Declared values now join the built-in table as searches for themselves, recorded under their own name, which is the token matchDeclared looks up. Bounded to 64 across the prompt set: each one costs a pass over every file head, and the prompts come from the reviewed tree. A pool that declares no mark: takes the identical path it did before -- markSearch(nil) returns the built-in table itself, unchanged and uncopied -- so nothing moves for a tree that declares nothing.
…nals # Conflicts: # CHANGELOG.md
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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.
Signals: mark:comptimeis the exampledocs/RUNS.mdandprompt.Signalsboth give, and it could never match anything.peekrecords what it finds under the built-in table's category labels —http,sql,concurrent, seventeen of them — andmatchDeclaredlooks a declared value up in that same map:So a review's own
mark:matched only if it happened to spell one of those seventeen labels.comptimeis not one. The docs say "a substring found near the top of a source file"; nothing ever searched for it.That matters more than a stray signal kind, because the declared-signals path is the only way a project's own prompt is reachable through
--suggest-agent gauntletat all: the built-in rules only know built-in names. A review written for a tree and keyed on a mark was silently unproposable.Declared values now join the built-in table as searches for themselves, recorded under their own name, in the same head reads the built-in rules already make. Bounded to 64 across the prompt set: each costs a pass over every head, and the prompts come from the reviewed tree, where
Signalsis already parsed defensively.On the calibration script. AGENTS.md asks for its number before and after any change here. It cannot produce one on this machine: it scores against recorded
--suggestruns and the journal holds four runs, none of them--suggest— it exits with "no --suggest runs recorded yet: nothing to calibrate against". The structural argument is stronger than a number would be anyway:markSearch(nil)returns the built-in table itself, so a pool declaring nomark:takes a byte-identical path, and no bundled prompt declares aSignals:line at all. A test pins that the table is neither copied nor disturbed.Three tests: the documented
mark:comptimenow matches a tree containing it; a control that it does not match a tree without it (a suggester that matched every declared mark would pass the first test and be no better than the bug); and the table/cap behavior. Against the unfixed source: "a review declaring mark:comptime was not proposed for a tree containing it".docs/RUNS.mdnow says where a declared mark is looked for and states the cap.Gate:
make checkandmake coverclean on the tree merged with main, total coverage 78.1% against the 74.0% floor.