Skip to content

fix(control): make tone batches, settings availability, and launch checks consistent - #2935

Merged
kitlangton merged 1 commit into
devfrom
api-fix-settings-control
Nov 27, 2026
Merged

kitlangton merged 1 commit into
devfrom
api-fix-settings-control

Conversation

@kitlangton

Copy link
Copy Markdown
Collaborator

Settings batches now keep tone requests consistent, and the CLI recognizes a running Hex it cannot talk to.

❌ Before

  1. A batch requesting tones on and volume zero succeeded with audible tones.
  2. Settings could advertise an unsupported shortcut as available and writable.
  3. An incompatible local API could look absent to control commands and trigger another launch.

✅ After

  1. Tone fields resolve together before the batch retry loop. Contradictions return an error with no change to commit; zero retains the remembered level.
  2. Descriptions and write checks share support, policy-lock, and read-only decisions. Supported-but-locked settings remain available.
  3. One discovery classifier preserves absent, compatible, and live-but-incompatible states. Control and embedded selection report incompatibility; start refuses to launch.
- apply tone setters separately; describe support separately; erase incompatible discovery
+ resolve one tone patch; share one access decision; preserve the live process and refusal

📊 Proof

Case Before After
Tones on + zero volume ❌ Audible success ✅ Atomic refusal
Unsupported screenshots shortcut ❌ Advertised writable ✅ Unavailable and refused
Live incompatible API ❌ Could look absent ✅ Refusal, no launch

Five added tests cover tone tables, every registry key across OS/build/policy environments, discovery-file fixtures, and launch refusal. The unmodified baseline was not rerun with these tests.

👀 Read: src/local_api/discovery.rs keeps the existing embedded-client projection while preserving incompatible process identity in the shared classifier. src/control/settings/access.rs keeps support independent of locks and intrinsic read-only status.

Found in a code audit · no user reports · native macOS checks

Checks run
  • python3 scripts/code-shape.py --check: passed; existing size warnings, no hard problems.
  • scripts/check labs control::settings local_api::discovery control::cli: passed; 131 passed, 3,899 skipped.
  • scripts/check: formatting, code-shape, Nix pins (14 tests), and Clippy passed. Full nextest: 3,990 passed, 2 failed, 1 timed out, 37 skipped; exit 12. An earlier attempt stopped at a Clippy style diagnostic in the new access module; corrected before this run.
  • Failed socket cases (both fail at a 10-second socket read with WouldBlock):
    • local_api::processing::tests::an_absent_process_parameter_keeps_the_response_as_before
    • local_api::timestamps::tests::the_lab_gates_a_timed_request_before_the_audio_body_is_read
  • scripts/check -j 1 local_api::processing::tests::an_absent_process_parameter_keeps_the_response_as_before local_api::timestamps::tests::the_lab_gates_a_timed_request_before_the_audio_body_is_read: both still failed, 4,028 skipped. These fixtures connect directly to the test server, bypassing the changed discovery path; their sources are unchanged.
  • rune_ui::onboarding_kit::stories::motion_gate::the_first_run_moves_cleanly: timed out after 120 seconds in the full run; not rerun.
  • git diff --check: passed.

@kitlangton
kitlangton merged commit f1c772c into dev Nov 27, 2026
4 checks passed
@kitlangton
kitlangton deleted the api-fix-settings-control branch November 27, 2026 07:21
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