Skip to content

Explain why files under different roots can't be checked together - #2699

Merged
somewhatabstract merged 7 commits into
mainfrom
claude/jolly-galileo-72zesp-multiple-roots
Nov 11, 2026
Merged

somewhatabstract merged 7 commits into
mainfrom
claude/jolly-galileo-72zesp-multiple-roots

Conversation

@somewhatabstract

Copy link
Copy Markdown
Owner

Every file in a checksync run must share one root. When two files under different roots had the same path from their roots, such as one/src/a.js and two/src/a.js with a package.json in each of one and two, the run stopped with "File has already been drained to the output sink". That gave no hint of the cause.

The error now names both files and says that every file in a run must share one root. It suggests checking them in separate runs, or using --root-marker to pick a marker that only the shared root contains. The error only appears where the old one did; runs that worked before are unchanged.

This patch is for 11.x. It adds a cli/multiple-roots conformance case with its own fixture.

Test plan

  • Make two folders, one and two. Give each a package.json and a src/a.js containing a sync tag with a wrong checksum.
  • Run checksync one two. It names two/src/a.js and one/src/a.js and explains that they need separate runs.

Generated by Claude Code

Every file in a run must share one root. When two files under different
roots have the same path from their roots, and the first had errors,
OutputSink stopped with "File has already been drained to the output
sink". It now names both files, says they must share one root, and
suggests separate runs or another root marker.

Adds a `cli/multiple-roots` conformance case and fixture. Its golden
comes in the next commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QjLhVH1NnUc7MzCSYLd8Yn
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QjLhVH1NnUc7MzCSYLd8Yn
@changeset-bot

changeset-bot Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 82b19c4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
checksync Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codecov

codecov Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (3d467ac) to head (82b19c4).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##              main     #2699   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           93        93           
  Lines         3171      3177    +6     
  Branches      2381      2384    +3     
=========================================
+ Hits          3171      3177    +6     
Flag Coverage Δ
typescript 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/conformance/constants.ts 100.00% <ø> (ø)
src/output-sink.ts 100.00% <100.00%> (ø)

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3d467ac...82b19c4. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

checksync only stops when the earlier file had errors, so the message now
says it can't report on both files rather than that a run must have one
root. It also mentions the rootMarker configuration option alongside
--root-marker.

startFile now works out the file's key once, and a file with no errors is
dropped from both maps. The fixture's tagged content is a comment, so
eslint no longer reports an unused variable.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QjLhVH1NnUc7MzCSYLd8Yn
@codecov

codecov Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Bundle Report

Changes will increase total bundle size by 417 bytes (0.06%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
checksync-cjs 686.57kB 417 bytes (0.06%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: checksync-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
main.js 417 bytes 686.57kB 0.06%

Files in main.js:

  • ./package.json → Total Size: 23 bytes

  • ./src/output-sink.ts → Total Size: 8.38kB

cwdRelativePath uses the platform's separators, so the inline snapshots
failed on Windows. The tests now keep the paths as given.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QjLhVH1NnUc7MzCSYLd8Yn
Say plainly that the two files are under different root folders, what a
root folder is, and how to check them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QjLhVH1NnUc7MzCSYLd8Yn
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QjLhVH1NnUc7MzCSYLd8Yn
…72zesp-multiple-roots

# Conflicts:
#	src/conformance/constants.ts

@somewhatabstract somewhatabstract left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@somewhatabstract
somewhatabstract enabled auto-merge (squash) November 11, 2026 00:08
@somewhatabstract
somewhatabstract merged commit e4aa2ac into main Nov 11, 2026
14 of 15 checks passed
@somewhatabstract
somewhatabstract deleted the claude/jolly-galileo-72zesp-multiple-roots branch November 11, 2026 00:09
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.

2 participants