instar 1.3.812 → 1.3.813
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/server.d.ts.map +1 -1
- package/dist/commands/server.js +4 -0
- package/dist/commands/server.js.map +1 -1
- package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
- package/dist/core/PostUpdateMigrator.js +6 -0
- package/dist/core/PostUpdateMigrator.js.map +1 -1
- package/dist/core/types.d.ts +3 -1
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js.map +1 -1
- package/dist/monitoring/QuotaCollector.d.ts +10 -4
- package/dist/monitoring/QuotaCollector.d.ts.map +1 -1
- package/dist/monitoring/QuotaCollector.js +71 -2
- package/dist/monitoring/QuotaCollector.js.map +1 -1
- package/dist/monitoring/QuotaTracker.d.ts +2 -0
- package/dist/monitoring/QuotaTracker.d.ts.map +1 -1
- package/dist/monitoring/QuotaTracker.js +25 -5
- package/dist/monitoring/QuotaTracker.js.map +1 -1
- package/dist/scaffold/templates.d.ts.map +1 -1
- package/dist/scaffold/templates.js +1 -0
- package/dist/scaffold/templates.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +19 -19
- package/src/scaffold/templates.ts +1 -0
- package/upgrades/1.3.813.md +23 -0
- package/upgrades/eli16/codex-quota-load-shed.md +21 -0
- package/upgrades/side-effects/codex-quota-load-shed.md +91 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Upgrade Guide — vNEXT
|
|
2
|
+
|
|
3
|
+
<!-- assembled-by: assemble-next-md -->
|
|
4
|
+
<!-- bump: patch -->
|
|
5
|
+
|
|
6
|
+
## What Changed
|
|
7
|
+
|
|
8
|
+
Solo Codex agents now feed real rollout quota windows into the global job/session load-shed brake.
|
|
9
|
+
|
|
10
|
+
## What to Tell Your User
|
|
11
|
+
|
|
12
|
+
A solo Codex agent stops starting work when its five-hour or weekly account window is exhausted. Missing, stale, unreadable, or incomplete Codex quota data now pauses new work conservatively instead of failing open into an unknown wall.
|
|
13
|
+
|
|
14
|
+
## Summary of New Capabilities
|
|
15
|
+
|
|
16
|
+
- Authoritative `codex-rollout` quota state for the global brake.
|
|
17
|
+
- Healthy Codex windows allow work; exhausted windows shed it.
|
|
18
|
+
- Missing or invalid Codex readings persist explicit uncertainty and fail safe.
|
|
19
|
+
- Existing Claude OAuth-authoritative and JSONL-degraded behavior remains unchanged.
|
|
20
|
+
|
|
21
|
+
## Evidence
|
|
22
|
+
|
|
23
|
+
Scoped unit coverage exercises both sides of the gate and every uncertainty boundary. Collector-to-manager integration proves persisted wall shedding and replacement of prior healthy headroom when the reader disappears. Full lint, build, and CI matrix gate release.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# ELI16 — Solo Codex agents stop spawning into a quota wall
|
|
2
|
+
|
|
3
|
+
## What Changed
|
|
4
|
+
|
|
5
|
+
Instar’s global quota brake already protected Claude and Gemini work, and the subscription pool already understood Codex quota. But a Codex agent with only one account had no producer feeding those real Codex windows into the global brake. When that account was exhausted—or when its quota reading disappeared—the agent could keep starting work that could not succeed.
|
|
6
|
+
|
|
7
|
+
## What to Tell Your User
|
|
8
|
+
|
|
9
|
+
Solo Codex agents now read the same authoritative five-hour and weekly rollout windows already used by the subscription pool. Healthy headroom allows work normally. A full window stops new jobs and sessions. If the Codex reading is missing, stale, unreadable, or incomplete, the Codex brake fails safe and pauses new work instead of repeatedly spending attempts against an unknown wall.
|
|
10
|
+
|
|
11
|
+
## Summary of New Capabilities
|
|
12
|
+
|
|
13
|
+
- Start the existing quota collector for Codex agents instead of skipping every non-Claude framework.
|
|
14
|
+
- Convert the existing rollout reader’s primary and secondary windows into the shared quota-state shape with `codex-rollout` provenance.
|
|
15
|
+
- Treat Codex rollout data as authoritative at the same load-shed decision layer as provider-native capacity signals.
|
|
16
|
+
- Persist explicit uncertainty when a previously healthy reading disappears, preventing stale headroom from silently keeping the gate open.
|
|
17
|
+
- Preserve Claude semantics: OAuth remains authoritative, JSONL remains bounded-degraded, and missing Claude data retains its existing behavior.
|
|
18
|
+
|
|
19
|
+
## Evidence
|
|
20
|
+
|
|
21
|
+
Focused unit tests cover healthy, exhausted, missing, unreadable, and first-boot Codex states plus explicit Claude regression boundaries. Integration coverage drives collector through QuotaManager into the persisted quota file and proves both wall shedding and healthy-to-unknown fail-safe replacement.
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# Side-Effects Review — Codex quota load-shed parity
|
|
2
|
+
|
|
3
|
+
**Version / slug:** `codex-quota-load-shed`
|
|
4
|
+
**Date:** 2026-07-10
|
|
5
|
+
**Author:** Instar-codey
|
|
6
|
+
**Second-pass reviewer:** framework_guard_review
|
|
7
|
+
|
|
8
|
+
## Summary of the change
|
|
9
|
+
|
|
10
|
+
Boot now constructs `QuotaCollector` for `codex-cli`, using the existing rollout reader. The collector maps complete primary/secondary windows to shared `QuotaState`, persists explicit `quotaUnknown` when collection is missing or broken, and attributes both as `codex-rollout`. `QuotaTracker` treats complete Codex readings as authoritative and Codex uncertainty as fail-safe denial while preserving Claude semantics.
|
|
11
|
+
|
|
12
|
+
## Decision-point inventory
|
|
13
|
+
|
|
14
|
+
- Framework collector construction — modify — Codex gains a real quota producer; Claude construction is unchanged.
|
|
15
|
+
- Codex rollout mapping — add — provider windows become shared quota state.
|
|
16
|
+
- Solo-agent quota authority — modify — complete Codex state gates normally; Codex uncertainty sheds.
|
|
17
|
+
- Existing-agent awareness migration — add — all framework templates learn the new safety posture.
|
|
18
|
+
|
|
19
|
+
## 1. Over-block
|
|
20
|
+
|
|
21
|
+
A Codex agent with no readable complete rollout pauses new jobs/sessions, including first boot before its first quota-bearing turn. This is intentional fail-safe behavior requested for a framework where unknown capacity may already be a hard wall. Existing live sessions are not killed. Claude missing data remains fail-open. Gemini's provider-native capacity signal is now explicitly authoritative; at the normal 100% wall behavior is unchanged, while an implausible >100% provider value now sheds all priorities instead of entering bounded-degraded mode—the safe direction for a native capacity signal.
|
|
22
|
+
|
|
23
|
+
## 2. Under-block
|
|
24
|
+
|
|
25
|
+
The newest persisted rollout can lag actual provider consumption until Codex emits another rate-limit-bearing event. Thresholds therefore remain the existing brake thresholds, not a prediction system. If quota tracking is disabled entirely, this subsystem remains intentionally absent. A complete but old snapshot is rejected by the tracker’s existing staleness bound and then follows Codex fail-safe denial.
|
|
26
|
+
|
|
27
|
+
## 3. Level-of-abstraction fit
|
|
28
|
+
|
|
29
|
+
The existing Codex rollout reader owns provider-log parsing. `QuotaCollector` owns normalization and persistence into the shared state shape. `QuotaTracker` remains the single job/session spawn authority. No second parser or parallel spawn gate is introduced.
|
|
30
|
+
|
|
31
|
+
## 4. Signal vs authority compliance
|
|
32
|
+
|
|
33
|
+
Required reference: [docs/signal-vs-authority.md](../../docs/signal-vs-authority.md)
|
|
34
|
+
|
|
35
|
+
- [x] No — the rollout reader and collector produce structured provider signals consumed by the existing quota authority.
|
|
36
|
+
|
|
37
|
+
Quota exhaustion and missing-data posture are constrained operational invariants, not conversational judgments. The tracker already owns this deterministic authority; the change supplies the missing Codex provenance and framework-specific uncertainty rule.
|
|
38
|
+
|
|
39
|
+
## 5. Interactions
|
|
40
|
+
|
|
41
|
+
- **Shadowing:** the Codex collector replaces the previous explicit “no framework usage meter” skip only for `codex-cli`.
|
|
42
|
+
- **Double-fire:** a solo Codex agent has one `QuotaManager` and one collector. Subscription-pool polling writes account metadata, not this global quota file.
|
|
43
|
+
- **Races:** `QuotaTracker.updateState` retains its atomic temp-write/rename. Failed collection writes explicit uncertainty so a prior cached healthy state cannot survive invisibly.
|
|
44
|
+
- **Feedback loops:** shedding prevents new spawns; it does not start retries, migrations, or swaps. The next successful scheduled collection overwrites uncertainty and reopens the gate from real headroom.
|
|
45
|
+
- **Gemini scope:** `gemini-cli-capacity` joins the explicit authoritative-source set. A regression test locks its real-wall and over-wall behavior so this additive safety choice is deliberate rather than a silent ride-along.
|
|
46
|
+
|
|
47
|
+
## 6. External surfaces
|
|
48
|
+
|
|
49
|
+
Codex agents may pause new background jobs and session spawns when capacity is exhausted or unknown. The existing quota-state file gains additive `codex-rollout` and `quotaUnknown` values. No endpoint, credential, network call, URL, or operator action is added; rollout reads are local and read-only.
|
|
50
|
+
|
|
51
|
+
## 6b. Operator-surface quality
|
|
52
|
+
|
|
53
|
+
No operator surface — not applicable.
|
|
54
|
+
|
|
55
|
+
## 7. Multi-machine posture
|
|
56
|
+
|
|
57
|
+
**Machine-local by design.** A rollout describes the Codex account/config home available on that machine, and the global spawn brake controls that machine’s work. Subscription-pool quota continues its separate replicated metadata path. This feature emits no direct user notice, holds only the existing per-machine quota-state file, does not strand topic state, and generates no URLs.
|
|
58
|
+
|
|
59
|
+
## 8. Rollback cost
|
|
60
|
+
|
|
61
|
+
Pure code and additive-state rollback. Older readers ignore the extra fields/source at runtime only after code rollback; deleting the optional quota-state file is not required because the collector will replace it. No database migration or credential repair exists.
|
|
62
|
+
|
|
63
|
+
## Conclusion
|
|
64
|
+
|
|
65
|
+
The change closes the last solo-Codex fail-open path at the existing choke point. The design deliberately persists uncertainty rather than letting yesterday’s healthy headroom survive a broken reader. Claude authority/degradation behavior is explicitly regression-tested. Clear to ship after scoped gates and authoritative CI.
|
|
66
|
+
|
|
67
|
+
## Second-pass review
|
|
68
|
+
|
|
69
|
+
**Reviewer:** framework_guard_review
|
|
70
|
+
|
|
71
|
+
**First independent read: concern.** A corrupt quota-state file could return previously healthy cached Codex state, and a complete rollout without a valid capture timestamp was being stamped fresh. Both would let uncertainty masquerade as headroom.
|
|
72
|
+
|
|
73
|
+
**Resolution:** Codex now clears cached state on corrupt/stale file reads while Claude preserves last-known-good behavior. Collector authority additionally requires a finite capture timestamp no older than the configured freshness window and no more than five minutes in the future; otherwise it persists `quotaUnknown`. Adversarial unit tests cover cached-healthy → corrupt and missing-timestamp → deny. Revised concurrence recorded below.
|
|
74
|
+
|
|
75
|
+
**Final independent read: concur.** Fail-safe cache and timestamp handling are correct, Claude behavior is preserved, boot wiring is sound, and the reviewer’s focused suite passed 75/75.
|
|
76
|
+
|
|
77
|
+
**CI follow-up:** The intentional framework-specific corrupt-file catch is classified inline with the repository's narrow `@silent-fallback-ok` annotation. This changes no runtime behavior; it makes the already-reviewed fail-safe fallback explicit to the no-silent-fallbacks enforcement test.
|
|
78
|
+
|
|
79
|
+
**E2E clock follow-up:** The live Codex pool fixture now injects a fixed clock matching its recorded rollout. Its five-hour reset timestamp had crossed during CI, so the real poller correctly zeroed that expired window while the assertion still expected the pre-reset value. Freezing the fixture clock removes the wall-clock time bomb without changing production expiry behavior.
|
|
80
|
+
|
|
81
|
+
## Evidence pointers
|
|
82
|
+
|
|
83
|
+
- `tests/unit/codex-quota-load-shed.test.ts`
|
|
84
|
+
- `tests/unit/quota-tracker.test.ts`
|
|
85
|
+
- `tests/unit/quota-tracker-pool-aware.test.ts`
|
|
86
|
+
- `tests/unit/quota-collector.test.ts`
|
|
87
|
+
- `tests/integration/codex-quota-load-shed.integration.test.ts`
|
|
88
|
+
|
|
89
|
+
## Class-Closure Declaration
|
|
90
|
+
|
|
91
|
+
No agent-authored-artifact defect and no self-triggered controller — not applicable.
|