test: stabilize process smoke and cache-lock regressions - #1270
Closed
avs-io wants to merge 6 commits into
Closed
Conversation
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
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.
…apshot-lock-test-20260907
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.