Skip to content

De-bash orchestration emit: agnostic registry dispatch in compiler stage - #6090

Closed
gunbai-bot[bot] wants to merge 1 commit into
mainfrom
session/sunny-seal-56
Closed

gunbai-bot[bot] wants to merge 1 commit into
mainfrom
session/sunny-seal-56

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Introduce std/orchestration_emit with OrchestrationMedium, OrchestrationEmitHandlers, and registry lookup — the medium-agnostic substrate for emit(intent, target).
  • Move all bash-specific lowering (run/join2/retry grammar rows, env-welded path, dissolution trigger) into extdeps/languages/bash_orchestration_emit.
  • Refactor compiler/05_emit_orchestration to fold Pipeline/Step/Retry intent purely through registry-dispatched handlers; zero bash imports remain in the compiler stage.
  • Repoint workflow witnesses to the bash extdeps convenience API; add orch_emit_registry_empty_rejects_holds fail-closed registry witness.

Test plan

  • CI floor green (orchestration_emit_test, orchestration_retry_emit_test, orchestration_registry_dispatch_test)
  • Byte-identical bash emission preserved (pipeline newline-join, retry EAGAIN, env-prefix teeth)
  • Empty registry dispatch rejects (fail-closed)

Made with Cursor

…iler stage.

Move bash-specific lowering into extdeps/languages/bash_orchestration_emit; compiler/05_emit_orchestration now folds intent via OrchestrationEmitHandlers registry lookup only.

Co-authored-by: Cursor <cursoragent@cursor.com>
@gunbai-bot

gunbai-bot Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

Response to claude-opus-4-7 review (registry lookup finding)

Finding verified — valid, but will not land in this PR.

orchestration_emit_registry_lookup_entries (src/v2/std/orchestration_emit.dag:37-50) indeed inspects only list_head(entries) with no list_tail recursion. With a single OrchestrationMedium = Bash variant this is correct today, but the reviewer is right that adding a second medium would make this a fail-open chokepoint (first entry returned regardless of requested medium). Option (a) tail-recursive filter or (b) Map<OrchestrationMedium, Handlers> would be the right fix if this module were shipping.

Why no fix commit here: This PR is superseded by an operator design correction (clever-raven-585, design-gated brief). The OrchestrationEmitHandlers fn-bundle + orchestration_emit.dag registry is the same banned shape as closed PRs #6082/#6089 — realization dispatch still lives in the compiler interface via handler injection, not the agnostic target_bundle_child named-edge pattern that 06_translate.dag:1190 uses.

Deliverable 1 (seam proposal: sibling ^target_model_edge_orchestration_emit on extdeps medium bundle, parameterization via binding_spellings, compiler takes medium_target: TargetModel from caller with zero bash imports) was sent to parent and is awaiting ack before Deliverable 2 implementation on a fresh branch off origin/main.

Closing this PR. The lookup concern is noted for the replacement design — the named-edge row lookup will fail-closed on construct_tag mismatch rather than returning the first row.

— sent from sunny-seal-56

@gunbai-bot

gunbai-bot Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by operator design correction: handler-fn-bundle approach banned; awaiting parent ack on target_bundle_child named-edge seam (Deliverable 1 sent). Fresh PR will follow Deliverable 2.

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