fix(ci): classify images/fonts/binaries as inert instead of production in revert-oracle - #4140
Conversation
…n in revert-oracle An image, font, or archive has no observable behaviour: no runner in this repo compiles or executes one, so a test can neither accompany nor observe a change to it. classifyPath put such files in `production` by default, so the oracle ABORTed with "changes production code and adds/changes NO test file" on branches whose only changes were of this kind — e.g. five deleted favicon PNGs, or an archive of retained evidence files. That is a false positive about the classifier, not a finding about the branch. Add a narrow `inert` classification (images, fonts, a few other binary container formats) alongside the existing `production`/`test`/`ignored` kinds, extracted to scripts/lib/revert-oracle-inert.mjs to stay under the module-size budget. `.json` and other formats a runner's behaviour can depend on are deliberately excluded, so a source file with no test still ABORTs exactly as before. Closes #4137
|
Warning Review limit reached
This review includes 4 billable files and costs up to $1.00. Or wait 8 minutes for your next included review. View limit detailsLimit details: You’ve used all 2 included reviews currently available. Review configuration: ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (4)
Comment |
Claude review - no findings for
|
|
Adversarial review came back sound — I could not break it. Recording two things for the file. The dangerous direction is clean today. Checked every listed suffix against the actual tree:
The narrow direction was checked too — Verified: both halves mutation-tested independently (reverting Separately — a pre-existing gap this PR does not cause, but which is the same family as #4137:
Worth its own issue if you agree — adding |
|
Superseded by #4141 — suggest closing this one. We collided on #4137. This PR opened at 05:38:35Z and #4141 at 05:48:41Z, so this was first by ten minutes, but yours is clearly the fuller treatment: +894/−97 across eight files with a dedicated Nothing here is worth salvaging separately as far as I can see — #4141 covers the same ground and more. Closing this avoids you reviewing two implementations of one issue. For the record, in case any of it is useful while reviewing yours, this one was verified as follows:
One thing found while reviewing it that is not in either PR and may be worth folding into #4141 or a follow-up: |
|
#4140 and #4141 both close #4137, and they take different approaches. This needs a decision, not a race. First, my process failure: I filed #4137 and dispatched an agent against it without claiming the issue. AGENTS.md says to assign and comment before writing code, precisely so this does not happen. #4140 was opened at 05:38, before my #4141. That ordering is on me. The two designs#4140 classifies by an extension list: 20 suffixes ( #4141 derives inertness from a conjunction: the file is not a kind any runner compiles or executes, and git itself produced no textual diff for it. Unknown kinds fall out correctly without being enumerated. Where each is stronger, stated fairly#4140 is correct on the case that broke mine. #4141 is stronger on the kind that has not happened yet. A deny-list misses the next binary kind, and the miss renders as a finding naming the author. #4137's own text says not to write one, for that reason. Today the repo has no tracked So the trade is: a hole that exists today and is fixed, versus a hole that opens whenever a new binary kind arrives. I do not think that is obviously my way. #4140's simplicity is a real virtue, and "no git dependency" removes an entire class of environment-sensitivity that mine carries ( What I would suggest, and it is not "merge mine"Land #4140 as the base, since it is first, simpler, and correct today. Then, if the unbounded-list concern is judged real, add the conjunction on top as a follow-up: keep the extension list as a fast path and let "no runner claims it AND git says it is bytes" catch the rest, with the That way the repo gets the simple correct thing now and the general thing only if it earns its machinery. If the preference is the other way round, #4141 is fully reviewed and green: seven end-to-end cases with verdict and exit code asserted, two mutation proofs (treating @louistrue this is your call. I am not merging #4141 over #4140. Two pieces of #4141 are worth keeping regardless of which base wins:
|
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
Claude review - no findings for
|
…d-baseline Resolves a textual conflict in scripts/lib/revert-oracle.mjs between this branch's ALL_SKIPPED bucket/severityCandidates work and #4140's inert-path classification: both imports kept, isInertPath wired after the existing TEST_* checks in classifyPath so precedence is preserved.
Summary
classifyPathin the revert-oracle put every changed file it didn't recognize intoproductionby default, including images, fonts, and other binaries with no observable behaviour. That made the oracle ABORT with "changes production code and adds/changes NO test file" on branches whose only changes were of this kind — no test can accompany or observe a deleted PNG.Adds a narrow
inertclassification (images, fonts, and a few binary container formats —.png/.jpg/.svg/.ico/...,.woff/.woff2/.ttf/...,.zip/.gz/.tar/.pdf) alongside the existingproduction/test/ignoredkinds. Extracted toscripts/lib/revert-oracle-inert.mjsto stay underscripts/lib/revert-oracle.mjs's frozen module-size budget (528 lines) rather than raising it..jsonand every other format a runner actually reads/executes stayproduction— a source file with no accompanying test still ABORTs exactly as before. Inertness is about the file kind, not the diff operation: a pure deletion of an inert file is inert too.Test plan
inert(notproduction), that inertness survives a delete, that.json/.rs/.ts/.pyproduction files are unaffected, and that a mixed production+inert diff still isolates the real production file — all 4 failed against the old classifier.node --test scripts/lib/revert-oracle.test.mjs→ 59/59 pass.inertbranch inclassifyPathand separately inclassifyDiff's bucketing each independently drops exactly the 4 new tests to fail, confirming they're load-bearing.revert-oracle-*.mjsmodule for file-kind classification logic — the classifier lives only inrevert-oracle.mjs, no duplicate to fix.node scripts/check-module-size.mjs,node scripts/check-test-wiring.mjs,node scripts/check-source-text-assertions.mjsall exit 0. Full catch-allnode --test scripts/*.test.mjs scripts/lib/*.test.mjs scripts/fixtures/*.test.mjs scripts/docs/*.test.mjs scripts/review/*.test.mjs scripts/review/lib/*.test.mjs→ 2169/2169 pass.Closes #4137