Repository navigation
ShellProgram -> DAG (Wave 1-3, on 1) - #6514
Merged
Merged
Conversation
…wall on the whole-tree emit path
Fold-family productions extended so the fold no longer refuses word
Concat/CmdSubst or stmt WithRedir (all four Redir variants): new
concat_parts/word-compound/with_redir production families, lex tokens,
kind-tag emit transforms, and recursive bundle arms. Byte-identity vs
serialize_bash proven by execution: five depth-2 oracle tests plus the
depth-4 assign_root_stmt manual probe (ROOT=$('git' 'rev-parse'
'--show-toplevel' 2>/dev/null || 'pwd') byte-exact). The delegated
fail-closed RED control repoints from WithRedir (now native) to Heredoc
(still delegated) so the boundary guard stays discriminating.
Measured cost wall, declared on-carrier (bash_program_emit_cost_wall_note):
whole-tree backward row-selection is ~alternatives^depth (1s flat stmt,
64s for the single depth-4 stmt, DNF >8min for the full witness_bin
program) because formal_production_unique_lhs_exact_match deep-validates
every candidate per level and the descent re-validates each level again.
Real-program oracles therefore stay MANUAL probes, not test fns (a
discovery-run test would hang the local floor); the probe note on the
test carrier names the dissolution triggers.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…t runtime) Phase-3 shape for the shared witness invocation, per the shell-emission-model rule that runtime-present sites are argv invocations wearing bash syntax. run_witness_bin_program and run_gunbc_claims no longer build a ShellProgram, serialize it, and shell out - they realize the same intent as typed service operations: - git.Core.Toplevel (new op beside CurrentBranch/HeadCommit) resolves the repo root the bash path derived with a cd/rev-parse dance - shell.Test.IsExecutable (new, POSIX test -x) replaces the test-not- executable guard and the post-build artifact verification - cargo.Build.BuildInheritEnv (new) is the build-if-absent arm; it inherits process env exactly as the old sh -c cargo build did (cargo.Build.Build's env Map default is both a behavior change and unrecordable by the claim- run fixture writer, which fail-closes on Map values) - gunbc.WitnessBin.Run (new) invokes the witness binary by absolute path with a spliced args list Proven by execution: six op probes incl. argv[0] interpolation, list splice, and negative RED controls (typed_witness_invocation_test); pattern A end-to-end (v1_dag_parse witness, 0.43s wall vs bash round-trip); the run_gunbc_claims rider (extdeps_external_authority uri witnesses); and the flip-level RED control (unbuildable bin -> false, refused not fabricated). The ShellProgram builders stay as the canonical fixtures for the bash row-emit byte-identity oracles; importer ratchet unchanged at 27. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…rs 27 -> 20 Second typed-argv tranche, riding the host_prelude flip: - dag_compile_clean_transport: the four perturb receipts and the gate are one shared typed composition (Mktemp.Dir, Filesystem.Write for the perturb module - the heredoc dissolves, WitnessBin.Run on gunbc, Remove.RecursiveForce), parameterized by expected compile outcome. The ShellProgram builders, their serialize-shape witnesses, the marker rows, and both RealizationDispatch scaffold rows dissolve: with typed args the invocation facts are the construction, so the spelling-drift class those witnesses validated is unwritable (DESIGN 5) - the witness test file and the duplicate_computation compile-clean subject go with them (noted on the carrier; the lens keeps its emit_determinism subjects). - dag_compile_clean_seam: the RawLine pile (cp -r, sed, $VAR-captured compiles, grep -c, echo SEAM_RESULT) becomes typed ops end to end - the sed is Filesystem.Read + replace + Write, the three compiles return typed results, and the SEAM_RESULT string protocol plus its parser dissolve; the receipt is a typed record and the synthetic RED controls construct it directly. - dag_compile_clean_shard / shard_totality: typed staging compile and a Find.Files op (the '| sort' was cosmetic - the totality algebra is set-membership both ways). - source_root_ingest_transport, compiler_closure_ingest_transport, self_host_realized_comparison_gate: typed compositions over the shared helpers (run_witness_bin_program / run_gunbc_claims). - New extdeps ops: shell.Mktemp.Dir/DirWithTemplate, shell.Mkdir.Parents, shell.Remove.RecursiveForce, shell.Copy.File/Recursive, shell.Find.Files, shell.Test.IsNonEmpty (review fix: restores the test -s zero-byte guard the bash emit_verifications carried). - Importer ratchet re-frozen 27 -> 20; seven stale exception-roster rows removed; ratchet + planted RED controls + clean-tree + roster-soundness all green. Verified by execution: seam algebra + seam live probe, totality live, shard exemplar compile, cross-tree green + optional-skew red receipts, ingest gate (incl. a live cold-build refusal: remote-routed cargo produced no local artifact and the non-empty/executable verification failed closed), closure ingest gate, pattern A, full co-rooted corpus compile x2 clean. Deferred with in-tree notes: floor_diff_observe (affected-set CI's diff observer - avoid colliding with that lane), emit_determinism_transport (last duplicate_computation ShellProgram subject), emit_host_transport (go/node arms are genuine toolchain-bootstrap windows; rust arm needs an env-pinning build op), bmc/ubuntu/srv3 provisioning tails. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… regression) The dissolved bash prelude carried cd "$ROOT" - the construction that made relative --source-root values and cargo build unambiguous. The typed flip dropped it: WitnessBin.Run, BuildInheritEnv, and Find.Files ran in inherited process cwd. Fix: each op now takes a required workdir input spelled as GNU env -C (coreutils env(1)), so a call that does not say where it runs is a type error, not a latent host-state dependency. All call sites thread git.Core.Toplevel(). New discriminating probes: pwd under workdir=/tmp and workdir=toplevel; ingest gate re-run green from a repo subdirectory (the exact failure class flagged). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…unbc into session/witty-ibex-317
…, Bash); on_exhausted wired Precondition first (plan-doc FLAG): Retry.on_exhausted was a declared-but-unread field - the emitter matched it as _ and the row baked exhaustion as fixed tokens. Wired end to end: seg_h split into four fixed segments with three shared-binding occurrences of an exhausted spelling, the emitter emits the on_exhausted Pipeline and threads it through realize_retry (arity 8), and a new teeth test reds the bytes when on_exhausted changes. Cutover: gunbc.ci_spec.ci_cargo_eagain_retry_core no longer concatenates bash - it builds the Retry intent (body run, two LogMatches escalation levels, exhausted pipeline: the policy facts ci_spec owns) and renders through orch_emit_step over the bash grammar rows. First dag-tree module importing v2.* (gunbc ci loads both roots; workflow->compiler is the allowed layering direction). The String seam's refusal arm emits a loud poison marker that reds both the drift gate and the yaml parse gate - refuse, never widen; noted on the carrier. The hand-authored blob moved verbatim to the test module as an emitter-independent golden; the intent fixture module now delegates to the production intent so tests exercise the value production emits. Receipts: 5 retry emit tests green (byte-identity vs golden, production seam vs golden, env/exhausted teeth); ci_yaml_parse_witness (the CI drift+parse gate) ExitSuccess - committed ci.yml byte-identical through the new path; full corpus compile 0 diagnostics. Attribution: the local 'gunbc ci' top-level failure (dash rejecting set -o pipefail) reproduces on clean origin/main - pre-existing, not this change. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
run_rust_smoke/run_python_smoke are runtime-present sites: replace the ShellProgram builders (mktemp/mkdir/heredoc/EnvPrefixed/wc -c pipeline) with typed service operations - shell.Mktemp/Mkdir/Write/Remove, cargo.Build.BuildManifest (env -C workdir + CARGO_TARGET_DIR), python.Interpreter.RunFile (new cited extdeps.python), gunbc.WitnessBin.Run for the fixture binary. shell.Write.File is the one net-new capability: POSIX tee with the transport's first-class stdin binding (cron.Replace precedent), so file content never rides through a heredoc. The wc -c byte-count assertion strengthens to CONTENT equality: the expected string is built in-substrate (repeat_string of from_code_point(0)) from the same stdout_byte_count authority, and the 5-NUL fixture bytes survive the transport's trailing-whitespace trim. Discriminating RED control: a count-identical 5-space fixture must compare unequal - the exact class the old count check was blind to. Cleanup now runs unconditionally (set -e leaked the tempdir on mid-script failure). Proven by execution: both smokes true, composed emit_host_gate ExitSuccess (all 5 rows), importer-count ratchet green at 19 with both planted-RED controls. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Auto-opened by session-dashboard for session
witty-ibex-317.Pushing to
session/witty-ibex-317advances this PR.Worker attestation
Before flipping this PR to ready for review, confirm each item:
npm test,cargo test) and the result.Closes #Ndirective.Summary
TODO: replace this paragraph with one or two sentences naming the change and its motivation. Reviewers read this first.
Test plan