Skip to content

WriteChunks: write all chunks before checking insertion status#372

Open
ChrisJefferson wants to merge 1 commit into
masterfrom
fix-warning
Open

WriteChunks: write all chunks before checking insertion status#372
ChrisJefferson wants to merge 1 commit into
masterfrom
fix-warning

Conversation

@ChrisJefferson

Copy link
Copy Markdown
Member

Writing a chunk whose body contains a nested @InsertChunk marks the inserted chunk as inserted. Previously the "defined but never inserted" and "inserted but never defined" checks were interleaved with writing, so a chunk that was only inserted from within a later-written chunk could be spuriously reported, depending on iteration order. Split the loop: write every chunk first, then run the checks once all insertions have been resolved.

Found while fixing the vole package.

AI disclosure: this change was prepared with the assistance of Claude Code (Anthropic), which diagnosed the ordering issue and drafted the fix.

Writing a chunk whose body contains a nested @InsertChunk marks the
inserted chunk as inserted. Previously the "defined but never inserted"
and "inserted but never defined" checks were interleaved with writing,
so a chunk that was only inserted from within a later-written chunk
could be spuriously reported, depending on iteration order. Split the
loop: write every chunk first, then run the checks once all insertions
have been resolved.

Found while fixing the vole package.

AI disclosure: this change was prepared with the assistance of Claude
Code (Anthropic), which diagnosed the ordering issue and drafted the
fix.

Co-authored-by: Claude <noreply@anthropic.com>
@codecov

codecov Bot commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.20%. Comparing base (2bad29a) to head (d5f41b0).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #372   +/-   ##
=======================================
  Coverage   93.20%   93.20%           
=======================================
  Files          13       13           
  Lines        2956     2958    +2     
=======================================
+ Hits         2755     2757    +2     
  Misses        201      201           
Files with missing lines Coverage Δ
gap/DocumentationTree.gi 96.09% <100.00%> (+0.01%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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