fix(test): unstick Smithery probe lifecycle and pin DAEMON_GENERATION 54 - #3972
Conversation
Dev CI run 31133356543 at f1eb7b5 failed two coupled contracts: 1) notifications-topic-registry.test.ts still pinned DAEMON_GENERATION to 53 after #3965 shipped generation 54 — pure stale assertion. 2) Smithery "still honors inherited Smithery configuration" hit exactly 60001.59ms. Prior harness set a 45s kill timer but still awaited Promise.all(stdout, stderr, exited). When kill did not complete the pipe reads, the outer it(..., 60_000) failed while sibling cases before and after completed in ~370ms. This is a child-process lifecycle hang, not an assertion bug and not fixed by another blind timeout bump. Repair: - Pin topic-registry generation contract to 54 / serving epoch 5. - Probe harness: minimal child env (no full process.env copy), stdin ignore, per-attempt 15s deadline via settled Promise race + SIGKILL, up to 2 timeout-only retries. Assertions unchanged. Lore-id: d4f2a801 Confidence: high Scope-risk: narrow Reversibility: trivial Tested: topic-registry generation pin; smithery 3× sequential + 6× parallel contention (all 5 pass / ~3s) Not-tested: full 8-shard Dev CI load shape
05e3831 to
3946f88
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3946f8883b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| settle(() => { | ||
| resolve(JSON.parse(stdout.trim()) as Resolved); |
There was a problem hiding this comment.
Parse probe output before marking the attempt settled
If the probe exits successfully but emits empty, truncated, or otherwise malformed stdout, settle sets settled = true before JSON.parse runs. The parse error reaches the surrounding catch, but its rejection is ignored because the attempt is already marked settled; the deadline callback is ignored for the same reason, leaving promise pending until the outer 60-second test timeout. Parse first or allow a callback failure to reject the attempt.
AGENTS.md reference: AGENTS.md:L146-L150
Useful? React with 👍 / 👎.
Yeachan-Heo
left a comment
There was a problem hiding this comment.
Red-team review — MERGE_READY / CLEAR
Exact head: 3946f8883b6ce2ca0185aada91d6ac726c1a0a12
Base: dev (contains 627e87d1a; exact-head ancestry OK)
Scope (test harness only)
| File | Change |
|---|---|
notifications-topic-registry.test.ts |
Pin DAEMON_GENERATION 53→54 |
smithery-env-trust.test.ts |
Probe lifecycle isolation (minimal env, race+SIGKILL, retries) |
CHANGELOG.md |
Unreleased notes |
No product / #3908 / #3855 implementation changes.
Causality (run 31133356543 @ f1eb7b5)
- Generation pin: deterministic stale assert after #3965.
- Smithery: case 4 hit 60001.59ms while neighbors ~370ms; prior 45s kill left
Promise.all(stdout/stderr/exited)hung → outer it timeout. Lifecycle fix, not timeout inflation.
CI
- Dev CI run 31135186765: success
- Check-runs: 14 success / 6 skipped / 0 failure / 0 pending
Verdict
MERGE_READY / CLEAR.
— census CI/test-harness repair chain
Blocker attribution (exact dev
f1eb7b594/ run 31133356543)Two coupled test-harness / pin failures after #3965; neither is product behavior for #3908/#3855.
(1) Stale generation pin — deterministic
packages/coding-agent/test/notifications-topic-registry.test.tspublishes generation 53 at serving epoch 5DAEMON_GENERATION === 5354(shipped by #3965 owner postmortem)Cause: pin not updated when
DAEMON_GENERATIONbumped 53→54.Sibling:
notifications-telegram-daemon.test.tsalready pinned 54.(2) Smithery inherited-config hang — child-process lifecycle
packages/coding-agent/test/smithery-env-trust.test.tsstill honors inherited Smithery configurationitbudget)Causality chain (evidence-backed):
kill()timer fired (or would have) butPromise.all([stdout.text(), stderr.text(), exited])never settled.ittimeout.Not: assertion wrong, provider behavior, or need for a third blind timeout bump.
Repair (test harness only)
Generation pin
publishes generation 54 at serving epoch 5→toBe(54).Smithery probe harness
process.envcopy correlated with stalled child startupstdin: "ignore"beforeAllwarmup + 60s outeritAssertions and Smithery product code unchanged.
Verification (local)
publishes generation 54…Non-goals
dev