Skip to content

Groundwork: guards for the workspace move - #156

Merged
nofuturekid merged 2 commits into
rebuildfrom
fix/145-groundwork-guards
Nov 13, 2026
Merged

nofuturekid merged 2 commits into
rebuildfrom
fix/145-groundwork-guards

Conversation

@nofuturekid

@nofuturekid nofuturekid commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #145

Task 1 of docs/superpowers/plans/2026-11-13-obsbot4linux-groundwork.md. Tests and CI only; no change to src/, Cargo.toml or Cargo.lock, so nothing that is sent to the camera changes. The fixtures are recorded from the code of the base commit, before anything moves.

  • tests/byte_guard.rs records every frame and short command the builders emit for a fixed list of calls in tests/fixtures/byte-guard.txt (831 lines).
  • tests/cli_surface.rs records the --help text of the CLI and of every subcommand, including the hidden gimbal center, in tests/fixtures/cli-surface.txt (88 texts), and checks --version against the package version.
  • The release dry run gets the job contents: it checks that the binary in every package is stripped and compares the file list of all eight packages with packaging/contents.txt. release needs it. packaging/contents.txt is recorded in a follow-up commit from the package-contents artifact of this pull request's own dry run.
  • scripts/groundwork/test-names.sh and scripts/groundwork/move-check.sh are the test-name and move checks of the later groundwork tasks; scripts/package-contents.sh lists the package files.

Verified (no camera involved, the binary only ran with --help and --version):

  • cargo test --locked: 118 + 25 + 1 + 2 passed (library, binary, byte_guard, cli_surface), 0 doc tests.
  • cargo fmt --check and cargo clippy --all-targets --locked -- -D warnings clean; shellcheck on the three new scripts and actionlint on the workflows clean.
  • Mutation, byte guard: [0x01, 0x01, on as u8] in hdr changed to !on as u8: byte_guard fails with left cmd::hdr(false) = 010101, right cmd::hdr(false) = 010100; restored.
  • Mutation, CLI guard: about text of the CLI changed by one !: cli_surface fails with "a help text of the CLI changed"; restored.
  • scripts/groundwork/test-names.sh for base and head: head adds exactly builders_emit_the_recorded_bytes, help_texts_are_unchanged, version_is_the_package_version.
  • sha256 of the fixtures: byte-guard.txt 0e4a70c8ea39ee7d6574bcda3b340863f751654d9cbf892d200d46e4efe0605a, cli-surface.txt 3eceb47a17a6dd5570006fa69a9dcbbd5b45c26081cf8e8776d6e674001a867c.

From now on, a change that alters on purpose what a builder sends or a help text re-records the fixture with BYTE_GUARD_BLESS=1 or CLI_SURFACE_BLESS=1 and lists the changed lines in its description.

🤖 Generated with Claude Code

A byte guard records every frame and short command the builders emit for a fixed list of
calls, a CLI guard records the help text of every subcommand, and the release dry run lists
the files of every package. The workspace move must leave all three unchanged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@nofuturekid nofuturekid added the enhancement New feature or request label Nov 13, 2026
Taken from the package-contents artifact of the release dry run of this pull request: the
files of the deb, rpm, Arch and tarball packages for both architectures.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@nofuturekid
nofuturekid merged commit 12d9e0d into rebuild Nov 13, 2026
20 checks passed
@nofuturekid
nofuturekid deleted the fix/145-groundwork-guards branch November 13, 2026 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant