Skip to content

feat(canary): DXT/CXTP OTA correctness & regression canary (#10) - #12

Closed
saariuslystoned wants to merge 2 commits into
mainfrom
feat/10-dxt-cxtp-ota-canary
Closed

saariuslystoned wants to merge 2 commits into
mainfrom
feat/10-dxt-cxtp-ota-canary

Conversation

@saariuslystoned

Copy link
Copy Markdown
Contributor

Closes #10 (host implementation, seeded vector suite, buffer-reuse fault-injection & per-variant quarantine policy, JSON receipt schema, tests, and stock-Android device-lane runbook).

Summary

  • Self-contained OTA canary (canary/): deterministic public seeded test vectors with repeated buffer-slot reuse across finite dispatches (canary/include/ota_canary.hpp, canary/src/canary_host.cpp, canary/src/ota_canary.py), with bit-identical C++17 and Python reference outputs.
  • Structured JSON receipt (canary/CANARY_RECEIPT_SCHEMA.json): records Android build fingerprint, Vulkan driver version & driver ID, GPU class (DXT/CXTP), variant ID, buffer-reuse mode, pass/fail verdict, max abs/rel error, failing vector index, and per-dispatch/total timing.
  • Fine-grained variant & buffer-reuse quarantine: automated fault-injection tests prove a reuse-only mismatch disables only buffer_reuse_allowed for the affected variant, a kernel-wide mismatch disables only that variant, and sibling paths remain enabled and bit-exact.
  • Zero proprietary/debug extension dependency: statically and dynamically verified zero dependency on VK_KHR_pipeline_binary or VK_KHR_pipeline_executable_properties.
  • CI & Verification: .github/workflows/ci.yml (ota-canary job), canary/tests/ota_canary_tests.cpp, tests/test_ota_canary.py, canary/PROOF.md.

Verification

  • c++ -std=c++17 -O2 -Wall -Wextra -Werror + ASan/UBSan (ota_canary_tests.cpp): 143/143 checks PASS.
  • python3 -m unittest discover -s tests -v: 27/27 OK.
  • python3 -m unittest discover -s freepvr-twin/tests -v: 25/25 OK.
  • python3 canary/src/ota_canary.py --self-test & --check-extensions: PASS.
  • ./scripts/clean-room-audit.sh: PASS (0 violations across 72 files).
  • See canary/PROOF.md for host-verified vs. pending stock-Android OTA execution details.

saariuslystoned and others added 2 commits November 29, 2026 02:59
- Tolerance predicate is NaN/Inf fail-closed in both engines; recorded
  metrics stay finite so receipts remain strict JSON.
- Zero/negative/huge vector/dispatch counts, out-of-range seeds, unknown
  variants/faults/reuse modes, and unbounded slot pools are rejected
  (API ValueError, CLI exit 2) instead of passing vacuously or
  allocating unbounded memory.
- --device-json strictly parsed (NaN/Infinity, truncated JSON, missing
  device keys are exit 2); --out rejects .. segments, symlinks, and
  non-regular files; write failures are exit 2, never tracebacks.
- validate_receipt now fails closed on flipped verdicts, missing or
  duplicate variants, non-finite metrics, and bad config/device data.
- Adds 39-test adversarial fuzz suite (tests/test_ota_canary_adversarial.py)
  and 54 C++ adversarial checks (197 total); updates PROOF.md evidence.
@saariuslystoned

Copy link
Copy Markdown
Contributor Author

Adversarial Hardening & Public-Roads Audit Receipt (9bc3e494)

  • Prior PR head: 65cf802b → Hardened head: 9bc3e494
  • 8 security/fail-open bugs fixed: NaN/Inf→pass (both engines), vacuous pass on zero/negative counts, silent atoi & unbounded alloc in C++ host, invalid-JSON receipts, traceback exit-1, --out ../ traversal + symlink following, validate_receipt accepting flipped verdicts/NaN metrics, silent Python fault injection.
  • Verification: 66 unit tests (39 new adversarial) + 25 twin tests OK, C++ 197/197 strict+ASan PASS, 60-case seeded JSON mutation fuzz (0 crashes), ./scripts/clean-room-audit.sh (73 files) PASS.

@saariuslystoned

Copy link
Copy Markdown
Contributor Author

Closing per sweep: 3.2K lines of CPU-only synthetic math with zero Vulkan calls (canary.h/canary_host.cpp do not invoke Vulkan or touch hardware). If we add an OTA canary later, it will be a small real Vulkan compute binary running actual freepvr shaders on-device.

@saariuslystoned
saariuslystoned deleted the feat/10-dxt-cxtp-ota-canary branch November 30, 2026 23:26
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.

DXT OTA correctness & regression canary

1 participant