Memory Bridge follow-ups (M1/M2/M3) — v1.8.2-rc.1#77
Merged
Conversation
…tree (fail-open to box-private)
There was a problem hiding this comment.
Pull request overview
Implements the Sprint 5 “Memory Bridge” follow-ups by improving promotion routing into a Grimdex working copy, making promoted stamping safer (atomic, order-stable, and preserving malformed lines), and extending CLI JSON output coverage; includes docs and a plugin version bump to 1.8.2-rc.1.
Changes:
- Add routed promotion targeting (
Get-PromotionWriteTarget+Get-MemoryProjectId) and upgradeWrite-PromotionToGrimdexto route intoBATON_GRIMDEX_ROOTwhen available. - Rewrite
Set-MemoryPromotedto be line-wise, order-stable, and atomic via temp + replace, preserving malformed lines. - Extend
scripts/test-memory-lib.ps1coverage for routing, stamping behavior, andrecall --json; update command docs and bump plugin version.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| scripts/test-memory-lib.ps1 | Adds hermetic tests for promotion routing (M1), atomic/order-stable stamping (M2), and recall --json shapes (M3), including env pinning for BATON_GRIMDEX_ROOT. |
| scripts/memory-lib.ps1 | Implements routed promotion write targeting and updates journal stamping to be atomic and order-stable. |
| commands/memory-promote.md | Documents where promotion writes land when BATON_GRIMDEX_ROOT is set. |
| .claude-plugin/plugin.json | Bumps plugin version to 1.8.2-rc.1. |
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.
Package 1 of the 2026-07-04 backlog batch (see
docs/superpowers/plans/2026-07-04-backlog-execution-handoff.md). Finishes Sprint 5's three tracked Memory Bridge review follow-ups. Specdocs/superpowers/specs/2026-07-04-memory-bridge-followups-design.md, plandocs/superpowers/plans/2026-07-04-memory-bridge-followups.md.What shipped
269e686):Write-PromotionToGrimdexbecomes a router behind the existing-Writerseam — scope/kind → the real Grimdex tree (universal/mistakes.mdavoid,universal/winners.mdprefer,projects/<id>/decision-guidance.md). New pureGet-PromotionWriteTarget+ leaf-libraryGet-MemoryProjectId. Absent/unwritable root, unknown scope, or missing project id → box-private lessons file + warning. A promotion is never lost.22a8711):Set-MemoryPromotednow round-trips touched rows through[ordered](original field order), preserves untouched AND malformed lines byte-verbatim (the old code silently dropped malformed lines — latent data loss, fixed), and writes temp +Move-Item -Force(atomic, same-volume). Re-stringifies thetsdatetime (ConvertFrom-Json trap).recall --jsoncoverage (4fb024e): empty → valid JSON empty array; single match stays a one-element array; populated shape. Coverage-only, no production change.ade0ab1):commands/memory-promote.mdrouting section; plugin1.8.1 → 1.8.2-rc.1(plan's stale1.8.1-rc.1target corrected — v1.8.1 already shipped this session).Quality
test-memory-lib.ps151/51,test-bootstrap.ps148/48 green.Spec deltas caught during planning (grounded against the real Grimdex)
universal/lessons.md/projects/<id>/lessons.mddon't exist — routed to the real shelf per GRIMDEX.md law Plan 3: Job & phase scaffold + KB foundation #1.🤖 Generated with Claude Code