Skip to content

Engine test: copying a sheet that holds a spill matches a full recalc (#2053) - #2708

Merged
h-a-n-a-s-h-i merged 2 commits into
storytold:mainfrom
Harrison-Booth:gc-spill-copy-test
Oct 30, 2026
Merged

h-a-n-a-s-h-i merged 2 commits into
storytold:mainfrom
Harrison-Booth:gc-spill-copy-test

Conversation

@Harrison-Booth

@Harrison-Booth Harrison-Booth commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Encodes the five commands from #2053 (grades sample, merge F:H, SEQUENCE spill in J54, select row 15, copy sheet, legacy array SUM over the spill on the copy) as an engine test. It checks that J55 on the copy is a number and equals the value after a full recalc.

Checked: cargo fmt --check is clean. I did not build or run the test here; the fork CI runs the suite. Not run on Windows, macOS or in the GUI.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests
    • Added integration coverage for copying a sheet that contains a spilled formula. The test checks that the copied sheet’s value in cell J55 is numeric before a full recalculation and remains unchanged afterward, helping verify that sheet copying preserves the expected value across recalculation.

@coderabbitai

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between d8c5f58 and 0edf2b8.

Files selected for processing: 2
  • crates/engine/tests/it/main.rs
  • crates/engine/tests/it/sheet_copy_spill.rs

Limit details: You’ve used all 10 included reviews currently available.

Walkthrough

The integration-test binary now includes a test that copies the Grades sheet with a spilled formula and checks the copied value before and after full recalculation.

Changes: Copied sheet spill test

Layer / File(s) Summary
Register and verify copied spill test
crates/engine/tests/it/main.rs, crates/engine/tests/it/sheet_copy_spill.rs
The integration-test binary registers a test that copies Grades with a SEQUENCE(5)*C6 formula in J54. The test checks that J55 contains a number before full recalculation and retains the same value afterward.

Priority: Low

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Other

Possibly related issues

  • storytold/gridcraft#2053 — The test checks the copied sheet’s spill value before and after full recalculation, matching the reproduction described for this issue.

Possibly related PRs

Suggested reviewers: fredapps, aiongg

Merge Risk: Minimal · up to 0edf2

The new regression test covers copied-sheet spill stability without changing production behavior. No merge-blocking issue is evident, though the test still needs to run in CI.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the main change: an engine test covering copying a sheet that holds a spill, checked against a full recalculation. The raw summary and PR objectives both describe a new integration tes…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: an engine test covering copying a sheet that holds a spill, checked against a full recalculation. The raw summary and PR objectives both describe a new integration test for this scenario (sheet_copy_spill.rs, five-command setup, J55 value comparison against full recalc). The title is specific and matches the changeset. The issue reference (#2053) is extra context and does not affect the assessment.

Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Usage-based review receipt

  • Mode: Continue automatically
  • Reviewed files: 2
  • Waived: $0.50 (charged $0.00)
  • View usage details

Note

This review exceeded your plan’s limits and used usage-based reviews—free during trial, billed after paid activation unless disabled. Manage usage-based reviews.

Comment @coderabbitai help to get the list of available commands.

alehel added a commit to alehel/gridcraft that referenced this pull request Oct 30, 2026
alehel added a commit to alehel/gridcraft that referenced this pull request Oct 30, 2026
@h-a-n-a-s-h-i
h-a-n-a-s-h-i merged commit 27d5930 into storytold:main Oct 30, 2026
6 checks passed
@echelon

echelon commented Oct 30, 2026

Copy link
Copy Markdown
Member

Landed in main (75f7056). Thank you for the contribution, @Harrison-Booth!

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.

3 participants