Files
PaperClipAI/tests
DottaandClaude Opus 5.5 07d9316218 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>
2026-11-18 16:49:12 -06:00
..