Repository navigation
clens-010-import-codex-autodiscover: clens import codex with no path: auto-discover ~/.codex/sessions/ - #19
Merged
Conversation
…codex-autodiscover-1784802254898)
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.
clens-010-import-codex-autodiscover
Ticket: tickets/clens-010-import-codex-autodiscover.md
All gates green: lint ✅, typecheck ✅, test ✅ (1885 pass in CLI, 320 in web, 0 fail).
Summary
Hardened test coverage for
clens import codex's no-arg auto-discover feature (clens-010). The build stage already covered the four "done looks like" cases well (CODEX_HOME set, HOME fallback, absent/empty default dir, explicit-path regression, help text). I found one genuine gap: the implementation's docstring claims tests can hermetically override "both branches" ofHOME || USERPROFILE, but onlyHOMEwas ever exercised.Added (
packages/cli/test/import-command.test.ts):falls back to $USERPROFILE/.codex/sessions when neither CODEX_HOME nor HOME is set— closes the untestedUSERPROFILEfallback branch.an empty-string CODEX_HOME is treated as unset and falls back to HOME— pins the||truthiness check (empty env var, a realistic shell/CI condition).I initially also added a third test (all three env vars unset → root
/.codex/sessions), but caught via advisor review that it broke hermeticity (depends on real filesystem-root state with no env seam to redirect it) and added no coverage beyond what the other tests already provide — dropped it.No implementation defects found;
packages/cli/src/commands/import.tsandcli.tsare unchanged from the build stage. Left in the working tree per instructions, no git operations performed.Gates
lint — pass
typecheck — pass
test — pass
Gate suite ran in: 18185ms
Repair rounds used: 0
Total duration: 993715ms
Run id: clens-010-import-codex-autodiscover-1784802254898
Captured sessions
/Users/silouane/adw-factory/runs/clens-010-import-codex-autodiscover-1784802254898/.clens/sessions/67c5b76f-5d65-45a9-8d50-3ad9bb4a3dd7.jsonl/Users/silouane/adw-factory/runs/clens-010-import-codex-autodiscover-1784802254898/.clens/sessions/3f9f99ff-2dfa-4b26-bf1f-ecb0bc574adb.jsonl/Users/silouane/adw-factory/runs/clens-010-import-codex-autodiscover-1784802254898/.clens/sessions/d91b46ef-0d1f-4bf7-b2a6-ea2f031befa8.jsonlOpened by adw-factory. A human reviews and merges — the factory never merges,
approves, or closes its own pull requests.