Skip to content

An effort, place or working copy recorded right after a message is no longer overwritten by its stamp - #2557

Merged
AbirAbbas merged 2 commits into
devfrom
fix/effort-after-open-dev
Nov 10, 2026
Merged

AbirAbbas merged 2 commits into
devfrom
fix/effort-after-open-dev

Conversation

@AbirAbbas

Copy link
Copy Markdown
Collaborator

The dev port of #2556 (the app/v3 fix for #2549). dev has the same deferred stamp and the same unguarded stampMeta, so the terminal product that ships from here had the bug too.

What was true

stampUserLocked captures the model, effort, approval, places and trees when a person speaks. It writes them behind the path, as a deferred metaStamp write. stampMeta, which stampEffort, stampPlaces and stampTrees use, wrote meta.json synchronously and did not wait for that write.

So an effort, a place or a working copy recorded while the stamp was still owed got overwritten with the older values when the stamp landed. The next process then read them back as they had been before. The working copy is the serious one, because it holds work that exists nowhere else.

What is true now

stampMeta settles the owed metaStamp before it takes its snapshot, so whatever lands second is the newer state. When nothing is owed, the settle returns at once.

Proof

New test TestAnEffortSetWhileTheOpeningStampIsOwedIsTheOneKept. It holds the opening stamp through a nil-in-production seam until the effort's write is waiting on it. There is no clock in it.

  • Without the settle it fails 10/10: meta.json says "" after the opening stamp landed.
  • With the settle it passes 50/50.

TestAppEffortRungsRoundTripRealEngine and its focused-retry fix exist only on app/v3, so they are in #2556, not here.

🤖 Generated with Claude Code

AbirAbbas and others added 2 commits November 9, 2026 19:20
…t writes

The dev port of the app/v3 fix for #2549. stampUserLocked captures the model,
effort, approval, places and trees when a person speaks and writes them
behind the path. stampMeta, which effort, places and trees use, wrote
synchronously without waiting for that deferred write. So an effort, a place
or a working copy recorded while the stamp was still owed was overwritten
with the older values when the stamp landed, and the next process read them
back as they were before. This has been true since the deferred user stamp
arrived on 2026-09-11 (#876), including v0.8.2. stampModel got this guard on
2026-10-07 (#1750); stampMeta did not.

stampMeta now settles the owed metaStamp before it takes its snapshot.
TestAnEffortSetWhileTheOpeningStampIsOwedIsTheOneKept holds the stamp until
the effort's write is waiting on it. It fails 10 of 10 without the settle and
passes 50 of 50 with it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@AbirAbbas
AbirAbbas merged commit 4fdad18 into dev Nov 10, 2026
6 checks passed
@AbirAbbas
AbirAbbas deleted the fix/effort-after-open-dev branch November 10, 2026 00:27
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