Repository navigation
fleet actions exec: tiered lease-extension policy (code#13774) - #13854
Merged
Merged
Conversation
Implements the design amendment recorded on #13774 (Drew's policy, 2026-11-23): extension requests past a session's max lifespan are decided in three tiers. - Tier 1 (first extension within the auto caps): granted by /actions-exec-extend-request itself; notification-only PM push (plain alert, no needsDrew block). - Tier 2 (second extension): pends under a 10-minute deny window (EXT_DENY_WINDOW_S); the push states it approves itself at window end unless denied; silence settles it on the next verb that touches the session (the agent's poll in practice); the hard deadline covers the window so the agent is not killed mid-question. - Tier 3 (third+, oversized raw ask, or past the cumulative 60-minute auto cap): the v1 manual flow, unchanged in shape. Counters (ext_count/ext_total_s) increment on every grant and never on a deny; ext_state records the outcome (auto-approved / silence-approved / approved / denied). Push keys gain the extension ordinal so successive pushes on one session no longer dedupe-suppress each other. Every tier's push carries the full detail set (handle, seat, repo, run + attempt deep link, lease state, ask, cumulative before/after, tier, consequence) via a tier-aware build_extension_alert_body over a new ExtensionAlert detail struct. Schema: additive columns on actions_exec_sessions (ext_count, ext_total_s, ext_tier, ext_decide_after, ext_reason, context) in the DDL of record plus the house pragma-checked ALTER migration in turso_queue::core. The open verb accepts an optional context (seat-supplied task/issue link), threaded from `fleet actions exec start --context`; the extend/decide CLI output names the tier and outcome. Tests: the tier ladder end-to-end against the rusqlite fake (tier-1 auto, tier-2 silence, tier-2 deny, tier-3 manual, size-cap and cumulative-cap escalation, deny-window deadline) and alert-body shape per tier in needs_drew.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 43 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
This was referenced Nov 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements the tiered lease-extension policy for fleet Actions exec, per the design amendment recorded on #13774 (comment 7116645799, Drew's words of 2026-11-23 ~17:06 CST). Lane ACTIONS-EXEC-3.
The tiers (tunables in
turso_queue::actions_exec):EXT_AUTO_SIZE_CAP_S1800 (a raw ask above it is tier 3 even when first),EXT_TIER1_MAX_COUNT1,EXT_TIER2_MAX_COUNT2,EXT_AUTO_TOTAL_CAP_S3600,EXT_DENY_WINDOW_S600./actions-exec-extend-requestapplies the grant itself (same conditional-UPDATE shape as a manual approval); the PM push is a plain notification with no needsDrew block.ext_decide_after; the session's hard deadline covers the window so the agent survives it; deny via extend-decide ends it at the current cap, approve-now applies at once, silence settles it on the next verb touch (the agent's poll in practice) assilence-approved. One push per request.Push payload (all tiers, per Drew's detail requirement): handle, session
contextlink when recorded, seat, repo, workflow + run id/attempt with an attempt deep link, the stated reason, lease state (opened / granted / elapsed / lease_until / max_until), the ask, cumulative extensions before → after, the tier, and the deny/timeout consequence. Alert keys are ordinal-scoped (actions-exec-ext:<handle>:<n>) so successive extension pushes on one session no longer dedupe-suppress each other.Schema: additive
actions_exec_sessionscolumns (ext_count,ext_total_s,ext_tier,ext_decide_after,ext_reason,context) in the DDL of record + the housepragma_table_info-checked ALTER migration inturso_queue::core. Open accepts an optionalcontext, threaded from a newfleet actions exec start --contextflag; extend/decide CLI output names tier and outcome (including the late-decision-after-silence-approval case).Named gap (unchanged from v1): the phone tap → broker write-back is still the PM stack's next phase — tier-2 denies and tier-3 answers land via a seat-run extend-decide on Drew's recorded answer. The push deep link itself is wired (run URL in
links).Tests: fleet-queue suite green (616 passed across targets, incl. 9 new: tier-1 auto-approve, tier-2 silence, tier-2 deny, tier-3 manual, cumulative-cap escalation, deny-window deadline, 3 alert-body oracles; the v1 extension test reworked onto tier-3 oversized asks). Fleet bin + registry suites in the PR checks below.
{ "direct_parent": null, "links": [], "lineage": { "design": null, "roadmap_item": null, "priority": null }, "pm_meta": 1, "provenance": { "queue_id": null, "scheduled_start": null, "picked_up_at": null, "work_started_at": null, "created_at": "2026-11-23T23:29:11Z", "session_id": null, "lane": null, "host": "amd", "worktree": "/home/user/wt-actions-exec-3", "model": null, "lane_start_issues": [], "workspace_ref": { "kind": "worktree", "id": "/home/user/wt-actions-exec-3", "repo": "developing-today/code", "branch": "lane/actions-exec-3-tiers", "sha": "27f01f60b18c8670e8afa6b84e6c4e3beac28249" }, "auth_subject": "oc-code-08", "stamped_by": "fleet 0.1.0 (native)" } }Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.