Skip to content

feat(config)!: default the final-answer audit off; bound the audit child (C3) - #59

Merged
lg2m merged 1 commit into
fix/context-usability-2-in-run-compactionfrom
fix/context-usability-3-audit-default
Sep 17, 2026
Merged

lg2m merged 1 commit into
fix/context-usability-2-in-run-compactionfrom
fix/context-usability-3-audit-default

Conversation

@lg2m

@lg2m lg2m commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

C3: audit.mode defaults to off; the audit child is bounded

Spec: docs/plans/context-usability.md § C3. Stacked on #58 (C2); review against that base.

User-visible behavior

  • A default-config implementation run is now exactly one agent loop. Previously any run that edited a file, ran a non-read shell command, made ≥ 12 tool calls, or spawned a child paid a second full read-only agent run (with unbounded turns, within the parent's remaining budget) before it could complete: seconds to minutes appended to every substantive task.
  • With audit: (mode: heuristic | always) set explicitly, the auditor is capped at 8 model turns and 120 s on top of the inherited budget. Past either bound the answer stands as unavailable, the same fail-open path an auditor failure takes today.

Breaking

AuditConfig::default() / AuditMode::default() flip Heuristic → Off. Users who want the audit set audit: (mode: heuristic). The runtime-level AuditPolicy::default() was already Off.

What changed

  • qq-config: enum default and AuditConfig::default().
  • qq-core/runtime/audit.rs: MAX_AUDIT_CHILD_TURNS = 8, MAX_AUDIT_CHILD_DURATION_MS = 120_000; lib.rs clamps the child budget at the hook call.
  • Tests: audits_inherit_remaining_limits_and_charge_inclusive_spend_once asserts the admitted auditor's max_model_turns and max_duration_ms; config default test renamed to audit_settings_default_to_off_and_validate_revisions.
  • TUI unchanged: it already shows the audit child session and a RunAuditCompleted notice.

How verified

cargo test --workspace green; fmt; strict all-target clippy.

Docs

architecture.md § audit; protocol.md § Final-answer audit; supervised-delegation.md B1 gate wording; ledger.

… child (C3)

Every user-initiated run that mutated a file, ran a shell command, or made
twelve tool calls paid a second, unbounded agent loop at its completion
boundary under the default `audit.mode = heuristic`. None of the reference
harnesses runs a per-run judge, and the delegation plan's B1 arm that would
justify it is unmeasured. The default is now `off`; `heuristic` and
`always` remain opt-in.

When an audit does run, the child is bounded beyond the parent's remaining
budget: at most MAX_AUDIT_CHILD_TURNS (8) model turns and
MAX_AUDIT_CHILD_DURATION_MS (120 s), past which the answer stands as
`unavailable` exactly as an auditor failure does today.

Breaking: users relying on the implicit heuristic audit must set
`audit: (mode: heuristic)` explicitly.
@lg2m
lg2m force-pushed the fix/context-usability-3-audit-default branch from 6ac63e8 to d4b81c9 Compare September 17, 2026 01:50
@lg2m
lg2m merged commit 1c4467b into main Sep 17, 2026
4 checks passed
@lg2m
lg2m deleted the fix/context-usability-3-audit-default branch September 17, 2026 01:51
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