Repository navigation
Conversation
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 2 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
3 of 6 tasks
…ed the packs by their chain. A worker that ran an earlier step served files from that step: rebuilding only when the directory was missing left it behind the store. A host-local note says which state this host agreed to, so a tree is moved forward only from a state it built or captured, and a developer's own checkout is left alone. Packs are ordered by the chain they form rather than by a write clock hosts do not share, an empty directory counts as absent, and a failed rebuild removes only what the attempt itself created.
moetemp
force-pushed
the
moe/worktree-freshness
branch
from
September 15, 2026 01:01
827a2fc to
a497d3b
Compare
moetemp
force-pushed
the
2026/08/opencode-temporal
branch
from
September 15, 2026 01:01
1e2f3e7 to
d04430c
Compare
|
This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window. Feel free to open a new pull request that follows our guidelines. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR makes a worker whose project tree is behind the store rebuild it before a drain runs, and orders the snapshot packs by their chain.
A worktree was only rebuilt when the directory was missing, so a worker that had run an earlier step of a session served files from that step. The store's newest capture is the target now. What the rebuild may touch is bounded by a host-local note (
snapshot/tip.ts) saying which state this host's tree is at: a tree is moved only when the note says this host is behind, so a host holding a capture that never shipped is left alone.Packs are ordered by their parent chain rather than by
time_created, because two hosts do not agree on the time, and a later pack written by a slower clock would otherwise read as the older one.Tests:
packages/core/test/snapshot-chain.test.tsand the materializer cases inpackages/core/test/worktree-materialize.test.ts.