Skip to content

terminal output modeling for CI/interactive - #5887

Merged
briansrls merged 8 commits into
mainfrom
host-trace-funnel
Jun 28, 2026
Merged

briansrls merged 8 commits into
mainfrom
host-trace-funnel

Conversation

@briansrls

Copy link
Copy Markdown
Contributor

Auto-opened by session-dashboard for session bright-ibex-44.
Pushing to host-trace-funnel advances this PR.

Worker attestation

Before flipping this PR to ready for review, confirm each item:

  • Title describes the change (not the session id or branch).
  • PR body summarises what and why (replace the TODO below).
  • Tests run: name the command (e.g. npm test, cargo test) and the result.
  • If this closes a work item, the body contains a Closes #N directive.
  • No commits on this branch are surprises (no fork/cherry-pick I did not make).
  • No secrets / credentials / large binaries staged.

Summary

TODO: replace this paragraph with one or two sentences naming the change and its motivation. Reviewers read this first.

Test plan

  • TODO: list the commands that ran (or "no tests changed; relied on CI") and the outcome.

Brian Searls and others added 7 commits June 27, 2026 23:31
…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>
…5579)

The WIP grouping model added // doc-comments to std.render / extdeps.render.surface
/ the witness — but .dag has had no comment syntax since #5579, so each // parsed
as "expected item declaration", failing std.render's parse and cascading
"unresolved type Frame/Span/…" through extdeps.render.terminal. That reds
dsl_compile_clean_gate (the CI floor batch-1 gate) the whole tree over.

Comments removed; the grouping seam stands:
- std.render: Block = Leaf | Group { title, frame } + Document — the target-agnostic
  collapsible-section model (one concept, every surface).
- extdeps.render.surface: RenderTarget = PlainTerminal | GithubActions dispatch +
  GroupSyntax authority; GitHub Actions -> ::group::/::endgroup:: (consuming
  log_annotations), plain terminal -> "── title ──" header. detect_target keys off
  GITHUB_ACTIONS, mirroring terminal_capability's env->cap.

Verified: render_surface_witnesses passes by execution via the floor resolve path
(resolve_entry_graph + run_claim); whole-tree `gunbc compile --target rust` emits
614 modules / 0 diagnostics.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…tch (option B)

Wire the grouping seam into the floor: claim_executor installs the per-target
GroupSyntax from extdeps.render.surface.resolve_group_syntax(GITHUB_ACTIONS) at
startup, then brackets each batch's parallel walk in a host-effect group. The
[file]/[rest]/[shell] trace lines (stderr, emitted live from worker threads) fold
INSIDE the group; the PASS/FAIL summary (stdout) is deferred until AFTER group_end
so it stays the scannable, ungrouped signal. One open/close on the main thread spans
the whole batch, so it is sound under spawn_width > 1 (threads never interleave
markers). Gated on host_trace_grouping_active() — no brackets when every trace
channel is Suppressed (Quiet), so empty groups stay out of the log.

Verified by execution (minimal 1-batch plan over filesystem_read witness):
- GITHUB_ACTIONS=true: `::group::batch 1 host-effects` / `[file] read …` / `::endgroup::`
  then `✓ PASS` AFTER the close.
- plain terminal: `── batch 1 host-effects ──` header, no workflow commands.
- Quiet: no grouping at all.
render_surface_witnesses (incl. resolve_group_syntax) green; fmt + clippy --bins clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review June 28, 2026 02:06
claude-opus-4-7 REQUEST_CHANGES on #5887: an auto-WIP commit swept in dead
substrate — TypeEnv.parents + lookup_binding_in_scope / enumerate_bindings_in_scope
in src/v1/04_env.dag with zero callers (~10 constructor sites all pass parents: []),
unrelated to this PR's terminal-output topic and with no named dissolution trigger
(DESIGN §6). Reverted src/v1/{04_env,04_infer,04_resolve,05_emit,05_emit_rust}.dag to
origin/main; the render-surface grouping work is untouched.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@briansrls
briansrls merged commit fc71f90 into main Jun 28, 2026
2 checks passed
@briansrls
briansrls deleted the host-trace-funnel branch June 28, 2026 14:40
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