Files
buzz/desktop
npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7 333362a55b fix(buzz-acp): generation-based effort commit/rollback + nonce correlation (IMPORTANT 1/2/3)
Addresses all three IMPORTANT findings from Thufir Pass 2 plus the extraction
MINOR that feeds harness-side invalid_value validation in production.

IMPORTANT 1 — provisional pick + rollback:
- Added committed_effort field to AgentPool as the last adapter-confirmed
  baseline. Pending picks are provisional until the ACP call resolves.
- return_agent: generation-matched Applied → commit; Failed → rollback to
  committed_effort so the failed candidate is never recopied by try_claim.
- Stale-generation results (superseded by newer pick/clear) are discarded
  entirely — no commit, no rollback, pool unchanged.

IMPORTANT 2 — per-request nonce correlation:
- AgentPool.effort_generation incremented on every pick/clear; carried on
  checked-out agents as desired_effort_gen. Pool echoes it as a nonce field
  (from pending_effort_nonce, set from the Desktop's crypto.randomUUID() nonce)
  in all immediate and final acks.
- Desktop: sendSetConfigOption gains optional nonce param; AgentConfigPanel
  generates crypto.randomUUID() per request and registers it before awaiting.
- awaitEffortOutcome: nonce is the primary correlation key; rejects acks where
  frame.nonce !== nonce even if configId and value match (stale same-value picks).
- observerRelayStore: persistence gate checks ackNonce === registered before
  persisting ok/cleared; backwards-compat — acks without nonce always pass.
- Four new nonce correlation tests in effortOutcome.test.mjs.

IMPORTANT 3 — two-phase clear:
- handle_set_config_option_control: empty value now emits pending_session
  (non-terminal) instead of terminal cleared. Pool is cleared immediately so
  future sessions run without effort, but confirmation waits for adapter.
- create_session_and_apply_model: new else-if branch — desired_effort=None but
  desired_effort_gen set → pending clear; emits final cleared ack with nonce+
  category after the session creates without effort override. Observer persists
  null only on this final cleared.
- Tests updated: test_b5_empty_value_emits_pending_session_ack and
  test_b5_pre_discovery_clear_with_category_emits_pending_session_not_synthetic_ok.

MINOR — extract_agent_config_options (feeds harness invalid_value production):
- New function in acp.rs that retains both category=="model" and
  category=="thought_level" entries from session/new configOptions.
- AgentModelCapabilities.config_options_raw now populated via this function so
  the pool-level capability cache includes thought_level valid_values in
  production (not just tests). The harness invalid_value guard now runs for
  real adapter picks.

MINOR — picker query invalidation:
- AgentConfigPanel: on ok/cleared outcome, invalidates agentConfigSurfaceQueryKey
  (source of currentEffort) in addition to managedAgentsQueryKey so the panel
  reflects the new committed effort immediately.

MINOR — restore damaged doc comment:
- lib.rs test_b5_real_forward_ack_includes_thought_level_category: restored the
  middle line of the three-line doc comment that was dropped in a prior commit.

Pool tests: 4 new (test_failure_rolls_back_desired_effort_to_committed,
test_applied_commits_desired_effort_to_committed,
test_stale_gen_failure_does_not_rollback_pending_pick,
test_cleared_commits_none_to_committed_effort).

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
2026-08-05 03:04:57 -04:00
..
2026-08-03 21:51:17 -04:00
2026-03-09 13:02:11 -07:00
2026-06-11 15:06:24 +00:00
2026-03-09 13:02:11 -07:00

Buzz

Desktop chat shell with:

  • Tauri + React + TypeScript + Vite
  • Tailwind CSS
  • shadcn/ui-ready shared components
  • Biome (lint/format/check)
  • Feature-driven frontend structure

Scripts

  • pnpm dev - run the web frontend
  • pnpm tauri dev - run the desktop app
  • pnpm build - typecheck and build frontend
  • pnpm typecheck - TypeScript checks
  • pnpm lint - Biome lint
  • pnpm format - Biome format (write)
  • pnpm check - Biome check

Structure

  • src/shared - reusable app-wide code (ui, lib, styles)
  • src/features - feature modules (vertical slices)
  • src/app - top-level app composition