Skip to content

No automated verification: a piped-input smoke script would lock in each branch's output #13

Description

@dmccoystephenson

Summary

There is no automated verification of any kind in this repository — no test framework, no CI workflow, and no script that runs the program and checks what it prints. Every claim about behavior has to be re-established by hand, one piped run at a time.

This became concrete while fixing #4. The evidence that the fix worked was produced by stashing it, re-running the divide case, observing the tuple form, then restoring it and observing the sentence form. That evidence lives only in the pull request; nothing in the tree would catch the tuple form being reintroduced.

Suggested shape

A single POSIX-sh script — check.sh, no framework and no dependency beyond the shell and the interpreter — is the proportionate unit for a 16-line program:

  • One case per branch: Add, Subract, Multiply, Divide, and the unrecognized-operation path, each asserting the line the program prints today.
  • Four input lines per case (first number, second number, operation, exit pause). Three lines leaves the final raw_input to raise EOFError, which fails the case for a reason unrelated to the program.
  • Every invocation wrapped in timeout, since the program blocks forever at the first prompt when stdin is not fed.
  • A clean skip, not a failure, when no Python 2 interpreter is present: the version is probed, SKIP: no Python 2 interpreter is printed, and 0 is returned. A script that hard-fails on a Python-3-only machine is worse than none.
  • No bytecode left behind.

The cases should characterize what the program does today, including the behavior tracked in #5, #6 and #8. Fixing a bug discovered while writing a case belongs in a separate change.

Why it is worth doing before the remaining behavioral issues

#5, #6, #8 and #10 all change what the program prints or accepts. Landing the script first gives each of those a place to record a real regression case, instead of leaving the evidence in a pull request body where nothing re-runs it.

This issue was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).


drafted by Claude on behalf of Daniel Stephenson

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions