Skip to content

Add timed Astra boost for reachable task servers - #5

Draft
jesse-merhi wants to merge 2 commits into
mainfrom
jesse/codex-reset-boost
Draft

jesse-merhi wants to merge 2 commits into
mainfrom
jesse/codex-reset-boost

Conversation

@jesse-merhi

@jesse-merhi jesse-merhi commented Sep 12, 2026

Copy link
Copy Markdown
Owner

Review incomplete: Native review found three further issues in this published revision: replayed tool requests can be answered by the controller, quota failures can be dropped during a slow scan, and cleanup retries can interrupt tasks started after cutoff. Repairs are preserved locally and are not included in this PR yet. The review workflow stopped at 406 lines of repair growth against its 300-line allowance; final native and independent review have not passed.

Desktop coverage limitation: Existing desktop app sessions currently use private stdio. This controller cannot attach to those sessions. It covers only task servers explicitly exposed through Unix sockets, and it does not restart or migrate desktop tasks.

CXA can now run a time-bounded boost for reachable tasks. It checks the live account and model catalog, applies Astra / Ultra / Fast to loaded tasks, enrolls newly loaded tasks after their first real message, and stops on a weekly quota reset, a deadline, or a manual request. Cutoff interrupts every tracked task and applies Astra / Medium / Standard to both task settings and global defaults.

The controller journals its work before making changes. Failed cleanup stays visible and blocks another run until the server is reachable and cleanup succeeds. Global defaults remain unchanged while the boost is active, so tasks outside the covered sockets cannot silently inherit expensive settings.

Change breakdown

Part Files +LOC -LOC
Implementation 6 +2366 -8
Tests and fixtures 1 +944 -1
Documentation 1 +61 -0
Total 8 +3371 -9

Proof

There was no earlier boost workflow to compare against. The new behavior was exercised through the built CXA binary against a temporary simulated task server over a real Unix WebSocket. The simulation changed no live account, task, or settings.

$ cxa boost start --until <future RFC3339 time> --socket <temporary socket>
Boost controller started; preparing 1 server(s).

$ cxa boost status
Boost: Active; controller running
Tracked tasks: 2. Cutoff settings: Astra / Medium / Standard.

$ cxa boost stop
Stop requested. The controller will interrupt tasks and apply Astra / Medium / Standard.

$ cxa boost status
Boost: Stopped; controller not running
Tracked tasks: 0. Cutoff settings: Astra / Medium / Standard.
Reason: Stop requested
Observed state User task Child task Global defaults
Active Astra / Ultra / Fast; interrupted, updated, then continued Astra / Ultra / Fast; updated in place Unchanged at Sol / High / Standard
Stopped Interrupted; Astra / Medium / Standard Interrupted; Astra / Medium / Standard Astra / Medium / Standard

Fast mode remains available after cutoff for later manual use. A separate integration case observed weekly usage fall from 72% to 4% and stopped before its future deadline.

How to verify

cargo test --test cxa_cli boost_
./scripts/check.sh

At published head a7c19e7, all project checks passed on Rust 1.98: 38 unit tests, 34 CLI tests, formatting, lint, build, and packaging checks. A separate read-only probe against the installed task server passed initialization and model listing using a temporary home; no model turns were requested. The public cleanup command also wrote the expected defaults using both installed server versions in temporary homes, and recovered a native empty task from a pending-cleanup journal.

The refreshed CLI journey verified that empty tasks stay untouched until their first message, then enroll normally. A task that remains empty does not block cutoff.

The focused integration coverage checks active user-task continuation, in-place child-task updates, enrollment of a newly loaded task, deadline cleanup, weekly-reset cutoff, preflight with no mutation, and recovery from recorded pending cleanup.

Implementation notes

  • The controller supports ChatGPT sessions whose live model catalog advertises Astra with Medium, Ultra, and Fast.
  • Quota reads run about every 15 seconds. Machine sleep, network delay, and requests already in flight mean reset detection is conservative rather than instantaneous.
  • Missing or stale weekly quota data stops the run instead of being treated as a reset.
  • Cleanup errors remain journaled so cxa boost status reports unfinished work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant