test(simulator): prove the OpenClaw plugin acquires its own client - #972
Closed
chughtapan wants to merge 1 commit into
Closed
test(simulator): prove the OpenClaw plugin acquires its own client#972chughtapan wants to merge 1 commit into
chughtapan wants to merge 1 commit into
Conversation
The plan's decisive assertion for the adapter cutover was that the plugin starts with no injected client and still completes the round trip. The OpenClaw case injected one, so the assertion had never run. The plugin now acquires the slot's client itself. One slot names one loopback port, so nothing else may open a second daemon against it: the peer opens the conversation and the membership boundary is asserted from the peer's side, which is the shape the NanoClaw case already had. `harnessClientForAccount` stays, marked test-only. It hands back a HarnessClientService, so it is not a second route to the daemon the way the deleted createService/createCore were, and deleting it would turn four presentation suites into daemon-spawning integration tests. No shipped source supplies it. Closes divergence ledger rows 1 and 6: every package now carries AGENTS.md and CLAUDE.md, and ConversationWithParticipants says what is true — it has no consumer outside packages/client, but it names a public return type, so the comment was the wrong half rather than the export.
Owner
Author
|
Superseded by #974, which collapses this stack into one PR against |
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.
Closes the last three open items from the slate's verification table.
1. The decisive assertion now runs
The plan's step-10 gate ends with:
harness-adapters.integration.test.ts → startOpenClawGatewayconstructs the plugin ascreateMoltzapChannelPlugin()with no injected client and still completes the round trip. The OpenClaw case injected one, so that assertion had never executed — the only end-to-end proof of the production acquisition path was the NanoClaw case.The plugin now acquires the slot's client itself. One slot names one loopback port, so nothing else may open a second daemon against it: the peer opens the conversation and the membership boundary is asserted from the peer's side, which is the shape
runNanoClawCasealready had.assertConversationBoundaryis replaced byassertPeerConversationBoundary.Coverage moved, not lost:
HarnessClientService.startConversationis still exercised bymoltzapd.integration.test.ts → starts a conversation and round-trips a bound reply through MCP onlyand byharness-client.test.ts.2.
harnessClientForAccountstays — a recommendation I reversedI previously said this should be deleted, and step 10's grep does list it. Having looked at what depends on it, deleting it is the wrong call:
HarnessClientService— the sanctioned adapter-facing capability. It is not a second route to the daemon the way the deletedcreateService/createCorewere, which returnedMoltZapService/MoltZapChannelCore.So the field stays, marked
@internaland documented as test-only in both the plugin type and the fixture header.git grep harnessClientForAccount -- packages/ | grep -v '\.test\.ts\|test-utils/'returns only the declaration and its own read — no shipped source supplies it, and #962'scheckAdapterFilerule already blocks the real bypasses by symbol and subpath.I'd rather flag this as a plan step that stopped making sense than execute it and degrade the test suite.
3. Divergence ledger — rows 1 and 6 closed
Row 1 was the corpus's only confirmed binding divergence and was still open:
packages/evalshad neitherAGENTS.mdnorCLAUDE.md,packages/simulatorhad noCLAUDE.md. All seven packages now carry both.Row 6 —
ConversationWithParticipantshas zero consumers outsidepackages/client, but it names the return type ofHarnessClientService.startConversation, so the export is correct and the doc comment was the wrong half. Rewritten to say what is true.Rows 2 and 3 remain: contested, v2-owned, unresolvable until a main-resident
HarnessClientcontract is admitted. Row 5 was withdrawn (v2 renamed on its own branch; main's table matches main's tree). Row 7 closed in #961.Full re-derived ledger and the per-row verification table are posted to #926: #926 (comment)
Verification
Run against the new gate shape, since
workspace:precommitno longer exists after main's hook retiering:pnpm typecheck— 0pnpm lint— 0 (includesarch:checkacross 9 projects and the newlint:script-reachability)pnpm format:check— 0pnpm docs:generate— no driftOne miss worth recording: deleting
assertConversationBoundaryorphanedSchema,agentName, andINITIAL_CONTENT. The integration test passed regardless — onlypnpm lintcatches that, and I reported the item done before running it.