You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e406c09
Browse filesBrowse the repository at this point in the historyBrowse files
Fix the two checkpoint-queue findings the review raised, and stop a self-move deleting its own file
The unit is at 295 of the gate's 500 counted executable lines, so these are implemented here rather than
deferred: this reconciliation adds 30 counted lines (src/core/checkpoints/index.ts +27,
src/core/tools/ApplyPatchTool.ts +3), measured with scripts/stryker-diff.mjs's own functions against
48be786 before the commit, for 325 of 500 afterwards. The five new test rows are free budget because the
counter excludes __tests__ paths.
Checkpoint queue (threads 7pkQ on Task.ts and 7p-r on checkpoints/index.ts). The per-task queue serialized
checkpoint work but never expired it: after a baseline whose git add/commit outlives checkpointTimeout, the
caller was released by the Promise.race in initiateTaskLoop while the queued saves still started, however
late, committing whatever the workspace had become by then, and a save queued by a task that had already been
canceled still performed checkpoint work. The queue now gates the start of each save: one past its
checkpoint window, or requested by a canceled task, is dropped instead of started late and resolves to the
caller exactly as a missing service does - with no commit - which is how the task-start baseline already
treats a save that produced no commit, by retrying it on a later loop entry. Restores keep no expiry:
dropping a queued restore would silently discard an explicit user action. Four rows in
src/core/checkpoints/__tests__/checkpoint.test.ts cover the expired drop, the canceled drop, a fresh save
running normally after the stall settles (the drop does not poison the queue) and a restore that is never
dropped; one row in Task.spec.ts covers the case the reviewer asked about - a save that commits after the
task already gave up on it does not retire the baseline.
Self-move (thread 7p-w on ApplyPatchTool.ts). A patch whose Move to resolves onto its own Update File path
is a rewrite of that path, not a relocation: the staged content is renamed onto it and the trailing source
unlink then deletes the file that was just committed. The unlink is skipped when the two resolved paths match.
A row in applyPatchTool.execute.spec.ts asserts the rename happened and no unlink happened.
Nothing else from the review's open rows is implemented here: preserving a symlink destination instead of
replacing it (7pkY), the recovery artifact for a host exit between the two renames (7p-u), and the resolved-
target workspace and protection checks belong to the single guarded writer in unit 2 of the split proposed on
PR 1408 (refs/tmp/s3-1408-u2-guardedwrite), where the compare-and-swap write, its rollback and its lock live.
Implementing symlink semantics twice, once in this move path and once in that writer, would give the workspace
two rollback stories.
0 commit comments