Repository navigation
ref(lint): Fail when a check baseline grows, and pair each rule with its check - #3612
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Agents that trip a ratchet check add a baseline entry and the check passes. Review caught this in #3035 and #3564, and it merged in #3460, #3226, and #3206. baseline-growth:check compares each debt baseline to the merge base with origin/main and fails when a rule's total rises. Totals per rule let a file move or split without failing. Co-Authored-By: David Cramer <[email protected]>
AGENTS.md rules now say which check enforces each one, so a correction for a rule that only review enforces shows up as a repeat. Agents keep fixing missing information with new hooks, resolvers, and lookups instead of fixing the source, as in #3610, #3404, and #3457. No check can tell a needed abstraction from a speculative one, so correctness-complexity.md names the case. Co-Authored-By: David Cramer <[email protected]>
Agents fix deterministic behavior with prompt or policy text. #3610 first changed the GitHub system prompt to fix PR links, and the fix was rejected: the system already knows whether a link is a pull request. On #3404 the bot name in prompts had to become a check because the mistake kept coming back, and #3438 was told not to add policy text when a rule can enforce it. No check can tell deterministic output from judgment in a prompt diff, so agent-steering.md names the rule and AGENTS.md lists it. Co-Authored-By: David Cramer <[email protected]>
sentry-junior
Bot
force-pushed
the
improve-repo/baseline-growth
branch
from
November 17, 2026 20:47
594009d to
f6fc858
Compare
Contributor
|
This PR has had no activity for 3 days. It closes in 2 days unless someone pushes, comments, or adds the |
BYK
approved these changes
Nov 21, 2026
BYK
marked this pull request as ready for review
November 21, 2026 18:43
BYK
enabled auto-merge (squash)
November 21, 2026 18:43
…-growth # Conflicts: # AGENTS.md # package.json
Contributor
|
7 screenshot changes — 7 changed · 0 added · 0 removed Review screenshots in Frameshift |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 1384e03. Configure here.
The hand-written list missed scripts/nav-request-budget-exceptions.mjs.
Match *-baseline.{json,txt} and *-exceptions.mjs instead, and list only the
files that may grow.
BYK
pushed a commit
that referenced
this pull request
Nov 21, 2026
Each root check script had its own `node --test … && node …` chain in `package.json`, and `pnpm lint` listed a dozen of them one by one. Every new check added more of the same wiring. `scripts/check.mjs` now owns that wiring: - `node scripts/check.mjs <name>…` runs each named check: first its `scripts/check-<file>.test.mjs` tests, then its `scripts/check-<file>.mjs` script. It stops at the first failure. - With no name, it runs every check that `pnpm lint` needs, with their tests in one `node --test` run. - `migration-locks` still runs `squawk` after its script. - It fails when a `scripts/check-*.mjs` file has no entry, so a new check gets wired here or not at all. - It ignores file-path arguments, because lint-staged appends the staged paths. Every `pnpm <name>:check` entry stays and calls the runner, so the check names in `AGENTS.md`, lint-staged, and CI still work. `pnpm lint` starts with `node scripts/check.mjs`, and `ast-grep:lint` ends with `node scripts/check.mjs ast-grep-ignores`. The CI release paths include the runner, because `release:check` now goes through it. No check script or its logic changes. The `packages/junior` check scripts keep their own `package.json` entries. Related: #3680, #3612. <!-- junior-request-attribution:start --> via @BYK. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:agent%3Acdada5c589dc375265165b968649b09b --> -- [View Session](https://junior-prod.sentry.dev/conversations/agent%3Acdada5c589dc375265165b968649b09b) [[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3Acdada5c589dc375265165b968649b09b/?project=4510944073809921) <!-- junior-session-footer:end --> --------- Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
22 tasks done
This branch was successfully deployed
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.

Baselines can only shrink
The ratchet baselines (
type-assertions,await-in-loop,test-architecture,typecheck-coverage,migration-locks,tool-descriptions,file-length-exceptions) already say "do not add entries". But when a check trips, an agent can still add an entry and the check passes. Review caught this on #3564 and #3035, both from @BYK. It merged without review in #3460, #3226, and #3206.pnpm baseline-growth:checkis now part ofpnpm lint. It compares each baseline to the merge base withorigin/mainand fails when a rule's total goes up. The error names the baseline, the rule, and the entries that caused it. Totals are counted per rule, so a file that moves or splits still passes. A rule or baseline that is new in the change is skipped, because that is how a new check gets adopted. The CI lint job now usesfetch-depth: 0so it has a merge base.tool-error-classification-baseline.txtis left out because it is an allowlist of approved system errors and grows on purpose.Use data the system already has before you add plumbing
Agents fix missing information with new hooks, resolvers, and lookups instead of using data the system already stores, as in #3610, #3404, and #3457. No check can tell a needed abstraction from a speculative one, so
policies/correctness-complexity.mdnow names this case.Generate deterministic output in code, not prompt text
Agents fix deterministic behavior with prompt or policy text. #3610 first tried to fix PR links with a GitHub system prompt change, and @dcramer rejected it: "We know if it's a pull request or an issue. We should just be generating the right link." The bot name in prompts (#3404) had to become a check, and #3438 was told not to add policy text when a rule can enforce it.
policies/agent-steering.mdnow says to generate links, IDs, and formats in code.Rule table
The AGENTS.md rules are now a table that says what enforces each rule. A correction for a rule marked "Review" shows that the rule is a repeat and needs a higher-level fix.
Open decision
via @dcramer.
--
View Session [Sentry]