Repository navigation
feat(cloud-brain): the wire format, its validation and shared fixtures (CB1) - #47
Conversation
…s (CB1) The browser and the future Rust service must refuse the same bodies for the same reasons, so one module (AI-Car-Racer/cloud/wire.js) defines protocol 1 and a generator writes fixtures both sides run: 154 bodies (10 as raw bytes) with expected results, plus context and meta cleaning tables. - Canonical padded base64 of little-endian Float32; strict JSON types; a fixed order of checks with stable reason codes; parsers that never throw. - Brain ids are 128 bits of SHA-256 of the weights: xxHash32 ids (the local archive's) can be forged for any brain. - Tracks are listed once per contribution and brains point at them (a track in every brain did not fit 16 brains in 64 KB). - Bodies are read as bytes with strict UTF-8; answers may be 256 KiB. - Weight bound 16: "Use my driving" clones reach 6.76 at most. - cleanLearning moves to learning/policy.js for both the cross-tab and cloud wires. Five adversarial review rounds; 253 of 266 single mutations fail a test.
|
Important Review skippedToo many files! This PR contains 165 files, which is 65 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (165)
You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The browser and the future Rust service must refuse the same bodies for the
same reasons, so one module (AI-Car-Racer/cloud/wire.js) defines protocol 1
and a generator writes fixtures both sides run: 154 bodies (10 as raw bytes)
with expected results, plus context and meta cleaning tables.
fixed order of checks with stable reason codes; parsers that never throw.
archive's) can be forged for any brain.
in every brain did not fit 16 brains in 64 KB).
wires.
Five adversarial review rounds; 253 of 266 single mutations fail a test.
Confidence
Verbatim from /ship's Phase 2 confidence gate — per-axis score (0–25), the
evidence used, and the self-critique. Treat anything below 20 as a known soft
spot to verify before relying on it.
Requirements Fit: 24/25
AI-Car-Racer/cloud/wire.jscovers the CB1 scope: protocol 1, canonical base64 Float32, SHA-256 ids, a fixed order of checks, parsers that never throw, builders, and four answer parsers with HTTP statuses.tests/fixtures/cloud-brain/: 154 bodies and 2 cleaning tables, generated byscripts/cloud-brain-fixtures.mjs. The weight bound is 16, measured at 6.76 from 14 clones.docs/validation/cloud-brain.md#cb1. The plan box and its sub-items are ticked.float_roundtripandfrom_utf8) matched the JS on all fixtures and on 14 000 hard numbers.Functional Robustness: 24/25
Verification Evidence: 24/25
npm run test:cloud-brain→ 10/10 pass.npm run test:learning→ 147/147 pass.npm run test:learning:browser→ exit 0 (coverscleanLearning, which moved tolearning/policy.js).TextDecoderis untested in a browser. The copy is harmless either way.System Safety & Integration: 24/25
cleanLearning, and the unit and browser learning tests pass after it.Total: 96/100. Gate (≥95 AND no axis <15): PASS