Skip to content

v0.2.0 fix(sim): escape $true in high_defender_tamper + add CI smoke test#23

Merged
keirsalterego merged 1 commit into
mainfrom
fix/defender-tamper-and-ci
Jun 14, 2026
Merged

v0.2.0 fix(sim): escape $true in high_defender_tamper + add CI smoke test#23
keirsalterego merged 1 commit into
mainfrom
fix/defender-tamper-and-ci

Conversation

@keirsalterego

Copy link
Copy Markdown
Contributor

Summary

Two genuinely-new deltas on top of current main (the demo-fire scenario suite itself already landed in #21):

Fixed

  • high_defender_tamper.sh crashed demo-fire.sh --populate with line 31: true: unbound variable. The PowerShell literal $true sat inside an unquoted heredoc, so set -u treated it as an unset shell variable and aborted the whole populate run. Escaped to \$true so the payload carries the literal $true. main still has the bug; this fixes it. All scenarios now build clean under set -u.

Added

  • CI (.github/workflows/simulator-ci.yml) — sh -n syntax check, ShellCheck (error severity), and a smoke test on every push/PR. Actions pinned to a full commit SHA; job runs contents: read only.
  • scripts/smoke.sh — hermetic signature-shape test (no ingestion server): builds a payload, signs it, asserts the sha256=<64-hex> HMAC-SHA256 wire shape.

Changed

  • simulate.sh only dispatches when executed directly (a BASH_SOURCE guard) so the smoke test can source it to exercise the signer/payload builder without sending anything. (Surgical addition to the current main version — no other simulate.sh changes.)

The CHANGELOG 0.2.0 entry also retroactively documents the demo-fire suite shipped in #21 (which landed without a changelog entry).

Verification (the exact CI checks, run locally)

  • sh -n on simulate.sh + all scenarios + scripts/smoke.sh — clean
  • shellcheck --severity=error — clean
  • scripts/smoke.shPASS (valid JSON, 64-hex HMAC, sha256= header shape)

Note

This replaces #22, which was built on a stale local main and would have reverted the #20 justfile fix and #19 em-dash purge. This branch is cut from current origin/main and contains only the 5-file genuine delta.

🤖 Generated with Claude Code

high_defender_tamper.sh crashed demo-fire.sh --populate with "line 31: true:
unbound variable": the PowerShell literal $true sat inside an unquoted heredoc,
so set -u treated it as an unset shell variable. Escaped to \$true so the
payload carries the literal $true. All scenarios now build clean under set -u.

Also adds CI for the public-facing simulator:
- .github/workflows/simulator-ci.yml: sh -n + ShellCheck + smoke on push/PR;
  actions pinned to a full SHA, job runs contents:read only.
- scripts/smoke.sh: hermetic signature-shape test (no ingestion server).
- simulate.sh: BASH_SOURCE guard so sourcing (the smoke test) does not dispatch.

Bump 0.1.0 -> 0.2.0 (also documents the demo-fire suite shipped in #21).
@keirsalterego keirsalterego merged commit 62dbd14 into main Jun 14, 2026
1 check passed
@keirsalterego keirsalterego deleted the fix/defender-tamper-and-ci branch June 14, 2026 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant