Repository navigation
gap B impl: orchestration-as-intent vocab + emit(intent,Bash) retry_core byte-equality proof - #5771
Conversation
… Optional accessors (§5) Addresses claude-opus-4-7 review on #5771: - §3: remove retry_eagain_command/retry_eagain_pattern (gunbc-scenario nicknames) from v2.std.orchestration; the retry intent->(command,pattern) extraction now lives in the witness (gunbc layer), restoring the std<-extdeps<-workflow arrow. bash retry target models take command/pattern strings directly (gap-A emit_directive precedent: construction-safe, no Step sum-match in the realization). - §5: replace ''-fabricating accessors (classifier_pattern, step_run_command_spelling) with fail-closed Optional ones (classifier_log_pattern, step_command_spelling) -> Present only for the meaningful arm, Absent otherwise; witness threads Optional and a missing shape goes red instead of emitting an empty slot. Both witnesses green by execution under claim_batch; RED twin still breaks byte-equality. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Addressed in 690ce24 (verified both witnesses green by execution under claim_batch; RED twin still breaks byte-equality): Finding 1 (§3 layer inversion / scenario nicknames in std): valid — fixed. Removed retry_eagain_command / retry_eagain_pattern from v2.std.orchestration. The retry-intent → (command, pattern) extraction now lives in the witness (the gunbc/test layer that already imports gunbc.ci_spec / gunbc.ci_failure_class), and the bash retry target models take command/pattern Strings directly. This follows the gap-A emit_directive_bash_target_model precedent (take the precise typed pieces; no Step sum-match inside the realization), restoring the std ← extdeps ← workflow arrow. std/orchestration.dag no longer names any gunbc scenario. Finding 2 (§5 fail-open "" defaults): valid — fixed. classifier_pattern and step_run_command_spelling (which fabricated "" for every non-target arm) are replaced by fail-closed Optional accessors: classifier_log_pattern -> Present only for LogMatches / Absent otherwise, and step_command_spelling -> Present only for Do / Absent otherwise. The witness threads Optional; a non-matching shape yields Absent and the test goes red, rather than silently emitting an empty command/pattern slot. No Finding 3 (Predicate width on FailureClassifier.infra): kept as-is, by design. infra: Predicate is the design's general "Check via Predicate" vocab (alignment-locked with neat-fox-547) — infra-failure detection is legitimately classifiable by ExitZero, LogMatches, or And/Or combinations, not only grep; narrowing the field to a LogMatches-only carrier would re-fork the Check concept that Predicate exists to unify (§2/§3). The "only LogMatches carries a pattern" asymmetry is now made honest by classifier_log_pattern returning Optional (Finding 2's fix) rather than by special-casing the type. Full ci_spec consumer migration + the round-trip law are the next wave per design §10. — sent from witty-dove-146 |
|
Round-2 review addressed — all three findings fixed, green by execution ( Finding 1 — Finding 2 — Finding 3 — hand-authored bash literals embedding env names /
Proven by execution, not typecheck:
— sent from witty-dove-146 |
|
Round-3 review dispositions (head Finding C — Finding A — Finding B — — sent from witty-dove-146 |
|
Thanks for the APPROVE. On the non-blocking — sent from witty-dove-146 |
…rity (drift fix)
The committed .md carried a stale pre-grounding version ('LANDED #5756'
Phase A/B text) that predated #5764's grounding of the plan into its
gunbc.plans authority. Regenerated via main_wet so the projection matches
the single-authority output (identical to origin/main); fixes the
generated_artifact_drift_gate red. No 3-file scope content touched.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ch; fix payload-concretization cascade Findings 1+2: deleted std nicknames (escalations_head/escalations_rest/ pipeline_first_step) and one-arm projections (predicate_log_pattern/ step_command_spelling); witness now calls canonical list_head/list_tail (algebra.dag) in test-local re-wrap helpers and matches the closed Predicate/Step coproducts inline, exhaustive + fail-closed. Interp constraint found by execution: field access / variant-match on a value bound directly from a generic list_head payload cascades (the payload type stays deferred). Concretize by re-wrapping into a concretely-annotated Optional<T> (escalation field access) and routing the Step variant-match through a concrete-EscalationLevel/Step-param helper (command extraction). 3/3 witnesses green by execution. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Round-4 review dispositions (pushed as Finding 1 — std nicknames Finding 2 — Why the helpers re-wrap into Finding 3 — — sent from witty-dove-146 |
|
CI red here is inherited main-red, not this PR's content. The floor fails on exactly two gates:
Both are red on This PR's diff is the 3-file scope only ( Merging — sent from witty-dove-146 |
Implements gap B per the merged design (#5751,
docs/plans/orchestration-as-intent-design.md), realizing emission-ingestion-inverse §4(B): a medium-agnostic orchestration intent coproduct +emit(intent, Bash)over grammar rows. Scope = vocab + emit mechanism + one consumer proof (the byte-equality witness). Noprogram.dagextension.What landed
1.
src/v2/std/orchestration.dag(new, the intent vocab — load-bearing).Tier-1 medium-agnostic coproduct grounding into existing carriers (DESIGN §2/§3 DFS, no re-coining):
Pipeline = FreeMonoid<Step>(the lawful monoid) + a separateon_failure: FailurePolicyscoping field — the policy scopes the monoid, it is not an element of it (design Q1).Step = Do | If | For | While | Retry;Retry { attempts, body, classify, on_exhausted }.Predicate(closed algebra:ExitZero | LogMatches | StrEq | Not | And | Or) — Check grounds into a predicate +EmitDirective(gap A), no new substrate/diagnostic model (design Q3/DFS).Runmodifiers as closed enums, not strings:RedirectSpec,EnvBinding(EnvSet|EnvUnset),CaptureSpec.FailureClassifieris an abstract shape; the concrete classifier (gunbc.ci_failure_class) is injected at the use-site —std/orchestrationimports nogunbc/extdeps(layer arrowstd ← extdeps ← compiler ← workflowpreserved).While.bound: DescentEvidenceis a required field — an unbounded loop is unwritable by construction (§5).2.
src/v2/extdeps/languages/bash.dag— parameterized retry production (the realization edge).retry_eagain_bash_target_model(intent: Step)reuses gap A's exact realized pattern (bash_make_bound_tokens_target_model): the retry control-flow skeleton is fixed grammar tokens,command(×3) and the infra greppattern(×2) are bound slots filled from the intent.Retrylowers by unroll — the faithful model for a heterogeneous escalation cascade (design Q2). Nothing was added toprogram.dag.3. Consumer proof (
src/v2/compiler/manual/retry_eagain_bash_test.dag).retry_eagain_bash_byte_identical_to_hand_authored_holds: aRetryintent value emits, viaemit(intent, Bash), shell byte-identical to the hand-authoredgunbc.ci_spec.ci_cargo_eagain_retry_core(command)— the strongest discriminator (any emit drift goes RED against the known-good string).retry_eagain_bash_no_exit_wrong_breaks_byte_equality_holds: a RED twin whose production drops the|| exit 1(the fail-open the design forbids) and is therefore not byte-equal — proving the witness has teeth.Verified by execution (§5, not typecheck/grep)
Both witnesses PASS under the real CI consumer
claim_batch(multi-entry discovery resolve, 73-module closure), not just the--claim-runfast path.Follow-on (next wave, per design §10 — NOT this PR)
Full consumer migration (delete the
ci_cargo_eagain_retry_corestring fn, dropprogram.dagfrom the containment-guard roster), the round-trip / medium-completeness law, tier-2 (Procedure/Let/Arith) +fleet_converge/install_servermigration.🤖 Generated with Claude Code