This audit verifies public contract stability and caller impact for v5.3.4..HEAD, then adds explicit compatibility guardrails where contract ambiguity existed.
- Compared exported TypeScript signatures in touched public modules against
v5.3.4. - Compared
codex-*tool inventory inindex.tsagainstv5.3.4. - Reviewed changed caller-facing docs/examples for drift and migration risk.
- Added compatibility tests for both legacy and new command argument forms.
- Classified every public-surface delta as breaking/non-breaking and mapped migration paths.
| File | Export Signature Diff |
|---|---|
index.ts |
none |
lib/storage.ts |
none |
lib/auth/token-utils.ts |
none |
Conclusion: no exported signature removals/renames in touched public modules.
Tool inventory is unchanged (17 tools):
codex-listcodex-switchcodex-statuscodex-metricscodex-helpcodex-setupcodex-doctorcodex-nextcodex-labelcodex-tagcodex-notecodex-dashboardcodex-healthcodex-removecodex-refreshcodex-exportcodex-import
Conclusion: no tool removals/renames.
- Added additive argument:
mode(checklist|wizard). - Retained legacy argument:
wizard?: boolean. - Added conflict/validation handling:
- invalid mode ->
Invalid mode: ... - conflicting
mode+wizard->Conflicting setup options: ...
- invalid mode ->
Compatibility: non-breaking additive.
- Added additive argument:
mode(standard|deep|fix). - Retained legacy arguments:
deep?: boolean,fix?: boolean. - Added conflict/validation handling:
- invalid mode ->
Invalid mode: ... - conflicting
mode+deep/fix->Conflicting doctor options: ...
- invalid mode ->
Compatibility: non-breaking additive.
codex-setup wizard=truecodex-doctor deep=truecodex-doctor fix=true
codex-setup mode="wizard"codex-doctor mode="deep"codex-doctor mode="fix"
modeis less ambiguous in scripts/reviews than multiple booleans.- explicit mode names are easier to reason about and document.
| API | Condition | Error Representation | Caller Action |
|---|---|---|---|
codex-setup |
mode not in {checklist,wizard} |
string containing Invalid mode |
send valid mode |
codex-setup |
mode conflicts with wizard |
string containing Conflicting setup options |
provide one coherent mode choice |
codex-doctor |
mode not in {standard,deep,fix} |
string containing Invalid mode |
send valid mode |
codex-doctor |
mode conflicts with deep/fix |
string containing Conflicting doctor options |
provide one coherent mode choice |
| Changed File in Range | Public API Impact | Classification |
|---|---|---|
index.ts |
Tool argument extensions + validation messages | non-breaking additive |
lib/storage.ts |
Identity dedupe behavior hardening; no signature drift | non-breaking behavioral fix |
lib/auth/token-utils.ts |
Canonical org-id extraction behavior hardening; no signature drift | non-breaking behavioral fix |
README.md, docs/* |
Contract docs alignment and migration guidance | non-breaking docs |
test/* |
Contract regression coverage | non-breaking tests |
package.json, package-lock.json |
release/version metadata in baseline range | non-breaking metadata |
- Boolean-heavy command mode selection was a caller-facing ambiguity risk.
- Mitigation applied:
- Added explicit mode enums without removing legacy booleans.
- Added conflict guards to prevent silent contradictory input.
- Updated docs/examples to explicit mode syntax.
- Suggested bump for this follow-up work: MINOR
- Rationale:
- New caller-visible capabilities (
mode) are additive. - Existing contracts remain supported.
- No removals/renames requiring MAJOR.
- New caller-visible capabilities (
- Export signature comparison: no diffs in touched public modules.
- Tool inventory comparison: no name diffs across
v5.3.4andHEAD. - Automated checks:
npm run typechecknpm testnpm run build
- Added tests for:
- explicit
modebehavior (checklist,wizard,standard,deep,fix) - legacy boolean compatibility
- invalid/conflicting input handling
- explicit
- Breaking changes: none found
- Merge readiness from API-contract perspective: ready