chore(gates): make test guards and CI selectors fail on the violations they exist for

Merged
TH
11h ago
+616-498

Summary

Fixes gates that could not fail (audit findings TEST2-1/2/3/5, CONTR2-3, DOCS-2/5, TOOL-2/5/6/7, TOOL2-2/4, BASE-1).

Exec wraps

  • exec-wrap-guard now scans packages/*/src.
  • It flagged four wraps that lacked processExitError: simctl boot and bootstatus, Vega inventory, and adb discovery. The simctl wraps already passed stderr. All four now use execFailureDetails.
  • Changed error shape: adb discovery errors can now carry xcrun-tool-not-found with its hint. The adb classification still wins.

Guards

  • package-exports enforces the exact export list.
  • Android contract evidence is checked in both directions.
  • An interaction-contract setup hook diffs each manifest against the tests that ran.
  • Loopback tests skip only through skipWhenLoopbackUnavailable, and CI sets AGENT_DEVICE_REQUIRE_LOOPBACK_TESTS=1.
  • Spent output-economy waivers are inert.
  • Doc snippets compile on 6 pages; the BrowserStack and AWS snippets are fixed.
  • The chmod tests inject failures through spies or seams, so they run under any uid.

Selectors and CI

  • Public-surface paths come from the build entries.
  • Device lanes keep both sides of a rename.
  • A failed git diff fails the mutation lane.
  • Provider integration runs once.
  • The torture lane validates its inputs and uses disjoint seed ranges.

Deferred: TOOL2-5 and TOOL-4.

Validation

  • Receipts showing each guard fails on old code are in a PR comment.
  • check:affected --run at f07fb59: format, lint, typecheck, fallow, build and package pass.
  • integration-node fails locally only in smoke-daemon-clean. The container's PID 1 does not reap stopped daemons. CI owns that lane and passed it at 7c699e3.

Generated by Claude Code


<a href="https://backend.blacksmith.sh/track/enable-autofix?expires=1796917338&installation_model_id=447842&pr_number=4356&ref=codesmith_pr_footer&repository=callstack%2Fagent-device&return_to=https%3A%2F%2Fgithub.com%2Fcallstack%2Fagent-device%2Fpull%2F4356&signature=e28e5dba4dba5d8e467904c9885c1b802bf5d37e24cb13e2390b0eb5512c16dd"&gt;&lt;picture&gt;&lt;source media="(prefers-color-scheme: dark)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark.svg"&gt;&lt;source media="(prefers-color-scheme: light)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-light.svg"&gt;&lt;img alt="Autofix with [code]smith" src="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png" width="190" height="28"&gt;
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

<a href="https://www.cubic.dev/action/auto-fix/pr/callstack/agent-device/4356?returnTo=https%3A%2F%2Fgithub.com%2Fcallstack%2Fagent-device%2Fpull%2F4356&source=description" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true">&lt;source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-dark.svg"&gt;&lt;source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"&gt;&lt;img alt="Turn on auto-fix" src="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"&gt;


Generated by Claude Code