Skip to content

[CTX-0735] feat(hint): wire hint overlay + dispatch slice - #1331

Merged
Xuepoo merged 2 commits into
mainfrom
ctx-0735/feat-hint-overlay-dispatch
Sep 23, 2026
Merged

Xuepoo merged 2 commits into
mainfrom
ctx-0735/feat-hint-overlay-dispatch

Conversation

@Xuepoo

@Xuepoo Xuepoo commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Priority: P1 | Area: area:ui | Labels: feat,P1,area:ui | Milestone: v0.1.0 | RFC: OQ-089 (P7 Beacon engine, packet-2 adopted), OQ-051 (Scene path) | Task: CTX-0735

Closes #981

Scope

Minimal viable slice of CW-02 on top of the live Leader/hint sessions (#1307 lit, #1312 live): the overlay paint payload, session-authority dispatch, and the anchor-independent config surface. Label pools, script authority, and pixel painting stay ordered after OQ-050 anchors / the OQ-051 placed contract (#985, #990).

What changed

  • Overlay (bitty-runtime cw_present): HintOverlayPresent projects the live HintBatch 1:1 into CwPresentPlan (label order, kinds, anchors, shed; overlay_cost() == 0, 4+1 bound untouched) so the render path can paint one annotation pass.
  • Dispatch authority (bitty-runtime cw_live): Runtime::cw_hint_dispatch_armed dispatches against the armed session batch only — it takes no batch, so a stale or foreign batch cannot be smuggled through the live path. Disarmed fails closed (NotArmed); success disarms; errors keep the window for retry.
  • Config (bitty-lua -> bitty-config -> bitty-app): top-level hints_enabled (default-on) through ConfigData, plan, scalar-replace merge with attribution, reload-live diff, project-layer trust reject, resolve_hint_config, into ChromeState; while disabled the Leader keeps its normal owner (fail-open) and no session arms. Startup logs once when disabled.

Fail-closed throughout; zero unwrap/expect/panic in non-test code.

Verification

  • cargo fmt --all -- --check: clean
  • RUSTFLAGS="-D warnings" cargo clippy --workspace --all-targets --locked: clean
  • cargo test --workspace --all-targets --locked: green
  • RUSTFLAGS="-D warnings" cargo +1.85 check --workspace --all-targets --locked: green (MSRV)
  • cargo check --target x86_64-pc-windows-gnu --workspace --all-targets --locked: green (Ctrl+Space Windows path untouched)
  • ./scripts/check-scratch-paths.sh: OK
  • New regression tests: 2 cw_present unit (1:1 projection, empty batch), 2 cw_uipresent integration (armed-only dispatch incl. disarmed/second-call NotArmed, plan carries overlay), 1 app intercept (disabled Leader falls through, incl. platform leader mods), config/lua merge+reload+trust+resolve coverage (7 tests).

Follow-ups (not this slice)

@Xuepoo Xuepoo added this to the v0.1.0 milestone Sep 23, 2026
@Xuepoo Xuepoo added feat Feature P1 Priority: high area:ui Area: UI / layout labels Sep 23, 2026
reviewer and others added 2 commits September 23, 2026 18:35
Overlay: HintOverlayPresent projects the live HintBatch 1:1 into
CwPresentPlan (label order, anchors, shed; zero overlay slots) so the
render path can paint one annotation pass.

Dispatch authority: Runtime::cw_hint_dispatch_armed dispatches against
the armed session batch only (no caller-supplied batch); disarmed
fails closed with NotArmed, success disarms.

Config: top-level hints_enabled (default-on) from Lua through plan,
merge with attribution, reload-live diff, project-layer trust reject,
into ChromeState; disabled Leader keeps normal owner (fail-open).

Tests: 2 cw_present unit + 2 runtime integration + 1 app intercept +
config merge/reload/trust/lua resolve coverage.

Task: CTX-0735
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ui Area: UI / layout feat Feature P1 Priority: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CW-02: Wire hint overlay + dispatch

1 participant