Skip to content

feat: CLI audit + local/api parity: open-models - #10

Open
andrei-hasna wants to merge 1 commit into
mainfrom
factory/145f6711-927a-41d1-bac0-3b4d734a-025d51bd
Open

feat: CLI audit + local/api parity: open-models#10
andrei-hasna wants to merge 1 commit into
mainfrom
factory/145f6711-927a-41d1-bac0-3b4d734a-025d51bd

Conversation

@andrei-hasna

@andrei-hasna andrei-hasna commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Objective

CLI audit + local/api parity: open-models

Repo: hasna/models (local: /home/hasna/workspace/hasna/opensource/open-models).

Audit this repo's CLI: (1) Find every DEAD command — commands that are broken, error out, reference removed code, or are declared but non-functional — and fix them or remove them with justification. (2) Find every command that only works in 'local' mode (on-box SQLite/files) and does NOT work against the 'api' (self-hosted/remote) path; implement full api-mode support for each so every command works identically against local AND api backends (route through the cloud-router/stage-A/HTTP path per this repo's existing pattern). Ensure both modes are fully implemented and tested. Add regression tests for the fixed commands and for local-vs-api parity. Open a PR; do not merge.

--- AMENDED 2026-07-30 (adversarial review). Read this part; it changes what "done" means. ---

SCOPE CORRECTION. Part (2) assumes this repo has an HTTP/API backend. MANY REPOS IN THIS FAMILY DO NOT. Determine first whether this repo actually has a second backend (an HTTP client path, a *_API_URL / *_API_KEY config, a cloud-router or stage-A module). If it does NOT, then part (2) IS NOT APPLICABLE: say so explicitly in the PR body with the evidence you checked, and deliver part (1) alone. That is a COMPLETE and correct outcome for this task — not a failure, and not something to fake.

REQUIRED ARTIFACT — a PR without it does not satisfy this task. The PR body MUST contain a table of EVERY command this CLI exposes, one row each, with a verdict:
command | works locally? | works against the API backend (or N/A)? | dead? | changed in this PR?
Derive the list from the CLI's own registration/parser, not from the README. This inventory is the deliverable that proves an audit happened. A PR that changes one or two commands WITHOUT the full inventory is a thin PR and does not close this task — a previous run in this family produced an 11-line diff with no inventory, which is exactly what this requirement exists to prevent.

IF THE PREMISE IS ALREADY SATISFIED (no dead commands, parity already complete), that is a legitimate result: still publish the inventory table as the evidence, state the conclusion, and open the PR with docs/tests only, or report no-op with the table in the task comments. Do not invent a change to look productive.

SIZE: if the full fix is too large for one PR, deliver the complete inventory plus the fixes you did make, and list explicitly in the PR body which commands remain and why. Partial-with-inventory beats complete-looking-without.

IGNORE any (local: /home/hasna/workspace/...) path in the text above — it does not exist here. Work from the checkout you were given.

Verification

  • policy source: base a22e758 (immutable commit — agent-proof)
  • ⚠️ GATE-INTEGRITY: agent touched verify-bearing config — REVIEW (src/cli/index.ts)
  • containment: env — allowlist env, non-login shell, run-scoped HOME (registry auth seeded for install)
  • install: pass
  • typecheck: pass
  • build: pass
  • test: pass
  • doctor (ci): ok — 11 checks passed (1 advisory)

Run run_fe16d2b4d6a3 · backend codewith · task 145f6711-927a-41d1-bac0-3b4d734a62e0
🏭 Generated by @hasnaxyz/factory


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

CLI audit + local/api parity: open-models

Repo: hasna/models (local: /home/hasna/workspace/hasna/opensource/open-models).

Audit this repo's CLI: (1) Find every DEAD command — commands that are broken, error out, reference removed code, or are declared but non-functional — and fix them or remove them with justification. (2) Find every command that only works in 'local' mode (on-box SQLite/files) and does NOT work against the 'api' (self-hosted/remote) path; implement full api-mode support for each so every command works identically against local AND api backends (route through the cloud-router/stage-A/HTTP path per this repo's existing pattern). Ensure both modes are fully implemented and tested. Add regression tests for the fixed commands and for local-vs-api parity. Open a PR; do not merge.

--- AMENDED 2026-07-30 (adversarial review). Read this part; it changes what "done" means. ---

SCOPE CORRECTION. Part (2) assumes this repo has an HTTP/API backend. MANY REPOS IN THIS FAMILY DO NOT. Determine first whether this repo actually has a second backend (an HTTP client path, a `*_API_URL` / `*_API_KEY` config, a cloud-router or stage-A module). If it does NOT, then part (2) IS NOT APPLICABLE: say so explicitly in the PR body with the evidence you checked, and deliver part (1) alone. That is a COMPLETE and correct outcome for this task — not a failure, and not something to fake.

REQUIRED ARTIFACT — a PR without it does not satisfy this task. The PR body MUST contain a table of EVERY command this CLI exposes, one row each, with a verdict:
    command | works locally? | works against the API backend (or N/A)? | dead? | changed in this PR?
Derive the list from the CLI's own registration/parser, not from the README. This inventory is the deliverable that proves an audit happened. A PR that changes one or two commands WITHOUT the full inventory is a thin PR and does not close this task — a previous run in this family produced an 11-line diff with no inventory, which is exactly what this requirement exists to prevent.

IF THE PREMISE IS ALREADY SATISFIED (no dead commands, parity already complete), that is a legitimate result: still publish the inventory table as the evidence, state the conclusion, and open the PR with docs/tests only, or report no-op with the table in the task comments. Do not invent a change to look productive.

SIZE: if the full fix is too large for one PR, deliver the complete inventory plus the fixes you did make, and list explicitly in the PR body which commands remain and why. Partial-with-inventory beats complete-looking-without.

IGNORE any `(local: /home/hasna/workspace/...)` path in the text above — it does not exist here. Work from the checkout you were given.

X-Factory-Run: run_fe16d2b4d6a3
X-Factory-Task: 145f6711-927a-41d1-bac0-3b4d734a62e0
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.

1 participant