Skip to content

fix(codex): guard inherited and configured SQLite relocation - #284

Merged
abruption merged 3 commits into
mainfrom
abruption/v110-storage-268-20261009
Oct 9, 2026
Merged

abruption merged 3 commits into
mainfrom
abruption/v110-storage-268-20261009

Conversation

@abruption

@abruption abruption commented Oct 9, 2026 •

Copy link
Copy Markdown
Owner

Summary

Investigates #268 against fixed native Codex sources and adds bounded pre-effect storage guards. The investigation in #268 remains open: effective storage of a running shared server and native managed/project configuration remains an evidence gate.

  • Refuse nonempty inherited CODEX_SQLITE_HOME and root sqlite_home configuration before discovery, dry-run, queue and wake preflight. Refusal is structured and does not reflect configuration contents or environment values.
  • Bound selected-home configuration reads to a 1 MiB regular, non-symlink UTF-8 file with descriptor/path identity checks. Recognize quoted/escaped root keys, dotted keys and tables while distinguishing nested keys, comments and string bodies. The dependency-free classifier is not a complete TOML/schema parser.
  • Recheck before queue/app-server child creation, strip empty SQLite overrides, normalize case-insensitive Windows environment keys, and preserve the existing private native-home translation.
  • Add 13 isolated storage tests and an actual fake-child environment recorder. Update the CLI reference in all four locales and regenerate the standalone artifact.

Type

  • fix
  • docs
  • chore / refactor / test / perf

Fixed source findings

These are source findings, not a fresh native routing experiment or proof of an actual wrong-target submission/security exploit. No live accounts, transcripts, native message submissions or operational services were inspected or modified.

Checklist

  • Real local CLI listing of live sessions (not performed; isolated fixtures only)
  • Real SSH listing (not performed)
  • Dry-run refusal occurs without queue or app-server child execution in isolated fixtures
  • Commits follow Conventional Commits
  • CLI reference and translations updated
  • No secrets, tokens, session keys, private paths or account identities in the diff

Verified against

Local macOS 27.0 arm64, Python 3.14.8. Native Codex versions were reviewed from immutable upstream source only; they were not executed. The live wake support matrix remains unchanged.

Local checks:

  • python3 -X dev -W error::ResourceWarning -m unittest tests.codex.test_storage -q: 13 PASS.
  • python3 -m unittest discover -s tests/codex -t . -q: 120 tests PASS, 1 Windows-only skip.
  • python3 -m unittest discover -s tests/core -t . -q: 345 tests PASS, 2 skips.
  • python3 -m unittest discover -s tests/docs -t . -q: 32 PASS.
  • Generated artifact, compilation and git diff --check: PASS.
  • Initial system-Python full discovery ran 615 tests with one missing-test-dependency error (packaging) and 29 skips. This environment failure is not hidden; a private test venv with the repository-pinned packaging==26.3 is used for the final rerun.
  • Final pinned-test-venv python -X dev -W error::ResourceWarning -m unittest discover -s tests -t . -q: 615 tests PASS, 29 explicit skips. This is default discovery, not a claim that all optional Relay/Control integrations ran.
  • The initial Windows CI run exposed a fixture-only case-simulation error: real Windows os.environ normalized the lowercase fixture key even while the test simulated POSIX. The follow-up uses a plain mocked mapping for cross-platform simulation; runtime behavior is unchanged. Current-head CI remains a required gate.

Notes and remaining gates

This guard checks inherited overrides and each inspected home's configuration, not the complete native configuration stack. Unselected nested configuration is not treated as a root storage setting, but a profile/project/system/managed layer or an already-running daemon can still determine effective storage. Configuration can also change after the last check. Passing this guard is not storage attestation, and fake-child fixtures cannot prove real routing or consumption.

Before #268 can be closed, establish an authoritative body-free effective-storage contract for supported native versions and daemon/layer cases, then verify it on the relevant platforms. This PR adds no relocated-storage support, does not relax writer ownership/inactive opt-in, and does not expand the wake version matrix. Native full TOML/schema validation remains native Codex's responsibility; lexically unclassifiable input fails closed here.

No merge, tag, package publication, fleet installation or operational changes are part of this work.

@abruption
abruption marked this pull request as ready for review October 9, 2026 00:06
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 9, 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-10-09T00:09:34.155276Z 0a388fc Draft marked ready
🔒 Security Review ✅ Completed 2026-10-09T00:10:41.772641Z 0a388fc Draft marked ready
ℹ️ 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.

@abruption
abruption merged commit f0db147 into main Oct 9, 2026
28 checks passed
@abruption
abruption deleted the abruption/v110-storage-268-20261009 branch October 9, 2026 05:15
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