Skip to content

test: stabilize process smoke and cache-lock regressions - #1270

Closed
avs-io wants to merge 6 commits into
getagentseal:mainfrom
avs-io:codex/process-smoke-reliability
Closed

test: stabilize process smoke and cache-lock regressions#1270
avs-io wants to merge 6 commits into
getagentseal:mainfrom
avs-io:codex/process-smoke-reliability

Conversation

@avs-io

@avs-io avs-io commented Sep 7, 2026

Copy link
Copy Markdown
Member

Three process-test fixtures can fail for reasons unrelated to their assertions: a chatty Node child gets only 600ms to boot, a hostile-model output check inherits color decoration, and a degraded-cache regression guesses when another process has reached the refresh lock.

The watchdog fixture writes immediately after boot and then regularly beyond a two-second silence budget; boot time still counts. The hostile-model child disables color while retaining every source-safety assertion. The degraded-cache case moves into the existing serial lock suite and waits for an observed failed exclusive lock acquisition before releasing the holder. Its child has bounded termination and is stopped before fixture cleanup.

The degraded response must still report stale, retain the older call count and write no snapshot; the next clean response must include the new call and persist its snapshot. Reintroducing the bad save gate makes the same test fail at the no-snapshot assertion. The watchdog fixed-cap negative control also fails as intended.

Validation on current main 0b1cf56 plus this branch: 3,745 CLI tests and 37 serial lock tests passed, with 5 existing CLI skips. The unchanged watchdog/hostile-model changes retain their earlier desktop and negative-control evidence. Independent review and root reproduction covered the lock handshake, assertion preservation and child cleanup. No production source differs from current main.

Independent default app npmtest killed the chatty optimize child at 614ms
because the 600ms idle timer started at spawn and the first progress byte
waited on Node boot plus setInterval. Emit the first stderr byte immediately
after boot, then ten 400ms ticks (result ticks 11) under a 2s silence budget.
Node boot still counts; the larger smoke window absorbs it. Work still
outlives a fixed total-runtime cap. Production already resets on every byte;
timeout constants unchanged.
FORCE_COLOR=1 on agent/CI runners makes chalk paint table chrome with ESC.
The C0/C1 assertion is a model-ID sanitization check, not a color check.
@avs-io
avs-io marked this pull request as ready for review September 7, 2026 16:47
Move the cross-process status-snapshot gate off the parallel pool.
Wait for the child's first session-refresh.lock EEXIST via a test-only
--import probe that syncs ESM builtin exports, then assert degraded
stale=true/calls=1/no snapshot and a clean calls=2 persisted snapshot.
Give runCliAsync the same 60s wall as spawnSync. A hang SIGTERMs, then
SIGKILLs after 1s; both timers clear on a normal close. After lock-wait
ready, a non-zero/signaled child fails as stuck rather than awaiting
unbounded.
@avs-io avs-io changed the title test: stabilize process watchdog and hostile-model smoke checks test: stabilize process smoke and cache-lock regressions Sep 7, 2026
@iamtoruk

iamtoruk commented Sep 8, 2026

Copy link
Copy Markdown
Member

Landed via #1271 (159198b), which carried these commits. main already matches this branch on all five files.

@iamtoruk iamtoruk closed this Sep 8, 2026
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.

2 participants