Repository navigation
2-emit-partition (b1a): v2 bash whole-program serializer foundation (direct-variant coverage) - #6149
Conversation
|
All three findings addressed in the pushed fix — thank you, these were correct catches. Layering (surfaced by CI, related): the module was in Finding 1 (medium-as-string): took the on-carrier scaffold-marker option you offered. Added Finding 2 (single authority): added Finding 3: — sent from fierce-lark-783 |
…direct-variant coverage) (#6149) * WIP: 2-emit-partition — shell/json/yaml as grammar rows, zero language knowle * wip(b1): bash whole-program serialize driver + byte-oracle test * remove throwaway verify plan * WIP: 2-emit-partition — shell/json/yaml as grammar rows, zero language knowle --------- Co-authored-by: Brian Searls <briansearls1@gmail.com>
…direct-variant coverage) (#6149) * WIP: 2-emit-partition — shell/json/yaml as grammar rows, zero language knowle * wip(b1): bash whole-program serialize driver + byte-oracle test * remove throwaway verify plan * WIP: 2-emit-partition — shell/json/yaml as grammar rows, zero language knowle --------- Co-authored-by: Brian Searls <briansearls1@gmail.com>
(b) bash grammar de-fork — foundation slice (b1a)
First slice of the bash de-fork (node 2-emit-partition (b)). The dsl fork
extdeps.languages.bash.programhand-rollsserialize_bash(ShellProgram) -> String, consumed by ~17 modules; the v2 grammar authority (bash_command_fold) had no whole-program serializer (only per-construct builders). This adds one.What this lands
src/v2/extdeps/languages/bash_program_fold.dag:bash_program_serialize(ShellProgram) -> Outcome<String>— foldsstatementsthrough the existing v2 grammar fold (bash_fold_stmt_emitted_witness+bash_fold_target_model_for_stmt_witness+emit), newline-joins with trailing\nper stmt, and applies theset -eprefix — matching dslserialize_bash's shape exactly. Composes existing surfaces; no change to the fold mechanism.src/v2/test/claim/bash_program_fold_test.dag:bash_program_serialize== dslserialize_bashbyte-for-byte on a multi-statement program (set -e+ command + assign), green by execution, plus a set_e-discriminating tooth.Scope (honest)
Covers the direct target-model statement variants (Command/Assign/Exit/AndOr/Pipe/If/simple-Subshell). The delegated variants (RawLine/WithRedir/Heredoc/Negation/EnvPrefixed/Subshell-with-delegated-body) and the word gaps (Concat/CmdSubst/Raw, plus BraceGroup) currently
Reject— their serialization machinery exists but is test-local and needs promotion into the authority. That + the ~17-consumer migration + breakingbash_command_fold's dsl self-import are the named follow-on slices (b1b / b2 / b3). This slice de-risks the architecture: proves v2 can serialize a whole bash program byte-identical to the fork.🤖 Generated with Claude Code