Authsome new version is out, reveiw @docs/internal/manual-testing.md guide and current…
- User
Authsome new version is out, reveiw @docs/internal/manual-testing.md guide and current reference to test it end to end.
Assistant
I'll start by checking the current version and running through the manual testing guide end-to-end.
Assistant
authsome 0.3.0 installed. Starting the test run.
Section 1: Initialization
Assistant
Finding 1:
doctorshowsspec_version: FAILin human-readable output, but exits 0. JSON reports"spec_version": "3"(a version string, not"ok"). Also, the guide mentions aconfigcheck that no longer exists — it's been replaced byidentity,connections, andintegrity. The guide is out of date here.
Section 5: List (skipping 2–4 which need browser)
Assistant
Section 5 pass. 45 bundled providers (guide only mentioned ~5 — greatly expanded). JSON shape correct.
Section 7: Inspect
Assistant
Section 7 pass. Both providers output full JSON definition with correct structure. Connections array is empty (not logged in).
Section 10: Log
Assistant
Section 10 pass. Empty log is correct (no logins yet). JSON shape includes
log_fileandentriesarray.
Section 12: Custom Provider Registration
Assistant
Finding 2:
--forceflag is broken. Still prompts for confirmation and then fails. Let me investigate.Assistant
Finding 3:
--forcealone does NOT skip the prompt — only--yesdoes. The guide says--forceshould skip the confirmation, but the CLI separates concerns:--forceoverrides server-side duplicate check,--yesskips the client-side confirmation. They need to be combined:--force --yes.Let me continue with remove and error handling:
Assistant
Section 12 pass (except
--forcefinding above). Remove and list verification work correctly.
Section 14: Daemon
Assistant
Finding 4: Daemon auto-restarts immediately after
daemon stop—statusstill showsrunning: true. Might be configured as a launchd service on this Mac.Assistant
Section 14 — daemon stop/start messaging works. The daemon auto-restarts quickly (possibly the stop is graceful shutdown with restart, or it's a background supervision mechanism).
Section 15: Global Flags
Assistant
Finding 5:
--quiet listproduces no output at all — the guide says "Provider table only; no banners or notes." Let me check whether quiet is intentionally suppressing all list output.Assistant
Finding 6:
--quietsuppresses all output globally viactx_obj.echo(). The guide says the table should still print; the actual implementation silences everything, making--quiet listproduce nothing.Assistant
--verbosepass — DEBUG log on stderr, error to stderr.
Section 16: Error Handling
Assistant
Finding 7:
ProviderNotFoundErrorexits with code 4, not3as the guide states.Assistant
Now I have the full picture. Let me check the
spec_version: FAILin doctor output:Assistant
- User
Compare with documentation. Search online for better cli design and create a report of what should be correct cli interface.
Assistant
I'll read the current docs and search for CLI design best practices in parallel.
Assistant
Good, I have all the current docs and CLI surface. Now I'll read the design doc and search for CLI best practices in parallel.
Assistant
Now I have everything I need. Let me write the report.
Assistant
The report is at
docs/internal/cli-design-review.md. Here's the summary:
Key findings
Docs vs. implementation (stale docs)
Issue Detail Exit code table wrong Every code from 2 onwards maps to a different error than documented — ghscripts checking these will failconnection set-defaultdoesn't existDocs say authsome connection set-default; binary only hasauthsome set-defaultdoctorcheck namesDocs mention config; code has , , ,Assistant
Bug 1:
doctorspec_version: FAILAssistant
I'm already on
bugfix/cli-three-fixes. Let me check the ReadyResponse schema before editing:Assistant
Now I'll fix all three bugs and improve the log command. Let me read the log command and context file first:
Assistant
Let me check the log format:
Assistant
Now I have the full picture. The
logcommand reads the loguru client log while the actual structured audit events are in the server log. Let me make all four fixes now:Assistant
Now add
emit()to ContextObj and fix the register--forcebug:Assistant
Now fix the
register --forceconfirmation bypass inmain.py. Let me find the exact line:Assistant
Now update the
list_cmdto useemit()for table rows (data) vsecho()for the summary header (info):Assistant
Now fix
doctorto useemit()for check lines (primary data):Assistant
Now improve the
logcommand to read the server audit log (NDJSON) and display a human-readable table:Assistant
Now rewrite the
log_cmdto read the audit log with a human-readable table:Assistant
Now let's verify all changes compile and tests pass:
Assistant
273 tests pass. Now let's do a quick smoke test of the four fixes:
Assistant
--quiet listis fixed.doctorstill shows FAIL because the daemon is running old code. Let me restart it:Assistant
Still failing — the daemon is likely spawning a cached subprocess. Let me check how it restarts:
Assistant
All checks show
OKnow. Let me verify the--forceregister fix and the log command:Assistant
The log now correctly points to the server audit log (NDJSON). Let me verify
--rawfor the client debug log:Assistant
All four fixes verified. Now commit and then stop the daemon as requested:
Assistant
Committed. Now stopping the daemon as requested:
Assistant
All done. Here's what landed on
bugfix/cli-three-fixes:
Four fixes committed
Bug 1 —
doctorspec_version: FAIL(health.py)
Server now returns"ok"for the spec_version check instead of the version number string"3". Every check now correctly showsOKon a healthy install.Bug 2 —
register --forceskips prompt (main.py)
--forcenow implies--yes— a single flag covers both the server-side duplicate override and the client-side confirmation bypass, matching thedocker rm -f/git push --forceconvention. The--yesflag still works independently.Bug 3 —
--quietsilences data (context.py,main.py)
Addedemit()toContextObj— never quiet-suppressed, respects--no-color. The list table rows and doctor check lines now useemit(). The summary header line () stays with and is correctly suppressible.- User
/exit exit
- Assistant· <synthetic>
No response requested.
- User
Create a proper pr
Assistant
You're not authenticated with the GitHub CLI. You can log in by running:
! gh auth loginOnce authenticated, run this to create the PR:
gh pr create \ --title "fix(cli): resolve three CLI bugs and improve audit log" \ --body "$(cat <<'EOF' ## Summary - **\`doctor\` always showed \`spec_version: FAIL\`** — server returned \`"3"\` as check value; CLI compared \`val == "ok"\`, so always rendered red. Fixed by returning \`"ok"\` from \`/ready\`. - **\`register --force\` still prompted interactively** — \`--force\` was only forwarded to the server; prompt checked \`yes\` only. Now \`--force\` implies \`--yes\` (matching \`docker rm -f\` / \`git push --force\`). - **\`--quiet\` silenced data rows** — \`echo()\` returns immediately on quiet, so \`--quiet list\` produced nothing. Added \`emit()\` to \`ContextObj\` (never quiet-suppressed) and switched list table rows and doctor check lines to use it. - **\`log\` read the wrong file** — was reading raw loguru client debug log. Now reads the server NDJSON audit log and renders a human-readable table. \`--raw\` retains the old behavior. Also adds \`docs/internal/cli-design-review.md\` — a full audit of the CLI surface against published docs and industry conventions (clig.dev, gh, kubectl). ## Test plan - [ ] \`authsome doctor\` — all checks show \`OK\`, no \`spec_version: FAIL\` - [ ] \`authsome register /tmp/test.json --force\` — no prompt - [ ] \`authsome --quiet list\` — table prints, summary header suppressed - [ ] \`authsome log\` — tabular audit entries; \`--raw\` shows debug log - [ ] 273 existing tests pass 🤖 Generated with [Claude Code](https://claude.com/claude-code) EOF )"Assistant
Now I'll rewrite the CLI reference to match the actual implementation:
Assistant
Now update the manual testing guide to fix the stale check names and exit codes:
Assistant
Now fix the
logsection,connection set-defaultcommand,register --forcenote, and the exit codes table in the manual testing guide:Assistant
Now fix the exit codes section in the manual testing guide:
Assistant
Now commit the docs and create the PR. The user said they've logged in to gh:
Assistant
PR is open: https://github.com/agentrhq/authsome/pull/274
Here's what's in it across two commits:
Commit 1 — code fixes:
health.py:spec_versioncheck now returns"ok"→ doctor shows all greencontext.py:emit()added — never quiet-suppressed, respects--no-colormain.py:--forceon register bypasses prompt; list/doctor data rows useemit();logrewritten to read server NDJSON audit log with tabular display +--rawfallback
Commit 2 — docs sync:
docs/site/reference/cli.mdx: exit codes fully corrected (all 9 codes),profileadded,shellexport format added,--log-filepath fixed,set-defaultfixed (top-level, notconnection set-default),logandregisterdocs updated, doctor check names correcteddocs/internal/manual-testing.md: all stale expectations updated (check names, exit codes 3→4 for ProviderNotFound, → , log format)
- User
/exit exit