Skip to content

#642 Split the PK-fallback paragraph, and stop the doc reviewer revising its own prose - #644

Merged
nockawa merged 1 commit into
mainfrom
doc-drift-pingpong
Aug 2, 2026
Merged

nockawa merged 1 commit into
mainfrom
doc-drift-pingpong

Conversation

@nockawa

@nockawa nockawa commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

Fixes #642.

It was not a reversal — but the shape was worrying for a good reason

The clause #642 objects to sits on the - side of #636's diff: it predates last night and was carried through verbatim. #633 was about a different clause in the same paragraph. So one paragraph held two independent errors; night 1 fixed one and inherited the other, then bridged into it with "In either case ..." — widening a claim that was only ever true for non-cluster archetypes. That connector is the actual defect: it signed the reviewer's name to prose it had never read.

The prose

09-querying.md:150 packed seven independently verifiable claims into a single paragraph — SelectFullScanStream, both -1 cases, the ExecuteCore short-circuit, Count=0, PK B+Tree removal, and cluster ordered scans. A reviewer told to "fix only what it is confident about" will nibble one clause per night forever. Split into a non-cluster paragraph and a cluster one, with the cluster dispatch as a table so each entry point stands alone.

Verified against the code before writing, so this is not a third round:

Query shape Entry point Source
Unordered ExecuteTargeted → ScanPerArchetypeBTree EcsQuery.cs:1209-1216
Ordered, all clustered ExecuteOrderedClustered EcsQuery.cs:830-834
Ordered, mixed ExecuteOrderedViaSortFallback EcsQuery.cs:837
Count() w/ any cluster archetype ExecuteTargeted().Count EcsQuery.cs:2176-2181

PipelineExecutor.Count's return 0 (PipelineExecutor.cs:51-58) is reachable only from the non-cluster path.

Two guards

Prompt. Verify every claim in a paragraph you edit, not just the sentence you came for. And never write a linking phrase — "in either case", "likewise", "the same applies" — into prose not verified that run, because a connector widens the scope of whatever it points at.

Mechanical. open-pr now blames the pre-image line ranges of each hunk and refuses to commit when they were written by a [doc-drift] commit less than 30 days old. Touching the same page two nights running is expected — --3way exists for it. Rewriting the same lines means the reviewer is arguing with itself, and neither run can tell, because each only ever sees the current text. Recent rather than ever, so prose the bot wrote months ago can still be revised when the code moves.

Findings stay filed as issues when it trips, matching how the step already handles a conflicting merge: stop rather than resolve.

Verification

Case Expected Result
Edit a human-written line silent pass
Edit a line a recent [doc-drift] commit wrote fires pass
Edit a line a >30-day-old [doc-drift] commit wrote silent pass
Pure insertion silent pass
Live: this PR's own doc edit fires against 30baae7 (1d) pass

Link lint clean (329 files, 1872 links, 0 findings). Workflow YAML parses.

…ing its own prose

09-querying.md line 150 packed seven independently verifiable claims into one paragraph, which is why two nights in a row found something wrong in it. The 2026-08-01 run fixed the stale half and inherited a cluster-storage sentence it had not checked, then bridged into it with "In either case" — widening a claim that was only ever true for non-cluster archetypes. #642 filed the result. Both errors were real and different; this was not one fix being reverted by the next.

Split it into a non-cluster paragraph and a cluster one, with the cluster dispatch as a table so each entry point is checkable on its own instead of buried in prose. Verified against the code: ExecuteTargeted sends cluster archetypes to ScanPerArchetypeBTree whenever UsesSecondaryIndex is false, pure-cluster ordered scans go to ExecuteOrderedClustered, mixed ones to ExecuteOrderedViaSortFallback, and Count with any cluster archetype in the mask returns ExecuteTargeted().Count without ever reaching PipelineExecutor.Count. The "returns 0" short-circuit is non-cluster only.

Two guards so it does not happen again. The prompt now requires verifying every claim in a paragraph it edits and forbids writing a linking phrase into prose not verified that run, since a connector widens the scope of whatever it points at. And open-pr blames the pre-image lines of each hunk and refuses to commit when they were written by a [doc-drift] commit less than 30 days old: touching the same page two nights running is expected, rewriting the same lines means the reviewer is arguing with itself and neither run can tell, because each only sees the current text. Recent rather than ever, so prose the bot wrote months ago can still be revised when the code moves.

Guard verified on four cases plus the live one: human-written line silent, recent bot line fires, bot line older than 30 days silent, pure insertion silent, and this commit's own doc edit correctly flagged against 30baae7.

Fixes #642

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019edYt6pHPKFqVcsDpJ7v9x
@nockawa
nockawa merged commit 0dee59d into main Aug 2, 2026
15 checks passed
@nockawa
nockawa deleted the doc-drift-pingpong branch August 2, 2026 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[doc-drift] 09-querying PK-fallback: unordered cluster scans also handle -1 plans; Count is not 0 for cluster archetypes

1 participant