fix(external-runtime): bound reservation telemetry - #1232
Conversation
|
🔗 Paperclip issue: BLO-23009 |
1 similar comment
|
🔗 Paperclip issue: BLO-23009 |
|
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. |
Emit claim telemetry once per dispatch attempt and emit launched telemetry only for real reservation state transitions. Preserve late Job UID enrichment without rewriting an unchanged run stamp. Co-Authored-By: Paperclip <noreply@paperclip.ing>
18d18a8 to
c9a2c79
Compare
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: 18d18a8
Looks good. The claim path now emits one event and one aggregate refresh per externally visible dispatch attempt, while launch telemetry only records the launching to launched transition.
Critical Issues (0)
Important Issues (0)
Suggestions (0)
Strengths
- Pool claims no longer overcount occupied slot probes as contention, and the new tests cover both exhaustion and a later-slot win.
- Repeated Job identity observations, including late UID enrichment, retain the original launch event and avoid unnecessary heartbeat-run timestamp churn.
Recommended Action
- Merge when the repository's required checks pass.
allyblockcast
left a comment
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: 18d18a8
Looks good. The claim path now emits one event and one aggregate refresh per externally visible dispatch attempt, while launch telemetry only records the launching to launched transition.
Critical Issues (0)
Important Issues (0)
Suggestions (0)
Strengths
- Pool claims no longer overcount occupied slot probes as contention, and the new tests cover both exhaustion and a later-slot win.
- Repeated Job identity observations, including late UID enrichment, retain the original launch event and avoid unnecessary heartbeat-run timestamp churn.
Recommended Action
- Merge when the repository's required checks pass.
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: c9a2c79
Looks good. The claim path now emits one event and one aggregate refresh per externally visible dispatch attempt, while launch telemetry only records the launching to launched transition.
Critical Issues (0)
Important Issues (0)
Suggestions (0)
Strengths
- Pool claims no longer overcount occupied slot probes as contention, and the new tests cover both exhaustion and a later-slot win.
- Repeated Job identity observations, including late UID enrichment, retain the original launch event and avoid unnecessary heartbeat-run timestamp churn.
Recommended Action
- Merge when the repository's required checks pass.
allyblockcast
left a comment
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: c9a2c79
Looks good. The claim path now emits one event and one aggregate refresh per externally visible dispatch attempt, while launch telemetry only records the launching to launched transition.
Critical Issues (0)
Important Issues (0)
Suggestions (0)
Strengths
- Pool claims no longer overcount occupied slot probes as contention, and the new tests cover both exhaustion and a later-slot win.
- Repeated Job identity observations, including late UID enrichment, retain the original launch event and avoid unnecessary heartbeat-run timestamp churn.
Recommended Action
- Merge when the repository's required checks pass.
Thinking Path
Linked Issues or Issue Description
kkroosuccessor reproduces its intended current-master change and incorporates the outstanding late-UID review finding.external-runtime-reservations.ts.What Changed
launchedtelemetry fires only when the state changes.launchedor rewritingheartbeat_runs.updatedAtwhenexternalRunIdis already correct.Verification
PAPERCLIP_HOME=/tmp/paperclip-1151-successor.Ll7wBb/runtime PAPERCLIP_INSTANCE_ID=pr-1151 pnpm test:k8s-concurrency-chaospassed: 4 test files / 278 tests, followed by 2 webhook concurrency tests.pnpm --filter @paperclipai/server typecheckpassed.git diff --checkpassed, and the diff contains nopnpm-lock.yamlchange.Risks
reserved,contended, andlaunchedcounter rates will intentionally fall because they now represent a dispatch attempt or state transition rather than inner probes or steady-state observations.packages/shared/src/telemetry/README.mdtherefore requires no event-contract update.Model Used
Checklist
Fixes: #/Closes #/Refs #OR (b) described the issue in-PR following the relevant issue template