test: isolate native controller takeover fixture (#13212)

## Thinking Path

> - Paperclip is the open source app people use to manage AI agents for
work
> - Native runtime recovery protects controller takeover with process
identity checks
> - The live-controller test mocked process liveness but left process
start time to host state
> - This pull request supplies the matching process start time in the
fixture
> - The benefit is deterministic coverage of the live-controller fence

## Linked Issues or Issue Description

Closes #13172

## What Changed

- Complete the live-controller takeover fixture with the recorded
process start time.

## Verification

- Contributor reports focused native restart-recovery tests, related
native tests, integration tests, and typecheck passed locally.
Maintainer reran the 20 native restart-recovery tests successfully and
verified current-head CI, Greptile 5/5, and zero unresolved review
threads.

## Risks

Low risk. This changes test setup only. Production controller fencing is
unchanged.

## Model Used

Original patch by @lorenzozanee; the original author did not record
model details. Maintainer review and verification used OpenAI GPT-6
through Codex with reasoning, repository tools, and code execution. The
exact serving model ID and context window are not exposed by this
environment.

## Checklist

- [x] I have included a thinking path that traces from project context
to this change
- [x] I have specified the model used (with version and capability
details)
- [x] I have checked ROADMAP.md and confirmed this PR does not duplicate
planned core work
- [x] I have searched GitHub for duplicate or related PRs and linked
them above
- [x] I have either (a) linked existing issues with `Fixes: #` / `Closes
#` / `Refs #` OR (b) described the issue in-PR following the relevant
issue template
- [x] I have not referenced internal/instance-local Paperclip issues or
links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip`
URLs)
- [x] My branch name describes the change (e.g. `docs/...`, `fix/...`)
and contains no internal Paperclip ticket id or instance-derived details
- [x] I have run tests locally and they pass
- [x] I have added or updated tests where applicable
- [x] I have updated relevant documentation to reflect my changes (no
documentation change is needed for this test fixture)
- [x] I have considered and documented any risks above
- [x] All Paperclip CI gates are green
- [x] Greptile is 5/5 with no open P2s, recommendations, or follow-ups
- [x] I will address all Greptile and reviewer comments before
requesting merge
This commit is contained in:
lorenzozane 2026-09-12 03:43:19 +08:00 committed by GitHub
parent 847d00bdc3
commit 2fc5e3e43b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -207,6 +207,7 @@ describe("native controller takeover fencing", () => {
}),
now,
isProcessAlive,
readProcessStartedAt: async () => recordedStart,
}),
).resolves.toEqual({ allowed: false, reason: "controller_still_alive" });
expect(isProcessAlive).toHaveBeenCalledWith(123);