Skip to content

feat: emit the config: plan-step verb (substitute + stage + egress-validate) - #237

Merged
github-actions[bot] merged 3 commits into
mainfrom
feat/config-step-verb-emitter
Sep 7, 2026
Merged

github-actions[bot] merged 3 commits into
mainfrom
feat/config-step-verb-emitter

Conversation

@atrawog

@atrawog atrawog commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Implements the config: plan-step verb emitter in deploykit (the schema contract landed in opencharly/spec#117; this PR consumes it).

  • tasks_emit.go: new SubstituteContent(content, vars, img) — resolves ${NAME} refs in a config body against the candy's declared var: plus the image auto-exports (USER/UID/GID/HOME) at GENERATE time; unresolved refs are a hard error. Reuses the existing TaskVarRefPattern / TaskUnresolvedRefs machinery (R3).
  • tasks_render.go: config: case — parent-dir auto-insertion (like write:), content substituted + staged content-addressed via StageInlineContent, delivered by COPY (no shell); optional validate: <kind> gates the rendered bytes through the existing Generator.ValidateEgress seam (wired to the compiled-in verb:egress provider) BEFORE staging.
  • Spec pin reconciliation: the branch started at the merged tag v0.2026250.922 and, after merging origin/main (CC-3 stage walk, feat(cutover-c3): stage-grouped + concurrent bed-member walk (kit) + all-or-nothing load validation #236), go mod tidy resolved the require to v0.2026250.929 (MVS against the merged main's module graph — newer than .922; it contains the SAME config-verb contract plus the spec#118 lint fix). The committed pin is .929; this body tracks the diff.
  • Tests: substitution (vars + auto-exports), unresolved-ref hard error, lowercase-non-match passthrough, emit renders the SUBSTITUTED content (content-addressed COPY, no heredoc RUN), validate: rejection aborts + names the schema, validate: unset skips the egress seam.

How tested

$ go build ./deploykit/ && go vet ./deploykit/
$ go test ./deploykit/ -count=1
ok  github.com/opencharly/sdk/deploykit 2.635s

The full deploykit package passes (incl. the 6 new config-verb tests, emitters, staging idempotence, and the existing write/link/download/user suites).

Rulebook compliance

  • R3: reuses TaskVarRefPattern/TaskUnresolvedRefs/StageInlineContent/EmitWrite + the ValidateEgress seam — no parallel implementations.
  • R4: no workarounds — generate-time substitution + egress validation, never a shell heredoc.
  • R7: full package test run pasted above.
  • Pin discipline: spec pinned at a merged tag (.929) — no PR-branch pins.

Change classification

  • Class: sdk emitter feature (contract consumer). Verification gate: go test ./deploykit/ full package green. Attribution: fully tested and validated.

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

…lidate)

config: <dest> renders a config file from the candy's declared values:
SubstituteContent resolves ${NAME} against var: + auto-exports at generate
time (unresolved is a hard error); the rendered bytes ride the write:
content-addressed COPY path (no shell); validate: gates them through the
ValidateEgress seam (verb:egress, bytes mode) before staging. Spec pin
bumped to v0.2026250.922 (the config-verb contract).
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown

Review — BLOCK

Head SHA: 755ace7df3478ab4e281e5e288cc45ad087fd0a4 (branch: feat/config-verb)

Change class: sdk emitter feature (Go code + tests + dependency bump).

Blocks

  1. A1 / rule 4 — spec version mismatch (body ↔ diff contradiction). The body states repeatedly that the spec is pinned to v0.2026250.922 ("spec require bumped to v0.2026250.922 (the config-verb contract)", "spec pinned to the merged tag v0.2026250.922"), and the commit message says "keep spec v0.2026250.922 for the config verb". But the CURRENT diff (go.mod) bumps github.com/opencharly/spec from v0.2026250.903 to v0.2026250.929 (and go.sum adds the v0.2026250.929 hashes). The body's accounting of the shipped change does not match the diff. The author must reconcile this — either correct the body/commit message to the actual pinned version, or explain why 929 (not the claimed 922) is the intended config-verb contract pin.

  2. A1 — "How tested" lacks pasted output. The body asserts go test ./deploykit/ -count=1 → ok github.com/opencharly/sdk/deploykit, plus go build ./... and go vet ./deploykit/ clean, but pastes no actual command output — only inline descriptions. A1 requires pasted output (not a promise) for the change-class gate. Also note the described command cd deploykit && go test ./deploykit/ is internally inconsistent (from repo root the package is ./deploykit/; cd deploykit would make ./deploykit/ resolve to a non-existent deploykit/deploykit). Provide the real command and its real output.

Notes (non-blocking)

  • Placement: CORRECT — the config: verb case is added to the deploykit emitter mechanism alongside the existing write:/link:/download: verbs; it is a generic render mechanism, not a capability, so the sdk layer is right.
  • SDD: no hand-written wire types; the change consumes spec.Op fields (Config/Content/Validate/Mode/RunAs) from the bumped spec package. No @go(-) tags or banned patterns in the diff.
  • R3/R4: reuses TaskVarRefPattern/TaskUnresolvedRefs/StageInlineContent/EmitWrite/ValidateEgress; no parallel implementations, no ad-hoc workarounds.
  • Tests: 6 new test functions match the body's "6 new config-verb tests" count and exercise the new code paths.

Verdict: BLOCK


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

View action run

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown

Review — PASS

Head SHA: 364c0707887e4df8eb3b06116a984cd0b49dc06e (branch: feat/config-verb)

Security screen: PASS — no secrets/exfiltration/network, no weakened guardrails, spec pin is a merged tag (.929) not a PR-branch pin, no scope mismatch (diff matches description).

Checklist: All applicable rules PASS or NA.

Prior BLOCK findings re-derived against CURRENT state:

  • Spec version mismatch — RESOLVED. Body now explains the .922→.929 reconciliation (MVS after merging origin/main, spec#118 lint fix); diff shows .929, body tracks .929. Consistent.
  • "How tested" pasted output — RESOLVED. Body now pastes go test ./deploykit/ -count=1 → ok github.com/opencharly/sdk/deploykit 2.635s; package path matches repo, output internally consistent.

Placement CORRECT (config: verb added to the deploykit emitter mechanism alongside write:/link:/download: — generic render mechanism, not a capability). R3/R4 honored (reuses TaskVarRefPattern/TaskUnresolvedRefs/StageInlineContent/EmitWrite/ValidateEgress; no shell heredoc). 6 new tests match body count and exercise the new code paths. SDD clean (consumes spec.Op fields, no hand-written wire types, no @go(-)). Attribution footer in exact form; "fully tested and validated" justified (new code paths executed in test suite).

Verdict: PASS


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

View action run

@github-actions
github-actions Bot enabled auto-merge (squash) September 7, 2026 09:43
@github-actions
github-actions Bot merged commit 6f91221 into main Sep 7, 2026
1 check passed
charly-auto-merge Bot added a commit that referenced this pull request Sep 7, 2026
@atrawog
atrawog deleted the feat/config-step-verb-emitter branch September 7, 2026 14:21
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