spec-kit icon indicating copy to clipboard operation
spec-kit copied to clipboard

[Bug]: Gate show_file is recorded but never displayed at the interactive prompt

Open doquanghuy opened this issue 5 months ago • 1 comments

Bug Description

The built-in gate step accepts a show_file config field. The value is read, template-expanded, and recorded in the step output, but its contents are never displayed to the operator at the interactive prompt. The operator is asked to approve/reject without seeing the file the gate is supposed to surface.

Steps to Reproduce

  1. Author a workflow with a gate that references a file:
    steps:
      - id: review
        type: gate
        message: "Review the generated spec before approving"
        show_file: "spec.md"
        options: [approve, reject]
    
  2. Run it in an interactive terminal: specify workflow run wf.yml.
  3. Observe the gate prompt.

Expected Behavior

The contents of show_file (spec.md) are shown in the interactive gate prompt before the approve/reject choice, so the operator can review the material the gate refers to.

Actual Behavior

Only the message and the options are printed. show_file is stored in output["show_file"] but its contents are never rendered. GateStep._prompt(message, options) (in src/specify_cli/workflows/steps/gate/__init__.py) is not passed show_file and never reads it.

Specify CLI Version

0.8.16 (also reproduces on main @ ed10b32)

AI Agent

N/A — workflow-engine bug, agent-independent.

Operating System

macOS (agent-independent)

Python Version

3.11

Additional Context

show_file is the gate's only mechanism for surfacing review material; without rendering it the field is effectively inert. A minimal fix renders the file in the interactive prompt while leaving the non-interactive PAUSED path, exit codes, resume behaviour, and no-show_file output unchanged.

AI disclosure: this issue was investigated and drafted with AI assistance (Claude); the bug was reproduced and the source traced by the author before filing.

doquanghuy avatar Jun 02 '26 10:06 doquanghuy

@mnriem could you help take a look at this? i also opened an PR for this issue, please help check as well

doquanghuy avatar Jun 02 '26 11:06 doquanghuy