Add the exact component-property edit protocol - #173
Conversation
📊 PR Size: size/XLTotal changes: 3261 lines (12 files) Top files changed:
...and 2 more files Size calculated as additions + deletions. Labels: XS (<10), S (<50), M (<250), L (<1000), XL (1000+) |
|
| Test Suite | Result |
|---|---|
| Snapshot Tests | ✅ success |
| Linux: Registry Validation | ✅ success |
| Test Coverage Delta | ✅ success |
| Valdi Smoke Tests | ✅ success |
| valdi_web Integration Test | ✅ success |
| macOS: C++ & Platform Tests | ❌ failure |
| Linux: Build & Export | ✅ success |
| Linux: Module Tests | ✅ success |
| API Surface Check | ✅ success |
| Linux: Hotreload Smoke | ✅ success |
| Linux: Build Compiler | ✅ success |
| Linux: C++ Tests | ✅ success |
Some tests failed. Please check the workflow logs for details.
🚀 Bazel remote cache is now enabled - future builds will be faster!
Workflow: Valdi CI
clholgat
left a comment
There was a problem hiding this comment.
Review of the component-property edit protocol. The write path is well-bounded overall (single-use 128-bit tokens bound to target/component/property/type/revision, three-layer type+range validation, descriptor-stability double-capture, scalar-only, native targets structurally read-only). One design concern noted inline about the wire contract's forward/backward compatibility.
Note for the squash: please carry this feedback into the squashed PR that contains the edit protocol.
| 'value', | ||
| ]; | ||
| const keys = Object.keys(body).sort(); | ||
| if (keys.length !== expectedKeys.length || keys.some((key, index) => key !== expectedKeys[index])) { |
There was a problem hiding this comment.
🟠 Med — the edit wire contract is validated by exact key-set equality (and the bridge's parseComponentPropertyEditRequest does the same) with no protocol version field. But the bridge lives inside the inspected app (which can be any Valdi version), while the server/client are the independently-versioned CLI. Any future addition to the request tuple becomes a lock-step-only change with no negotiation: a newer CLI editing an app built with an older bridge (or vice-versa) will fail closed on the strict key-set check with no way to degrade gracefully. Failure scenario: a later release adds an optional field (e.g. an idempotency key) → every cross-version edit silently 400s/409s even though both sides support editing. Suggested fix: add an explicit protocolVersion field to the tuple now (accepted by both server and bridge), and validate a known-version key set per version rather than one frozen exact set, so the contract can evolve without a coordinated bridge+CLI upgrade.
|
Superseded by #180, which consolidates this patch into the reviewed debugger capabilities landing unit. The replacement carries forward the feedback and fixes discussed here. Closing this draft to reduce the active stack; this PR and its discussion remain the historical review record. |
Description
Adds web-only, revision-bound scalar mutation authorization and a descriptor-stable renderer update path.
Type of Change
Testing
bazel test //...)Testing Details
npm testpassed 436/436; the CLI production build passed.//src/valdi_modules/src/valdi/web_renderer:testpassed.bazel query //...passed.Checklist
Related Issues
Relates to #154
Additional Context
Stack 20/22. Stacked on #172 (
bjd/debugger-component-properties). Review this PR as the single incremental commit2dd01e3cagainst that base; do not merge it before its parent.