Repository navigation
fix(alert): derive the request envelope from an alert wait window - #4581
Conversation
The alert command's request envelope was the fixed 90s default, so a longer 'alert wait' window was cut off by the transport before its poll window ended. ALERT_TIMEOUT_POLICY now reads the action and the accepted window through the existing positional-parser budget: only 'wait' widens the envelope to window + margin; get, accept and dismiss keep the fixed envelope. A window above the armable ceiling (2147453647 ms, the client timer limit minus the request margin) is refused by the handler before anything runs with INVALID_ARGS, details.reason 'alert-wait-window-too-long' and details.maxWaitWindowMs, never clamped. Closes #4566 Co-authored-by: Apex <noreply@callstack.ai>
Size Report
Startup median (7 runs, lower is better):
|
There was a problem hiding this comment.
All reported issues were addressed across 9 files
You’re at about 95% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
Apex Sentinel · ✅ ApproveSince the last review: 0 new · 0 still open · 0 no longer raised No open findings. Reviewed with this repository's own Sentinel configuration ( 💬 Talking to SentinelIn a finding's thread, reply with:
On this conversation, comment Earlier reviewsReview of
|
|
@apex-sentinel-staging review |
|
This PR is ready at 4a808cd. Not blocking: the new test for a wait window inside the ceiling only asserts behavior that already worked, and its last block repeats the wait-at-ceiling check, so you could fold the 120000 wait/get/accept guard into the first new test and drop or retarget the older message-regex test at CI is green (22 checks, none failing) and there are no conflicts. Nothing else must happen before merge. None of the earlier review threads still apply at this head, and no lower-priority threads remain. These can be resolved: the fixed alert description for the get leg (#4581 (comment)), the fixed wait-read timing text in the docs (#4581 (comment)), the fixed Not blocking: no run of a real client-to-daemon alert wait longer than 90 s is attached, and the tests cover the registry policy functions and the daemon handler, not the client transport timer. Replay and batch steps with a long |
* origin/main: fix(alert): derive the request envelope from an alert wait window (#4581) fix(android): require a nonzero chunk before a recorder counts as ready (#4559) chore(deps): clear astro and node-forge security alerts (#4577) fix(ios): establish the screen origin of a full-screen private AX root (#4573) docs(agents): trace behavior claims during review (#4576) fix(mcp): trim the press plan text back under the always-loaded byte budget (#4572) refactor(alert): one helper owns the alert runner budget (#4563) feat(interaction): multi-ref press plan lowered through the ordinary press lane (#4296) fix(ios): use the caller's budget for alert get and type the watchdog outcome (#4540) feat(recovery): bound remote health and runner-busy recovery by the command's deadline (#4541) fix(ios): find the navigation bar back button outside the bar's subtree (#4542) feat(open): report device kind, model and osVersion on open and session identity (#4543) fix(apple): use typed screenshot timeouts and observed shutdown recovery (#4544) feat(device-status): report per device whether a new session can take it (#4547) fix(runner): type the refusals for a control the target cannot supply (#4548) refactor(transport): share outgoing transfer phase ownership (#4551) fix(remote): bound artifact preparation and upload phases (#4552)
Summary
alert waitpreviously used the fixed 90-second request envelope, so longer accepted windows could time out early. Its policy derives the envelope from the window plus the existing margin.get,acceptanddismisskeep their existing budgets.Windows above 2147453647 ms are refused with
INVALID_ARGS,details.reason: alert-wait-window-too-longanddetails.maxWaitWindowMs, rather than shortened.Closes #4566. Nine files change; no new flags or native interaction changes. Scope covers timeout admission, regression coverage and help/docs, including Apple-only get budgets and capped first/remaining wait reads.
Validation
189570486a11ae3e637abdd55fcaff2cebb26362; head4a808cd54215c1b9eb72ec9e6b511bd0aac23f89.e9ad4fac9f: four failures against base production files, 25 tests passed with the fix. The 120000 ms wait reproduced90000 !== 150000before the fix..tmp/validation/run-LiklFS/receipt.json: exactCommit=true, checkoutChanged=false, no fail-open reasons.Co-authored-by: Apex noreply@callstack.ai
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.