Skip to content

explain_stats ignores the permute pass; -tui -ct does not pre-fill Sources #348

Closed

Description

@TMHSDigital

Summary

Two small front-end gaps left by today's features.

Where

  • internal/cli/explain.go (explainTarget)
  • internal/cli/session.go (tuiOmittedFlags)

Details

  1. Since Run-quality report leaves out the -permute pass's queries and verdict #298 a target's verdict can come from its permutation pass, but explain_stats prints only the pass's candidates, seeds and found, so its explanation relies on the reason string alone; it should state the pass's verdict and queries.
  2. subenum -tui -ct warns that the form has no field for -ct, although the Sources field (TUI form lacks sources, max duration, auto rate, retry inconclusive, permute #274) takes ct; it could pre-fill Sources instead.

Suggested fix

Add the permutation pass's verdict and queries to the explanation; map -ct onto the Sources field and drop it from tuiOmittedFlags.

Acceptance criteria

  • explain_stats names the permutation pass when it set the verdict
  • subenum -tui -ct opens with ct in Sources and no warning

Getting started

  • How to run tests: make test (or go test ./...). Tests must stay hermetic: use -simulate, -simulate-zone or the local DNS test server, never a live domain.
  • Related docs: docs/DEVELOPER_GUIDE.md, docs/ARCHITECTURE.md

Filed by repo-audit/fix-issues at 637a950. Severity: low. Effort: S. audit-key: enhancement|internal/cli/explain.go|permutation

Activity

  1. added
    enhancement
    good first issue
    severity: low
    on Nov 15, 2026
  2. TMHSDigital commented on Nov 15, 2026

    @TMHSDigital
    OwnerAuthor

    Fixed in 95b1bac: tuiOptions turns -ct into ct in the Sources field without a warning; explain_stats gives the permutation pass's names tested, queries and own verdict, and says when it set the target's verdict. ct stays in the test's tuiOmittedFlags (the form still reads only -sources), with a note. Verified: new cases in TestTUIOptionsFromFlags (-ct, -ct -sources wayback, -ct -sources ct,wayback) and a second target in TestMCPExplainStatsBranches; go test ./internal/cli and golangci-lint v2.15.0 pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementgood first issueseverity: low

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions