Release v1.4.0 - repair floor, concurrency CAS, seeding + genesis, swarm cards, ghost paths - #1
Merged
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
There are correctness issues in the new concurrency/batching and setup/doctor flows that can lead to lost updates or missing persisted output unless fixed.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Release v1.4.0 focused on hardening persistence and concurrency semantics (CAS file locking + atomic writes), adding cold-start seeding + GENESIS, and expanding CLI/MCP/dashboard capabilities with regression tests to lock behavior.
Changes:
- Added cross-process file locking for the memory store and swarm mesh, plus new tests covering concurrent writers and race conditions.
- Added cold-start seeding (with
[seeded]provenance) and GENESIS ritual, plus new CLI commands (handoff,doctorverification,remove) and MCP resources. - Hardened dashboard state-changing POSTs against CSRF/DNS rebinding and added swarm visibility to the dashboard.
File summaries
| File | Description |
|---|---|
| tests/temporalMemory.test.ts | New tests for seeded non-supersede behavior and batched persistence semantics. |
| tests/swarmMesh.test.ts | New tests asserting sync() is read-only and mutation prunes sessions. |
| tests/storeContainment.test.ts | Verifies .git/info/exclude containment and untracking behavior. |
| tests/setupOutput.test.ts | Asserts setup success output flow is wired into CLI. |
| tests/seeding.test.ts | End-to-end tests for seeding idempotency and GENESIS ritual behavior. |
| tests/removeCommand.test.ts | Tests clean uninstall behavior across injected files and MCP configs. |
| tests/memorybench.test.ts | Adds adversarial eval class coverage and report assertions. |
| tests/mcpResources.test.ts | Tests MCP resources list/read behaviors and byte-identical outputs. |
| tests/harness.test.ts | Adds platform-specific MCP launch shape tests (cmd /c on win32). |
| tests/handoffCommand.test.ts | Tests handoff brief token budget, determinism, and checkpoint hash validity. |
| tests/ghostPaths.test.ts | Tests ghost-path collision detection and header rendering behavior. |
| tests/fileWatcher.test.ts | Tests watcher ignore rules, debounce config, and per-file cooldown. |
| tests/doctorVerify.test.ts | Tests MCP launch verification handshake, timeout handling, and counters. |
| tests/dashboard.test.ts | Adds dashboard POST hardening tests and /api/swarm visibility tests. |
| tests/contextBlock.test.ts | Tests [seeded] marker rendering and token budget ceiling. |
| tests/concurrency.test.ts | Adds concurrent-process and dead-lock eviction tests for CAS mutex. |
| tests/autoCommitGuards.test.ts | Verifies git argv guardrails (no git config writes, staged-store reset). |
| tests/autoCommit.test.ts | Expands checkpoint hygiene coverage (identity, merge/rebase guard, subdir guard). |
| src/server/dashboardServer.ts | Adds state-change guard, /api/swarm, and swarm card rendering/polling. |
| src/memory/temporalMemory.ts | Adds seeded non-supersede and batched supersede persistence logic. |
| src/memory/swarmMesh.ts | Adds file-lock CAS, atomic write path, win32 canonical lock keys, read-only sync(). |
| src/memory/sqliteStore.ts | Adds file-lock CAS around mutations, atomic write adjustments, and source field. |
| src/memory/seeding.ts | Implements bootstrap fact derivation, workspace seeding, and genesis record writer. |
| src/memory/fileLock.ts | New synchronous cross-process lock implementation with dead-holder eviction. |
| src/memory/contextBlock.ts | Renders [seeded] provenance marker in context block lines. |
| src/mcp/server.ts | Adds MCP resources capability, list/read handlers, and transport-agnostic connect(). |
| src/hooks/fileWatcher.ts | Adds additional ignored dirs and awaitWriteFinish debounce settings. |
| src/hooks/autoCommit.ts | Adds operation-in-progress/subdir safety guards and per-invocation git identity. |
| src/harness/mcpAccess.ts | Wraps npx in cmd /c on win32 for shell-less hosts. |
| src/harness/ghostPaths.ts | New ghost-path scanner bounded to recent snapshot commits with opt-out env var. |
| src/harness/contextHarness.ts | Appends optional [GHOST] line to the generated header. |
| src/eval/memoryBench.ts | Adds adversarial fixtures, scoring, and per-class breakdown in report. |
| src/cli/setupOutput.ts | New helper for setup next-steps flow rendering. |
| src/cli/removeCommand.ts | New clean uninstall engine removing injected sections/config entries/store dir. |
| src/cli/oneShotSetup.ts | Adds seeding + containment + GENESIS ritual + improved setup outcome reporting. |
| src/cli/index.ts | Wires setup output, adds handoff and remove, and prints doctor counters. |
| src/cli/handoffCommand.ts | New deterministic handoff brief builder (forward and --story). |
| src/cli/doctor.ts | Adds MCP launch verification handshake and measured counters reporting. |
| src/cli/cliUtils.ts | Adds read-only store reader utility for CLI features. |
| README.md | Updates containment/CI benchmark wording to match new behavior. |
| package.json | Bumps version to 1.4.0 and includes new published docs files. |
| FUNDING.yml | Adds GitHub Sponsors handle. |
| CHANGELOG.md | Adds v1.4.0 release notes. |
| .gitignore | Ignores local *.tgz pack artifacts. |
| .github/workflows/release.yml | Adds tag-triggered release workflow with gates + publish. |
| .github/workflows/ci.yml | Removes separate advisory eval job and documents eval now running in tests. |
Review details
- Files reviewed: 45/46 changed files
- Comments generated: 5
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+64
to
+68
| existing.status = 'superseded'; | ||
| existing.invalidAt = now; | ||
| existing.tags = [...(existing.tags ?? []), `superseded-by:${record.id}`]; | ||
| } | ||
| this.store.saveStore(); |
Comment on lines
+169
to
+185
| child.stdout?.on('data', (chunk: Buffer) => { | ||
| buffer += chunk.toString('utf-8'); | ||
| for (const line of buffer.split('\n')) { | ||
| try { | ||
| const message = JSON.parse(line) as { id?: unknown; result?: { tools?: unknown[] } }; | ||
| if (message.id !== 2) continue; | ||
| const toolCount = Array.isArray(message.result?.tools) ? message.result.tools.length : 0; | ||
| finish({ | ||
| name: 'mcp-launch', | ||
| ok: true, | ||
| detail: `${launch.command} ${launch.args.join(' ')} replied with ${toolCount} tool(s)` | ||
| }); | ||
| } catch { | ||
| // partial or non-JSON line | ||
| } | ||
| } | ||
| }); |
Comment on lines
+129
to
+133
| const memoryMd = path.join(this.targetDir, 'Memory.md'); | ||
| if (!fs.existsSync(memoryMd)) { | ||
| fs.writeFileSync(memoryMd, '# Memory\n', 'utf-8'); | ||
| } | ||
| memory.syncToMemoryFile(); |
Comment on lines
+95
to
+100
| private mutate<T>(fn: () => T): T { | ||
| return withFileLock(this.lockPath, () => { | ||
| this.state = this.loadState(); | ||
| return fn(); | ||
| }); | ||
| } |
Comment on lines
+443
to
+444
| this.server.setRequestHandler(ReadResourceRequestSchema, async (request) => { const { uri } = request.params; | ||
|
|
… CI short paths, case-fold on win32
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.
Locked-plan v1.4.0 release branch. Phases 0-4 complete: B1-B6 repair floor, C1-C4 concurrency CAS repair (both stores), F1/F2/F3/F4/F5/F7/F8 features, H1-H4 chores, truth-in-advertising pass. Local gates: build 0, 159/159 tests (25 files), eval 8/8, public-install smoke green (pack->install->setup->GENESIS->cmd /c config->doctor handshake).