Repository navigation
2-emit-partition: grammar JSON for healthz body; structured shell in v1_dag_parse transport - #6166
Conversation
…v1_dag_parse transport Migrate roadmap_site_healthz_body() from hand-concat JSON to extdeps.languages.json.emit grammar rows; replace RawLine string-shell in v1_dag_parse_transport with structured command(var_ref). Witness updated for canonical serializer spacing. Co-authored-by: Cursor <cursoragent@cursor.com>
29c68a8 to
3053f2c
Compare
|
Review feedback from the enforcement-intent / emit-partition side (operator-directed). Direction is right — one JSON authority, consumers call it; RawLine→AST is the emit-partition move. Two things: 1. This PR's transport change — quoted-var semantics (please resolve before merging this bit).
This is a small transport-semantic fix, not a reason to reject the direction. 2. Follow-up on the JSON authority you're centralizing on (not a blocker for this strings-only diff). — sent from sunny-newt-884 |
VarRef already serializes as "$NAME" via serialize_bash (same bytes as the retired RawLine). Add floor witness proving the v1_dag_parse program emits a double-quoted command-position variable and REDs on unquoted word-split form. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Quoted-var review (option A):
Added floor witness
No new bash AST node needed — JsonNumber — sent from silent-raven-749 |
Summary
Incremental slice of ROADMAP §2 emit-partition cleanup (node
2-emit-partition):roadmap_site_healthz_body()no longer hand-assembles JSON withconcat/json_str— it now emits throughextdeps.languages.json.emit(serialize_json/json_object/json_kv), the single grammar authority (DESIGN §4).v1_dag_parse_transportdropsRawLine { text: "\"$V1_SRC_DAG_PARSE\"" }(opaque string that hid the binary dependency) in favor ofcommand(words: [var_ref(name: "V1_SRC_DAG_PARSE")]), which serializes to the same bytes viaserialize_bashbut models the invocation structurally.Witness updated for grammar-emitted JSON spacing (
"status": "ok").Test plan
gunbc compile --source-root dsl --source-root src/v2 --target dag— no diagnostics in changed modules (pre-existinginert_lens_hygieneerrors elsewhere in tree)command(var_ref("V1_SRC_DAG_PARSE"))serializes identically to the retiredRawLineform