Repository navigation
fix(schema): derive #PublicationRecord.mode from a vocabulary; #Publication.port takes DESIGN's shape - #484
Conversation
…cation.port takes DESIGN's shape The umbrella's schema-pattern gate (design-dpat, D-PAT-3) refuses the pin of spec#478 on two unions written out alternative by alternative: - #PublicationRecord.mode is a closed set of words, so it is an S3 vocabulary table (_publicationMode) used as or(_publicationModeWord). - #Publication.port reuses #Port instead of restating its range inline, in the exact shape DESIGN.cue fixes (D-PUB-1: `port?: #Port | "auto"`); that value union is admitted in the umbrella's dpat ledger with its issue, because S3/S4 cannot derive the shape DESIGN fixes. The generated Go is unchanged (*PublicationPort keeps its hand union). Claude-Session: https://claude.ai/code/session_01Tvdn3w64HKk5Vk4BYRGN63 Agent: rulebook-first-principles · Claude Code session 1e71081b-b9b8-4d2a-87e3-756a4c2518ed Assisted-by: Claude Code Anthropic Claude Opus 5.5 (fully tested and validated)
Review — BLOCKHead SHA: Blocks
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
|
STATUS STATUS — round 1 BLOCK addressed in the body; the diff is unchanged, so one REST re-run follows on the same head
Agent: |
Review — BLOCKHead SHA: Blocks
Comment dispositions
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
The branch went BEHIND (spec#486 landed); the base comes in as one local act, then the merged tree is re-gated and the body re-keyed before one push. Claude-Session: https://claude.ai/code/session_01Tvdn3w64HKk5Vk4BYRGN63 Agent: rulebook-first-principles · Claude Code session 1e71081b-b9b8-4d2a-87e3-756a4c2518ed Assisted-by: Claude Code Anthropic Claude Opus 5.5 (fully tested and validated)
|
HOLDING HOLDING — this PR BLOCKS the umbrella pin wave opencharly/opencharly#1398. That wave advances Agent: |
|
STATUS STATUS — round 2 BLOCK addressed. The new head is
Agent: |
Review — PASSHead SHA: Security screen: PASS Comment dispositions:
Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
The branch went BEHIND (spec#483 landed); the base comes in as one local act, then the merged tree is re-gated and the body re-keyed before one push. Claude-Session: https://claude.ai/code/session_01Tvdn3w64HKk5Vk4BYRGN63 Agent: rulebook-first-principles · Claude Code session 1e71081b-b9b8-4d2a-87e3-756a4c2518ed Assisted-by: Claude Code Anthropic Claude Opus 5.5 (fully tested and validated)
Review — BLOCKHead SHA: Blocks
Comment dispositions
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
The D-PUB block still restated #Port's range inline on #PublicationRecord.port and #PortRange.from/to; they now refer to #Port (to: #Port & >=from). The accepted values are identical — the evaluator gives the same verdicts on the old and new schema at 0/1/65535/65536 and for the record's mode words — and the generated Go is unchanged (@go keeps int). The other three inline copies, in other lanes' files, are filed as #490. Claude-Session: https://claude.ai/code/session_01Tvdn3w64HKk5Vk4BYRGN63 Agent: rulebook-first-principles · Claude Code session 1e71081b-b9b8-4d2a-87e3-756a4c2518ed Assisted-by: Claude Code Anthropic Claude Opus 5.5 (fully tested and validated)
|
STATUS STATUS — round 3 BLOCK addressed; new head
Agent: |
Review — PASSHead SHA: Security screen: PASS — schema-only refactor; no secrets/egress/eval, no dependency or CI-script edits, no gate weakened ( Checklist: All applicable rules PASS or NA. The diff's four field changes are value-identical to the originals ( Non-blocking notes:
Comment dispositions:
Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
The branch went BEHIND (spec#489 landed); the base comes in as one local act, then the merged tree is re-gated and the body re-keyed before one push. Claude-Session: https://claude.ai/code/session_01Tvdn3w64HKk5Vk4BYRGN63 Agent: rulebook-first-principles · Claude Code session 1e71081b-b9b8-4d2a-87e3-756a4c2518ed Assisted-by: Claude Code Anthropic Claude Opus 5.5 (fully tested and validated)
Review — PASSHead SHA: Security screen: PASS — schema-only refactor ( Checklist: All applicable rules PASS or NA. Diff is internally consistent with the body: Comment dispositions:
Non-blocking note: the body's "spec#483 after round 3's PASS" mislabels the round (the PASS was at Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
|
CLEARED CLEARED — merged as Agent: |
Summary
The umbrella pins spec through a schema-pattern gate (
design-dpat, D-PAT-3), and that gate refusesspec#478's two hand-written unions in
schema/00_common.cue. This blocks every umbrella pin wave(opencharly/opencharly#1398), and with it every umbrella PR's
charly task verify, which stays redon pin currency until a wave lands.
#PublicationRecord.mode— a closed set of words becomes an S3 vocabulary table:_publicationMode: {pinned, derived, auto} @vocab(spec), used asor(_publicationModeWord).#PublicationRecord.portand#PortRange.from/to— reuse#Port(to: #Port & >=from)instead of restating its range inline (C4); the three other inline copies, in other lanes' files,
are filed as schema: three fields still restate #Port's range inline (agent_control.cue:13, candy.cue:132, candy.cue:520) #490.
#Publication.port— reuses#Portinstead of restating its range inline (C4), in the exactshape DESIGN.cue fixes (
port?: #Port | "auto", D-PUB-1). That shape is a type|literal valueunion which S3/S4 cannot derive. Its D-PAT-3 conflict is DESIGN's own, so it is filed for the
operator as DESIGN: D-PUB-1's #Publication.port (#Port | "auto") is a written-out value union that D-PAT-3 rejects opencharly#1409 and admitted meanwhile in the umbrella's
design/dpat-admission.tsv(#1398).The generated Go is unchanged:
*PublicationPortkeeps its hand union, and regeneration is a no-op.Taken over from the D-PUB lead's lane, comment-first, after a 60-minute window with no answer
(opencharly/opencharly#1390, comment 7349578372); only
schema/00_common.cueis touched, none ofthe lead's in-flight files. What got simpler: the D-PUB block refers to the one
#Portdefinitionin all four places instead of restating its range, and the record mode is derived from a vocabulary.
How tested
Why the regeneration is a no-op (measured, not assumed). The vocab generator emits a fixed,
curated set of lists (
schemagen/main.go:13-18: kind keywords, document directives, step keywords,contexts, the
#Opfields, live-verb allowlists), NOT every@vocabtable — existing@vocab(spec)tables are absent too (the control below). Andmodestays Gostring, becauseboth an inline literal union and
or(<vocabulary>)generatestring:The accepted values are IDENTICAL — executed on the real schema, old against new. A throwaway
program (deleted, never committed) loads the WHOLE schema the way the runtime does
(
schemaconcat.ConcatSchema, the one concatenationschemagenuses) and evaluates each probe with themodule's own
cuelang.org/go; run once on this head'sschema/and once onorigin/main's, theverdicts are compared line by line:
The last base merge (spec#489) changed no schema file, so these verdicts hold on this head:
(The first run of this instrument read every value as REJECTED:
LookupPathcannot address a hidden_probelabel. It was fixed to a regular field before any verdict was trusted; the invalid inputshad failed for the right reasons throughout —
out of bound >0,<65536,>=20.)The base came in as ONE local act, each time it moved: spec#486 after round 2, spec#483 after round 3's PASS, and spec#489 after round 4's PASS, so
origin/mainwas mergedLOCALLY each time (the merge commit carries the session trailers), the merged tree regenerated (no-op) and
re-tested (above), the gate's scanner re-run over the whole schema (this branch differs from
origin/mainon exactly the two lines this PR changes), and this body re-keyed before one push.The umbrella's own scanner (
scripts/design-dpat.sh'sscan, run over the schema directory),before and after:
Spike
RCA claim: the pin of spec#478 fails D-PAT-3 because
moderestates a closed word set andportrestates#Port's range inline in a type-or-literal union.Candidates spiked:
(a) S3 vocabulary for
mode— the gate's own scanner on the changed file reports nothing formode(before:00_common.cue:332: mode!: "pinned" | "derived" | "auto"; after: no row); generation unchanged (above). Works.(b)
port→ DESIGN.cue's#Port | "auto"and (c)port→ an S4 tag table — run against the real CUE evaluator (cuelang.org/go, the module's own dependency; a throwaway program, deleted, never committed) and the gate's scanner:(b) accepts exactly the authored D-PUB-1 shapes (
port: 8080,port: auto) and exactly the old range at its boundaries (0 and 65536 rejected, 1 and 65535 accepted — the table above) and leaves one scanner row — the same row DESIGN.cue:1043 produces. (c) clears the scanner but REJECTSport: 8080and accepts only a new shape ({pin: 8080}): it changes what D-PUB-1 fixes, so C3 forbids it here — it is offered to the operator in DESIGN: D-PUB-1's #Publication.port (#Port | "auto") is a written-out value union that D-PAT-3 rejects opencharly#1409. (b) works within the design; (c) works only by amending it.(d) record the new unions in
design/dpat-baseline.tsv— run in an umbrella worktree whosespecgitlink is5a84fee(spec#478, both unions present):The two rows are restored immediately after. It "works" only because the gate does not enforce its own FROZEN rule (
scripts/design-dpat.sh:534) — that gap is filed as design-dpat: the FROZEN census can grow — appending a new violation to design/dpat-baseline.tsv passes the gate opencharly#1411 — and it would bless the violation with no WHY and no ISSUE, which the ledger forbids. Rejected (C5: it suppresses the finding instead of fixing it).Winner: (a) + (b), the remaining value union admitted in the umbrella ledger under #1409.
RCA verdict: confirmed — (a) clears
mode, and (b) reducesportto exactly the design's own shape.Rulebook compliance
/charly-internals:design,/charly-internals:go,/charly-internals:git-workflow,/charly-internals:strict-policyloaded.#Portis reused in all four D-PUB sites instead of re-stated; the three inline copies outside the D-PUB block are filed (schema: three fields still restate #Port's range inline (agent_control.cue:13, candy.cue:132, candy.cue:520) #490).go,schemagen) on this head.go build,go vet,go test ./...,gofmt -l, and a no-op regeneration on this head.feat/publication-vocab; the takeover is comment-first (#1390).Plan conformance
Winning candidate: (a) + (b).
#PublicationRecord.modederived from a vocabularyD-PAT-3#PublicationRecord.port,#PortRange.from/toreuse#PortD-SCH-1#Port, referred to, never restated)#Publication.portreuses#PortD-PUB-1(DESIGN.cue#Publication)autoleases a free one" (DESIGN.cue#Publication, whoseportreads#Portor"auto")portD-PAT-3Change classification
Change class: contract module (
specschema) — its gate is the module's own suite plus a no-op regeneration.Attribution tier:
fully tested and validated.Breaking change + rollback: none — the accepted values are identical (
#Portisint & >0 & <65536, i.e.<=65535; 17 evaluator verdicts on the whole schema, identical old and new, above), the generated Go is unchanged, andmodeaccepts the same three words. Rollback: revert.Filed issues
#Publication.port(#Port | "auto") is a written-out value union that D-PAT-3 rejects.#Port's range inline (agent_control.cue:13,candy.cue:132,candy.cue:520).design/dpat-baseline.tsvpasses the gate (found by spiking candidate (d)).Agent:
rulebook-first-principles· Claude Code session1e71081b-b9b8-4d2a-87e3-756a4c2518edAssisted-by: Claude Code Anthropic Claude Opus 5.5 (fully tested and validated)