mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-19 07:42:38 +01:00
fix: restore master's typecheck and runner SDK input pin (#22242)
## Thinking Path > - Paperclip is the open source app people use to manage AI agents for work > - #22235 added a runner regression test for a turn lost to a mid-run `runnerd` restore > - That test reads `startTurn.mock` inside the initializer of `startTurn` itself > - The CI test-program typecheck rejects this with TS7022 and TS7024, so master fails "Typecheck + Release Registry" > - This pull request counts calls in a local variable instead > - The benefit is that master typechecks again, and the test behaves exactly as before ## Linked Issues or Issue Description Refs #22235, Refs #22234 **What happened?** After #22235 merged, `ci / Typecheck + Release Registry` failed on `packages/paperclip-runner/src/native-session-runtime.test.ts(724)` with TS7022 ("'startTurn' implicitly has type 'any'...") and TS7024. **Steps to reproduce** 1. Run the CI typecheck lane (`typecheck test programs`) on master after #22235. 2. See TS7022 and TS7024 at line 724 of the test. **Expected behavior** The test program typechecks. ## What Changed - The `startTurn` mock in the new test uses a local call counter instead of reading its own `mock.calls`. - `tests/runner-e2e/source-sdk-public-inputs.json`: refresh the pin for `packages/shared/src/app-definitions/github.json`, which #22234 changed without updating it. The Runner support suite fails on master without this. ## Verification - `npx tsc -p packages/paperclip-runner/tsconfig.test.json --noEmit` reports no errors in the test file. - `npx vitest run src/native-session-runtime.test.ts` in `packages/paperclip-runner`: 301/301 pass. ## Risks - Low risk. This changes a test and regenerates a pin with the repository script (`node tests/runner-e2e/source-sdk-public-inputs.mjs <sha> --write`). `source-sdk-public-inputs.test.mjs`: 13/13 pass. ## Model Used - Claude Opus 5.5 (`claude-opus-5-5`) in Claude Code, with tool use. ## 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 - [x] I have considered and documented any risks above - [ ] All Paperclip CI gates are green - [ ] Greptile is 5/5 with no open P2s, recommendations, or follow-ups - [x] I will address all Greptile and reviewer comments before requesting merge 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
eaac8ed0f7
commit
07d9316218
2 files changed
+3
-2
No files matched your search
@@ -721,8 +721,9 @@ describe("executeNativeSession recovery", () => {
|
||||
pendingRuntimeRequests: [], lineage: [],
|
||||
terminalTurns: [{ turnId: lostTurnId, fingerprint: JSON.stringify({ terminalState: "failed", error: failure, result: null }) }],
|
||||
};
|
||||
let turnStarts = 0;
|
||||
const startTurn = vi.fn<NativeSession["startTurn"]>(async () => ({
|
||||
turnId: startTurn.mock.calls.length === 1 ? "turn-recovery" : "turn-continuation",
|
||||
turnId: ++turnStarts === 1 ? "turn-recovery" : "turn-continuation",
|
||||
}));
|
||||
const session: NativeSession = {
|
||||
identity: () => identity,
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
"packages/shared/src/app-definitions/fireflies.json": "2c4605a6044ccdd4e6cd66d2763f80a2fc5c88c0",
|
||||
"packages/shared/src/app-definitions/gauge.json": "da9d1f2bd1592689f7363462c7c432d6f20a156f",
|
||||
"packages/shared/src/app-definitions/github-code-review-bot.json": "c5897ebcbbbf4f0c2d243574748d4e682f14e57e",
|
||||
"packages/shared/src/app-definitions/github.json": "1e7b359b584309c5e6e7c56f46d782c8bdbcd885",
|
||||
"packages/shared/src/app-definitions/github.json": "9eb13cfb65c54ffc6a9b1fb6d32085d4f0a32cbf",
|
||||
"packages/shared/src/app-definitions/gmail.json": "a0f2dcfaaeca5bf54318d8cad82a0cb188e72bea",
|
||||
"packages/shared/src/app-definitions/google-calendar.json": "ab9e93999dd69a5d432ae66195e517c66aad2b74",
|
||||
"packages/shared/src/app-definitions/google-chat.json": "f3cf1f37b4b9f0e937b2af2e8d86ebf5df83ac7c",
|
||||
|
||||
Reference in new issue
Block a user