Skip to content

test: execute the classify script's diff-failure fail-closed path #388

Backlog

Description

@jflowers

CIW-FR-001 requires a failing diff command to fail the changes job ("Diff failure fails closed" scenario), but the behavior is pinned only textually — the script's set -euo pipefail first line and the git diff command-capture regex are asserted, while the executed scenario table in TestCIWorkflow_ClassifyScriptBehavior contains no scenario where git diff actually fails. A regression eroding set -e semantics while still matching the structural pins passes the suite.

Severity: LOW (assertion depth).

Location: cmd/gaze/ci_workflow_test.go:559.

Suggested fix: add an executed bogus-base scenario (a fabricated base SHA fails git diff deterministically) asserting the script exits non-zero and writes no code= line; the scenario-table runner needs only a wantExitNonZero-style field.

Source: review feedback on PR #373 — #373 (comment) (divisor-testing, council review).

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

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions