Skip to content
This repository was archived by the owner on Apr 7, 2026. It is now read-only.
This repository was archived by the owner on Apr 7, 2026. It is now read-only.

K3: falsify hangs with no args; 6 subcommands silently exit 0; code spawns orphan process #91

Description

@noahgift

Kaizen Surface Gate K3 Failures (8 defects)

CRITICAL: batuta falsify hangs indefinitely

  • Running batuta falsify with no args hangs with no output
  • No panic, no error, no timeout — must be killed
  • Should exit non-zero with "error: required argument not provided"

HIGH: batuta code spawns orphan process

  • Running batuta code with no args auto-discovers a model, launches apr serve on a random port
  • The apr serve child process persists after batuta exits (PID leak)
  • Should require explicit --model arg or exit non-zero when no model specified

MEDIUM: 6 subcommands exit 0 with no required args

These all silently succeed when run without arguments, mutating CWD or producing output:

  • batuta init — initializes project in CWD
  • batuta analyze — analyzes CWD
  • batuta report — generates migration_report.html in CWD
  • batuta parf — runs PARF analysis on CWD
  • batuta oracle — prints header then exits
  • batuta serve — prints server banner and starts listening

Five-Whys (falsify hang)

  1. Why does it hang? No timeout on the main loop when no input is provided
  2. Why no input detection? The falsify command expects spec file paths but doesn't validate args before entering the processing loop
  3. Why no early validation? Likely reads from an empty iterator and blocks on I/O or channel
  4. Why no timeout? The command was designed for long-running falsification runs, not for empty-arg detection
  5. Why not caught? No K3 surface gate testing — unit tests always provide valid inputs

Fix

  • falsify: Add early arg validation — require at least one <spec-path> positional arg
  • code: Require --model or detect non-TTY stdin and exit with usage hint
  • Others: Add required args or --force flag for CWD-mutating operations

Found via kaizen surface gate sweep.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions