feat: CLI audit + local/api parity: open-models - #10
Open
andrei-hasna wants to merge 1 commit into
Open
Conversation
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
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.
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_KEYconfig, 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
Run
run_fe16d2b4d6a3· backendcodewith· task145f6711-927a-41d1-bac0-3b4d734a62e0🏭 Generated by @hasnaxyz/factory
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.