Skip to content

Gap A PR1: diagnostic-emission intent + Bash realization (emit(EmitDirective, Bash) → echo >&2); delete dead render_log_annotation - #5505

Merged
briansrls merged 5 commits into
mainfrom
session/jolly-pike-105
Jun 22, 2026
Merged

briansrls merged 5 commits into
mainfrom
session/jolly-pike-105

Conversation

@briansrls

@briansrls briansrls commented Jun 21, 2026 •

Copy link
Copy Markdown
Contributor

What

Gap A (emission = ingestion⁻¹ past syntax, docs/plans/emission-ingestion-inverse.md §4(A)) — PR1: the Bash-medium foundation. Introduces the medium-agnostic diagnostic-emission intent and its first row-driven realization, and deletes the dead hand-rolled forward emitter it replaces.

  • Intent (src/v2/std/diagnostic.dag): DiagnosticSeverity = SeverityError | SeverityWarning + a thin EmitDirective { severity, message: String } + eq fns. Medium-agnostic, dispatch-free (DESIGN §3). This is the "emit a diagnostic" intent, distinct from the rich compiler Diagnostic.
  • Bash realization (src/v2/extdeps/languages/bash.dag): emit(EmitDirective, Bash) → 'echo' '<message>' >&2, row-driven through the shared grammar machinery (emit = serialize_target ∘ translate, DESIGN §4) — not a hand-rolled emitter. Adds the >&2 (StdoutToStderr) fixed redirect token (bash-arc is parked, so absorbed here).
  • Witness (src/v2/compiler/manual/emit_directive_bash_test.dag): the live by-execution consumer grounding the intent.
  • Deletes the dead render_log_annotation forward emitter (dsl/extdeps/github/log_annotations.dag) + its actions.dag re-export. It was dead (only re-exported, never called); per DESIGN §5 dissolving dead code is spec-without-execution, so it is removed as a dead scaffold, not migrated. The LogAnnotation model + prefix data are kept for the GHA-as-Node arc.

Why

render_log_annotation was a match→concat("::error::", …) forward emitter — the exact thing the language layer abolished (one grammar read backward, N+M not N×M). This lands the agnostic intent + Bash realization so future consumers author intent and emit renders the medium, under bright-gull's MediumStructureLeak lens (#5500).

Honest scope (deferred payoff is markered, not silent)

The Bash transport is severity-invariant (POSIX sh has no severity concept; the stream is the only axis). So in PR1 severity is carried by the intent but realized only by a later medium layer. Phase 2 (witty-wolf GHA-as-Node-gated), markered in diagnostic.dag:

  • severity realization (::error/::warning GitHub-Actions annotation over the Bash transport),
  • source locus (Optional<Locus>, added with the GHA realizer that reads it),
  • migrating the live consumers (tools.build_step ::error, gunbc.ci_spec ::warning) onto emit(EmitDirective, GHA-over-Bash), which shrinks the §0 realization-vocab containment roster (the bright-gull dissolve-on).

Notice is intentionally absent — zero live consumers (only the dead AnnotationNotice), so adding it now would be §5 spec-without-execution.

Test plan (green by execution — gunbc run --claim-run, both source roots)

  • emit_directive_bash_error_emits_echo_stderr_holds → true (keystone: exact bytes 'echo' 'build verification failed' >&2)
  • emit_directive_bash_severity_invariant_holds → true (Error/Warning render identically; severity is GHA-layer)
  • emit_directive_bash_message_flows_holds → true (distinct message → distinct correct bytes; word not fabricated)
  • emit_directive_bash_to_stdout_wrong_ne_correct_holds → true (discriminating RED: stdout/no->&2 model emits different bytes; >&2 is load-bearing)
  • Regression: existing bash_emit_command_accepts_holds → true; ci_runner_seam_holds (imports actions.dag) → true after the deletion.

Built gunbc release; no .rs changes (fmt/clippy unaffected).

Note: the MODELING-COHERENCE per-head check is failing on a pre-existing ctrl plan-lib circular dependency (plans.coherence → plans.reducible, missing std.reducible) — cites only /home/briansrls/ctrl/plans/ files, identical across commits before/after this PR's edits, unrelated to these gunbc changes.

🤖 Generated with Claude Code

@gunbai-bot gunbai-bot Bot changed the title Gap A: diagnostic-realization rows — dissolve the hand-rolled render_log_annotation forward emitter into row-driven emit(diagnostic-intent, medium); agnostic Severity intent + GHA/Bash realization rows; pairs with bright-gull MediumStructureLeak lens as the dissolve arc Gap A PR1: diagnostic-emission intent + Bash realization (emit(EmitDirective, Bash) → echo >&2); delete dead render_log_annotation Jun 21, 2026
@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review June 21, 2026 23:59
briansrls added a commit that referenced this pull request Jun 22, 2026
…round-trip is the completeness gate, never the emit-PR bar)

quick-seal-137 (lane owner) refinement: 'a target is done iff round-trip green' must not be
misread as 'emit PRs cannot merge until round-trip green' — that would over-gate. An emit-only
PR with correct green grammar rows is merge-ready AS the emit step; the medium is COMPLETE only
once its round-trip law is green (DecodeFidelity-bounded). markdown #5501 + bash #5505 landed the
emit step; their round-trip completeness is the named next step, not a merge precondition.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@briansrls
briansrls merged commit 711d318 into main Jun 22, 2026
1 check passed
@briansrls
briansrls deleted the session/jolly-pike-105 branch June 22, 2026 05:26
briansrls added a commit that referenced this pull request Jun 22, 2026
…per-medium decidability partition (#5513)

* WIP: roadmap reflection + analysis

* plan(emission): §5.2 — emit-step-merge-ready is NOT medium-complete (round-trip is the completeness gate, never the emit-PR bar)

quick-seal-137 (lane owner) refinement: 'a target is done iff round-trip green' must not be
misread as 'emit PRs cannot merge until round-trip green' — that would over-gate. An emit-only
PR with correct green grammar rows is merge-ready AS the emit step; the medium is COMPLETE only
once its round-trip law is green (DecodeFidelity-bounded). markdown #5501 + bash #5505 landed the
emit step; their round-trip completeness is the named next step, not a merge precondition.

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

---------

Co-authored-by: Brian Searls <briansrls@gunb.ai>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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