Skip to content

fix: harden recovery and storage behavior - #54

Merged
davidrobertson merged 3 commits into
mainfrom
codex/fix-review-findings
Jul 27, 2026
Merged

fix: harden recovery and storage behavior#54
davidrobertson merged 3 commits into
mainfrom
codex/fix-review-findings

Conversation

@davidrobertson

Copy link
Copy Markdown
Contributor

Summary

  • Keep post-compaction recovery pending until lcm_pack_context completes.
  • Redact credential URI passwords, including password-only Redis URIs, before JSONL and SQLite persistence.
  • Restrict LCM storage and recovery state to 0700 directories and 0600 files.
  • Make fresh-store cleanup a successful no-op and search each integrity-checked overflow payload through its existing 8 MiB safety bound.
  • Preserve the retrieval-quality benchmark floor and document the full overflow scan.

Root causes

The recovery marker was consumed when the reminder was shown, so a task could stop before retrieval completed. URI redaction assumed a nonempty username, storage permissions depended on the caller's umask, cleanup expected an existing index, and overflow search reused the 512 KiB paging limit intended for display.

Validation

  • npm test: 188 passed
  • npm run typecheck: passed
  • npm run smoke: passed
  • Direct CLI/MCP audit: passed under umask 000
  • Goal, QA, code-quality, context/integration, and security review lanes: passed at 3559b2e897f64e4e41141c93c4e4f124cd88ca82

Risk

Overflow search now reads and lowercases each managed payload through the existing 8 MiB input bound, so broad searches across many large payloads can use more CPU. Recovery marker writes still trust the private LCM home; a hostile preexisting symlink requires prior control of that directory.

@davidrobertson
davidrobertson merged commit b352e8d into main Jul 27, 2026
1 check passed
@davidrobertson
davidrobertson deleted the codex/fix-review-findings branch July 27, 2026 14:25
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