Skip to content

fix(test): settle fake checkpoint writer so main-slice test drains cleanly#1400

Open
onlyfeng wants to merge 1 commit into
XiaomiMiMo:mainfrom
onlyfeng:fix/main-ci-checkpoint
Open

fix(test): settle fake checkpoint writer so main-slice test drains cleanly#1400
onlyfeng wants to merge 1 commit into
XiaomiMiMo:mainfrom
onlyfeng:fix/main-ci-checkpoint

Conversation

@onlyfeng

@onlyfeng onlyfeng commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Summary

checkpoint-main-slice test: the recording actor's spawn outcome never resolved,
leaving tryStartCheckpointWriter's settlement-watcher fiber suspended until scope
close force-interrupted it — a flaky source under it.live. Settle the outcome so
the watcher completes (writers.delete) and assert the writer drains to no-writer.

No production change — actor/spawn.ts is untouched; the test's spawn-ref finalizer
stays = undefined, consistent with the sibling checkpoint tests.

Verification

  • bun typecheck — exit 0
  • bun test test/session/checkpoint-main-slice.test.ts — 1 pass / 13 assertions

…eanly

The recording actor's spawn outcome never resolved, so tryStartCheckpointWriter's
settlement-watcher fiber stayed suspended and was force-interrupted at scope
close — a flaky source under it.live. Settle the outcome so the watcher runs to
completion (writers.delete) and assert the writer drains to "no-writer".

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@onlyfeng onlyfeng force-pushed the fix/main-ci-checkpoint branch from efcf6bc to 946b80b Compare June 27, 2026 07:12
@onlyfeng onlyfeng changed the title fix(actor): restore previous spawn ref on layer cleanup fix(test): settle fake checkpoint writer so main-slice test drains cleanly Jun 27, 2026
@onlyfeng

Copy link
Copy Markdown
Contributor Author

Note for reviewers — the failing unit (shard 4/4) checks are pre-existing flakiness on the base, not introduced by this PR.

  • The two failing tests (CheckpointContext producer ... after settle and parentSessionID end-to-end ... splitover) already fail on the base commit 0abfd8a on main (push CI at 2026-06-27 02:30), before any change here.
  • This PR's only change is test/session/checkpoint-main-slice.test.ts; src/actor/spawn.ts is untouched. Locally these all pass: checkpoint-main-slice, checkpoint-splitover-integration (standalone and combined with checkpoint-main-slice, both orders).
  • Root cause looks like shard-level test isolation: under shard load, global spawnRef/isSystemSpawned state gets perturbed and tryStartCheckpointWriter takes the "skipped" branch instead of "started".

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