Repository navigation
fix: retain MCP catalogs per connection; prepare 0.4.5 #128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
627e121
fix: fail MCP discovery and prepare CLI 0.4.5
byapparov 41fe095
fix: preserve MCP retry state and isolate release smoke checks
byapparov 7c3e8f2
fix(mcp): preserve SDK discovery deadline
byapparov 263afab
fix: retain MCP catalogs for each connection
byapparov fb096d9
fix: share MCP health across catalog readers
byapparov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| # Releasing aictrl CLI | ||
|
|
||
| 1. Prepare a PR against `main` with the fixes, the version bump in | ||
| `packages/cli/package.json`, and the matching `packages/cli` workspace | ||
| version in `bun.lock`. Run `bun install --frozen-lockfile`. | ||
| 2. Run the release regressions from `packages/cli`: | ||
|
|
||
| ```bash | ||
| bun test test/cli/run-mcp-discovery.test.ts test/mcp/discovery-recovery.test.ts test/cli/publish-workflow.test.ts test/cli/run-provider-finish.test.ts test/cli/run-signal-cancellation.test.ts test/cli/classify-session-error.test.ts test/session/idle.test.ts test/session/processor-idle.test.ts | ||
| ``` | ||
|
|
||
| Wait for CI build, workspace typecheck and tests to pass and address reviews. | ||
|
|
||
| 3. Merge the approved PR and record the resulting `main` commit SHA. Confirm | ||
| its package version matches the intended tag. Publish the release against | ||
| that exact commit, using reviewed notes: | ||
|
|
||
| ```bash | ||
| gh release create v<version> --repo aictrl-dev/cli --target <merged-main-SHA> --title v<version> --notes-file <notes-file> | ||
| gh run list --repo aictrl-dev/cli --workflow publish.yml --limit 3 | ||
| ``` | ||
|
|
||
| Do not use the legacy `script/release` or `script/publish.ts`; they refer to | ||
| retired branches/workflows and do not implement these gates. | ||
|
|
||
| 4. Require the **Publish to npm** workflow to be green. It checks the tag | ||
| against the wrapper package version before building, publishes the platform | ||
| packages and wrapper, then retries npm installation through its propagation | ||
| window and verifies the installed binary version. If publishing partially | ||
| succeeds, inspect the failure before rerunning: npm versions are immutable. | ||
| 5. Independently install `@aictrl/cli@<version>` in a temporary directory and | ||
| verify `./node_modules/.bin/aictrl --version` equals `<version>`. | ||
| 6. In a separate aictrl application PR, update `docker/executor/Dockerfile` to | ||
| the published version. Build the executor image and rerun the headless | ||
| discovery and idle-stream fixtures against its binary. Promote through | ||
| `sandbox` before `main`; verify a sandbox review persists MCP findings and | ||
| a stalled stream reports a timeout rather than waiting for the job limit. | ||
|
|
||
| ## 0.4.5 candidate | ||
|
|
||
| - MCP tools are discovered once per connection and retained for both the | ||
| startup catalog and model turns (CLI #127). Tool-list change notifications | ||
| refresh that catalog; a failed refresh or closed connection stops the next | ||
| turn with an actionable error, instead of submitting a reduced toolset. | ||
| A successful later notification or reconnection restores discovery health. | ||
| Initially unavailable optional MCP servers keep their existing behavior. | ||
| - Release version checks and npm propagation handling address CLI #126. | ||
| - The executor enables the existing five-minute model stream idle guard in | ||
| application #5891. The CLI retains its generic opt-in default; local tools | ||
| retain the extended allowance and explicit operator overrides remain valid. | ||
|
|
||
| Publication and executor promotion are separate gates. Preparing this candidate | ||
| PR does not publish npm packages or deploy an executor image. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⚪ Validate semver tag before npm spec and GITHUB_ENV.
🤖 Fix with your agent
Why this matters
The smoke job derives AICTRL_VERSION from github.event.release.tag_name with only the "v" prefix stripped and an empty-check, then interpolates it into an npm package spec (
npm install "@aictrl/cli@${AICTRL_VERSION}", line 204) and executes the installedaictrlbin (line 206); the publish job appends the same derived string to $GITHUB_ENV (line 63). Full quoting blocks shell injection, but npm accepts alias/URL spec syntax (npm:, git/https URLs), so a crafted tag could redirect the install to an arbitrary registry package whose binary the step then runs. Today the publish job's strict PKG_VERSION equality gate plusneeds: publishordering means a non-matching tag never reaches the smoke job, so this is defense-in-depth rather than an exploitable path.