Skip to content

fix: data files never select zero tests; intent from the working session (0.23.1) - #59

Merged
taylorg009 merged 4 commits into
mainfrom
fix/data-file-zero-tests
Oct 21, 2026
Merged

taylorg009 merged 4 commits into
mainfrom
fix/data-file-zero-tests

Conversation

@taylorg009

@taylorg009 taylorg009 commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Why

Two correctness bugs in what the brief tells reviewers:

  1. A data file could select zero tests. A changed .sql, .cypher, .graphql or other data file with graph nodes but no dependents was seeded like code, and its walk reached nothing. CGraph extracts dependencies only from code, so for data the graph's silence is not evidence that nothing reads the file. On a TypeScript service, a one-line edit to each of five migrations selected 0 tests on 0.23.0. A recent PR there selected 226 of 330 tests, and its migration contributed none of them.
  2. The Intent could open with another session's work. Entire attaches every session live in the checkout when a commit is made. Narration and "Ran before push" came from the first session with any text. On a web-app PR with ten attached sessions, the Intent opened with a call-summary session's first line, and 30 test commands came from other tasks.

What changes

  • select.ts: a mapped file that isn't code (isCodePath in detect.ts, matching CGraph's grammar languages) fails open when its own walk reaches no test and nothing outside the file. The reason is unmapped-file with unreached: true, and the comment says the file "has graph nodes nothing points at".
    • A data file something does point at (a table a model uses) keeps its subset.
    • A code file nothing depends on still selects zero tests.
    • Manifest script additions (inert) are unaffected.
  • checkpoint.ts: when any session worked on the commit's files, only those sessions supply the narration and test commands, as the prompt already did. The same-step check still counts every session's activity.

Evidence

  • Migrations: a real TypeScript service clone, built with CGraph bin-v0.9.5 and given a one-line edit to each of five migrations. 0.23.0 gives subset tests= 0 for each, and this branch gives all with the unreached reason.
  • Intent: the two commits of a real web-app PR (checkpointFor on its checkpoint, 10 sessions).
    • Narration before: the call-summary session's opening line.
    • Narration after: the working session's opening line about the ticket it was fixing.
    • Test commands: 32 and 30 before, 4 and 2 after.
  • Tests: 429 pass. The new tests in select.test.ts, comment.test.ts and checkpoint.test.ts fail without the fixes.

🤖 Generated with Claude Code

taylorg009 and others added 3 commits October 20, 2026 19:13
… full suite

A changed .sql, .cypher, .graphql or other data file with graph nodes but
no dependents selected zero tests: CGraph records no reads of data, so
the graph's silence there is not evidence that nothing reads it. Its own
walk reaching no test and nothing outside the file now fails open with
an unmapped-file reason marked unreached; code files keep zero tests.

On turing-api every migration edit selected 0 tests (5 of 5 tried).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ession that worked

Entire attaches every session live in the checkout when a commit is
made. Narration and test commands were taken from the first session
with any text, so a PR's Intent opened with another task's narration
(turing-webapp#827: a call-summary session among ten). When some
session worked on the commit's files, only those now count, as the ask
already did.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

PR brief: 4 agent commits · 16 of 25 test files reach this diff

Run at least these. Selection is a safe superset; it never marks a test safe to skip.

Summary PR #59 at c4100d9
Changed 11 files: 8 mapped to 5 symbols, 3 ignored by policy
Tests reached 16 of 25 ▮▮▮▮▮▮▮▮▮▮▮▮▮▯▯▯▯▯▯▯ 64% of the suite
Downstream code 13 files, 42 dependents · review effort high
Intent 4 of 4 commits attributed by trailer (claude-code)
Reviewed by no reviewer other than the author (taylorg009) so far · the 21 changed and reached files were last changed by Taylor Gagne (65 commits in 20 files), Taylor (19 commits in 17 files) · Taylor has no prior commit in 4 of the 21 files this change touches or reaches: src/audit.ts, src/checkpoint-write.ts, src/figure.ts, +1
Symbols 4 changed, 1 added within the diff
Since push 29d2252 1 new commit, 0 changed files, 0 tests reached
Compared against base ced9903

What each commit did

Commit Intent Files Reaches Ran before push
654298c fix(select): a data file whose graph nodes nothing points a… claude-code by Co-authored-by 6 files 10 files, 12 tests
f1aa581 fix(checkpoint): take the intent's narration and test runs … claude-code by Co-authored-by 2 files 7 files, 7 tests
29d2252 chore: 0.23.1 claude-code by Co-authored-by 3 files
c4100d9 fix(select): any data file that reaches no test fails open claude-code by Co-authored-by 7 files 10 files, 11 tests

Claims checked

  • partial: the narrative names the changed code. not named by the PR body or any commit message: src/types.ts (FailOpenReason changed) (understated scope).
  • consistent: PR body names 12 things in code font. every one is a changed symbol, a changed path, or in a changed line.

What each changed file reaches

Read Changed file Change Reaches Tests
1 types.ts FailOpenReason changed 10 files 11
with types.ts select.ts select changed 6 files 7
with types.ts comment.ts renderUnmapped changed 3 files 2
2 detect.ts isCodePath added 7 files 9
3 checkpoint.ts checkpointFor changed 7 files 7
4 checkpoint.test.ts test code, selected directly 1
5 comment.test.ts test code, selected directly 1
6 select.test.ts test code, selected directly 1
3 files under the repo root ignored by policy 0

Paths above are under src/ unless shown in full.

Tests to run (16)

Blast radius by changed file: 42 dependents
  • types.ts reaches audit.ts (imports types.ts, which contains FailOpenReason), brief.ts, CheckOptions (check.ts, references FailOpenReason), cli.ts, diff.ts (imports types.ts, which contains FailOpenReason), figure.ts (imports types.ts, which contains FailOpenReason), +4 files
  • detect.ts reaches buildBrief (brief.ts), check.ts, cli.ts, index.ts (re-exports it), mapping.ts (imports it), callTool, handleRequest, serveStdio (mcp.ts), +1 file
  • checkpoint.ts reaches buildBrief (brief.ts, calls checkpointFor), checkpoint-write.ts, cli.ts, index.ts, callTool, handleRequest, serveStdio (mcp.ts, callTool calls buildBrief in brief.ts, which calls checkpointFor), owners.ts (imports checkpoint.ts, which contains checkpointFor), +1 file
  • select.ts reaches buildBrief (brief.ts), check.ts (imports it), cli.ts (imports check.ts, which imports it), index.ts, callTool, handleRequest, serveStdio (mcp.ts, imports check.ts, which imports it), runSelection (run.ts, calls select)
  • comment.ts reaches cli.ts, index.ts, callTool, handleRequest, serveStdio (mcp.ts)

blastline 0.23.1. Selection is advisory unless your workflow gates on it. How selection works. Graph 43e2db2. change-context budget 29794: omitted 36 impacts, 1011 context entries (truncated); symbols are classified within the diff only. Intent: 0 of 4 commits, 4 attributed by trailer.

Review of #59: a migration that only another migration's foreign key
points at (sql_table references sql_table) still selected zero tests,
because its walk reached a file outside itself. Drop that condition: a
data file whose walk reaches no test fails open, whatever it reached.
Remove the advise() call that could never run (references are built for
nodeless files only). Tests for data reached by data, data reached by
untested code, and a manifest walked through its readers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@taylorg009
taylorg009 marked this pull request as ready for review October 21, 2026 02:25
@taylorg009
taylorg009 merged commit 1758f00 into main Oct 21, 2026
5 checks passed
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.

1 participant