fix(heartbeat): carry external stale deadline fix (PEN-2082) - #1025
Conversation
Co-Authored-By: Paperclip <noreply@paperclip.ing> Signed-off-by: Omar Ramadan <omar@blockcast.net>
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
🔗 Paperclip issue: PEN-2082 |
1 similar comment
|
🔗 Paperclip issue: PEN-2082 |
|
Hey @kkroo! Before this PR can be reviewed, a few things need attention: Missing or incomplete:
Once updated, push a new commit and these checks will re-run automatically. — commitperclip |
|
@ally review retry for unchanged exact head |
allyblockcast
left a comment
There was a problem hiding this comment.
Approved after green required checks and no unresolved review threads.
There was a problem hiding this comment.
Ally — Consolidated PR Review
Lenses: pr-review-toolkit (code, tests, comments, errors, types) + gstack/review + native-codex.
Reviewed head: 631c265
Looks good. No Critical or Important issues remain.
Strengths
- The carrier has the same stable patch ID as the cleanly re-reviewed source PR, including the narrowed synthetic-reattach matcher and ordinary-prose regressions.
- Useful output now advances a durable progress clock while keepalive and exact reattach banners cannot extend the destructive stale deadline.
- Closed PR gates cancel exact external Jobs only after an authoritative GitHub response, while API failures remain non-destructive.
- Focused recovery tests and the full required CI suite are green on this exact head.
Recommended Action
- Merge when the remaining repository gates permit.
Thinking Path
Linked Issues or Issue Description
Paperclip issue: PEN-2082.
Related PR: #1023. This is its independent-author carrier. A duplicate search for
external stale deadlinefound only #1023 and this carrier.Bug: after a worker restart, synthetic reattach bookkeeping could count as progress, extending the hard-stale deadline for an external job that had made no useful progress. The same restart path could also re-adopt an orphaned job after its GitHub gate became terminal.
What Changed
[paperclip]banner formats and add ordinary-prose negative regressions.9249106875759c1599a2dc368e8e4bd25e9a50ea.Verification
pnpm exec vitest run server/src/__tests__/heartbeat-process-recovery.test.ts server/src/__tests__/heartbeat-run-log.test.ts server/src/__tests__/github-app-auth.test.ts— 3 files passed, 220 tests passed.pnpm --filter @paperclipai/server typecheck— passed.git diff --check— passed.Risks
Low, bounded behavioral risk in external-lifecycle progress classification and restart adoption. Incorrect filtering could either reap a healthy quiet job or retain a stale job, so the patch includes positive synthetic-banner tests, negative ordinary-prose tests, healthy-progress tests, original-deadline tests, and terminal-gate recovery tests. No schema, deployment, or configuration changes. Roll back by reverting the carrier commit.
This fix is incident work already represented by PEN-2082 and #1023; it does not add or duplicate planned roadmap scope.
Model Used
OpenAI Codex, GPT-5 family (exact deployment ID is not exposed), with tool-assisted reasoning and local code/test execution. The implementation itself is an exact replay of the reviewed #1023 diff; Codex performed the independent carrier replay and verification.
Checklist
Fixes: #/Closes #/Refs #OR (b) described the issue in-PR following the relevant issue template