Repository navigation
refactor: share the remaining small helpers between runtime, the Action and the gateway - #1888
Conversation
…tion requirements
fro-bot
left a comment
There was a problem hiding this comment.
Verdict: PASS
The helper extractions preserve production behavior. No introduced correctness, security, or public API compatibility issues identified.
Blocking issues
None
Non-blocking concerns
None
Missing tests
Optional: add fake-timer coverage for positive and negative label-restore backoffs. Existing tests cover zero-delay retries; the new parser and logger tests cover their important edge cases.
Risk assessment (LOW): likelihood of regression, security exposure, or blast radius
Mostly identical extractions, preserving authorization checks, SHA validation, log argument order, and byte formatting. Shared sleep rejects invalid intervals, but production callers use valid defaults or bounded values.
Static review only; no tests, build, lint, or type-check commands were run, as requested.
Run Summary
| Field | Value |
|---|---|
| Event | pull_request |
| Repository | fro-bot/agent |
| Run ID | 39457085184 |
| Cache | hit |
| Session | ses_ea5d9e827ffeODPdj20ymMyPdG |
fro-bot
left a comment
There was a problem hiding this comment.
Verdict: PASS
Re-reviewed d2f19ac against the previously approved head. The only addition is backoff test coverage, which addresses the prior optional feedback: positive-delay timing, immediate negative-delay retries, and mixed sequencing.
Blocking issues
None
Non-blocking concerns
None
Missing tests
None
Risk assessment (LOW): likelihood of regression, security exposure, or blast radius
Production code is unchanged since the prior review. The new tests check retry timing and successful label restoration, including protection against swallowed errors.
Static review only; no tests, build, lint, or type-check commands were run, as requested.
Run Summary
| Field | Value |
|---|---|
| Event | pull_request |
| Repository | fro-bot/agent |
| Run ID | 39461484267 |
| Cache | hit |
| Session | ses_ea5d9e827ffeODPdj20ymMyPdG |
fro-bot
left a comment
There was a problem hiding this comment.
Verdict: PASS
Validated merge commit bec7576 against previously approved d2f19ac. The only incoming change is a runner-hardening action pin update matching main. The reviewed helpers, tests, documentation, and bundles are unchanged; no merge-resolution changes were found.
Blocking issues
None
Non-blocking concerns
None
Missing tests
None
Risk assessment (LOW): likelihood of regression, security exposure, or blast radius
The merge introduces no changes to the previously reviewed implementation or test coverage. Prior approval remains applicable.
Static review only; no tests, build, lint, or type-check commands were run, as requested.
Run Summary
| Field | Value |
|---|---|
| Event | pull_request |
| Repository | fro-bot/agent |
| Run ID | 39467430994 |
| Cache | hit |
| Session | ses_ea5d9e827ffeODPdj20ymMyPdG |
Problem
Copies of a few helpers were still live across runtime, the Action and the gateway:
owner/repo#nentity-ref parser, three identical copies on the repo-access gate path;sleep;Change
@fro-bot/runtimeexportsparseEntityRefRepo, pinned by a new test. The gateway's run-index lookup, redaction gate and run summary call it, and the copies and wrappers are deleted. The doc now saysentity_refis written as a bareowner/repo; the#strip only guards legacy or malformed records.server.ts, the Action'sexecute.tsandcheckpoint.ts, andcoordination-decline.tsuse runtimesleep.coordination-declineskips the wait for zero entries (if (delayMs > 0)), so its restore retries still run.acquire-lockkeeps its localunrefdelay, with a comment explaining why.toRuntimeLogger(execute/runtime-logger.ts, pinned by a new test), oneworkspace-api/sha.tsand oneformatBinaryBytes. The stale comments are fixed.DEFAULT_RUN_TIMEOUT_MS. It is the whole-run ceiling, a different setting from the Action's agent timeout, even though both are 30 minutes today.toErrorMessage.Behaviour
No behaviour change for any input production passes. No existing test file was edited; the only test changes are the two new files.
One edge case: runtime
sleepthrows on negative,NaNor infinite delays, where the old local copies resolved. Only test-injected options can produce those values; the defaults are 100, 200 and 250 ms. The exportedwaitForServerQuiescencegets the same guard.Verification
bun run check-types,bun run lintandbun run buildpass, anddist/is rebuilt.#strip fails 4 of the 10 entity-ref tests, and mis-routingwarningfails 2 of the 8 logger tests.