Repository navigation
Compare native idle compaction on/off net costs - #8
Conversation
Quest-Claim: 7e6dd161fc8a81d6
Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
|
Design change: Native idle notices now require an explicit Two review suggestions conflict with the accepted task requirements, so the review response preserves those requirements: complete malformed selected idle notices fail the atomic scan, and required inputs without an accepted estimate leave the aggregate net unpriced. The latter still reports conditional costs; estimated activation, client lifetime, and sensitivity continue to use the settled aggregate-winner policy. The full local gate passes 121 tests under Bun and Node 24. The next independent round is reviewing committed head (Written by GPT-6.1 Sol with xhigh) |
Summary
Complete the idle-compaction quest. Compare native Claude
idleCompactionon/off at current controls and after the TTL/window recommendations, and recommend the lower estimated aggregate net cost. Charge final unresumed summaries, preserve full system/project/resumed prefixes, carry context changes through later requests and summaries until convergence, and retain actual returned cache evidence. Sensitivity explains the estimate instead of vetoing it.The shared terminal renderer shows both baselines, window/monthly on-minus-off costs, opportunities and final/censored counts, lifetime/summary/timing sensitivities and break-evens. Details/JSON retain period eligibility, attribution, activation basis, calibration and context-size costs. Current owner/version/prerequisite guards control actionable changes. Settings and transcripts remain read-only.
Design choices
precomputed, boundary time and duration do not establish idle generation. Native transcripts do not invent historical settings or flag-fetch records. When comparable known-on metadata is absent, use the accepted open-and-awake documented-trigger fallback, including its charge on final periods.src/report.tswith the existing plain/details/JSON/cancellation flow.Public API and wire impact
JSON schema version 1 gains the
idle-compactionmember of the discriminatedCheckResultunion and its period/scenario evidence. Profiles gain optional current idle controls and project-directory owners. Structural events recognize verified native informational idle notices while discarding their text. TypeScript consumers must narrow bycheck. CLI flags, atomic exit 0/1/2 and the read-only/privacy contract are preserved. Human reports use the common renderer; booleans display as true/false.Validation
nix develop --command quest gate just checkpasses: formatting, TypeScript, built JavaScript, 121 synthetic tests under Bun and Node 24, and quest checks.Caused by
autoCompactEnabled: falseas disabling compaction even when a higher scope enables it. The reused resolver now respects the effective highest scope. The remaining work is the new idle quest.Models
Size: M
Implementer: Codex, gpt-6.1-sol, xhigh effort
Review
Rewritten by
quest reviewafter each round.582b3f08-facc-4995-b375-2e98e0e1126d, round 2Every earlier finding is either fixed at the head or refuted by the documented contract, and spot checks of the changed code turned up nothing new, though this round's look at new code was limited.src/idle.ts:1057:Idle scenario drops usage estimates when windows replay nothing;src/idle.ts:1106 now passes `options.estimates` when replayWindows returns the group unchanged (`part.requests === group`), so estimates are no longer dropped.src/reader.ts:950:Idle owners are discovered only for post-since requests;src/reader.ts:1001 calls discoverIdleOwners with `allRequests`, which includes the pre-since cacheContext requests, not just `sortedRequests`.src/idle.ts:255:Pending tool set never clears for id-less or abandoned tool calls;src/idle.ts:290 clears `pending` on every turn-start or turn-end, so abandoned and id-less tool calls no longer persist past their turn.src/reader.ts:934:Idle notice attributed to any earlier compaction with no time bound;src/reader.ts:972-995 follows explicit parentUuid lineage to an auto, same-session boundary that is not yet attributed, and no longer picks the latest earlier compaction by time.src/reader.ts:613:One idle notice without a timestamp aborts the whole scan;README.md:52-54 and docs/semantics.md:464 record the contract that a complete malformed selected record fails the whole scan and that there is no skip-malformed mode, so throwing on a recognized notice with no timestamp is intended.src/idle.ts:939:Math.min spread can overflow the stack on large histories;src/idle.ts:989 now takes the minimum with a reduce instead of spreading every request into Math.min.src/idle.ts:903:A single unknown period nullifies the whole profile's idle recommendation;quest/m0/README.md:95-96 states that missing inputs which cannot be estimated prevent a priced recommendation, so a null aggregate when a period is unknown is the specified behavior.src/idle.ts:1144:Break-even bisection has no tolerance; each step is a full replay;src/idle.ts:1214 stops the bisection once `high - low <= Number.EPSILON`, which bounds it to about 52 iterations.src/idle.ts:1075:Quadratic replayed-part lookup, and replay repeated per owner;src/idle.ts:1120-1130 builds a `replayedParts` Map keyed by `${id}:${part}` in place of the per-part `find`, and the author reports the replay is now hoisted out of the per-owner loop.src/idle.ts:1186:Activation-cohort aggregation duplicated between periods() and idleChecks;periods() returns `activationCohorts` (src/idle.ts:441), and idleChecks destructures and reports that same value (src/idle.ts:1146, 1290) instead of a duplicate cohortMap.(Written by GPT-6.1 Sol with xhigh)