serve diagnostics during managed provisioning#1024
Merged
TheGreenCedar merged 2 commits intoJul 12, 2026
Conversation
75bf360 to
13e9ab5
Compare
13e9ab5 to
4df17b2
Compare
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.
Context
Fresh managed-plugin startup awaited the full CLI download, extraction, verification, and publication path before opening MCP. A slow publisher or another process holding the single-flight lock therefore made CodeStory invisible instead of exposing its existing diagnostic surface.
Closes #1022
Refs #921
What Changed
managed_cli_provisioning, advertise tools/resources/prompts list-change support, and notify the client only after it has completed MCP initialization and publication is verified.initializeandnotifications/initializedinto the real stdio runtime before forwarding operational traffic, suppressing only the duplicate child initialize response.tools/list_changedpublication before asserting the verified runtime status.How To Review
resolveCli({ provision: false })and the deferred publisher inmain.runFailOpenMcplifecycle replay, list-change gating, EOF forwarding, and failure recovery..github/scripts/check-packaged-agent-proof.pyinitialization, publication notification wait, correlated reply validation, and negative protocol fixtures.Verification
python -m py_compile .github/scripts/check-packaged-agent-proof.pypython .github/scripts/check-packaged-agent-proof.py --self-test— passed, including managed handoff, list-change publication, malformed protocol, failure-artifact, and numeric-ID casesnode --test plugins/codestory/tests/plugin-static.test.mjs— 72 passednode --check plugins/codestory/scripts/codestory-mcp.cjsnode .github/scripts/check-doc-links.mjs— 69 files, 281 linksgit diff --check origin/dev/codestory-next...HEADThe first packaged CI run exposed a proof-harness mismatch rather than a launcher failure: Linux and Windows x64 captured the intentional initial
managed_cli_provisioningdiagnostic (server_version: null) because the harness sent operational requests without MCPinitialize/notifications/initializedand did not wait for the advertised list-change handoff. Direct packaged CLI status was healthy. The harness now follows the negotiated lifecycle and asserts the verified post-publication runtime in the same process. Fresh packaged CI is rerunning on this fix.Risk
The runtime change is limited to the Node plugin launcher and its tests/docs; no Rust or release asset format changes. The additional Python diff corrects packaged acceptance so it proves the new two-phase startup contract. Remaining qualification is the fresh cross-platform packaged CI run. Screenshot evidence is not applicable because this changes MCP startup protocol behavior, not visible UI.