Repository navigation
Add correctness specialist - #3
Conversation
Ports the CRITICAL categories from gstack review/checklist.md — SQL & Data Safety, Race Conditions & Concurrency, Shell Injection — plus the INFORMATIONAL ones nobody else owns: Type Coercion at Boundaries, Time Window Safety, Column/Field Name Safety, Async/Sync Mixing. Adds the three halves the source lacked: - An evidence bar. Quote both ends — where the bad value is produced and where it is used. One citation is half a finding. - A failure-scenario requirement, raised to a counterexample rule in the header so it frames every check: name one input and two outputs, what the code returns and what it should. No input, no finding. - A "Not a finding" section, eight entries, four of them routing to the lens that already owns the defect. Research changed three things. The over-correction taxonomy for LLM code review (arXiv 2603.00539) measures where these findings go wrong: unsupported "logic error" claims are 48.2% of false rejections and phantom off-by-one claims another 13.2%. That 61% is quoted in "Why this exists" and is why the counterexample rule leads the file rather than sitting in the evidence bar. Four more of its named classes became "Not a finding" entries — Added Requirement, Imagined Runtime, Assumed Type, Precision Error — as validation the spec never asked for, "this could throw", a null check on a producer that cannot return null, and floating-point imprecision that changes no decision. Aurora read replicas are asynchronous, so a read routed to the replica straight after a write returns the pre-write row. AWS's own guidance is to transact read-after-write on the writer. That is a nameable interleaving on this stack and no other lens has it. Scope drawn against the eleven existing lenses. Enum & Value Completeness splits: tracing a new value to consumers outside the diff is coherence, an uncovered branch visible in the diff is here. Redelivery is idempotency, this lens owns two concurrent callers of one path. Swallowing is silent-failure, this lens owns the wrong answer. N+1 is performance. Model output as untrusted input is llm-pipeline. Claude-Session: https://claude.ai/code/session_011pBqTHPZrXbQnRCuFBybsX
Greptile SummaryAdds a correctness specialist focused on concrete counterexamples and evidence-backed checks.
Confidence Score: 4/5The PR is not ready to merge because the existing Stage 2 instructions still prevent the new correctness specialist from running. The specialist file is present, but SKILL.md continues to classify correctness as unwritten and instructs the dispatcher to always skip it, so the feature introduced by this PR remains unreachable. Files Needing Attention: SKILL.md
|
| Filename | Overview |
|---|---|
| specialists/correctness.md | Adds the specialist checklist and now accurately describes Decimal/float failures and asynchronous Django ORM usage. |
Reviews (2): Last reviewed commit: "Fix two factual errors and an exemplar t..." | Re-trigger Greptile
|
Blocking: the lens is inert as merged. Greptile's Required: Required: Required: Reviewer items: 3 open on Greptile's threads, all verified, none rebutted. |
All seven specialist PRs (#3-#9) drew the same coherence finding from their own reviews: the lens lands, and SKILL.md still says it is 'not written yet - so today they always skip' while README lists it under 'Not yet written' with a stale count. Seven independent reviews, one finding, which is the lens doing its job. It is a workflow bug, not seven authoring bugs. Each agent was told to write its file and open a PR and never told to sweep the dispatch table - and seven parallel branches editing SKILL.md would have conflicted anyway. One commit on the base closes it across all seven. Adds correctness, testing and maintainability to always-on; the other four already had conditional rows. Drops the not-written prose and the stale eleven count. Also replaces the merge-gate warning: the real reason not to gate on it is that it has never been run end to end, not that lenses are missing.
Greptile, :45 - Decimal mixed with float does not become float, it raises TypeError. The finding is the float() someone added to silence that. Greptile, :61 - 'a Django ORM call inside async def raises SynchronousOnlyOperation' is overbroad. aget, acreate and async for are the supported path on Django 6, so the finding is a sync call where an async one exists. Own review, :12 - the rule demands one input and two outputs and the worked example supplied one. Added the expected output.
There was a problem hiding this comment.
Warning
The leading rule mandates "two outputs: what this code returns for it, and what it should" (line 12), but the worked example at line 14 gives only one (limit=0 → "returns the whole table") and the e...
specialists/correctness.md:14
Warning
The "Not a finding" entry reads "Redelivery is idempotency; you own two concurrent callers." specialists/idempotency.md lines 28–31 already own exactly that: "Check-then-act is not atomic.
specialists/correctness.md:88
2 finding(s) posted as inline comments.
prelint, PR #3: 'Redelivery is idempotency; you own two concurrent callers' collided head-on with idempotency.md:28-31, which already owns check-then-act between two workers - same check, same fix, same scenario. Both lenses would fire on one line of any webhook handler. Split by what is wrong rather than by who runs it. The missing atomicity mechanism is idempotency, including check-then-act. correctness owns the case where the mechanism exists and the logic through it is still wrong: a lock taken after the read it protects, a guard on the wrong key, a state machine admitting an order it cannot handle. If the fix is 'add the constraint', it is not correctness. prelint, PR #3: the evidence-bar exemplar gave one output while the rule at :12 demands two. I fixed the first example and missed this one - the same incomplete sweep, one commit later.
The general "does this code do what it claims" lens. 100 lines.
What it ports
From
gstack/review/checklist.mdand the Step 4 critical pass:raw(),extra(),RawSQL,cursor.executeeven when the value is already cast toint; bulk writes that bypasssave(), signals andfull_clean.UPDATE ... WHERE status = <old>,.save()withoutupdate_fields.subprocess(shell=True)with an f-string,os.system,eval,exec.The taxonomy is good and ports wholesale. Wording is retargeted from Rails to Django 6 / Django Ninja / Aurora / React 19.
What it adds that the source lacked
The source is a flat list of what to look for. It never says what to ignore, which is where the noise came from.
1. An evidence bar. Quote both ends — where the bad value is produced and where it is used. One citation is half a finding. For a race, both sides plus the interleaving. For a boundary, the index. For a coercion, both types and the operation that mixes them. Ends with the required worked bad-vs-good example.
2. A failure-scenario requirement, promoted to a rule in the header. Name one input and two outputs: what this code returns for it, and what it should. It sits above the checklist rather than inside the evidence bar because it has to frame every check, not qualify the write-up.
3. A "Not a finding" section. Eight entries. Four are routing to the lens that already owns the defect; four are the false-positive classes measured in the literature and in this repo's own record.
What the research turned up
The over-correction taxonomy quantifies exactly where this lens fails. "Are LLMs Reliable Code Reviewers? Systematic Overcorrection in Requirement Conformance Judgement" classifies 11 patterns of LLMs wrongly rejecting correct code. Four account for 87.2%, and two of those are mine: Logic Error (broad algorithmic claims with no counterexample) at 48.2% and Boundary Error (off-by-one claims that are not off by one) at 13.2%. That 61% is quoted in "Why this exists" and is the justification for leading with the counterexample rule instead of burying it. Four more of its classes became "Not a finding" entries verbatim in substance — Added Requirement → validation the spec never asked for, Imagined Runtime → "this could throw", Assumed Type → a null check on a producer that cannot return null, Precision Error → floating-point imprecision that changes no decision. Its first mitigation recommendation — "require rationales to cite concrete counterexample inputs/outputs" — is the rule as written.
Aurora read replicas make read-after-write a nameable interleaving on this stack. AWS's replication guidance is explicit: replicas update asynchronously and you must transact any read requiring read-after-write consistency on the writer. So a read routed to the replica straight after a write returns the pre-write row — a task enqueued before
commitis the usual shape.resource-limitsalready asks the performance question ("does this force the writer when the replica would do?"); this is the correctness half, and nothing owned it.Independent adversarial refutation is the mechanism, and Stage 3 already has it. Refute-or-Promote (arXiv 2604.19049) gates each finding behind an adversarial stage requiring reproducible trigger conditions plus a concrete counterexample before promotion. mattpocock/skills#566 proposes the same shape as a
skepticskill — every finding goes to a blind sub-agent whose only job is to refute it, and it gets the bare claim, never the reviewer's reasoning. mattpocock/skills#582 argues the same from the other direction: subagent findings are unverified leads, not results. All three converge on whatreference/verification.mdalready does with Filter 2, so this file adds nothing there — it just makes sure a finding arrives carrying what the refuter needs, which is the input and the two outputs.Also read and folded in: addyosmani/agent-skills#436 and PR #441, the likelihood-axis proposal
_schema.mdalready implements — the file names a triggering condition on each check rather than asserting risk. obra/superpowers#1955 contributes the sharpest field note in the set: a plan hard-coded a stale real-world constant and the test passed, because it encoded the same stale constant. That is a green suite proving a bug, and it is why "a pattern this file already used before the diff" is a "Not a finding" but a wrong constant is not.Scope boundaries against the eleven existing lenses
Enum & Value Completeness splits, and the line is drawn in the file. The source deliberately requires reading outside the diff — grep the sibling values, read every consumer. That is
coherence's "incomplete sweeps and missed call sites", and it is always-on, so duplicating it wastes both budgets. What stays here is the half visible in the hunk: anif/elif,matchor dict dispatch that does not cover a value present in the diff. If finding the uncovered value needs a grep, it iscoherence.idempotency— I own two concurrent callers of one pathsilent-failure— I own the wrong answer, not the missing signalperformancellm-pipeline— I own the same sinks for request, webhook and third-party-diff inputresource-limitsmoneytenancyspec-driftInjection sinks stay here per the brief. When
securitylands it will overlap on SQL and shell; Stage 3 dedupes onpath:lineand collapses them when the fix is the same.