Skip to content

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

Merged
github-actions[bot] merged 2 commits into
mainfrom
feat/deploy-declared-fields
Sep 6, 2026
Merged

github-actions[bot] merged 2 commits into
mainfrom
feat/deploy-declared-fields

Conversation

@atrawog

@atrawog atrawog commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

One data channel, zero hardcoded word lists: Threaded.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's in-substrate member scan (follow-up sdk 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 proven sdk #221 parse regression: a pod primary body carrying the canonical ADE iterate pattern iterate: {sandbox: ..., agent: [...], ...} misparses because agent is a kind word, so the value-shape scan (isEntityValue) classifies iterate: as an in-substrate member named "iterate", parseNode("iterate") takes agent as ITS disc, and scalar sandbox: hard-fails "expected a mapping value, got yaml kind 8".

A substrate word absent from the map (no declared schema threaded) keeps the documented value-shape scan unchanged — the no-declared-schema fallback, mirroring #104's structural fallback.

No CUE schema change, no cue:gen (Threaded is a hand-written contract type); no migration.

How tested

$ go build ./... && go vet ./... && go test ./... -count=1
ok  	github.com/opencharly/spec/exec	7.972s
ok  	github.com/opencharly/spec/exitcode	0.006s
ok  	github.com/opencharly/spec/fleet	0.006s
ok  	github.com/opencharly/spec/hostenv	0.008s
ok  	github.com/opencharly/spec/lock	0.209s
ok  	github.com/opencharly/spec/merge	0.008s
ok  	github.com/opencharly/spec/phase	0.007s
ok  	github.com/opencharly/spec/poll	0.206s
ok  	github.com/opencharly/spec/proc	0.792s
ok  	github.com/opencharly/spec/refs	11.275s
ok  	github.com/opencharly/spec/schema	1.345s
ok  	github.com/opencharly/spec/spec	0.505s
ok  	github.com/opencharly/spec/transport	0.183s

(all packages ok, zero FAIL, run on the committed tree)

Rulebook compliance

  • R0 — git-workflow skill loaded; contract-first landing order (this spec channel PR merges + tags BEFORE the sdk consumer PR re-pins).
  • R1 — RCA'd upstream: the sdk feat(schema): external-cluster inputs — kubeconfig on kubernetes:, guest identity on kubevirt: #221 substrate branch scans disc values by VALUE SHAPE (isEntityValue); a declared #Deploy field whose value mapping carries a kind-word key (iterate: → agent:) misclassifies as an in-substrate member. The root cause is the missing field-awareness channel on the deploy side; this PR is the contract half, mirroring the merged feat(spec): Threaded gains the structural declared-fields channel #104 mechanism — no new mechanism invented (R3). RCA of this PR's own validator BLOCK: A3 tier inflation — the new field is a pure data declaration in THIS diff (its behavioral execution lives in the follow-up sdk PR), so the changed path does not execute here; the tier is downgraded per the ruling.
  • R2 — no behavioral change lands in spec alone; the field is DATA consumed by the follow-up sdk PR.
  • R3 — one mechanism per behavior: the exact StructuralDeclaredFields pattern (feat(spec): Threaded gains the structural declared-fields channel #104) extended to the deploy-substrate schema; no duplicate channel.
  • R4 — no workarounds; a threaded DATA channel, never a hardcoded collision table.
  • R5 — nothing removed (additive struct field).
  • R6 — branch-per-change off origin/main; no force-push; no direct main push.
  • R7/R10 — the full module gate above, run on the final committed tree, -count=1.
  • R8 — attribution footer below (tier downgraded per the A3 ruling).
  • R9 — scope: one Threaded field + doc comment ONLY. The host-side feed of the channel (charly's loaderThreaded() reading registered substrate InputDef field names) and the sdk parse change are separate consumer PRs, deliberately NOT widened into this one (the feat(spec): Threaded gains the structural declared-fields channel #104 precedent).
  • R10 — fresh proof from the committed tree, never an edited state.

Change classification

  • Change class: additive contract-type change (hand-written seam struct field) — no CUE schema change, no migration, no wire envelope.
  • Verification gate: full module gate (build/vet/test -count=1) on the committed tree — pasted above.
  • Attribution tier: analysed on a live system — the new field is a data declaration consumed by the follow-up sdk PR; the full gate passed on the live tree, but the field's own behavior does not execute in this diff (A3 ruling).

Assisted-by: pi openrouter/deepseek/deepseek-v4-flash-0731 (analysed on a live system)

…el (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.
@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown

Review — BLOCK

Head SHA: fa610acd9987 (branch: feat/spec-threaded-deploy-declared-fields)

Change class: additive contract-type change (one hand-written struct field + doc comment in spec/loader_seam.go).

Security screen: PASS — no scope mismatch (diff is exactly the one field the body describes), no secrets/exfiltration, no weakened guardrails, no supply-chain change, no instruction injection.

Blocks

  1. A3 — inflated attribution tier. The body claims fully tested and validated, but the new DeployDeclaredFields field is never read or written anywhere in this diff — it is a pure data declaration consumed by a follow-up sdk PR (the body itself states "the field is DATA consumed by the follow-up sdk PR"). Per A3, fully tested and validated requires the NEW/CHANGED code paths to have EXECUTED against the fresh rebuild; a change whose changed branch never ran live is at most analysed on a live system. The pasted go build/vet/test gate proves the module compiles and existing tests pass, but it does not exercise the new field's behavior. Downgrade the tier to analysed on a live system (or equivalent) and align the Assisted-by: footer confidence accordingly.

Verdict: BLOCK


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

View action run

…alidator ruling (the field is data-only in this diff; the behavioral execution lives in the follow-up sdk PR)
@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown

Review — PASS

Head SHA: 1773cb7cd7dc (branch: feat/spec-threaded-deploy-declared-fields)

Security screen: PASS — diff is exactly the one additive struct field the body describes; no scope mismatch, no secrets/exfiltration, no weakened guardrails, no supply-chain change, no instruction injection.

Checklist: All applicable rules PASS or NA.

  • A3 tier — the prior reviewer's BLOCK (tier inflation) is resolved: the body now claims analysed on a live system, which is correct per A3 since the new DeployDeclaredFields field is a pure data declaration whose behavior executes only in the follow-up sdk PR. The Assisted-by: footer matches the tier. Prior comment disposition: stale-superseded (current body satisfies it).
  • A1/A2 — body supplies Summary, pasted full-module gate output (all packages ok, zero FAIL), justified tier, and per-rule compliance; change class (additive contract-type field) matches the gate.
  • B16 placement — field lands on the Threaded contract type in spec/, the correct layer for a wire SHAPE. Placement: CORRECT.
  • B13 SDD — no CUE schema change, no generated files; Threaded is a hand-written contract type. N/A.
  • R2/R5/R10 — contract-first landing with the consumer named (follow-up sdk PR); additive only, nothing removed; fresh gate on committed tree.

Verdict: PASS


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

View action run

@github-actions
github-actions Bot enabled auto-merge (squash) September 6, 2026 22:15
@github-actions
github-actions Bot merged commit a5e6d46 into main Sep 6, 2026
2 checks passed
charly-auto-merge Bot added a commit that referenced this pull request Sep 6, 2026
github-actions Bot pushed a commit to opencharly/sdk that referenced this pull request Sep 6, 2026
…d #Deploy fields — the deploy-declared-fields channel (sdk #221 class) (#225)

The #222/#223 parent-disc + key-rule guards fixed the STRUCTURAL arm, but the
SUBSTRATE arm (t.DeploySubstrates) still scanned disc values by VALUE SHAPE
(discEntityPairs/isEntityValue): a declared #Deploy field whose value mapping
carries a kind-word key classified as an IN-SUBSTRATE MEMBER. The proven
repro (the canonical charly-cli ADE iterate-entity bed): a pod primary body
with iterate: {sandbox: check-agent-pod, agent: [check-agent-live-claude],
plateau_iteration: 1, ...} — `agent` is a kind word, so `iterate:` classified
as a member named "iterate", parseNode("iterate") took `agent` as ITS disc,
and the scalar `sandbox:` hard-failed "expected a mapping value, got yaml
kind 8". Renaming the key to agentsX got past the raw parse (then CUE:
field not allowed) — isolating the parse class.

Same mechanism as #223, extended to deploy substrates: membership semantics
live in the PARENT kind's declared schema — for substrates that is #Deploy's
OWN CUE schema. The new spec.Threaded.DeployDeclaredFields channel
(opencharly/spec#107, v0.2026249.2215 — the #104 StructuralDeclaredFields
twin) is consulted by the substrate branch: a pair whose KEY is a declared
#Deploy field is DATA — its value is never looked inside; every other
entity-keyed value-shape member (web:/chrome:/sidecar:) stays a member. A
substrate word with NO declared schema threaded keeps the plain value-shape
scan (the documented no-declared-schema fallback). Zero hardcoded lists.

Also pins spec v0.2026249.2215 (the channel's contract change).

Gate: go build/vet/test ./... -count=1 green on the committed tree; the
repro fixture + the full corpus (authored-depth, 8a external-structural,
TestParse_StructuralDeclaredFieldStaysData, TestNoDualMapConstruction) green.
@aitrawog
aitrawog deleted the feat/deploy-declared-fields branch September 25, 2026 19:09
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