Skip to content

refactor(view-state): silence allow-path decision echoes#144

Merged
yishuiliunian merged 1 commit into
mainfrom
refactor/silence-decision-echoes
May 12, 2026
Merged

refactor(view-state): silence allow-path decision echoes#144
yishuiliunian merged 1 commit into
mainfrom
refactor/silence-decision-echoes

Conversation

@yishuiliunian
Copy link
Copy Markdown
Contributor

Summary

  • PermissionDecided allow + QuestionDecided no longer push a system msg into the conversation; deny still renders for diagnostic value
  • Drops the now-empty question_decided mutator and folds QuestionDecided into the existing non-rendering arm next to MessageRouted | InboxConsumed | TurnDiffSummary | SessionResumeWarnings
  • Wire / IPC / telemetry / classifier info! log are untouched — only the view-state renderer stops echoing the success path

Why

Every tool call in Classifier-decision mode was producing [permission allowed] Edit: ... (2469ms)-style lines that re-echoed the LLM's self-justification with no actionable value. Manual mode produced (0ms) echoes right after the user clicked allow. Deny information is still surfaced; if you want allow-path traces, look at the tracing log.

Changes

  • crates/loopal-view-state/src/mutators/interactive.rspermission_decided early-returns false on allow; deny/unknown still push; question_decided removed
  • crates/loopal-view-state/src/mutators/mod.rsQuestionDecided { .. } joined the => false non-rendering group
  • crates/loopal-view-state/tests/suite/decided_mutators_test.rs — allow / all question_decided paths now assert bumped.is_none() + no msg pushed; deny + unknown coverage retained
  • crates/loopal-view-state/tests/suite/e2e_resolve_source_propagation_test.rs — rewritten: three sources assert silence; serde wire contract preserved

Test plan

  • bazel test //crates/loopal-view-state:loopal-view-state_test PASSED
  • bazel test //... 58/58 PASSED
  • bazel build //... --config=clippy zero warnings
  • bazel build //... --config=rustfmt clean
  • CI passes

PermissionDecided allow and QuestionDecided were pushing a system msg
on every tool call ("[permission allowed] Edit: ... (XXXms)"),
re-echoing the LLM's self-justification on the success path with no
diagnostic value. Deny stays visible; AskUser folds into the
non-rendering group (wire payload doesn't carry answered/cancelled
kind, and the dialog already gives visual feedback).

Events still emit on the wire — telemetry, IPC broadcast, and the
classifier `info!` log are untouched. Only the view-state mutator
stops rendering them. Drops `question_decided` mutator entirely since
its body becomes a no-op equivalent of the existing non-rendering arm.
@yishuiliunian yishuiliunian merged commit 55f9f4b into main May 12, 2026
4 checks passed
@yishuiliunian yishuiliunian deleted the refactor/silence-decision-echoes branch May 12, 2026 04:02
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