Skip to content

test(sdk): fix stale lifecycle ready-marker assertion - #6294

Closed
probepark wants to merge 1 commit into
Yeachan-Heo:devfrom
probepark:fix-6289-t91e2d399
Closed

probepark wants to merge 1 commit into
Yeachan-Heo:devfrom
probepark:fix-6289-t91e2d399

Conversation

@probepark

@probepark probepark commented Oct 3, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #6289

Risk classification

  • low-risk — test-only, one-line assertion correction; no runtime code touched.
  • regression-risk
  • high-risk

Why

session.close revokes the lifecycle ready marker while retaining lifecycle.json until session.delete. The topology test still expected lifecycle.ready.json to resolve, producing a stale assertion failure.

What

Changed only packages/coding-agent/test/sdk-machine-lifecycle-topology.test.ts so the post-close ready-marker assertion expects rejection. The lifecycle-marker-retained assertion and post-delete cleanup verification remain unchanged.

Local tests

  • bun test packages/coding-agent/test/sdk-machine-lifecycle-topology.test.ts (before change: exit 1, 6 pass / 1 fail, failure at line 641; after change: exit 0, 7 pass / 0 fail, 462 expects)
  • bunx biome lint packages/coding-agent/test/sdk-machine-lifecycle-topology.test.ts (exit 0)
  • bun --cwd=packages/coding-agent run lint (exit 0; 2 pre-existing warnings and 1 info)
  • bun run lint (exit 0; Rust future-incompatibility warnings only)

Local CI gate (prepush)

  • bun run check (exit 1, BLOCKED by unrelated existing failure in packages/coding-agent/test/sdk-adapter-dispositions-daemon-cli.test.ts, AD-L-C49: session.cwd.move forwarded; 100 pass / 1 fail in that manifest; Rust checks passed)
  • No repository PR-body checker is present in the inspected scripts/ or package configuration, so no checker command was available to run.

Needs e2e

None outside CI. The broker lifecycle suite was run locally at exact head aa743a32 (coder re-verification on studio, after bun run setup:worktree):

  • bun test packages/coding-agent/test/sdk-machine-lifecycle-topology.test.ts → exit 0, 7 pass / 0 fail, 462 expects
  • bun test packages/coding-agent/test/sdk-broker-lifecycle-e2e.test.ts → exit 0, 152 pass / 1 skip / 0 fail, 765 expects

Acceptance

ID Acceptance Evidence
AC-1 session.close retains lifecycle.json and removes ready.json in both adapter directions Topology test passes in both mcp → daemon and daemon → mcp runs (7/7)
AC-2 session.delete removes the lifecycle marker without cross-workspace effects Existing post-delete assertions remain unchanged and pass
AC-3 Only the scoped topology-test assertion changed; no runtime modifications Diff is 1 line in the requested test file
AC-4 Local regression is RED → GREEN, broker lifecycle e2e test passes, lint passes Captured commands and results above

Agent

GJC, preset codex-pro.

Assumptions

  • The fork branch probepark:fix-6289-t91e2d399 is the authorized source branch for a PR targeting upstream dev.
  • The unrelated bun run check failure is pre-existing and outside this one-line test-only scope.
  • No changelog fragment is needed for a test-only correction.

Open questions

  • None for this scoped correction.

Approval

Review verdict: human-review pending (no gajae.pr-review-verdict.v1 line yet).
Agent PR Merge approval red is expected pending maintainer exact-head approval. Human review remains required on the exact PR head.

Session close revokes the ready marker but keeps lifecycle.json until session.delete. Update the topology assertion to match the existing lifecycle contract.
@Yeachan-Heo

Copy link
Copy Markdown
Owner

#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) 🦞]

@Yeachan-Heo

Copy link
Copy Markdown
Owner

Closing as a duplicate: #6287 made the same one-line change and is merged into dev as 496cddb7. Thanks @probepark.

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

@Yeachan-Heo Yeachan-Heo closed this Oct 3, 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