Skip to content

tests: F1 reopen resumes the same hold (stale-consent and hosted take-back tests) - #2183

Merged
santoshkumarradha merged 5 commits into
app/v3from
c40/reopen-fence-test
Nov 2, 2026
Merged

santoshkumarradha merged 5 commits into
app/v3from
c40/reopen-fence-test

Conversation

@santoshkumarradha

@santoshkumarradha santoshkumarradha commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

What changes

Only tests. Both came from dev, where every opening of a chat took a new hold. app/v3 resumes the same hold when the installed copy opens again, and only a clean quit releases it (the F1 contract from #2009, pinned by TestFenceF1StartupRenewsExistingHold and TestFenceF1IdleWatchReconnectAndProcessResume). With the real engine present, both tests failed on app/v3:

  • TestAReturnAfterTheWriterReopensIsNotALostRace (internal/syncsetup): its plain reopen kept the hold, so it failed before its real question (writer did not reopen). The writer now quits cleanly and opens again, which is the return that makes a new ownership under F1. The question is unchanged: a consent for the old ownership is refused, and a consent for the current one continues.
  • TestHostedTakeBackReachesAcquireWithoutSharedUploadsOrReleaseDelay (cmd/codeaf): it counted two acquires, the take's and the reopened writer's (made 1 acquires; want both). The reopened writer now resumes the taken hold with a heartbeat. The test records heartbeats too and requires that resume within the same 5s bound. The first-acquire bound and the no-shared-upload check are unchanged.

Validation

Limits

Test-only change. Reopening without a quit is covered by the F1 tests named above.

🤖 Generated with Claude Code

…stale consent meets

app/v3 resumes the same hold when a chat's installed copy opens again (F1,
TestFenceF1StartupRenewsExistingHold and TestFenceF1IdleWatchReconnectAnd-
ProcessResume), and a clean quit releases it. TestAReturnAfterTheWriter-
ReopensIsNotALostRace came from dev, where every open acquired a new fence,
so on app/v3 its plain reopen kept the fence and the test failed before it
reached the consent check. The writer now quits cleanly and opens again,
which is the return that makes a new ownership under F1, and the stale and
fresh consent assertions are unchanged.
…ng again

Same root cause as the reopen test: under F1 the hosted writer that reopens
after a take-back resumes the fence the take acquired with a heartbeat, so
TestHostedTakeBackReachesAcquireWithoutSharedUploadsOrReleaseDelay, which
counted two acquires, failed with the real engine since #2009. It now records
the relay's heartbeats too and requires the reopened writer to resume the taken
hold within the same 5s bound; the first-acquire bound and the no-shared-upload
check are unchanged.
@santoshkumarradha santoshkumarradha changed the title tests: a writer's return after a clean quit is the new ownership a stale consent meets tests: F1 reopen resumes the same hold (stale-consent and hosted take-back tests) Nov 2, 2026
@santoshkumarradha
santoshkumarradha merged commit 937eb49 into app/v3 Nov 2, 2026
1 check passed
@santoshkumarradha
santoshkumarradha deleted the c40/reopen-fence-test branch November 2, 2026 13:24
AbirAbbas added a commit that referenced this pull request Nov 2, 2026
…for branch publication

Rebased onto app/v3, where #2178 and #2183 already cover most of this
branch: the engine-backed fixtures and the hosted take-back's resumed-hold
proof. What is left:

- the hosted move rig and the drive rig's default daemon keep their homes
  under /tmp on Unix, because macOS's temporary folder leaves a workspace
  socket only a few bytes under the address limit;
- the L12 death-branches test waits for A's branch row to hold its three
  orphan turns before it reads them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AbirAbbas added a commit that referenced this pull request Nov 3, 2026
…for branch publication (#2032)

Rebased onto app/v3, where #2178 and #2183 already cover most of this
branch: the engine-backed fixtures and the hosted take-back's resumed-hold
proof. What is left:

- the hosted move rig and the drive rig's default daemon keep their homes
  under /tmp on Unix, because macOS's temporary folder leaves a workspace
  socket only a few bytes under the address limit;
- the L12 death-branches test waits for A's branch row to hold its three
  orphan turns before it reads them.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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