Skip to content

agentgate-verify: add a --quiet flag to suppress non-essential success output #14

Description

@shreyanshjain7174

What

Add a --quiet (short form -q) flag to cmd/agentgate-verify that suppresses the informational lines it prints on success — completeness: ... and range: ... — leaving only the single PASS: ... summary line (or nothing at all on success, your call — document whichever you pick).

Why

Today, a passing run always prints 2-3 lines (the PASS: summary, a completeness: line, and sometimes a range: line for JSONL exports). For a script that only cares about the exit code, or that wants a single terse confirmation line, this is more output than needed. --quiet gives scripted/CI callers a way to opt into a smaller, stable surface without losing any information on failure — failures should still print everything they do today, since that detail is exactly what a human debugging a FAIL needs.

Files to touch

  • cmd/agentgate-verify/main.go — add a --quiet/-q bool flag to run()'s flag set; when set and the result is OK, print only the PASS: line (skip completeness: and range:). Failure output (FAIL: ...) must be unaffected by this flag.
  • cmd/agentgate-verify/main_test.go — add test coverage for the new flag.

Acceptance checks

  • agentgate-verify --quiet (or -q) against a valid chain exits 0 and prints only the PASS: ... line — no completeness: or range: line.
  • agentgate-verify --quiet against a tampered chain still prints the full FAIL: seq=%d reason=%s (...) line exactly as without the flag, and still exits 1.
  • Without --quiet, output is byte-for-byte unchanged from today.
  • --quiet combined with a future --format json flag (see the companion issue) should not conflict conceptually — note in your PR if you think they need explicit interaction rules, but implementing both together is not required for this issue.

Test path (no secrets needed)

go test ./cmd/agentgate-verify/... -race -count=1 -v

The existing test helpers (buildTestChain, writeJSONLFile) already build real signed receipt chains in a temp SQLite database — no live AgentGate instance, network access, or secrets are needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions