Skip to content

test(sdk): expect retired ready marker after shared owner close - #6287

Merged
Yeachan-Heo merged 1 commit into
devfrom
fix/topology-ready-marker-after-6265
Oct 3, 2026
Merged

Yeachan-Heo merged 1 commit into
devfrom
fix/topology-ready-marker-after-6265

Conversation

@Yeachan-Heo

Copy link
Copy Markdown
Owner

Why

Dev has been red since e29e39e2 (#6265 merge). Coding-agent shard 3 fails in sdk-machine-lifecycle-topology.test.ts: shared-agent equal saved IDs select one owner without cross-workspace effects in either adapter direction. The test still expects <id>.lifecycle.ready.json to exist after closeSharedOwner.

#6265 (fixes #6261) intentionally retires the ready marker when the owner closes, and it updated the matching assertion in sdk-broker-lifecycle-e2e.test.ts the same way (resolves → rejects). This topology test wasn't in #6265's CI plan, so it was missed.

What

One assertion: after the owner closes, the ready marker is absent. The .lifecycle.json marker is still asserted present. Test-only.

Evidence

  • Local, bun test test/sdk-machine-lifecycle-topology.test.ts -t "shared-agent equal saved IDs": fails 3/3 on e29e39e2, passes 3/3 on its parent 8e709f59.
  • With this change on dev 9c54c088: whole file 7/0, 3 runs out of 3. Biome clean.

—
[repo owner's gaebal-gajae (clawdbot) 🦞]

#6265 (fixes #6261) retires the lifecycle ready marker when the owner
closes; the shared-agent collision topology test still pinned the old
behavior and fails deterministically on dev since e29e39e.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-03T19:10:45.688674Z f248cd7 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@probepark probepark left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review (head f248cd7, gajae-reviewer on behalf of probepark) — approve held

CI: green — all planned checks pass (test:packages/coding-agent/test/sdk-machine-lifecycle-topology.test.ts 2m14s, ts-build:coding-agent, gjc-state-gates, Virtual integration validation).
Scope: +2 / -1, 1 file — packages/coding-agent/test/sdk-machine-lifecycle-topology.test.ts (test-only)
Conventions: CHANGELOG none (test-only fix, not required), generated files none, labels none
Notable:

  • sdk-machine-lifecycle-topology.test.ts:L639-642 — the ready-marker assertion after closeSharedOwner flips from resolves.toBeNull() to rejects.toThrow(), matching #6265's intentional retirement of <id>.lifecycle.ready.json on close and the equivalent assertion in sdk-broker-lifecycle-e2e.test.ts:L5762-5763. .lifecycle.json stays asserted present (L638), and assertEndpointAndMarkerAbsent(loser, …) still covers the loser. No other closeSharedOwner call site in the file asserts the ready marker afterwards (L451-452 do not), so this is the only stale expectation.
  • Doc nit (non-blocking): the JSDoc on closeSharedOwner (L343, "its lifecycle marker is retained until session.delete removes it") could mention that the ready marker is retired, to match the new comment at L639.
    Blocking: none found in code review.

Approve held: CI plan did not run cd packages/coding-agent && bun run check (biome + check:types; check:@gajae-code/coding-agent is not in the head CI plan) on f248cd7; run it at this head (or add it to the plan) and re-request review.

@Yeachan-Heo

Copy link
Copy Markdown
Owner Author

#6287 and #6294 make the same one-line change to sdk-machine-lifecycle-topology.test.ts (ready marker resolves.toBeNull() → rejects.toThrow()), the fix for dev's shard 3 failure since e29e39e2. Whichever gets an exact-head approval first gets merged, and I'll close the other.

—
[repo owner's gaebal-gajae (clawdbot) 🦞]

@snowykr snowykr left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict

APPROVED

Summary

This test-only change updates the shared-owner lifecycle topology test to expect the ready marker to be retired after closeSharedOwner while the lifecycle marker remains. That matches the established graceful-close contract and analogous broker lifecycle coverage. No merge-blocking defects were found.

Findings / Required Changes

No blocking or actionable findings.

Non-blocking Observations

The updated fs.access(...).rejects.toThrow() assertion confirms access fails, but not specifically that the marker path is absent (a dangling symlink would also reject). That requires external filesystem mutation outside the controlled fixture and is not a blocker; using lstat and checking ENOENT would make the assertion more precise.

CI / Verification

For the exact reviewed head, 15 GitHub check runs succeeded and 8 were skipped; none failed or remained pending. The changed-test affected-path validation and its evidence/aggregate jobs succeeded. No tests were executed locally during this review.

Axis Coverage

Axis Verdict Coverage
A1 — Intent / Policy / Contract APPROVED The marker lifecycle expectation matches the existing close contract and analogous tests; no intent_projection was found.
A2 — Architecture / Correctness / Failure APPROVED The diff changes only the test assertion; the reachable cleanup and close paths support the expected post-close state.
A3 — Security / Privacy / Trust APPROVED No production code, attacker-controlled input, authority, or trust boundary changes.
A4 — Verification / Tests / CI APPROVED Exact-head affected-test validation and aggregate evidence passed; remaining skipped jobs are not failures.
A5 — Context / Compatibility / Platform APPROVED Readiness consumers, persisted marker handling, and analogous lifecycle tests are consistent; no material reuse gap was identified.

@Yeachan-Heo
Yeachan-Heo merged commit 496cddb into dev Oct 3, 2026
23 checks passed
@Yeachan-Heo

Copy link
Copy Markdown
Owner Author

Merged into dev as 496cddb7. snowykr approved the exact head f248cd7; CI 15/0; test-only, 9 behind dev with no overlap. This fixes dev's shard 3 topology failure from e29e39e2.

—
[repo owner's gaebal-gajae (clawdbot) 🦞]

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.

3 participants