Skip to content

protocol-lab: clean-room synthetic-CONTROL characterization → STOP-CLEAN-ROOM - #25

Open
btli wants to merge 11 commits into
mainfrom
feat/synthetic-control-protocol-lab
Open

protocol-lab: clean-room synthetic-CONTROL characterization → STOP-CLEAN-ROOM#25
btli wants to merge 11 commits into
mainfrom
feat/synthetic-control-protocol-lab

Conversation

@btli

@btli btli commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

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 Brilliant CONTROL could 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.md

Read-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:

  • Commitment is device-mTLS-certificate-bound. DeviceProvisioningClient._get_secret_and_commitment_for_home derives the join commitment from a random_secret combined with certificate_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_home enforces authorization. Symbols UNAUTHORIZED, InvalidTokenError, "Received improperly signed token". SERVER needs a cloud server_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_CONTROL self-bootstrap investigation hit, reached through the local peer-provisioning door rather than the cloud one. The clean-room synthetic-CONTROL architecture (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 root
  • oracle.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/_brilliant observation
  • profile.py + compile_profile.py — evidence gate that never converts an unknown into an assumption
  • capture.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

btli and others added 11 commits July 9, 2026 22:41
…-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.
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.

1 participant