Skip to content

Release v1.4.0 memory quality cleanup#4

Merged
sdwolf4103 merged 11 commits intomainfrom
feat/memory-quality-cleanup
Apr 28, 2026
Merged

Release v1.4.0 memory quality cleanup#4
sdwolf4103 merged 11 commits intomainfrom
feat/memory-quality-cleanup

Conversation

@sdwolf4103
Copy link
Copy Markdown
Owner

Summary

  • Adds shared memory quality gates, conservative cleanup migration, audit logs, and extraction rejection logging.
  • Adds sanitized regression fixtures plus safe workspace cleanup tooling and test XDG isolation.
  • Updates v1.4.0 changelog, release notes, and docs.

Verification

  • npm test (212 pass, 0 fail)
  • npm run typecheck
  • npm run cleanup:workspaces -- --dry-run --data-home
  • env -u MIGRATION_RUN_ROOTS bun run scripts/dev/run-migration.ts

@sdwolf4103 sdwolf4103 merged commit 5b0083e into main Apr 28, 2026
2 checks passed
@sdwolf4103 sdwolf4103 deleted the feat/memory-quality-cleanup branch April 28, 2026 06:53
sdwolf4103 added a commit that referenced this pull request May 2, 2026
…nce, and validation baseline

Wave 1 — Compaction prompt improvement:
- Add three wording-reuse bullets to buildCompactionPrompt() under
  CRITICAL MEMORY RULES: do not create rephrased duplicates, reuse
  existing wording exactly when re-emitting, only emit new memories
  when the fact is new, materially corrected, or more specific.
- This attacks the root cause of zero reinforcement: compaction
  generating variant text for the same durable fact.

Wave 2 — Bug fixes:
- Bug #2: Add placeholder comment to superseded_existing branch in
  decision dedupe (unreachable until v1.5.4 numbered refs). Preserve
  as const type assertions.
- Bug #3: Add memory_migration_superseded evidence event type. Both
  P0 and quality cleanup migrations now produce evidence events for
  superseded entries. loadWorkspaceMemory appends migration evidence
  on first-load migrations only (idempotent via migration IDs). No
  historical backfill.
- Bug #4: Add documentation comment explaining that feedback identity
  key returns exact key (absorbed_identity currently impossible for
  feedback). Add test verifying this behavior.

Wave 3 — Validation baseline script:
- Add scripts/dev/validate-identity-keys.ts: read-only script that
  scans workspace memory stores, computes exact/identity key
  collisions, and reports reinforcement statistics. Baseline matches
  audit: 0 exact collisions, 0 identity collisions, 0 reinforcement
  events across 123 active memories.

Identity extension is gated on measurement: if the prompt change
produces measurable reinforcement (reinforcementCount > 0), identity
extension may be unnecessary. Decision dedupe stays exact-only
(Wave 4 deferred).
sdwolf4103 added a commit that referenced this pull request May 8, 2026
sdwolf4103 added a commit that referenced this pull request May 8, 2026
…nce, and validation baseline

Wave 1 — Compaction prompt improvement:
- Add three wording-reuse bullets to buildCompactionPrompt() under
  CRITICAL MEMORY RULES: do not create rephrased duplicates, reuse
  existing wording exactly when re-emitting, only emit new memories
  when the fact is new, materially corrected, or more specific.
- This attacks the root cause of zero reinforcement: compaction
  generating variant text for the same durable fact.

Wave 2 — Bug fixes:
- Bug #2: Add placeholder comment to superseded_existing branch in
  decision dedupe (unreachable until v1.5.4 numbered refs). Preserve
  as const type assertions.
- Bug #3: Add memory_migration_superseded evidence event type. Both
  P0 and quality cleanup migrations now produce evidence events for
  superseded entries. loadWorkspaceMemory appends migration evidence
  on first-load migrations only (idempotent via migration IDs). No
  historical backfill.
- Bug #4: Add documentation comment explaining that feedback identity
  key returns exact key (absorbed_identity currently impossible for
  feedback). Add test verifying this behavior.

Wave 3 — Validation baseline script:
- Add scripts/dev/validate-identity-keys.ts: read-only script that
  scans workspace memory stores, computes exact/identity key
  collisions, and reports reinforcement statistics. Baseline matches
  audit: 0 exact collisions, 0 identity collisions, 0 reinforcement
  events across 123 active memories.

Identity extension is gated on measurement: if the prompt change
produces measurable reinforcement (reinforcementCount > 0), identity
extension may be unnecessary. Decision dedupe stays exact-only
(Wave 4 deferred).
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