docs: specify the gate statement in the ProseScript grammar - #155
Open
devanonyme42 wants to merge 1 commit into
Open
docs: specify the gate statement in the ProseScript grammar#155devanonyme42 wants to merge 1 commit into
devanonyme42 wants to merge 1 commit into
Conversation
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.
Resolves #147
Problem
prose.mddocumentsgate()as a first class VM primitive and the bundled session-to-prose extractor mandates emitting gate points, but the ProseScript grammar has no production for it. The only specification anywhere is the comparison table in the runtime delegation section, which describes the VM protocol asawait gate(payload). As #147 reports, a generator and an independent reviewer produced three different surface forms in a single run because there was nothing to lint against.Change
prosescript.mdgainsgate_stmt ::= ["let" target "="] gate_expr NEWLINE?withgate_expr ::= "gate" expression, the statement alternation entry, a Gates section in the style of the surrounding sections (intro, example, forms table, validation table), and a mention of gates in the execution model's phase 3 list.prose.mdgains one line after the gate vs runtime delegation table pointing to the new grammar section.Why the statement form and not
await gate(...)ProseScript has no
awaitkeyword anywhere in the grammar. The three existing primitives that yield to an external actor (call,session,resume) are all statement forms with an optionalletbinding, and the VM awaits implicitly. A gate is the same class of primitive, so the grammar follows that precedent. The new section states explicitly thatawait gate(payload)in the comparison table is the VM protocol description of the same interaction, so the two documents no longer read as conflicting. If a different surface form is intended, happy to adjust.Checks
pnpm test:skill(411 passed, includes the skill meta conformance suite that asserts on the grammar productions),pnpm test:examples(10 passed) andpnpm --filter @openprose/reactor-cli test:offline(210 passed, 1 skipped) are green after the change.