Skip to content

feat(spec): Threaded gains the structural declared-fields channel - #104

Merged
github-actions[bot] merged 1 commit into
mainfrom
feat/threaded-declared-fields
Sep 6, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
feat/threaded-declared-fields

Conversation

@atrawog

@atrawog atrawog commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Summary

One data channel on the loader seam, zero hardcoded word lists: spec.Threaded gains StructuralDeclaredFields map[string]map[string]bool — a STRUCTURAL kind word → the declared body FIELD NAMES of its registered input schema (the capability's InputDef, e.g. plugin-group's #GroupInput). The HOST fills it from the registered schema; the sdk parse (follow-up PR referencing opencharly/sdk#222) consults it so a structural body's DECLARED fields stay data even when a field name could collide with a kind word — the distro-arch corpus regression (group's iterate: block carrying an agent: key) is the live case.

A kind word absent from the map (no declared schema threaded) falls back to every kind-word key being a member — the documented, tested no-declared-schema fallback.

How tested

$ go build ./... && go vet ./... && go test ./... -count=1
ok  \tgithub.com/opencharly/spec/schema\t1.174s
ok  \tgithub.com/opencharly/spec/spec\t0.353s
ok  \tgithub.com/opencharly/spec/transport\t0.183s
(... full tail; all packages ok, -count=1, committed tree)

The consumer fixtures proving the channel (declared-field exclusion + no-declared-schema fallback) land in the sdk follow-up PR that bumps this pin.

Rulebook compliance

  • R0 — git-workflow skill loaded; sdk CLAUDE.md signpost followed (contract changes live in spec, consumed by a pin bump).
  • R1 — RCA'd design: the field-name channel is the only discriminator grounded in an existing source of truth (the registered InputDef schema).
  • R3 — no duplicate vocabulary: the channel reuses the plugin's OWN registered schema — zero hardcoded word lists.
  • R4 — no workarounds.
  • R5 — additive channel; nothing removed.
  • R6 — branch-per-change, no force-push, no direct main push, clean tree verified post-commit.
  • R7/R10 — full gate pasted, run on the committed tree.
  • R9 — scope: one struct field + doc; no other package touched.

Change classification

  • Change class: contract-module Go API addition (one Threaded field) — no CUE schema change, no migration, no generated-code drift.
  • Verification gate: full module gate (build/vet/test -count=1) on the committed tree — pasted above.
  • Attribution tier: fully tested and validated.

Assisted-by: pi openrouter/deepseek/deepseek-v4-flash-0731 (fully tested and validated)

…e parent-disc guard's field awareness)

One data channel, zero hardcoded word lists: StructuralDeclaredFields maps a
STRUCTURAL kind word to the declared body FIELD NAMES of its registered input
schema (the capability's InputDef, e.g. plugin-group's #GroupInput). The host
fills it from the registered schema; the sdk parse (follow-up PR) consults it
so a structural body's DECLARED fields stay data even when a field name could
collide with a kind word (group's `iterate:` carrying an `agent:` key — the
distro-arch corpus regression). A kind word absent from the map (no declared
schema threaded) falls back to every kind-word key being a member — the
documented, tested no-declared-schema fallback.

Gate: go build/vet/test ./... -count=1 green on the committed tree.
MSG && git push -u origin feat/threaded-declared-fields 2>&1 | tail -2
@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown

Review — PASS

Head SHA: 33ef645fd581 (branch: feat/spec threaded declared-fields)

Security screen: PASS — single additive struct field + doc; no secrets, no exfiltration, no scope mismatch, no guardrail weakening, no supply-chain change.

Checklist: All applicable rules PASS or NA.

  • Change class: contract-module Go API addition (one Threaded field). Gate = full module build/vet/test -count=1, pasted and internally consistent (schema/spec/transport all ok; diff touches spec package).
  • A1/A3: Body accounts for the single field; pasted output present; attribution footer in exact form; tier fully tested and validated justified for a data-only contract addition (no runtime path in this repo — consumer fixtures correctly deferred to the sdk pin-bump PR, a legitimate cross-repo sequencing, not an R2 split).
  • Architecture gate: placement CORRECT — the field is a contract shape on the loader seam, correctly living in spec; no alias file, no sdk-kit import, no Legacy identifier.
  • SDD: NA (no CUE/generated-file change). R5: additive only, nothing removed. R10: no bed required for a contract module; module gate run on committed tree.
  • Comment intake: no comments on the thread.

Verdict: PASS


ollama/deepseek-v4-flash — pi-review-action.

View action run

@github-actions
github-actions Bot enabled auto-merge (squash) September 6, 2026 20:30
@github-actions
github-actions Bot merged commit e0c6174 into main Sep 6, 2026
2 checks passed
charly-auto-merge Bot added a commit that referenced this pull request Sep 6, 2026
atrawog added a commit that referenced this pull request Sep 6, 2026
…th the merged #104 precedent + the pr-validator spec item-3 tier vocabulary (see the RCA comment)
github-actions Bot pushed a commit that referenced this pull request Sep 6, 2026
…task 1, contract half) (#105)

* feat(schema)!: remove the group kind from the spec schema (Cutover C task 1, contract half)

The targetless deploy kind group: (C2-group) is REMOVED at the schema boundary: the new member-tree bed shape makes its dual representation forbidden at R10. #ResourceKind drops the word; the former authored shape (a bed-level group: key carrying scalars with member entities as sibling keys) is migrated by the charly migrate rewrite (the charly wave, in flight): the first member becomes the deploy primary substrate node, the group scalars move onto that primary, remaining members stay deploy-level siblings.

- schema/node.cue: group dropped from #ResourceKind; live group doc claims rewritten (the removed #GroupInput had no schema def left, only a doc reference, now gone); the removal + the post-migrate spelling documented inline
- schema/deploy.cue: group removed from the edge-discriminator doc + the venue/lifecycle doc clauses
- schema/_common.cue: the Calamares package surface is candy-only now
- spec/charly_methods.go: Deploy.IsGroup() deleted (a targetless member-bearing deploy is no longer an authorable shape)
- spec/member_tree_test.go: the IsGroup fixture migrated to the post-migrate primary-substrate spelling
- spec/loader_seam.go: stale #GroupInput / targetless-group examples in the Threaded seam docs reworded
- spec/{cue_types_gen,vocab_gen}.go: regenerated (task cue:gen twice, hash-identical)

* docs: re-trigger validator — PR body corrected (the initial create consumed a stale shared-/tmp body file; the correct body describing this diff is now on the PR)

* docs: re-trigger fresh per-HEAD review — A1 footer ruling answered with the merged #104 precedent + the pr-validator spec item-3 tier vocabulary (see the RCA comment)
github-actions Bot pushed a commit that referenced this pull request Sep 6, 2026
…el (the #Deploy-schema twin of StructuralDeclaredFields) (#107)

* feat(spec): Threaded gains the deploy-substrate declared-fields channel (the #Deploy-schema twin of StructuralDeclaredFields)

One data channel, zero hardcoded word lists: DeployDeclaredFields maps a
DEPLOY-SUBSTRATE word to the declared body FIELD NAMES of its registered
input schema (for pod/vm/local/android/kubernetes that is the #Deploy
family) — the substrate-side twin of #104's StructuralDeclaredFields. The
sdk parse (follow-up PR) consults it so a substrate body's DECLARED #Deploy
fields (iterate/plan/record/disk_size/ram/...) stay data even when the
field's VALUE SHAPE would classify as an in-substrate member (the sdk #221
regression: pod body iterate:{agent:[...]} misparses because agent is a
kind word). A substrate word absent from the map keeps the documented
value-shape scan — the no-declared-schema fallback.

Gate: go build/vet/test ./... -count=1 green on the committed tree.

* docs: re-trigger fresh per-HEAD review — A3 tier downgraded per the validator ruling (the field is data-only in this diff; the behavioral execution lives in the follow-up sdk PR)
@aitrawog
aitrawog deleted the feat/threaded-declared-fields branch September 25, 2026 19:10
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