Skip to content

chore(release): v0.9.24 — --version flag + iii hard-pin enforcement#719

Merged
rohitg00 merged 1 commit into
mainfrom
fix/cli-version-and-iii-hard-require
May 29, 2026
Merged

chore(release): v0.9.24 — --version flag + iii hard-pin enforcement#719
rohitg00 merged 1 commit into
mainfrom
fix/cli-version-and-iii-hard-require

Conversation

@rohitg00
Copy link
Copy Markdown
Owner

@rohitg00 rohitg00 commented May 29, 2026

Summary

Hotfix on v0.9.23. Two bugs surfaced an hour after release:

Bug 1: agentmemory --version launches server

src/cli.ts:50-54 reserves -v for --verbose. No --version literal was checked. Fell through to default start command — user ran agentmemory --version and got the full engine boot output.

Fix: explicit args.includes("--version") || args.includes("-V") check at the top of cli.ts (before any env load, dir mkdir, or engine boot). Prints VERSION + process.exit(0). -V capital reserved per POSIX since -v is taken.

Bug 2: iii-engine pin was warn-only

warnIfEngineVersionMismatch (the function name signals it) logged a warning but let the worker boot against a mismatched engine. Runtime crash: state::list not found on iii v0.13.0+ (function removed/renamed), sandbox-everything trap on v0.11.6+ (per the IIPINNED_VERSION comment at line 64-74).

Fix: renamed to enforceEngineVersionPin. On mismatch: p.log.error(...) + process.exit(1). Override env AGENTMEMORY_III_VERSION unchanged — it redefines IIPINNED_VERSION upstream at line 75, so the comparison passes when a user knowingly opts into a different engine.

Validated

  • node dist/cli.mjs --version0.9.24 + exit 0
  • node dist/cli.mjs -V0.9.24 + exit 0
  • npm run build clean
  • npx vitest run — 1291 pass (integration always-failing local, pre-existing)

Version bumps (9 files)

package.json, packages/mcp/package.json, plugin/.claude-plugin/plugin.json, plugin/plugin.json, plugin/.codex-plugin/plugin.json, src/version.ts, src/types.ts (ExportData union), src/functions/export-import.ts (supportedVersions Set), test/export-import.test.ts (assertion). CHANGELOG entry added.

Next after merge

  1. git tag -a v0.9.24 <merge-sha> + git push origin v0.9.24
  2. gh release create v0.9.24 --notes-file <changelog>
  3. Local npm publish (CI publish still blocked on Trusted Publisher setup — separate issue)

Summary by CodeRabbit

  • Bug Fixes
    • Fixed --version and added -V flag to correctly print version and exit cleanly
    • Upgraded engine version mismatch handling from warning to enforced validation—process now exits with error code and provides downgrade instructions when mismatches are detected
  • Version
    • Bumped to 0.9.24

Review Change Stack

…ement

Two bugs surfaced in the first hour after v0.9.23 hit npm:

1. `agentmemory --version` silently launched the server instead of
   printing the version. `-v` was reserved by --verbose and no
   --version literal was handled — fell through to default `start`.
   Now --version (and -V capital, POSIX) prints VERSION + exits 0
   before any side effects.

2. iii-engine version pin was warn-only. When the engine on PATH
   didn't match agentmemory's pinned v0.11.2, the worker still booted
   against the mismatched engine and crashed at runtime with
   state::list not found (v0.13.0) or sandbox traps (v0.11.6).
   warnIfEngineVersionMismatch renamed to enforceEngineVersionPin
   and now p.log.errors + process.exit(1). AGENTMEMORY_III_VERSION
   override unchanged.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 29, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agentmemory Ready Ready Preview, Comment May 29, 2026 9:22am

Request Review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 29, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 465204d7-dc2b-4537-88d7-6958906104d1

📥 Commits

Reviewing files that changed from the base of the PR and between a9bc129 and b33dfb2.

📒 Files selected for processing (11)
  • CHANGELOG.md
  • package.json
  • packages/mcp/package.json
  • plugin/.claude-plugin/plugin.json
  • plugin/.codex-plugin/plugin.json
  • plugin/plugin.json
  • src/cli.ts
  • src/functions/export-import.ts
  • src/types.ts
  • src/version.ts
  • test/export-import.test.ts

📝 Walkthrough

Walkthrough

This PR releases version 0.9.24 with two hotfixes: CLI --version / -V flag now prints the version and exits before server initialization, and the iii-engine version mismatch detection is upgraded from a soft warning to hard enforcement that terminates the process. All version references across npm, MCP, plugin manifests, and export schema are bumped to 0.9.24.

Changes

Release 0.9.24 and CLI improvements

Layer / File(s) Summary
Version constant and release documentation
src/version.ts, CHANGELOG.md
VERSION constant bumped to 0.9.24 and release notes document the CLI version flag fix and engine version enforcement behavior change.
Package and plugin manifest version bumps
package.json, packages/mcp/package.json, plugin/.claude-plugin/plugin.json, plugin/.codex-plugin/plugin.json, plugin/plugin.json
All package and plugin manifests consistently updated to 0.9.24.
Export/import schema and version compatibility
src/types.ts, src/functions/export-import.ts, test/export-import.test.ts
ExportData type and import validation extended to accept 0.9.24 as a valid export version; test expectation updated.
CLI version flag and engine version enforcement
src/cli.ts
Early --version/-V flag handler prints version and exits before initialization; new enforceEngineVersionPin() function replaces mismatch warning with hard exit (code 1) when iii-engine version differs from pinned version.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • rohitg00/agentmemory#659: Similar pattern of extending ExportData.version and supportedVersions to accept a new export schema version across src/types.ts, src/functions/export-import.ts, and test files.
  • rohitg00/agentmemory#702: Continuation of prior version-bump PR that added support for the previous export schema version in the same validation code paths.

Poem

🐰 Version hops along the line,
From point-two-three to twenty-four's design!
The CLI flags now early exit clean,
And version checks are firm, no in-between.
Exports align, all manifests agree—
A tidy release, consistent and free!

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/cli-version-and-iii-hard-require

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@rohitg00 rohitg00 merged commit fd9e3bd into main May 29, 2026
6 of 7 checks passed
@rohitg00 rohitg00 deleted the fix/cli-version-and-iii-hard-require branch May 29, 2026 09:23
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.

1 participant