Skip to content

Print prose preflight verdicts from Go #889

Description

@tbhb-agent

Problem

The preflight distinguishes an unscoped target, a failed Vale probe, an already-clean lint command and a run that should proceed. Those distinctions prevent silence from being mistaken for success. The shell report at packages/agents/source/skills/fix-prose/shared/scripts/preflight.sh:35 must move without exposing the writer's full findings to the caller.

Part of #588 and #327. Adds agentrepo prose preflight; no caller switches here.

Acceptance criteria

  1. AC1: Given no repository, no target or a missing target, preflight emits the existing corresponding BLOCKED report with exit 0. Dropped: moved to AC1, AC2 and AC3 respectively in Report prose preflight argument blockers from Go #1029 ("Report prose preflight argument blockers from Go"), so each argument-handling report has one criterion and Print prose preflight verdicts from Go #889 stays below the 12-live-criterion cap.
  2. AC2: Given a successful Vale scope probe with no finding lines, preflight reports UNSCOPED and BLOCKED with exit 0.
  3. AC3: Given a Vale scope probe exiting above 1, preflight reports the probe failure and BLOCKED with exit 0.
  4. AC4: Given finding lines from a valid scope probe, preflight reports the same coverage count as the shell.
  5. AC5: Given Vale is unavailable, preflight reports unknown scoping and continues as the shell does.
  6. AC6: Given a supplied lint command that succeeds, preflight reports already-clean BLOCKED with exit 0.
  7. AC7: Given a failing supplied lint command or no lint command, and no earlier blocker, preflight reaches the existing PROCEED verdict.
  8. AC8: Given abandoned workflow state or an existing guard lock, preflight prints the same leftover notices as the shell.
  9. AC9: Non-functional: output from the supplied lint command is absent from the preflight report.
  10. AC10: Non-functional: with a read-only lint fixture, preflight changes no worktree, index or workflow state.
  11. AC11: Non-functional: native Go coverage for these outcomes executes and passes on macOS, Linux and Windows.
  12. AC12: Given the supported shell executor (Bash found on the search path; on Windows, the Bash that ships with Git for Windows) cannot be started, preflight reports BLOCKED with one executor-unavailable line and exit 0, never PROCEED and never already-clean.

Scope and non-goals

Scope: valid-target report ordering, the existing control-text probe, lint-command execution and leftover reporting. Probe and lint behavior are at packages/agents/source/skills/fix-prose/shared/scripts/preflight.sh:80 and packages/agents/source/skills/fix-prose/shared/scripts/preflight.sh:104. The outside-repository, no-target and missing-target BLOCKED reports move to #1029 ("Report prose preflight argument blockers from Go").

Non-goal: changing the published Vale template, teaching a new finding format, treating missing Vale or missing lint as a new refusal, cleaning up leftover state, running agents, changing hooks, switching callers or retiring tests. The outside-repository, no-target and missing-target BLOCKED reports are out of scope here and belong to #1029.

Approach

Preserve the supplied command-string semantics and its repository-root working directory. Execute that command with the supported executor named in AC12 (Bash, as the original runs it); do not reimplement shell parsing or substitute a Windows command language. This child owns the executor helper that 05 reuses: it separates "executor could not start" from "command ran and returned a status", and the first is reported as BLOCKED, as stated in AC12. Preserve the C locale and the existing environment hardening for this report. The caller-supplied command may itself write files; the report's read-only claim does not suppress those existing effects.

Keep the control text and ai-tells-agent.tmpl selection at packages/agents/source/skills/fix-prose/shared/scripts/preflight.sh:72. Count lines beginning with a digit, not JSON findings or total matches. Use status before count. Make the probe usable by 05 without a shell helper. Keep the current leftover-key calculation at packages/agents/source/skills/fix-prose/shared/scripts/preflight.sh:117; do not silently change its path semantics to match baseline canonicalization. Golden fixtures should cover that distinction.

Dependencies

Blocked by: #753 (command-registration coverage).

Prerequisite: the applicable repository-context contract from #321. No dependency on the #322, #323 or #324 transactions; their lint commands remain caller input.

Related scope split: #1029 ("Report prose preflight argument blockers from Go") owns the three argument-handling BLOCKED reports. Neither issue depends on the other.

Size

S. Estimated 450 code lines: 180 implementation, 240 tests/fixtures and 30 command plumbing. The original report measures 72 code lines with scc 4.1.0. Exclude only generated output under packages/agents/{claude,codex}/.apm/skills/, .claude/skills/, .agents/skills/, and tokens.json; source, fixtures and all other copies count. Hard limits: 800 code lines and 2,000 prose lines; split before exceeding either.

Verify plan

  • AC1 (moved): verify outside-repository, no-target and missing-target reports under sibling AC1, AC2 and AC3 respectively in Report prose preflight argument blockers from Go #1029 ("Report prose preflight argument blockers from Go"). This struck criterion is excluded from Print prose preflight verdicts from Go #889's live count. These early returns run before any probe or lint-command execution; git still runs first at packages/agents/source/skills/fix-prose/shared/scripts/preflight.sh:35. Valid absolute/relative target fixtures remain in the probe, lint and leftover checks for AC2, AC3, AC4, AC5, AC6, AC7, AC8 and AC9.
  • AC2, AC3, AC4, AC5: a controlled Vale executable covers statuses 0, 1 and greater than 1 with empty, mixed and digit-prefixed output, plus missing Vale. Assert exact probe arguments and control text; preserve the published template syntax.
  • AC6, AC7, AC9: controlled lint commands cover success, failure, omitted command, quoting and shell operators; record one invocation, its working directory and suppressed stdout/stderr.
  • AC8: fixtures for both supported state locations and a guard lock compare report order and notices with the shell.
  • AC10: before/after inventories with a read-only executor show no report-owned mutation; a separate fixture confirms existing lint-command side effects are not silently suppressed.
  • AC11: native CI tests execute on all three platforms with controlled executors; shell parity tests record their supported executor and platforms rather than hiding skipped coverage.
  • AC12: on all three platforms, run with a search path containing no Bash and expect the single executor-unavailable BLOCKED line, exit 0 and no lint invocation.
  • AC7: on all three platforms, start controlled Bash with a lint command that exits nonzero and assert PROCEED; compare this report with the executor-unavailable report checked under AC12.
  • Definition of done: D1 each AC is verified at the merged head, with the commands and results cited in the pull request's Verification. D2 an independent review approves the exact merged head, and every finding has a recorded disposition. D3 required checks pass with no gate loosened. D4 the leak scans the repository specifies are clean, and every post made for this work passes the per-post leak review before it is posted. D5 every commit is signed. D6 the documentation matches the change or the Verification says why there is no impact. D7 every commit has an Assisted-by trailer and the pull request has the provenance:agent-assisted label. D8 the pull request stays within the size limits. D9 follow-ups are filed as issues and listed under Related. D10 the merge closes the issue through a closing reference, the board shows Done, and the final Status: comment names the merge commit.

Risks

Conflating an errored probe with an unscoped path, or changing exit-zero BLOCKED behavior, could mislead the caller. Requoting a supplied command could change what runs. Undo: revert the Go addition; the unchanged report remains active until 07.

Operator authority

None.

Activity

  1. tbhb-agent commented on Oct 27, 2026

    @tbhb-agent
    ContributorAuthor

    Refinement: READY — Print prose preflight verdicts from Go
    Model: gpt-6-astra

    Child 04 Print prose preflight verdicts from Go

    Verdict: READY

    Checked: The round 1 executor gap is closed by AC12: supported Bash is identified, executor-start failure produces BLOCKED with exit 0, and an executed lint command returning nonzero remains distinct. Verification exercises both outcomes on all three platforms. Existing probe precedence, suppressed lint output and leftover notices remain anchored in packages/agents/source/skills/fix-prose/shared/scripts/preflight.sh:80, packages/agents/source/skills/fix-prose/shared/scripts/preflight.sh:104 and packages/agents/source/skills/fix-prose/shared/scripts/preflight.sh:117. The 450-code-line estimate remains plausible.

    Gaps: None.

    Split: None required.

    Definition of done

    The definition of done for this issue (Feature). Tick each item and give its evidence.

    • D1 The author verified each AC on the merged head, and the Verification section of the pull request cites each AC ID with its evidence: the command and its result, or a link.
    • D2 An independent reviewer approved the exact merged head, and the author resolved each finding or filed it as a follow-up.
    • D3 The required checks pass on that head, and any loosened gate has the owner's approval of that exact head.
    • D4 The leak scans come back clean: gitleaks, devtools' check-leaks.sh with the repository's private-strings list, and the leak review of each post.
    • D5 The author signed each commit, the squash included.
    • D6 The docs match the change (README, docs/, CHANGELOG or help text), or the Verification section says "No doc impact" and why.
    • D7 The commits and the squash have Assisted-by trailers, and the pull request has the provenance:agent-assisted label.
    • D8 The pull request stays within the size limits, or the owner approved its exact head over the hard limit.
    • D9 The author files follow-ups and deferred findings as issues with at least a Problem and numbered AC and lists them under the Related section of the pull request. Any work left in the code links its issue.
    • D10 The merge closes the issue through a closing reference and the board shows Done. The final Status: comment names the merge commit.
    • devtools-1 mise run check is green, and so are the coverage floors mise run cover-go-check and mise run cover-py-check, which check doesn't run.
    • devtools-2 A change to skill sources under packages/agents/source/ commits what mise run generate-skills, then mise run skill-tokens, then apm install rewrite, in that order, and check-generated-skills (part of lint) passes.
    • devtools-3 A consumer-visible change (the vendored payload, a skill, a reusable workflow, a task or a pin) has its consumer steps in docs/agent-skills-migration.md or the adoption docs, or the PR's Verification says "No consumer impact" and why.

    Round: 2 of 3

  2. tbhb-agent commented on Nov 1, 2026

    @tbhb-agent
    ContributorAuthor

    Refinement: READY — Print prose preflight verdicts from Go

    Checked

    Gaps

    None.

    Split

    None required.

    Definition of done

    Planning coverage only; unchecked items are not completed work.

    • D1 Verify each AC at the merged head and cite its command and result in PR Verification. The plan lists checks but does not require recording merged-head results in the PR.
    • D2 Obtain independent review of the exact merged head and record each finding’s disposition. Not covered by the ACs or Verify plan.
    • D3 Pass required checks without loosening gates. Not covered by the ACs or Verify plan.
    • D4 Pass required leak scans and per-post leak review. Not covered by the ACs or Verify plan.
    • D5 Sign every commit. Not covered by the ACs or Verify plan.
    • D6 Match documentation to the change or record why there is no impact. Not covered by the ACs or Verify plan.
    • D7 Include Assisted-by trailers and the provenance:agent-assisted PR label. Not covered by the ACs or Verify plan.
    • D8 Keep the PR within size limits. The Size section estimates scope, but the plan does not require checking the actual PR diff.
    • D9 File and list follow-ups. Not covered by the ACs or Verify plan.
    • D10 Close by merge reference, set the board to Done, and post a final Status: comment naming the merge commit. Not covered by the ACs or Verify plan.

    Round: 1 of 3

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

    refinement:readyPassed the Definition of Ready; may be picked up

    Fields

    Priority

    None yet

    Work type

    None yet

    Projects

    • Status
      Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions