Skip to content

I10 (audit-I42+I50+I51+I57): missing/lying CLI surfaces#40

Merged
mfwolffe merged 3 commits into
trunkfrom
i10/missing-cli-surfaces
May 24, 2026
Merged

I10 (audit-I42+I50+I51+I57): missing/lying CLI surfaces#40
mfwolffe merged 3 commits into
trunkfrom
i10/missing-cli-surfaces

Conversation

@espadonne
Copy link
Copy Markdown
Contributor

Summary

Closes audit-I42 + I50 + I51 + I57 — every surface where the CLI either failed to dispatch through a working server endpoint, or advertised a flag the server doesn't honor.

What landed

  • `repo list ` (audit-I42, CRIT) — pre-fix only hit `/users/{X}/repos` and bailed with "user not found" when X was an org. Now: try user first, fall back to `/orgs/{X}/repos` when the user lookup 404s. When both 404, the user-side NotFoundError propagates unchanged.
  • `repo edit --archived / --unarchive` (audit-I50, MED) — typed flags for the archive bit. Server already honors `archived` on PATCH; the raw-API workaround (`api -X PATCH /repos/{O}/{R} -F archived=true`) wasn't discoverable. The two flags are mutually exclusive; pass either one.
  • `repo edit --visibility internal` (audit-I51, CRIT) — server 422s "visibility must be public or private". Drop `internal` from the help text and validate client-side so the error names the actual flag instead of letting the API speak. Same lie removed from `repo create --internal` (flag removed, "Internal" stripped from the interactive prompt).
  • `repo edit --enable-projects/--enable-wiki/--enable-discussions` (audit-I57, MIN) — the help already said "no-op on shithub for now" but the CLI still printed `✓ Updated` for a request that did nothing. Now prints a `note:` per passed vapor flag so the user knows the server has no behavior to attach.

Out of scope

  • I43 (`org view --json publicRepos` always 0) — deferred from I8; needs a server-side `/api/v1/orgs/{org}` GET endpoint that doesn't exist yet. Tracked separately for a future I-N or J-pass.

Test plan

  • Build + vet clean
  • `TestListFallsBackToOrgOn404` + `TestListPropagatesUserNotFoundWhenOrgAlsoMisses` pin I42
  • Full `./pkg/cmd/repo/...` test suite green
  • Dogfood post-merge: `shithub repo list tenseleyflow` returns org repos; `shithub repo edit $REPO --archived` succeeds; `--visibility internal` rejects cleanly; `--enable-projects` prints note

🤖 Generated with Claude Code

@mfwolffe mfwolffe merged commit fd30a0a into trunk May 24, 2026
3 checks passed
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.

2 participants