Skip to content

Codex follow-ups on #26 (1.5.10): legacy archive validation, contained purge, WSL withdrawal prunes manifest and consent, archive path checked first - #27

Merged
CompleteDotTech merged 1 commit into
mainfrom
fix/audit-followups-3
Sep 10, 2026
Merged

CompleteDotTech merged 1 commit into
mainfrom
fix/audit-followups-3

Conversation

@CompleteDotTech

Copy link
Copy Markdown
Contributor

Summary

Codex reviewed #26 after it merged; all four points fixed.

Finding Fix
P1 Any directory with a file named index.sqlite was grandfathered as a legacy archive Accepted only when the index has the archive schema and every other entry is a plain host directory; otherwise refused
P1 Purge candidates could escape the archive root for rows written before host validation Host name and containment validated for both candidate files; unsafe rows are kept as unremovable and reported
P1 A migrated detect.wsl=false left WSL hosts in a scheduled manifest The migration removes WSL hosts from the manifest, sets any scheduled-run consent aside (.withdrawn) so scheduled runs refuse until re-consented, and persists on load
P2 Archive-path validation ran after onboarding side effects Validated right after the answers / overrides, before detection, credential reads or any write

Test plan

  • check_followups_1_5_9 extended: foreign index refused, real legacy archive accepted, escaping row kept with the outside file untouched, manifest pruned and consent withdrawn on migration, invalid archive path stops init before accounts.json changes
  • python scripts/validate_quality.py --skip-mermaid passes
  • CI green

🤖 Generated with Claude Code

https://claude.ai/code/session_01WUhGzUwi8pXjngqs22ghZ3

…d purge, WSL withdrawal prunes manifest and consent, archive path checked first

- ledger_archive: an unmarked directory is accepted as a legacy archive only when its index has our schema and
  every other entry is a plain host directory; purge validates the host name and containment for both
  candidate files and keeps unsafe rows as unremovable.
- ledger: withdrawing the legacy WSL default (config version 2) also removes WSL hosts from the manifest and
  sets any scheduled-run consent aside (renamed .withdrawn), persisting the migration on load; the archive
  path is validated right after the answers/overrides, before detection, credential reads or any write.
- tests extended (foreign index refused, legacy accepted, escaping row kept, manifest pruned, consent
  withdrawn, archive path checked before accounts.json is touched).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WUhGzUwi8pXjngqs22ghZ3
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 10, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-10T04:51:51.271892Z d48a157 PR opened
🔒 Security Review Completed 2026-09-10T04:48:50.285148Z d48a157 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@CompleteDotTech
CompleteDotTech merged commit 6818d30 into main Sep 10, 2026
2 checks passed
@CompleteDotTech
CompleteDotTech deleted the fix/audit-followups-3 branch September 10, 2026 04:51

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d48a157560

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/ledger.py
Comment thread scripts/ledger_archive.py
Comment thread scripts/ledger.py
Comment thread scripts/ledger_archive.py
CompleteDotTech added a commit that referenced this pull request Sep 10, 2026
Codex follow-ups on #27 (1.5.11): reconcile version-2 homes, keep consent when nothing was pruned, full legacy schema check, encoded SQLite URIs
BunsDev pushed a commit to BunsDev/ai-usage-ledger-skill that referenced this pull request Sep 11, 2026
… homes, keep consent when nothing was pruned, full legacy schema check, encoded SQLite URIs

- ledger: CONFIG_VERSION 3; on load, when WSL discovery is off the manifest is pruned of WSL hosts
  whatever version wrote the home, and a scheduled consent is set aside only when that pruning
  actually changed the scanned scope.
- ledger_archive: a legacy archive is accepted only with the complete files and runs schemas;
  the index path is percent-encoded before it becomes a SQLite URI (also in ledger_query).
- tests: version-2 home reconciled, consent kept when no WSL host existed, partial schema refused.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WUhGzUwi8pXjngqs22ghZ3
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