instar 1.3.654 → 1.3.656
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 +40 -1
- package/dist/commands/server.js.map +1 -1
- package/dist/core/LiveTestHarness.d.ts +30 -1
- package/dist/core/LiveTestHarness.d.ts.map +1 -1
- package/dist/core/LiveTestHarness.js +33 -0
- package/dist/core/LiveTestHarness.js.map +1 -1
- package/dist/core/devGatedFeatures.d.ts.map +1 -1
- package/dist/core/devGatedFeatures.js +6 -0
- package/dist/core/devGatedFeatures.js.map +1 -1
- package/dist/core/rateLimitFalsePositiveMatrix.d.ts +28 -0
- package/dist/core/rateLimitFalsePositiveMatrix.d.ts.map +1 -0
- package/dist/core/rateLimitFalsePositiveMatrix.js +74 -0
- package/dist/core/rateLimitFalsePositiveMatrix.js.map +1 -0
- package/dist/core/types.d.ts +13 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js.map +1 -1
- package/dist/monitoring/CompactionSentinel.d.ts +9 -0
- package/dist/monitoring/CompactionSentinel.d.ts.map +1 -1
- package/dist/monitoring/CompactionSentinel.js +8 -0
- package/dist/monitoring/CompactionSentinel.js.map +1 -1
- package/dist/monitoring/PresenceProxy.d.ts +14 -0
- package/dist/monitoring/PresenceProxy.d.ts.map +1 -1
- package/dist/monitoring/PresenceProxy.js +103 -11
- package/dist/monitoring/PresenceProxy.js.map +1 -1
- package/dist/monitoring/QuotaCollector.d.ts.map +1 -1
- package/dist/monitoring/QuotaCollector.js +21 -8
- package/dist/monitoring/QuotaCollector.js.map +1 -1
- package/dist/monitoring/RateLimitSentinel.d.ts +25 -0
- package/dist/monitoring/RateLimitSentinel.d.ts.map +1 -1
- package/dist/monitoring/RateLimitSentinel.js +44 -0
- package/dist/monitoring/RateLimitSentinel.js.map +1 -1
- package/dist/monitoring/ResumeQueue.d.ts +17 -2
- package/dist/monitoring/ResumeQueue.d.ts.map +1 -1
- package/dist/monitoring/ResumeQueue.js +19 -2
- package/dist/monitoring/ResumeQueue.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +2 -2
- package/upgrades/1.3.655.md +29 -0
- package/upgrades/1.3.656.md +68 -0
- package/upgrades/side-effects/false-ratelimit-recovery-completed-sessions.md +113 -0
- package/upgrades/side-effects/honest-session-state-surfaces.md +185 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA2CH,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAU3D,OAAO,EAAE,eAAe,EAAiC,MAAM,iCAAiC,CAAC;AAwBjG,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAGvD,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAwH7D,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AA+EtD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,gBAAgB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAC1C,OAAO,CAUT;AAyID,UAAU,YAAY;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;2DACuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAy4CD,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,eAAe,EACzB,cAAc,EAAE,cAAc,EAC9B,YAAY,CAAC,EAAE,YAAY,EAC3B,WAAW,CAAC,EAAE,WAAW,EACzB,WAAW,CAAC,EAAE,WAAW,EACzB,iBAAiB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,EAGvE,UAAU,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AAO,CAAC,EAGvE,UAAU,CAAC,EAAE,MAAM,OAAO,8BAA8B,EAAE,WAAW,GAAG,IAAI,EAK5E,qBAAqB,CAAC,EAAE,MAAM,OAAO,gCAAgC,EAAE,kBAAkB,GAAG,IAAI,EAKhG,mBAAmB,CAAC,EAAE,MAAM,MAAM,GAAG,IAAI,GAAG,SAAS,GACpD,IAAI,CA8eN;AA2lBD,wBAAsB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAi4gBtE;AAED,wBAAsB,UAAU,CAAC,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAsDzE;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAuD5E"}
|
package/dist/commands/server.js
CHANGED
|
@@ -6672,7 +6672,14 @@ export async function startServer(options) {
|
|
|
6672
6672
|
}
|
|
6673
6673
|
// Wired by the resume-queue boot block (Part B) once the queue exists;
|
|
6674
6674
|
// stays false (no "restart queued" lines) until then or in dry-run.
|
|
6675
|
+
// OWNERSHIP predicate (paused-BLIND) — read by the PromiseBeacon I2
|
|
6676
|
+
// double-spawn coordination guard (must keep deferring to the queue while
|
|
6677
|
+
// paused). Distinct from resumeClaimableForSession below.
|
|
6675
6678
|
let resumeQueuedForSession = () => false;
|
|
6679
|
+
// CLAIMABILITY predicate (paused-AWARE) — read by the ReapNotifier
|
|
6680
|
+
// "restart is queued" copy (honest-session-state-surfaces Finding (c)): a
|
|
6681
|
+
// paused queue won't revive yet, so the claim is suppressed while paused.
|
|
6682
|
+
let resumeClaimableForSession = () => false;
|
|
6676
6683
|
const reapNotifier = new ReapNotifier({
|
|
6677
6684
|
resolveTopic: (tmuxSession) => {
|
|
6678
6685
|
const t = telegram?.getTopicForSession(tmuxSession);
|
|
@@ -6697,7 +6704,9 @@ export async function startServer(options) {
|
|
|
6697
6704
|
recordNotify: (e) => reapLog.recordNotify(e),
|
|
6698
6705
|
quietHoursEndAt: (now) => notificationBatcher.quietHoursEndAt(now),
|
|
6699
6706
|
summaryReleaseAt: (now) => notificationBatcher.nextSummaryReleaseAt(now),
|
|
6700
|
-
|
|
6707
|
+
// Finding (c): the user-facing "restart is queued" copy reads the
|
|
6708
|
+
// CLAIMABILITY predicate (false while paused), NOT the ownership one.
|
|
6709
|
+
resumeQueuedFor: (tmuxSession) => resumeClaimableForSession(tmuxSession),
|
|
6701
6710
|
// Honest-recycle (honest-session-recycle-spec): tell ReapNotifier whether
|
|
6702
6711
|
// this session's topic has an ACTIVE autonomous run (and how long is left),
|
|
6703
6712
|
// so an age-limit RECYCLE of a still-active run reads as a continuation
|
|
@@ -6961,7 +6970,10 @@ export async function startServer(options) {
|
|
|
6961
6970
|
else {
|
|
6962
6971
|
// Feed the notifier's "restart is queued" line (live, non-dry-run only).
|
|
6963
6972
|
const rq = resumeQueue;
|
|
6973
|
+
// OWNERSHIP (paused-blind) → I2 double-spawn guard at :11980.
|
|
6964
6974
|
resumeQueuedForSession = (tmuxSession) => rq.hasLiveQueuedEntryFor(tmuxSession);
|
|
6975
|
+
// CLAIMABILITY (paused-aware) → ReapNotifier "restart is queued" copy.
|
|
6976
|
+
resumeClaimableForSession = (tmuxSession) => rq.hasClaimableQueuedEntryFor(tmuxSession);
|
|
6965
6977
|
const resolveTopicForTmux = (tmuxSession) => {
|
|
6966
6978
|
try {
|
|
6967
6979
|
const t = telegram?.getTopicForSession(tmuxSession);
|
|
@@ -9349,9 +9361,16 @@ export async function startServer(options) {
|
|
|
9349
9361
|
// calls that used to live here. Dedupes across the three triggers and
|
|
9350
9362
|
// vetoes zombie cleanup while a recovery is in flight.
|
|
9351
9363
|
const { CompactionSentinel } = await import('../monitoring/CompactionSentinel.js');
|
|
9364
|
+
// A session is a legitimate recovery target ONLY while it is in the running
|
|
9365
|
+
// set. A finished/failed/killed session drops out of listRunningSessions(),
|
|
9366
|
+
// so this is the structural guard that stops both sentinels from "recovering"
|
|
9367
|
+
// a session that is simply done — the false-positive that spammed the user
|
|
9368
|
+
// with throttle-resume nudges on a finished session (live incident 2026-06-24).
|
|
9369
|
+
const isSessionRecoverable = (sessionName) => sessionManager.listRunningSessions().some(s => s.tmuxSession === sessionName);
|
|
9352
9370
|
const compactionSentinel = new CompactionSentinel({
|
|
9353
9371
|
recoverFn: recoverCompactedSession,
|
|
9354
9372
|
projectDir: config.projectDir,
|
|
9373
|
+
isSessionRecoverable,
|
|
9355
9374
|
getClaudeSessionId: (sessionName) => {
|
|
9356
9375
|
const session = sessionManager.listRunningSessions()
|
|
9357
9376
|
.find(s => s.tmuxSession === sessionName);
|
|
@@ -9446,6 +9465,7 @@ export async function startServer(options) {
|
|
|
9446
9465
|
notifyFn: rateLimitNotify,
|
|
9447
9466
|
projectDir: config.projectDir,
|
|
9448
9467
|
getClaudeSessionId: getClaudeSessionIdForName,
|
|
9468
|
+
isSessionRecoverable,
|
|
9449
9469
|
// #33 codex parity: for codex sessions, recovery-verification reads the newest
|
|
9450
9470
|
// codex rollout (account-wide throttle → newest-rollout growth = cleared) and
|
|
9451
9471
|
// the user-facing messages use OpenAI wording.
|
|
@@ -9477,6 +9497,19 @@ export async function startServer(options) {
|
|
|
9477
9497
|
sessionManager.on('apiErrorAtIdle', (sessionName) => {
|
|
9478
9498
|
rateLimitSentinel.report(sessionName, 'idle-error', { errorClass: 'transient-api' });
|
|
9479
9499
|
});
|
|
9500
|
+
// When a session completes, immediately clear any in-flight recovery for it in
|
|
9501
|
+
// BOTH sentinels. The recoverability guard already blocks NEW recoveries on a
|
|
9502
|
+
// finished session and aborts an in-flight one at its next tick; clearing here
|
|
9503
|
+
// frees the recovery slot (and lifts the zombie-kill veto) immediately instead
|
|
9504
|
+
// of waiting for that tick — and is the explicit completion-cleanup the prior
|
|
9505
|
+
// code lacked (clear() existed but had zero callers). (live incident 2026-06-24)
|
|
9506
|
+
// clear() on both sentinels is a pure synchronous timer-cancel + Map.delete that
|
|
9507
|
+
// cannot throw, so no defensive try/catch is needed here (a wrapper would only be a
|
|
9508
|
+
// silent fallback the no-silent-fallbacks ratchet flags — see the methods).
|
|
9509
|
+
sessionManager.on('sessionComplete', (session) => {
|
|
9510
|
+
rateLimitSentinel.clear(session.tmuxSession);
|
|
9511
|
+
compactionSentinel.clear(session.tmuxSession);
|
|
9512
|
+
});
|
|
9480
9513
|
// #33 codex parity: the two triggers above read CLAUDE panes / claude-PID watchdog,
|
|
9481
9514
|
// so a codex session throttled by OpenAI is invisible to them. This poll reads the
|
|
9482
9515
|
// codex account usage; when codex itself flags a rate-limit hit
|
|
@@ -10761,6 +10794,12 @@ export async function startServer(options) {
|
|
|
10761
10794
|
// honest classifier must stay silent so the user hears one voice.
|
|
10762
10795
|
// Reuses the same composed checker the SessionReaper uses for its veto.
|
|
10763
10796
|
isStuckRecoveryActive: (sessionName) => wedgeRecoveryActive?.(sessionName) ?? false,
|
|
10797
|
+
// honest-session-state-surfaces Finding (b): lift the Tier-3 honest
|
|
10798
|
+
// stuck classification into Tier 1 / Tier 2. Dev-gated dark — live on
|
|
10799
|
+
// a development agent, dark on the fleet (the flag is OMITTED from
|
|
10800
|
+
// ConfigDefaults so it resolves through the dev-agent gate). Signal
|
|
10801
|
+
// only — changes the standby MESSAGE TEXT, never the schedule/recovery.
|
|
10802
|
+
standbyHonestyTiers: resolveDevAgentGate(config.monitoring?.standbyHonestyTiers?.enabled, config),
|
|
10764
10803
|
// Shared LLM queue (interactive lane) — cross-monitor concurrency
|
|
10765
10804
|
// and daily-spend-cap with PromiseBeacon.
|
|
10766
10805
|
sharedLlmQueue,
|