Skip to content

feat(engine): add guarded mutations and browser response ownership - #287

Merged
hyperb1iss merged 4 commits into
mainfrom
nova/product-experience-engine
Sep 13, 2026
Merged

hyperb1iss merged 4 commits into
mainfrom
nova/product-experience-engine

Conversation

@hyperb1iss

Copy link
Copy Markdown
Owner

What this changes

Device names return to the observed hardware name when an override is cleared. Authenticated integrations can target an exact runtime scene/zone revision and inspect original persistence evidence. The UI gains an owned incremental browser response reader with demand-driven copies and cancellation cleanup.

This layer stacks on #286 (nova/release-user-skill-manifest). The existing manifest fix stays in its own PR.

Why

A cleared custom name could leave a stale display name. Runtime mutations also need to reject stale scene context at the shared mutation boundary, and response streaming needs explicit reader ownership before transports can stop buffering whole bodies.

Verification

  • Added or updated tests: focused device-name coverage, 14 runtime-zone guard tests, persistence regressions, and five actual Chromium/WASM reader tests passed. The reader and guard packets were independently reviewed.
  • Added or updated docs (no separate documentation change in this layer)
  • just verify passes locally (full current-head command pending; focused Rust/WASM checks passed)
  • just deny passes (no dependency version or license change; web-sys feature additions are covered by compilation)
  • just ui-test and just ui-build pass (five browser tests and all-target WASM Clippy passed; complete UI recipe qualification remains pending)
  • just sdk-lint, just sdk-check, and just sdk-build pass (not applicable; no SDK changes)
  • just python-verify passes (not applicable; no Python changes)
  • just compat-check passes (not applicable; no device database changes)
  • just docs-build passes (not applicable; no documentation changes)
  • cd docs && zola check passes (not applicable; no documentation changes)
  • Packaging scripts were syntax-checked (not applicable; packaging changes belong to fix(install): validate packaged user skill assets #286)
  • just e2e-build passes with the normal Servo stack (newest combined artifact not qualified)
  • just e2e-build-cpu passes (no new CPU smoke build claimed)
  • just e2e passes against the Servo stack (full current-head journey pending)
  • Tested on real hardware, simulator, or e2e harness: observed-name reset was exercised in an installed two-daemon fixture; response ownership was exercised in Chromium. Those receipts cover their recorded source checkpoints, not a new combined release.

Notes for reviewers

The runtime guard uses the existing scene mutation/CAS boundary. Default-scene layer durability requires the runtime projection; a later overwritten or superseded snapshot cannot certify the original write. Selected-field scene activation follows in a separate layer.

The response reader retains one browser-provided chunk and copies within the consumer's requested capacity. Browser buffering remains outside that bound. Native fetch integration and whole-transport resource qualification are unfinished; this draft does not advertise streaming support.

@coderabbitai

coderabbitai Bot commented Sep 13, 2026

Copy link
Copy Markdown

Warning

Review limit reached

  • Run on-demand review

On-demand reviews are free for the next 7 days. After that, they cost $0.25 per reviewed file.

Or wait 9 minutes for your next included review.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 5bf122bd-10af-441b-95b0-290563da1882

📥 Commits

Reviewing files that changed from the base of the PR and between 34766e3 and 1201eea.

📒 Files selected for processing (16)
  • crates/hypercolor-core/src/device/registry.rs
  • crates/hypercolor-core/src/scene/mod.rs
  • crates/hypercolor-core/tests/device_tests.rs
  • crates/hypercolor-daemon/src/discovery/device_helpers.rs
  • crates/hypercolor-daemon/src/domain/commit.rs
  • crates/hypercolor-daemon/src/domain/context.rs
  • crates/hypercolor-daemon/src/domain/mod.rs
  • crates/hypercolor-daemon/src/domain/runtime_zone.rs
  • crates/hypercolor-daemon/src/domain/scene.rs
  • crates/hypercolor-daemon/tests/device_name_reset_tests.rs
  • crates/hypercolor-daemon/tests/runtime_zone_tests.rs
  • crates/hypercolor-ui/Cargo.toml
  • crates/hypercolor-ui/src/api/browser_response.rs
  • crates/hypercolor-ui/src/api/mod.rs
  • crates/hypercolor-ui/src/tauri_bridge.rs
  • crates/hypercolor-ui/tests/browser_response_tests.rs

Comment @coderabbitai help to get the list of available commands.

hyperb1iss and others added 4 commits September 13, 2026 10:06
Keep the latest driver name separate from the effective display name so
clearing a user override restores current hardware metadata immediately.
Rediscovery and guarded refresh update that observation, while metadata-only
refreshes preserve it instead of recycling a customized display name.

Cover name reset through the registry and device API, including rediscovery,
SMBus remapping, rejected refreshes, and preservation of other settings.
Apply color through the existing scene candidate and revision fence,
preserving zone metadata, membership, brightness and output power.
Replace only the layer stack and reject stale or display-owned targets.

Return actual persistence evidence from both stores. Default-scene
layers require their exact Written runtime payload; superseded or
later overwritten snapshots cannot certify the original operation.

Co-Authored-By: Nova (GPT-6) <noreply@openai.com>
Keep the native test notifier out of browser builds so it cannot collide
with the real browser event publisher. Move existing installation helpers
before the test module to satisfy the all-target lint gate.
Pull browser response chunks only on demand and copy no more than the
consumer's reserved capacity into Rust. Retain one browser-owned chunk,
release the reader at EOF, and abort pending reads on cancellation.

Exercise the real browser stream in WASM tests, including large chunks,
failed reads, invalid values, empty responses, and reader ownership.
Native fetch integration remains a separate transport change.
@hyperb1iss
hyperb1iss force-pushed the nova/product-experience-engine branch from a3addfe to 1201eea Compare September 13, 2026 17:12
@hyperb1iss
hyperb1iss changed the base branch from nova/release-user-skill-manifest to main September 13, 2026 17:12
@hyperb1iss
hyperb1iss marked this pull request as ready for review September 13, 2026 17:19
@hyperb1iss
hyperb1iss merged commit 109f864 into main Sep 13, 2026
38 checks passed
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