Three build-breaking check scripts + two smoke test harnesses + two fixture dirs:
- scripts/check-bus-protocol-version.sh: greps Swift vs TS BUS_PROTOCOL_VERSION
constants, diffs the two fixture directories (packages/Bus/Tests/BusTests/
Fixtures/ vs webview/packages/bus/fixtures/). Fails build on any drift.
- scripts/check-no-evaluate-javascript.sh: scans App/ + packages/ for
`.evaluateJavaScript(` outside test dirs; HUD-04 architectural lint.
- scripts/check-bus-harness-parity.sh: byte-identical check between
canonical webview/bus-harness.html and bundle copy (Plan 02-03 provides
the bundle copy; this script enforces no-drift going forward).
- scripts/test-check-bus-protocol-version.sh + bus-mismatch/ fixture:
drives the protocol-version checker against a v2.0.0/v1.9.0 mismatch,
asserts exit 1 + both versions in error text.
- scripts/test-check-no-evaluate-javascript.sh + bus-evaluate-js/ fixture:
drives HUD-04 lint against bad.swift (evaluateJavaScript) + good.swift
(callAsyncJavaScript). Asserts bad.swift flagged, good.swift not flagged.
Fixture is copied to a temp dir to bypass the production */test-fixtures/*
path-skip rule.
[Rule 3 - Blocking] Normalized Swift-side fixtures to drop trailing newlines.
The 14 JSON files under packages/Bus/Tests/BusTests/Fixtures/ had stray
trailing \n while the TS mirror at webview/packages/bus/fixtures/ did not.
Plan 02-02's SUMMARY documented the no-trailing-newline convention (matches
Swift JSONEncoder default) but Plan 02-01's fixtures were authored via a
text editor that added them. Stripping \n lets check-bus-protocol-version.sh
pass without relaxing the byte-equality invariant. Swift CodableRoundTripTests
remain green (24/24) because JSONSerialization ignores trailing whitespace.