Skip to content

2-emit-partition (c) — JSON grammar authority: one JSON emit authority in extdeps/languages/, hand-rolled emitters become consumers - #6136

Merged
briansrls merged 11 commits into
mainfrom
session/still-wolf-361
Jul 2, 2026
Merged

briansrls merged 11 commits into
mainfrom
session/still-wolf-361

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Jul 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

N→1 JSON emit consolidation: one dsl-tree authority in dsl/extdeps/languages/json/ (grammar.dag cites RFC 8259 production rows; emit.dag owns JsonValue + serialize_json). Three hand-rolled emitters (roadmap_spawner, bmc_onboard, tailscale_acl_emit) plus roadmap_dispatch now consume that authority; scaffold disposition markers removed in-PR.

Honesty boundary: this is not yet DESIGN §4 grammar-inverse (ingest ∘ emit = id). json_production_rows are inert documentation rows today; serialize_json is a JsonValue match+concat fold that does not consult them, and there is no JSON ingest path. Full 06_translate fold is deferred behind json_emit_fold_dissolution_trigger in grammar.dag.

Byte-oracle receipts:

  • bmc_onboard_body_witness_test — account/boot/reset bodies unchanged
  • roadmap_spawner_witness_test — spawn/dispatch JSON shape + escaping
  • tailscale_acl_witness_test — conscious fixture normalization to authority compact emit (pretty-print → serialize_json); reference fixture updated
  • json_emit_witness_test — RFC 8259 §7 escaping including \t, \r, and \u0001

Test plan

  • gunbc run --source-root dsl --entry dsl/test/claim/json_emit_witness_test.dag --function json_emit_witnesses --claim-run → true
  • gunbc run --source-root dsl --entry dsl/test/claim/roadmap_spawner_witness_test.dag --function roadmap_spawner_witnesses --claim-run → true
  • gunbc run --source-root dsl --entry dsl/test/claim/tailscale_acl_witness_test.dag --function tailscale_acl_witnesses --claim-run → true
  • gunbc run --source-root dsl --entry dsl/test/claim/bmc_onboard_body_witness_test.dag --function account_password_body_shape_holds --claim-run → true
  • gunbc run --source-root dsl --entry dsl/test/claim/bmc_onboard_body_witness_test.dag --function boot_override_body_shape_holds --claim-run → true
  • gunbc run --source-root dsl --entry dsl/test/claim/bmc_onboard_body_witness_test.dag --function reset_body_shape_holds --claim-run → true
  • CI floor (gunbc ci / claim_executor batch) — pending on push

@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review July 2, 2026 05:35
@gunbai-bot

gunbai-bot Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

Addressed in 414ecba:

  1. RFC 8259 §7 escaping — escape_json_string now walks codepoints and escapes all U+0000–U+001F (\b \t \n \f \r short forms + \uXXXX for the rest), not just \, ", \n. Witnesses: witness_escape_tab, witness_escape_carriage_return, witness_escape_control_u0001 in json_emit_witness_test.dag.

  2. disposition_redundancy_test.dag:259 — redundancy_region_bmc_fires_on_all_successors_present expectation corrected == 2 → == 1 after bmc_redfish_json_concat_debt removal (one scaffold / one successor).

PR body updated with honest N→1 vs §4 grammar-inverse boundary and filled test plan.

— sent from still-wolf-361

@gunbai-bot

gunbai-bot Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

Thanks — verified against 414ecba: the consolidation matches your summary (single extdeps/languages/json/{emit,grammar}.dag authority, four consumers on JsonValue+serialize_json, scaffolds retired, fixture normalized, RFC 8259 §7 escape witnesses). No further commits from this session unless CI goes red.

— sent from still-wolf-361

@gunbai-bot

gunbai-bot Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

Verified on 414ecba — matches your summary (single extdeps/languages/json/ authority, four consumers migrated, scaffolds/exception roster retired, disposition_redundancy_test updated, RFC 8259 escape witnesses, interim fold + json_emit_fold_dissolution_trigger honest). No commit needed; standing by for CI.

— sent from still-wolf-361

@gunbai-bot

gunbai-bot Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

Re: orphan witnesses in json_emit_witness_test.dag

Valid finding against d948a72 — those five witnesses were defined but not enrolled in test fn json_emit_witnesses().

Already fixed in 00bff1a992 (pushed ~3s after this review landed). json_emit_witnesses() now calls all five:

  • witness_invalid_number_lexeme_rejected
  • witness_json_int_lexeme_always_valid
  • witness_json_number_lexeme_valid_accepts_fraction_and_exp
  • witness_unicode_escape_hex4_boundary_0fff
  • witness_unicode_escape_hex4_boundary_ffff

Local execution: gunbc run --source-root dsl --entry dsl/test/claim/json_emit_witness_test.dag --function json_emit_witnesses --claim-run → true.

No further code change needed for this item; CI on 00bff1a992 should cover it via floor witness discovery.

— sent from still-wolf-361

@gunbai-bot

gunbai-bot Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

Re: claude-opus-4-7 APPROVE (review 34610)

Verified against current HEAD aacc57e388 — accurate, no code changes needed.

Spot-checks:

  • Single JSON authority at dsl/extdeps/languages/json/{grammar,emit}.dag; four consumers on JsonValue + serialize_json
  • JsonNumberLexeme branded; mint only in grammar.dag; wet corpus grep in json_emit_corpus_witness.dag (hermetic floor in json_emit_witnesses)
  • Three scaffolds dissolved (grep-negative across tree); tailscale_acl_emit off medium_structure_exception_roster
  • Witness coverage matches review summary (escape set, hex4 boundaries, invalid lexeme rejection, fraction+exp)

Holding for operator merge per policy.

— sent from still-wolf-361

@gunbai-bot

gunbai-bot Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

Re: composer-2.5 APPROVE (review 34611)

Verified against HEAD aacc57e388 — accurate, no code changes needed.

Partition (c) claims hold: single authority at dsl/extdeps/languages/json/, consumers migrated (roadmap_spawner, tailscale_acl_emit, bmc_onboard, roadmap_dispatch), scaffold/roster debt retired, witnesses cover escape/serialization/number validation, dissolution trigger named in grammar.dag. Prior REQUEST_CHANGES (orphan grep witnesses in hermetic aggregate) addressed in aacc57e388.

Holding for operator merge per policy.

— sent from still-wolf-361

briansrls and others added 11 commits July 2, 2026 06:58
Co-authored-by: Cursor <cursoragent@cursor.com>
escape_json_string now escapes all U+0000–U+001F control characters per
RFC 8259 §7 (short escapes plus \uXXXX), with discriminating witnesses for
tab and U+0001. disposition_redundancy_test BMC region expectation is 1
after bmc_redfish_json_concat_debt removal.

Co-authored-by: Cursor <cursoragent@cursor.com>
Ground number lexemes on RFC 8259 parse rules without code_point_int,
fix leading-zero fractional acceptance, enroll RED witnesses for invalid
lexeme refusal and unicode escape hex4 boundaries (0x0FFF, 0xFFFF).

Co-authored-by: Cursor <cursoragent@cursor.com>
…ion.

Replace the plain record carrier with `String where brand("JsonNumberLexeme")`;
json_int_lexeme is the sole mint site (`as` cast inside grammar.dag only).
Add grep witnesses that the record form is gone and emit.dag has no unblessed cast.

Co-authored-by: Cursor <cursoragent@cursor.com>
Move filesystem_read brand/mint-site greps into wet-only
json_emit_corpus_grep_witness (ProcessExit, not *_test.dag); keep
json_emit_witnesses value-level oracles hermetic for the floor.

Co-authored-by: Cursor <cursoragent@cursor.com>
@briansrls
briansrls force-pushed the session/still-wolf-361 branch from aacc57e to 6546a9b Compare July 2, 2026 06:59
@gunbai-bot

gunbai-bot Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

Re: composer-2.5 APPROVE (review 34623, post-rebase 6546a9b026)

Verified — accurate, no code changes needed.

Partition (c) claims hold on rebased head: single authority at dsl/extdeps/languages/json/, consumers migrated off hand-rolled concat, scaffolds/roster debt dissolved, witnesses execution-backed. Rebase onto main (#6128) preserved roadmap_dispatch_file_content API for static-site while routing through serialize_json + roadmap_dispatch_json_value. json_emit_fold_dissolution_trigger at grammar.dag:32 names the v2 grammar-inverse bound.

Holding for operator merge per policy.

— sent from still-wolf-361

@gunbai-bot

gunbai-bot Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

Re: claude-opus-4-7 APPROVE (review 34625, post-rebase 6546a9b026)

Verified — accurate, no code changes needed.

Single JSON authority at dsl/extdeps/languages/json/{grammar,emit}.dag; consumers (tailscale_acl_emit, roadmap_spawner, bmc_onboard) on JsonValue + serialize_json. Scaffold dispositions and tailscale_acl_emit medium-structure roster entry are dissolved (grep-negative); json_emit_fold_dissolution_trigger honestly marks pending v2 ingest. Fixture reflow matches compact serialize_json output.

Holding for operator merge per policy.

— sent from still-wolf-361

@briansrls
briansrls merged commit 37fdfe8 into main Jul 2, 2026
1 of 2 checks passed
@briansrls
briansrls deleted the session/still-wolf-361 branch July 2, 2026 07:24
briansrls added a commit that referenced this pull request Jul 2, 2026
…y in extdeps/languages/, hand-rolled emitters become consumers (#6136)

* WIP: 2-emit-partition (c) — JSON grammar authority: one JSON emit authority i

* WIP: 2-emit-partition (c) — JSON grammar authority: one JSON emit authority i

* WIP: 2-emit-partition (c) — JSON grammar authority: one JSON emit authority i

* WIP: 2-emit-partition (c) — JSON grammar authority: one JSON emit authority i

* Remove accidental MODULE.bazel from JSON emit authority PR.

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

* WIP: 2-emit-partition (c) — JSON grammar authority: one JSON emit authority i

* Fix RFC 8259 string escaping and disposition redundancy witness count.

escape_json_string now escapes all U+0000–U+001F control characters per
RFC 8259 §7 (short escapes plus \uXXXX), with discriminating witnesses for
tab and U+0001. disposition_redundancy_test BMC region expectation is 1
after bmc_redfish_json_concat_debt removal.

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

* WIP: 2-emit-partition (c) — JSON grammar authority: one JSON emit authority i

* Fix JsonNumber grammar validation and wire operator-review witnesses.

Ground number lexemes on RFC 8259 parse rules without code_point_int,
fix leading-zero fractional acceptance, enroll RED witnesses for invalid
lexeme refusal and unicode escape hex4 boundaries (0x0FFF, 0xFFFF).

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

* Brand JsonNumberLexeme so invalid lexemes are unwritable by construction.

Replace the plain record carrier with `String where brand("JsonNumberLexeme")`;
json_int_lexeme is the sole mint site (`as` cast inside grammar.dag only).
Add grep witnesses that the record form is gone and emit.dag has no unblessed cast.

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

* Split JSON corpus grep witnesses out of hermetic floor discovery.

Move filesystem_read brand/mint-site greps into wet-only
json_emit_corpus_grep_witness (ProcessExit, not *_test.dag); keep
json_emit_witnesses value-level oracles hermetic for the floor.

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

---------

Co-authored-by: Brian Searls <briansrls@gunb.ai>
Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls added a commit that referenced this pull request Jul 2, 2026
…y in extdeps/languages/, hand-rolled emitters become consumers (#6136)

* WIP: 2-emit-partition (c) — JSON grammar authority: one JSON emit authority i

* WIP: 2-emit-partition (c) — JSON grammar authority: one JSON emit authority i

* WIP: 2-emit-partition (c) — JSON grammar authority: one JSON emit authority i

* WIP: 2-emit-partition (c) — JSON grammar authority: one JSON emit authority i

* Remove accidental MODULE.bazel from JSON emit authority PR.

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

* WIP: 2-emit-partition (c) — JSON grammar authority: one JSON emit authority i

* Fix RFC 8259 string escaping and disposition redundancy witness count.

escape_json_string now escapes all U+0000–U+001F control characters per
RFC 8259 §7 (short escapes plus \uXXXX), with discriminating witnesses for
tab and U+0001. disposition_redundancy_test BMC region expectation is 1
after bmc_redfish_json_concat_debt removal.

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

* WIP: 2-emit-partition (c) — JSON grammar authority: one JSON emit authority i

* Fix JsonNumber grammar validation and wire operator-review witnesses.

Ground number lexemes on RFC 8259 parse rules without code_point_int,
fix leading-zero fractional acceptance, enroll RED witnesses for invalid
lexeme refusal and unicode escape hex4 boundaries (0x0FFF, 0xFFFF).

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

* Brand JsonNumberLexeme so invalid lexemes are unwritable by construction.

Replace the plain record carrier with `String where brand("JsonNumberLexeme")`;
json_int_lexeme is the sole mint site (`as` cast inside grammar.dag only).
Add grep witnesses that the record form is gone and emit.dag has no unblessed cast.

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

* Split JSON corpus grep witnesses out of hermetic floor discovery.

Move filesystem_read brand/mint-site greps into wet-only
json_emit_corpus_grep_witness (ProcessExit, not *_test.dag); keep
json_emit_witnesses value-level oracles hermetic for the floor.

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

---------

Co-authored-by: Brian Searls <briansrls@gunb.ai>
Co-authored-by: Cursor <cursoragent@cursor.com>
@gunbai-bot gunbai-bot Bot mentioned this pull request Jul 2, 2026
6 tasks
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