protocol-lab: clean-room synthetic-CONTROL characterization → STOP-CLEAN-ROOM - #25
Open
btli wants to merge 11 commits into
Open
protocol-lab: clean-room synthetic-CONTROL characterization → STOP-CLEAN-ROOM#25btli wants to merge 11 commits into
btli wants to merge 11 commits into
Conversation
…-value sanitize() previously only redacted a value if the ENTIRE string was exactly 32 hex chars, letting raw device ids leak through when embedded in URLs or log-style strings. Add a word-boundary-aware regex that finds any 32-hex run inside a string and replaces it with safe_id(), while leaving the whole-string fast path, secret-key redaction, and PEM redaction untouched. A 40-hex (git-sha-like) run is intentionally left untouched since its boundary characters (hex digits) make the embedded pattern's negative lookaround not match.
Add oracle.collect_structure to structurally introspect Thrift-generated modules (class signatures, method names, field id/type/required flags, recursive struct/collection/map type_detail) without instantiating any class or touching credentials. Add tools/reference_probe.py, a thin script the operator runs privately under the firmware interpreter to emit sanitized, redaction-guarded JSON.
…nline ignores Add thrift.* override to protocol_lab/pyproject.toml (not the repo-root py3.10 project) and drop the 4 inline # type: ignore suffixes.
…aths Add comprehensive test coverage for Thrift MAP (type 13) and SET (type 14): - MAP round-trip with 2 key-value pairs (I32 keys, STRING values) - SET round-trip with 3 homogeneous I32 elements - Empty MAP rejected with 'key/value types' error - Heterogeneous MAP keys rejected with 'heterogeneous' error - Heterogeneous MAP values rejected with 'heterogeneous' error All tests verify real decoded structure/real exceptions. Gate clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add Evidence/ProtocolProfile with blockers()/ready_for_pairing() (Task 6 Step 3, verbatim) and a compile_profile.py compiler that derives init_service, provisioning methods, thrift type graph, transport framing/protocol/TLS, commitment, hardware attestation, and removal path only from present oracle evidence -- every absent or conflicting fact is recorded as Evidence.unknown naming its exact missing source, never a guessed transport/crypto default. Wires pytest/mypy to resolve the tools/ compiler module for the unit tests. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…AN-ROOM Read-only structural evidence from the pilot firmware shows join_home's commitment is bound to the device mTLS certificate fingerprint and _join_home enforces a Brilliant-signed authorization token; all three provisioning routes (SERVER/PEER/OUT_OF_BAND) require a Brilliant-issued credential. A clean-room software CONTROL cannot enroll. Same identity/authorization wall as the VC path.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A clean-room, value-free protocol lab (isolated Python 3.13 subproject at
protocol_lab/) that characterizes — read-only — whether an off-panel software BrilliantCONTROLcould enroll over the LAN peer-provisioning path, and emits a GO/STOP verdict. Executed via subagent-driven development from codex's plan/spec.Builds on codex GPT-5.6's design (
docs/superpowers/specs/2026-07-09-ha-virtual-brilliant-control-design.md) and plan (docs/superpowers/plans/2026-07-09-synthetic-control-protocol-characterization.md).Verdict: STOP-CLEAN-ROOM
Full report:
docs/superpowers/research/2026-07-09-synthetic-control-protocol-gate.mdRead-only structural evidence from the pilot firmware (no writes, no imports — binary symbol/string extraction) shows the LAN peer-join is gated by a Brilliant-issued device credential on all three provisioning routes:
DeviceProvisioningClient._get_secret_and_commitment_for_homederives the join commitment from arandom_secretcombined withcertificate_fingerprint_base64/get_my_certificate_fingerprint/peer_certificate_fingerprint; the peer verifies it. Not a pure function of two synthetic inputs → not classifiable as a standard primitive._join_homeenforces authorization. SymbolsUNAUTHORIZED,InvalidTokenError, "Received improperly signed token". SERVER needs a cloudserver_authentication_token; PEER needs a verified device certificate; OUT_OF_BAND needs a Brilliant-signed bootstrap token. No unauthenticated / bypass mode exists.This is the same identity/authorization wall the earlier
VIRTUAL_CONTROLself-bootstrap investigation hit, reached through the local peer-provisioning door rather than the cloud one. The clean-room synthetic-CONTROLarchitecture (design §3.1) is not viable as a credential-free redistributable product.The instrument (green, MIT-clean, reusable)
7-task TDD build, 33 tests, gate green (ruff, ruff format, mypy --strict, pytest), zero
# type: ignore/# noqa, repo-root py3.10 project untouched:redaction.py/manifest.py— secret/identifier redaction (whole-value + embedded 32-hex) and hash-only firmware manifest that refuses an in-repo rootoracle.py+reference_probe.py— value-free recursive Thrift type-graph extractor (structural inspection only)thrift_wire.py— vendor-neutral recursive Thrift binary codec (struct/list/set/map)mdns.py+browse_brilliant.py— bounded, read-only_init-brilliant/_brilliantobservationprofile.py+compile_profile.py— evidence gate that never converts an unknown into an assumptioncapture.py+ loopback/commitment classifiers — conservative transport + standard-primitive classification (loopback-only, /private/tmp write-guards)Committed artifacts are independently authored, synthetic-only, value-free. No firmware, captures, certs, keys, tokens, or raw identifiers.
Safety
All panel contact was read-only/diagnostic on the office pilot (load ~1.9): binary string/symbol extraction only — no import, no message-bus write, no pairing, no filesystem write. Report scanned clean of PEM/JWT/32-hex/secrets.
🤖 Generated with Claude Code