feat(moa): every_n fanout cadence + privacy redaction filter (opt-in, redesigned from #63448/#60463) - #70284
Merged
Merged
Conversation
Contributor
૮ >ﻌ< ა ci reviewran on adc471d all good! |
Extends the fanout enum with 'every_n:<N>' (N >= 2): advisors run on the
first iteration of each user turn and every Nth tool iteration after it;
off-cadence iterations REUSE the cached guidance from the last on-cadence
run via the same cache mechanism the user_turn fanout uses, so the
aggregator still gets advice on every step. The cadence counter is scoped
per user turn (resets on a new user message) and only advances when the
advisory state actually changes, so streaming retries never consume a
cadence slot. Mapping form {mode: every_n, n: N} normalizes to the
canonical string. Unknown/degenerate values fall back to per_iteration.
Addresses issue #63393 (advisor fan-out multiplies turn latency/cost by
the tool-iteration count). Redesigned from PR #63448: the submitted shape
skipped references entirely on off-cadence iterations (aggregator ran
advice-less); this version keeps the last advice in play, credited for
the idea and cadence framing.
Config-gated, default-off (default fanout remains per_iteration).
Co-authored-by: webtecnica <75556242+webtecnica@users.noreply.github.com>
Adds moa.privacy_filter ('' | display | full, default off — issue #59959):
- display: redact user-visible surfaces only (reference blocks emitted to
the UI + saved MoA trace records, including per-advisor full input/output
and the aggregator-input copy); the aggregator sees raw advisor text so
synthesis quality is unaffected.
- full: additionally redact the advisor text injected into the aggregator
prompt, on both the persistent facade path and the one-shot /moa
synthesis path (the issue's literal ask). Legacy boolean true maps here.
Secret/credential shapes (API-key prefixes, JWTs, private keys, DB
connection strings) are delegated to the central redactor
(agent.redact.redact_sensitive_text, force=True + code_file=True); the MoA
filter adds only email and clearly delimited phone-number patterns. No
bare 10-digit matching: line numbers, timestamps, epoch values, git SHAs,
IPs, versions, and source-code assignments in code-review-shaped advisory
text pass through byte-identical. The reference cache always holds raw
text — redaction happens at each consuming surface, so a mid-session mode
change never leaks or double-redacts.
Reworked from PR #60463: replaced its hand-rolled pattern list (which
matched bare digit runs and re-implemented key shapes) with central-
redactor reuse + safe patterns, and split the single boolean into
display/full modes. Credited for the feature framing.
Co-authored-by: webtecnica <75556242+webtecnica@users.noreply.github.com>
teknium1
force-pushed
the
moa/advisor-controls-cluster
branch
from
July 24, 2026 00:05
0f39534 to
adc471d
Compare
Contributor
|
Closing — absorbed by @teknium1 in #70284 (merged |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two opt-in advisor-control dials, engineered from community intent where the submitted implementations weren't merge-shaped: an
every_nfan-out cadence that reuses cached guidance on off-cadence iterations (from #63448 / issue #63393), and a privacy redaction filter with display/full modes and safe patterns (from #60463 / issue #59959). Both config-gated, both default-off, both Co-authored-by @webtecnica.Changes (2 commits)
fanout: every_ncadence (issue #63393 — multiplicative advisor latency in tool-heavy turns is real):fanoutenum rather than adding a parallel knob (the submittedtool_call_batch_cadenceran advisors every Nth iteration but gave the aggregator NO advice in between — worse thanuser_turn; it also never interacted withfanoutand its counter leaked across turns).user_turnalready uses); counter scoped per user turn.moa.privacy_filter(issue #59959):+-prefixed numbers are already covered by the central redactor).display(traces + user-visible reference events redacted; acting model sees raw) andfull(aggregator input redacted too — the issue's literal ask). Default off.Validation
Supersedes #63448 and #60463 (both close with credit — the issues were legitimate, the mechanisms needed redesign; details in each close comment). Fixes #63393, #59959.
Infographic