Repository navigation
fix(cli): command contract audit — help, strict arguments, not-found errors, telegram args, caps, logs help - #320
Merged
Conversation
They were unknown commands (usage printed, exit 1). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…nown sessions are 'not found' - odek session delete <unknown> reported 'Deleted session'; the store's delete is idempotent, so the CLI checks Store.Exists first - a missing session loaded as a raw open error naming the store path (session show, trim, continue --id); Store.Load now returns session.NotFoundError, which still unwraps to os.ErrNotExist - session list/show/delete/trim/cleanup, schedule list/rm/enable/ disable/next and skill list/view/delete have a fixed shape; a stray argument is a usage error instead of being ignored; the session usage names trim and cleanup - --max-iter 0 (or negative) is an error like the other budget flags instead of being silently ignored Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… session ids Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
odek telegram --bogus ignored the argument and started polling with the configured token; any argument is now a usage error before the lock. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ed to its cap Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…s use the odek error style Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… not-found errors, caps Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
odek | 92a3700 | Commit Preview URL Branch Preview URL |
Oct 13 2026, 03:11 AM |
…purge, sanitised logs errors - audit --list, schedule daemon/run, skill promote/import reject stray or unknown arguments (skill import accepts its flags in any position); schedule next keeps the quoted and the five-field forms - session delete purges the index entry and audit log of a session whose file is already gone instead of refusing with not found; Exists follows links like List - logs pass-through parse errors are sanitised; telegram --help prints its usage; session_search and repl no longer say 'not found' twice - docs: Docker guide no longer says telegram ignores argv; CLI.md claim matches the code; test comments restored and the telegram/subagent tests pin what they claim Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.
Summary
Follow-up to #319: every other
odekcommand was run against its documented contract (docs/CLI.md, SCHEDULES.md, LOGGING.md, MAINTENANCE.md) on a scratch copy of~/.odekwith the head binary. What behaved as documented:version,session list/show/trim/cleanup,skill list/view/import/promote/delete,init,schedule add/rm/enable/disable/next/run/daemon,cleanup,logsfilters,upgrade --check,run/continue/replflag rejection,subagentJSON contract,mcpstdio (tools/list),serve(token-gated API, Host check). Gaps found and fixed, one commit each, RED test first:odek help/--help/-hwere "unknown command", exit 1session delete <unknown>printed "Deleted session", exit 0 (the store delete is idempotent)Store.Existscheck → "not found"session show/trim <unknown>andcontinue --id <unknown>leaked the store path through a raw open errorStore.Loadreturnssession.NotFoundError(unwraps toos.ErrNotExist); also stops the diagnostics noise for missing sessionssession list extra,schedule list extra,skill list extra… ignored stray arguments; session usage omittedtrim/cleanup--max-iter 0silently ignoredaudit --bogusloaded a session called--bogus(empty JSON, exit 0)odek telegram --bogusignored the argument and started polling with the configured tokensubagent --timeout 99999/--max-iter 500clamped silently although documented as capslogs --helpexited 1 with the flag package's "Usage of logs:" dump;--boguslikewiseunknown flag "--bogus" for logsNot changed:
/api/healthanswers 403 without the instance token — by design (CSRF token on all/api/*);audit <unknown-session>prints an empty log, pinned by an existing test as intended;init --localon an existing file exits 0 (idempotent);odek mcptool set matches docs/MCP.md.Coverage
cmd/odekinternal/sessionSonnet adversarial review of the branch: no regressions (verified every
Store.Loadcaller useserrors.Is, no script passes arguments toodek telegram, the sub-agent stderr is not parsed by the parent).golangci-lint: 0 issues.Test plan
TestRED_*incmd/odek,internal/session)cmd/odekandinternal/sessionsuites🤖 Generated with Claude Code