Skip to content

Doghouse: fail fast on malformed --repo values #8

@flyingrobots

Description

@flyingrobots

Follow-up to #4.

Why

The CLI help advertises --repo owner/name, but resolve_repo_context() currently accepts slashless input and silently rewrites it into owner=name=repo.

Example:

  • --repo wesley becomes wesley/wesley

That is not a helpful fallback. It is a hidden query rewrite.

Current behavior

Relevant file:

  • src/doghouse/cli/main.py

snapshot, watch, and export all share the same repo-context resolver now, which is good. But malformed input still gets normalized instead of rejected.

Desired outcome

If the user supplies --repo, it should either:

  • be a valid owner/name, or
  • fail immediately with a clear error message

Auto-detection should remain the fallback only when the user does not provide a repo explicitly.

Acceptance criteria

  • Invalid explicit --repo values fail loudly.
  • snapshot, watch, and export all share the same validation path.
  • Add regression tests for malformed explicit input.
  • The CLI help and actual behavior stay aligned.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions