omega-rosetta
aien-dev/omega-rosetta
Brought by drakestapleton
omega-rosetta / .github / workflows / negative-control.yml
| 1 | name: negative control (red by design) |
| 2 | # Manual only. Runs run.sh on a copy of tasks/ whose fizzbuzz/expected.txt has one line changed, |
| 3 | # and does NOT invert the result: a correct checker makes this run fail (red). A green run here |
| 4 | # would mean run.sh cannot catch a wrong answer. The tasks workflow runs the same control inverted. |
| 5 | on: |
| 6 | workflow_dispatch: |
| 7 | permissions: |
| 8 | contents: read |
| 9 | jobs: |
| 10 | mutated-expected: |
| 11 | runs-on: ubuntu-24.04-arm |
| 12 | timeout-minutes: 15 |
| 13 | steps: |
| 14 | - uses: actions/checkout@v4 |
| 15 | - name: Mutate one expected line |
| 16 | run: | |
| 17 | set -eu |
| 18 | t="$RUNNER_TEMP/mutated"; cp -r tasks "$t" |
| 19 | sed 's/^Buzz$/Bzzz/' tasks/fizzbuzz/expected.txt > "$t/fizzbuzz/expected.txt" |
| 20 | ! cmp -s tasks/fizzbuzz/expected.txt "$t/fizzbuzz/expected.txt" |
| 21 | - name: run.sh on the mutated tree (expected to FAIL) |
| 22 | run: sh run.sh --prebuilt --tasks "$RUNNER_TEMP/mutated" |