Skip to content

Funnel host-effect traces through gunbc.output_policy (kill the [file] read floor spam) - #5881

Merged
briansrls merged 1 commit into
mainfrom
host-trace-funnel
Jun 28, 2026
Merged

briansrls merged 1 commit into
mainfrom
host-trace-funnel

Conversation

@briansrls

@briansrls briansrls commented Jun 27, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up slice to #5874 (the deferred host-trace funnel).

Problem

[file] read / [file] write / [rest] / [hermetic:mock] were unconditional
eprintln!s. [file] read alone floods the CI floor log with hundreds of
source-file reads (doubled by the within-run double-resolve) — the spam the original
"CI output is a horror" report called out.

Fix — consume the .dag output policy (no Rust re-derivation)

  • gunbc.output_policy gains ChannelPolicy + resolve_channel_policy(verbose, quiet):
    it enumerates the channels and calls channel_decision once each, so the seed
    evaluates the whole policy in one .dag call. channel_decision stays the single
    authority for channel × verbosity → decision.
  • cli_run::install_output_policy evaluates resolve_channel_policy from the .dag
    authority at the current cli_verbosity and installs the per-channel verdicts into a
    process-global (set once before discovery threads spawn). It only transports the
    evaluated OutputDecision variants across the boundary — the policy logic is not
    mirrored in Rust.
  • v1_interpreter routes the four trace sites through trace_emit(channel, line):
    reads/mocks → Instrumentation (Verbose-only), writes/rest → ShellTrace (condensed
    at Normal). render_shell_trace now consumes output_decision(ShellTrace) too,
    dissolving the cli_verbosity mirror terminal output modeling for CI/interactive #5860 left in it.
  • claim_executor + claim_batch install the policy at startup. Unset (other bins)
    falls back to Full = pre-funnel behavior, so nothing else regresses.

Verified

A WET filesystem_read witness prints 0 [file] read lines at Normal and 1 at
Verbose, and still passes. output_policy_witness covers resolve_channel_policy
(Normal: Instrumentation=Suppressed / ShellTrace=Condensed / Diagnostic=Full; Verbose:
all Full). cargo fmt --all --check + clippy --all-targets clean.

…e] read floor spam)

The [file] read / [file] write / [rest] / [hermetic:mock] trace sites were
unconditional eprintln!s — [file] read alone floods the CI floor log with hundreds
of source-file reads (doubled by the within-run double-resolve). #5874's deferred
slice: route them through the .dag output policy instead of suppressing in Rust.

- gunbc.output_policy gains ChannelPolicy + resolve_channel_policy(verbose, quiet):
  it enumerates the channels and calls channel_decision once each, so the seed can
  evaluate the whole policy in one .dag call. channel_decision stays the single
  authority for channel x verbosity -> decision.
- The seed (cli_run::install_output_policy) evaluates resolve_channel_policy from the
  .dag authority at the current cli_verbosity and installs the per-channel verdicts
  into a process-global (set once before discovery threads spawn). It only TRANSPORTS
  the evaluated OutputDecision variants across the boundary -- no Rust re-derivation of
  the policy logic.
- v1_interpreter routes the four trace sites through trace_emit(channel, line):
  reads/mocks -> Instrumentation (Verbose-only), writes/rest -> ShellTrace (condensed
  at Normal). render_shell_trace now CONSUMES output_decision(ShellTrace) too,
  dissolving the cli_verbosity mirror #5860 left in it.
- claim_executor + claim_batch install the policy at startup. Unset (other bins) falls
  back to Full = pre-funnel behavior, so nothing else regresses.

Verified by execution: a WET filesystem_read witness prints 0 [file] read lines at
Normal and 1 at Verbose, and still passes. output_policy_witness covers
resolve_channel_policy. fmt + clippy --all-targets clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@gunbai-bot
gunbai-bot Bot force-pushed the host-trace-funnel branch from 93c5730 to 9d246e3 Compare June 27, 2026 23:31
@gunbai-bot gunbai-bot Bot changed the title terminal output modeling for CI/interactive Funnel host-effect traces through gunbc.output_policy (kill the [file] read floor spam) Jun 27, 2026
@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review June 27, 2026 23:31
@briansrls
briansrls merged commit c87f409 into main Jun 28, 2026
2 checks passed
@briansrls
briansrls deleted the host-trace-funnel branch June 28, 2026 00:54
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