@@ -69,29 +69,27 @@ points at the leaf deliberately. A consumer that only reads documents —
6969a tool diffing two of them, with no command tree anywhere in it — gets
7070the plain data and none of the implementation.
7171
72- The name is the one the retired package had, because the role it names is
73- the one that survived. What is different is that ` desc ` is no longer a
74- * stage* : it failed as one because the lexer read a projection carrying no
75- ` Value ` , so resolving an argument to something the applier could act on
76- grew a private parallel tree and a ` bind() ` pass, eighty lines spent
77- keeping one field off a struct. Nothing internal reads a description. The
78- parser still runs on ` ir ` , and the conversion happens once, at the
79- boundary, on the way out. Calling the package ` schema ` was considered and
80- dropped: the format is published as a JSON Schema document, and one word
81- should not name both the Go types and the thing that validates them.
82-
83- Embedding the description into the implementation type was the other
84- candidate and does not work, for a reason independent of that history:
85- ` encoding/json ` flattens an anonymous embedded struct, so
86- ` ir.Command{desc.Command; Handler ...} ` marshals to exactly the keys it
87- marshals to today. It would buy a type and not a format.
88-
89- ### ` ir ` no longer marshals
90-
91- Nothing in ` ir ` is encoded or decoded, and its ` json:"-" ` tags come off
92- with the field comments that explain them. The guarantee that behavior
93- never leaks into a document stops being a tag discipline pinned by
94- ` TestMarshalOmitsBehavior ` , which retires, and becomes structural:
72+ ` desc ` is a boundary, not a * stage* . Nothing internal reads a description:
73+ the parser runs on ` ir ` , and the conversion happens once, on the way out.
74+ A description used as a stage does not work, because a lexer reading a
75+ projection that carries no ` Value ` cannot resolve an argument to anything
76+ the applier can act on, and putting that back costs a private parallel
77+ tree and a ` bind() ` pass — eighty lines spent keeping one field off a
78+ struct. The package is not called ` schema ` , because the format is
79+ published as a JSON Schema document and one word should not name both the
80+ Go types and the thing that validates them.
81+
82+ Embedding the description into the implementation type is the other
83+ candidate and does not work either: ` encoding/json ` flattens an anonymous
84+ embedded struct, so
85+ ` ir.Command{desc.Command; Handler ...} ` marshals to exactly the keys
86+ ` ir.Command ` marshals on its own. It buys a type and not a format.
87+
88+ ### ` ir ` does not marshal
89+
90+ Nothing in ` ir ` is encoded or decoded, and it carries no ` json:"-" ` tags.
91+ The guarantee that behavior never leaks into a document is not a tag
92+ discipline pinned by a test but a structural property:
9593` Describe ` copies named fields, so a behavior field added to ` ir ` later is
9694absent from the output because nothing wrote it there, not because a tag
9795excluded it.
@@ -327,17 +325,13 @@ operands is an ordinary configuration error naming the author's own
327325mistake. That question can stay open on its own merits rather than
328326blocking this.
329327
330- The two-type-model ADR states a rule this changes, and should be edited to
331- say three when this is accepted rather than before.
332-
333328` ir ` gains two fields, neither of them behavior. A golden document for
334329` examples/orbital ` is what will make an unintended wire change visible,
335330alongside the help goldens already there.
336331
337332Machine-readable error output should project through the ` desc ` types
338- rather than defining a second vocabulary for a command and a flag. That
339- was already the intent recorded for it, against the ` desc ` that no longer
340- existed when it was written.
333+ rather than defining a second vocabulary for a command and a flag, which
334+ is what docs/adr/human-readable-errors.md leaves open for it.
341335
342336Recording an option's effect is a change to ` ir ` , and the only one here
343337that is not additive. ` ir.Flag ` 's comment says today that what a
@@ -351,13 +345,13 @@ generated from and the effect of naming it, and `internal/argv` fills in
351345the second where it already fills in the first.
352346
353347` ir ` still knows no dialect by this, and the distinction has to be exact,
354- because a narrower version of the same field was rejected twice: first as
355- a negated form on the compiled flag, then as a ` Negated ` boolean on a
356- claim, both as a dialect feature leaking into the type every dialect
357- shares. The test that sank them was whether a dialect lacking the feature
358- would leave the field meaningless, and a boolean fails it. A dialect
359- without negation reports false everywhere, and one whose modifier is a
360- repeat or a reset needs a second field while the first sits dead.
348+ because the narrower versions of the same field do not survive it. A
349+ negated form on the compiled flag, or a ` Negated ` boolean on a claim, is a
350+ dialect feature leaking into the type every dialect shares. The test is
351+ whether a dialect lacking the feature leaves the field meaningless, and a
352+ boolean fails it: a dialect without negation reports false everywhere, and
353+ one whose modifier is a repeat or a reset needs a second field while the
354+ first sits dead.
361355
362356An effect names no feature. It is a term the dialect writes and a
363357consumer reads, over a vocabulary that is open, so a dialect with no
@@ -374,10 +368,10 @@ the shared type changing. Two rules keep it there:
374368 rather than by reading the effect. The modifier still lives entirely
375369 inside the dialect, and the effect exists for the document alone.
376370
377- Under those, this supersedes the earlier rejections rather than
378- contradicting them . What the type records is not that this dialect
379- negates, but that the dialect had something to say about an option, in a
380- word it and the reader share.
371+ Under those two rules an effect is not the field those narrower versions
372+ would have been . What the type records is not that this dialect negates,
373+ but that the dialect had something to say about an option, in a word it
374+ and the reader share.
381375
382376A flattened per-command projection is anticipated and deliberately not
383377built. Something calling one command wants that command's calling
0 commit comments