Skip to content

fix(mecatui): silence routine guardrails and unify review feedback - #2002

Merged
JAORMX merged 3 commits into
mainfrom
fix/guardrail-ui-noise
Sep 30, 2026
Merged

JAORMX merged 3 commits into
mainfrom
fix/guardrail-ui-noise

Conversation

@JAORMX

@JAORMX JAORMX commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Successful guardrail checks no longer interrupt normal mecatui conversations. The existing --debug flag exposes compact diagnostics instead; guardrail execution and durable audit events are unchanged.

  • Apply the same visibility rules to live output and stored-session transcripts, without fetching explanations for routine successes.
  • Replace detached hook/detail messages with one correlated warning or approval presentation, using plain-language outcomes and existing approval choices.
  • Keep findings, unresolved reviews, outages, and unknown states visible, including final result-release status arriving after an approval closes.
  • Correlate asynchronous explanations by session, review, and request, including queued approvals and failed requests. Reject stale replies; fetch a missing final explanation once without duplicating its receipt.
  • Preserve terminal sanitization and ordinary non-guardrail hook behavior; update the owning user documentation.

This is the directly approved UX fix. The operator explicitly waived an ADR and formal acceptance-plan document. No checker enforcement, server API, permission, or persistence changes.

Verification

  • Focused UI/client/scrollback race suites and reducer regressions
  • task test — complete suite, all modules and standalone proofs
  • task lint — all configured modules
  • task test:race — complete suite
  • task docs
  • task site:build
  • go run ./cmd/mecademo — tool call, permission ask/approval, and result verified
  • git diff --check

Regression coverage includes silent successful batches, debug and replay parity, terminal-control injection, warning updates, session switches, queued errors, retractions, and the actual inbound approval-before-final-hook ordering. Independent spec, standards/architecture, UX, security, reuse, and test-adequacy reviews completed; identified lifecycle and coverage issues were fixed and re-reviewed. DevEx review was not applicable: this changes internal terminal-client helpers, not a published SDK/API.

Verification notes: an initial non-race run failed in the unchanged JSONL lineage conformance test; 20 focused reruns and the subsequent complete suite passed. Initial full-gate attempts exhausted their time budgets. The root linter passed with an extended timeout, followed by a successful unmodified task lint run.

Keep successful guardrail checks behind --debug, correlate explanations with their warning or approval, and preserve late final outcomes without duplicate notices.

Co-authored-by: Mecatl <[email protected]>
JAORMX and others added 2 commits September 29, 2026 23:53
Share detail correlation and state updates between warnings and approvals, and reuse reducer setup across the guardrail regression tests without dropping coverage.

Co-authored-by: Mecatl <[email protected]>
Share typed block lookup for notice mutations, centralize review handoff and receipt transitions, and retire pending approval restoration when its run or session is abandoned.

Co-authored-by: Mecatl <[email protected]>
@JAORMX
JAORMX merged commit ee5c721 into main Sep 30, 2026
41 checks passed
@JAORMX
JAORMX deleted the fix/guardrail-ui-noise branch September 30, 2026 06:47
@toolhive-release-app toolhive-release-app Bot mentioned this pull request Sep 30, 2026
2 tasks
aponcedeleonch added a commit that referenced this pull request Oct 5, 2026
Restore the quiet-benign-hook-notices plan on top of #2002's per-review
notice model. Known-benign reviews are retained but hidden while details
are collapsed instead of being dropped; ExpandTools, the client setting
hook_notices.show_benign, or --debug reveals them, live and on replay.

- Classify benign reviews nil-safely and require a review ID and an
  action/inbound job; everything else fails visible.
- Fetch and fold live detail for benign reviews as well.
- A mismatched detail identity fails visible without its text.
- A routine final outcome never replaces a resolved approval receipt.
- Hidden notices leave no blank-row residue and stay cache-equivalent.

Co-authored-by: Mecatl <[email protected]>
aponcedeleonch added a commit that referenced this pull request Oct 5, 2026
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