Skip to content

refactor(spec)!: #55 import-purity — capability/matcher/value-type relocations + testkit + exec-hang fix - #13

Merged
atrawog merged 10 commits into
mainfrom
feat/55-import-purity-spec
Aug 3, 2026
Merged

atrawog merged 10 commits into
mainfrom
feat/55-import-purity-spec

Conversation

@atrawog

@atrawog atrawog commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary of changes

The producer leg of the #55 "charly imports ONLY spec" program: feat/55-import-purity-spec (bedcec9→715fafb). Per-commit accounting (files enumerated in CHANGELOG/2026.215.1928.md, placeholder CalVer, H1 filename-matched):

  • 4b5d145 fix(exec): Wait-monitor test pipe deadlock — concurrent stdout/stderr drain (sync.WaitGroup) + a 30s bound on the one unbounded subprocess test (exec/deploy_executor_process_race_test.go, exec/deploy_executor_process_test.go).
  • 05af668 feat(testkit): CopyCandyFixReplace (testkit/candy_fixture.go).
  • 001efee feat(spec): value types — BuildResolvedBox, BundleConfig (+Lookup/LookupKey), DeployRecord/CandyRecord/StepRecord, LedgerSchemaVersion, CloudInitRuntimeParams (additive; all fields already spec-native).
  • 2332bb6 test: LocalPkgInstallStep IR-contract test relocated from charly (spec/install_step_vocab_test.go).
  • 09e8dab feat: spec/capability (ProvidedCapability + StepContract + CLISubcommand, cuelang-free) + spec/spec/matchers.go{,_test.go} + climodel CLISubcommand re-export.
  • ec589dc docs: kernelFloor/residueOwner comment sweep. 58fc499+715fafb: the CHANGELOG entry + its H1 format fix.

Change class

charly-or-sdk Go (cross-repo producer leg). Chain: spec (this) → sdk#118 → plugins#123 (MERGED v2026.215.1738) / pkg-arch#6 (MERGED v2026.215.1737) → charly#204.

How R10-tested — exact gate, commands, and pasted output

  • The gate for this change class: the standalone module gate (build/vet/gofmt/lint/test, fresh clone) + the super terminus roster (charly#204) whose binary links THIS spec content via the gitlink pin.
  • Eval beds run: in charly#204's terminus — check-pod | pod | ok | 13 | ~200s · check-group | group | ok | 7 | ~300s · check-sidecar-pod | pod | ok | 17 | ~600s · check-builder-vm | vm | ok | 10 | ~500s · check-local-vm | vm | ok | 8 | ~503s · check-k3s-vm | vm | ok | 8 | ~380s — all exit 0, ONE binary 2026.215.1641, launched concurrently (runs 2026.215.1641–1654 under .check/).
  • Fresh rebuild: the roster's task build:binary compiled charly against this spec content (R9); the module itself builds from the fresh clone below.
  • Did the CHANGED code path execute live? Yes — relocated types/functions compile into and are exercised by the spec+sdk+charly suites and the live beds; the exec fix's test ran under -race -count=5 below (plus the commit's own 30x -race / 100x -count runs).
  • Concurrency: N/A for the contract module itself; the exec-test FIX is the concurrency fix, proven under -race below.
$ git clone https://github.com/opencharly/spec.git && git checkout feat/55-import-purity-spec
$ go build -buildvcs=false ./... && go vet -buildvcs=false ./... && gofmt -l . && go test -buildvcs=false -count=1 ./...
ok  	github.com/opencharly/spec/climodel	0.030s
ok  	github.com/opencharly/spec/container	0.004s
ok  	github.com/opencharly/spec/exec	7.661s
ok  	github.com/opencharly/spec/exitcode	0.002s
ok  	github.com/opencharly/spec/hostenv	0.005s
ok  	github.com/opencharly/spec/internal/wiregen	0.024s
ok  	github.com/opencharly/spec/ops	0.004s
ok  	github.com/opencharly/spec/phase	0.002s
ok  	github.com/opencharly/spec/proc	1.301s
ok  	github.com/opencharly/spec/refs	3.836s
ok  	github.com/opencharly/spec/spec	1.077s
ok  	github.com/opencharly/spec/transport	0.248s
GATE_EXIT=0
$ GOLANGCI_LINT_CACHE=<fresh> golangci-lint run ./...
0 issues.
$ go test -buildvcs=false -race -count=5 ./exec/
ok      github.com/opencharly/spec/exec 39.550s
(gofmt -l printed nothing)

Attribution tier

analysed on a live system — the relocated/changed code executed live (fresh-clone suite + -race runs + the super roster's live beds); fully tested and validated is claimed only by charly#204, which owns the fresh-rebuild bed evidence.

Harness rulebook compliance

  • R0: skills loaded before work (go, plugin, strict-policy, git-workflow) across the program's cones.
  • R1: the exec hang RCA'd to its mechanism (64KiB stderr pipe backlog, /proc-evidenced) — no retry framing; zero warnings in every pasted gate.
  • R2: every surfaced issue fixed in-cutover (the H1 + template findings of rounds 1–2 fixed in place on this branch).
  • R3: no duplication — relocations are verbatim moves; sdk re-exports (sdk#118) keep single definitions.
  • R4: the deadlock fix is a sync primitive (WaitGroup + context bound), no sleeps/retries.
  • R5: hard cutover — grep self-tests clean (kernelFloor/residueOwner → CHANGELOG-only; no dangling old homes: sdk#118 aliases every relocated symbol).
  • R6: no destructive tree ops on shared state (all work in fresh clones/worktrees; no stash on submodule trees).
  • R7: unit tests did NOT substitute for runtime — the composition ran the 6-bed roster (above).
  • R8: N/A — no Containerfile/OCI-label surface in a contract module.
  • R9: the roster's binary was rebuilt from source against this content (task build:binary; charly version 2026.215.1641).
  • R10: disposable-only beds, fresh-rebuild update steps included, zero warnings — evidence table above + charly#204.
  • RDD: the relocations were spiked before authoring (the value-type spike proved ResolvedBox end-to-end; the capability-slice spike proved cuelang-freedom).
  • ADE: N/A — no candy plan changes.
  • SDD: no new hand-written wire type — relocated types are the catalogued pre-existing gengotypes json:"-" exception class, moved verbatim.
  • Hard cutover: one phase; no transitional path ships (the sdk aliases are the PERMANENT re-export architecture, not shims).
  • Kernel/plugin boundary: placement CORRECT — value/contract types belong in spec (the lowest shared layer).
  • Disposable-only autonomy: all bed runs on disposable: true targets.
  • Clean architecture + Go gates: gofmt/vet/lint pasted above, 0 issues.
  • CHANGELOG: staged with the filename-matched H1 (715fafb).

Assisted-by: Claude Code Claude Fable 5 (analysed on a live system)

https://claude.ai/code/session_015CXB8CkzwZeXPzbqKjsuYj

atrawog added 7 commits August 2, 2026 08:41
… to spec (import-purity)

- spec/capability: new cuelang-free slice — ProvidedCapability + StepContract (from sdk/schema.go) + CLISubcommand (from spec/climodel/validate.go; plain authoring struct decoupled from ValidateGenerated's cuelang per Rule 2). imports only spec/spec (stdlib-only) → no cuelang/grpc/go-plugin, leaf → no cycle.
- spec/climodel/validate.go: CLISubcommand definition → re-export alias (type CLISubcommand = capability.CLISubcommand); cuelang confined to ValidateGenerated. Existing consumers (sdk/schema.go alias, sdk/kong_reflect.KongSubcommands, TestCLISubcommandFields) compile UNCHANGED.
- spec/spec/matchers.go: MatchAll + matchOne + matchNumeric + MatchValueString(s) relocated from sdk/matchers.go alongside spec.Matcher (union_types.go); stdlib-only (regexp/strconv/fmt/strings), no heavy dep. 2 private-matchOne tests moved to spec/spec/matchers_test.go (private symbol cannot be reached cross-package).
- spike-proven: spec/capability compiles standalone, drags NO heavy dep, no import cycle. spec/exec test timeout pre-existing (RCA'd: identical on clean base bedcec9, unrelated to this change).
- sdk re-export (leg 2) + super repoint of 2 charly root-test files (leg 3) follow.

Assisted-by: Claude Code glm-5.2:cloud (analysed on a live system)
…regression test

TestStartProcessWaitMonitorNeverClosesConsumerPipes read stdout to EOF
before touching stderr, but its fixture script ("head -c 1048576
/dev/zero; head -c 65536 /dev/zero >&2") runs both commands under one
sh, so sh's stdout fd stays open across both. Once the second head's
65536-byte write fills the (default-64KiB) stderr pipe with nothing
draining it, head blocks in write(), sh blocks waiting on head, and
stdout's write end never closes -- io.ReadAll(p.Stdout()) then never
sees EOF. Live-reproduced via `/proc` (head parked in anon_pipe_write,
sh in do_wait) and a genuine `FAIL github.com/opencharly/spec/exec
369.895s` before a SIGQUIT goroutine dump was taken, matching the
reported startCommandProcess ~600s hang (Go's default -timeout is
exactly 10m). Fix: drain stdout and stderr concurrently, mirroring the
pump pattern testkit.StartSSHProcessServer already uses for the same
reason. Verified clean over 3 fresh full-suite gate runs, 30x under
-race, and 100x at -count=100 with zero recurrence.

Also bound TestSSHProcessExecutorsPreserveRemoteLaunchAndPipes's real
OpenSSH subprocess with a context deadline: it was the only
real-subprocess test in the module with none, unlike its siblings
(TestGRPCOverRealOpenSSH, TestGRPCOverProcessTransports), so a stalled
handshake there had nothing to unblock it either.

Assisted-by: Claude Code Claude Sonnet 5 (analysed on a live system)
…out-of-process plugin e2e tests

Extracted from charly/plugin_kind_prescan_e2e_test.go (the #55 decoupling cone,
Batch D): the helper stages a candy module tree into a temp project, rewriting
its go.mod sdk/spec replace directives to absolute repo-submodule paths so an
out-of-process plugin build resolves them. It spells the sdk/spec import paths
as string literals (go.mod text rewriting, not a Go import), which is why it
lives in spec/testkit rather than charly/ — keeping it in charly/ would defeat
the decoupling gate's "no charly/*.go source spells the sdk import path as a
literal" requirement even though the file makes no actual Go import of either
module.
…/ledger records/CloudInitRuntimeParams

RDD-spiked additive move (spec leg of a 3-repo B2): four plain value/contract
types relocate to spec/spec ahead of their sdk-side aliasing. Every field on
each type already resolved to a spec.* type before this change, so each move
is a verbatim, zero-behavior relocation:

- BuildResolvedBox: the render-time embedding wrapper over the generated
  ResolvedBox (was sdk/buildkit.ResolvedBox) — its 9 host-render-cache
  fields (DistroConfig/DistroDef/BuilderConfig/InitSystem/InitDef/CandyCaps/
  BakedMetadata/RenderCandyOrder/ActiveInits) are all spec.* types already;
  it carries zero buildkit-only content and zero methods.
- BundleConfig (was sdk/deploykit.BundleConfig) + its two PURE methods
  (Lookup/LookupKey, plain map access). The three methods that reach
  sdk/kit (DeployedContainerNames/OccupiedHostPorts/GlobalEnvForImage) do
  NOT move — spec can never import sdk/kit; they become deploykit free
  functions in the sdk leg.
- DeployRecord/CandyRecord/StepRecord + LedgerSchemaVersion (was
  sdk/kit's install-ledger record shapes) — every field already resolved
  to spec.StepKind/Scope/Venue/ReverseOp.
- CloudInitRuntimeParams (was sdk/vmshared) — a plain 4-field struct with
  zero methods; RenderCloudInit (the render function, genuine behavior)
  stays in vmshared unchanged.

Verified: spec builds standalone, full spec test suite green (including
TestGenReproducible), gofmt/vet clean. This is the first leg of a 3-repo
B2 (spec -> sdk -> super); sdk aliases onto these types next.

Assisted-by: Claude Code claude-sonnet-5 (analysed on a live system)
…K3 cone2)

TestLocalPkgInstallStepIR asserted charly/localpkg_test.go's copy against a
pure spec.LocalPkgInstallStep with zero charly-core dependency. Relocated
verbatim to spec/spec/install_step_vocab_test.go (its owning package) as part
of the K3 render/build-engine test-import-purity closure; no duplicate
existed anywhere in the tree before this move.

Assisted-by: Claude Code Claude Sonnet 5 (analysed on a live system)
…step 7)

The provider_carriers.go header cited the charly/kernel_manifest_floor_test.go
tables (kernelFloor/residueOwner) as the classification method that moved this
content out of charly/install_plan.go — those tables are deleted in the
companion #55 step-7 cutover (replaced by an import-surface assertion), so the
reference is reworded to name the boundary-law classification generically
instead of the now-removed identifiers (R5 claim-keyed sweep).

Assisted-by: Claude Code claude-sonnet-5 (documentation reviewed)
@atrawog

atrawog commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

pr-validator — CHANGES REQUESTED ❌

Change class: charly-or-sdk Go (spec contract module — a pure-Go value-type relocation + a test-hang fix, no candy/box config, no direct deploy/check-bed surface of its own).

Independently re-cloned feat/55-import-purity-spec at ec589dc (matches remote refs/heads/feat/55-import-purity-spec) and re-derived everything myself — nothing here is taken on the author's word.

What I verified directly (all green)

  • go build ./... — clean.
  • gofmt -l . — empty.
  • go vet ./... — clean.
  • go test ./... — all packages green, including exec (7.7s).
  • golangci-lint run ./... (isolated GOLANGCI_LINT_CACHE) — 0 issues.
  • The exec/deploy_executor_process_race_test.go fix: re-ran TestStartProcessWaitMonitorNeverClosesConsumerPipes under -race (pass) and -count=50 (pass, no hang) — the concurrent stdout/stderr drain is a genuine synchronization-primitive fix for a real classic-exec.Cmd deadlock (sequential-read-of-two-pipes), not a sleep/retry (R4 compliant), and the RCA in the code comment is a real root-cause explanation (R1 compliant).
  • The TestSSHProcessExecutorsPreserveRemoteLaunchAndPipes bounded-context change mirrors an existing sibling pattern in the same module (R3 — no new duplication).
  • git grep -n "kernelFloor\|residueOwner" — clean (no stale references left from the doc-comment sweep commit).
  • Type-relocation claims cross-checked against opencharly/sdk main (schema.go): ProvidedCapability/StepContract are still full definitions there (not yet aliased) — confirms this spec PR is genuinely the not-yet-landed producer leg, and the relocated capability.ProvidedCapability/capability.StepContract struct shapes match sdk/schema.go's current field-for-field, docstring-for-docstring. Consistent with sibling PR sdk#118's description (re-exports ProvidedCapability/StepContract/MatchAll/ResolvedBox/BundleConfig/ledger-records/CloudInitRuntimeParams onto spec) — the two PRs interlock correctly.
  • No new charly/*.go in this diff (different repo), so the ARCHITECTURE GATE's per-item alias/kit-import trace is structurally N/A here; placement-wise, moving these value/wire-adjacent types further into spec (the lowest-dependency shared contract layer, below both sdk and charly core) is the CORRECT outward direction the boundary law wants — placement: CORRECT.
  • The relocated non-CUE-sourced types (BuildResolvedBox, BundleConfig, ledger records, CloudInitRuntimeParams) are pre-existing hand-written value types moved verbatim (not new), and BuildResolvedBox's own comment cites the already-catalogued gengotypes json:"-" limitation (the established spike-proven exception class) — not a fresh SDD violation.

Blocking findings

  1. Item 1 — Description completeness FAILS. The PR body is a bare commit-log narrative. Comparing against opencharly/.github/.github/PULL_REQUEST_TEMPLATE.md (the mandatory, org-wide template), this PR body supplies none of the required sections: no explicit Change class line, no How R10-tested block with pasted command output (the body's only R10 claim — "spec standalone build+test green throughout" — is an assertion, not a paste), no Attribution tier justification distinct from the trailer, and no Harness rulebook compliance section at all (zero per-rule R0–R10 / RDD-ADE-SDD / hard-cutover / kernel-boundary / disposable-only / clean-architecture evidence lines). Per the pr-validator spec: "An empty, template-only, or partially-filled body FAILS; the burden is on the PR to supply the evidence, never on you to infer it." My own re-derivation above happens to confirm the underlying work is sound, but that does not discharge the PR's own obligation to supply the evidence in its body.
  2. Item 18 — CHANGELOG missing. git diff main...HEAD --stat -- CHANGELOG is empty — no CHANGELOG/<placeholder-CalVer>.md staged. Every prior #55 spec leg in this repo's history (CHANGELOG/2026.213.1726.md, 2026.213.2047.md, 2026.214.0434.md, …) carries its own entry; this PR breaks that pattern. This is a runtime-tier Go change (not docs-only), so a CHANGELOG entry is mandatory (a placeholder CalVer is acceptable — I finalize it at merge).
  3. Item 3 (attribution tier) — unsupported by the body's own evidence, for the same reason as (1): the claimed analysed on a live system tier has no pasted proof in the PR body to justify it (my independent re-run happens to support that tier, but the PR itself must carry the evidence).

Comments considered

None — the PR carries zero comments.

Cross-PR interactions considered

  • sdk#118 (feat/55-import-purity-sdk) — the consumer leg; its description confirms it re-exports exactly the types this PR relocates (ProvidedCapability/StepContract/MatchAll/ResolvedBox/BundleConfig/ledger-records/CloudInitRuntimeParams). Depends on this PR merging first — verified-non-blocking for THIS PR's own correctness (no action needed here; sdk#118 will need gh pr update-branch/re-pin once this merges, which is that PR's own concern).
  • plugins#123 (feat/55-import-purity-plugins) — docs-only stale-claim sweep for the same program; no file overlap with this PR. verified-non-blocking.
  • pkg-arch#6 — unrelated PKGBUILD build-flag fix. verified-non-blocking.
  • charly#204 (feat/55-import-purity-super) — the terminus leg carrying the full R10 bed-roster narrative this PR's body defers to. verified-non-blocking for this PR (its own gate is correctly scoped to go build/go test/lint on a pure-Go contract module — there is no disposable bed that composes a bare spec module; the full bed roster belongs at the terminus where an actual deployable artifact exists). No coordination comment needed — no conflict.
  • charly#203 (docs-site) — no overlap, unrelated.

Decision

FAIL. The underlying code change is sound (verified independently: build/test/vet/lint clean, the race-condition fix is a genuine root-cause synchronization fix proven under -race and repetition, the type relocations verbatim-match their sdk origin and interlock correctly with the sibling sdk#118 PR, no stale references, correct architectural direction). But the PR fails the mandatory template + evidence-paste requirement (item 1) and ships no CHANGELOG/<CalVer>.md entry (item 18) — both explicit, non-negotiable gates regardless of code quality. To fix: rewrite the PR body against opencharly/.github/.github/PULL_REQUEST_TEMPLATE.md in full (change class, pasted go build/go test/golangci-lint/race-test output, the per-rule Harness rulebook compliance section, attribution tier justified by that pasted evidence), and add a placeholder CHANGELOG/<CalVer>.md entry following this repo's existing #55 leg format. Push both as a new commit on feat/55-import-purity-spec (no force-push) — the status resets and I re-run.

Assisted-by: Claude Code Claude Sonnet 5 (analysed on a live system)

…writes at merge)

Assisted-by: Claude Code Claude Fable 5 (documentation reviewed)
@atrawog

atrawog commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

pr-validator — CHANGES REQUESTED ❌ (round 2)

Change class: charly-or-sdk Go (spec contract module — pure-Go value-type relocations + a test-hang fix; no candy/box config, no deploy/check-bed surface of its own).

Independently re-cloned feat/55-import-purity-spec at 58fc499646332cc97cbaa0a2689ae5df1b58f6a2 (matches git ls-remote origin refs/heads/feat/55-import-purity-spec — the authoritative head, not gh pr view's lagging field) into a fresh, isolated clone and re-derived everything myself — nothing here is taken on the author's or round-1's word.

What I verified directly (all green)

  • go build -buildvcs=false ./... — clean.
  • go vet -buildvcs=false ./... — clean.
  • gofmt -l . — empty.
  • go test -buildvcs=false -count=1 ./... — all packages green, incl. exec (7.6s).
  • golangci-lint run ./... (isolated GOLANGCI_LINT_CACHE=/tmp/val-spec2-lintcache) — 0 issues.
  • TestStartProcessWaitMonitorNeverClosesConsumerPipes re-run under -race → PASS, and at -count=50 → PASS (0 recurrence). The commit message for 4b5d145 documents an even deeper RCA (30x under -race, 100x at -count=100, live /proc evidence of the anon_pipe_write deadlock, a genuine 369.9s hang reproduced pre-fix) — my independent re-run is consistent with that record. The fix (concurrent stdout/stderr drain via sync.WaitGroup, mirroring the existing testkit.StartSSHProcessServer pump pattern) is a genuine synchronization-primitive fix, not a sleep/retry (R4-compliant), with a real root-cause explanation (R1-compliant).
  • git grep -n "kernelFloor\|residueOwner" (tracked + working tree) — the only hit is CHANGELOG/2026.215.1928.md:21, itself describing the historical sweep — clean per R5 (spec/provider_carriers.go's comment was correctly updated to "kernel/plugin boundary-law classification").
  • Diff-read of all 5 new/changed non-test spec files (capability/capability.go, spec/build_resolved_box.go, spec/bundle_config.go, spec/cloud_init_runtime_params.go, spec/ledger_records.go, spec/matchers.go, climodel/validate.go): every relocated type is a verbatim move with a clear provenance comment; the non-CUE-sourced value types cite the already-catalogued gengotypes json:"-" exception (matches /charly-internals:go "Generation coverage"); ProvidedCapability/StepContract/CLISubcommand are the pre-existing SDK-facing authoring forms distinct from their already-generated pb.* proto wire counterparts (unchanged design, verbatim relocation — not a new hand-written wire type). No secrets, no exfiltration, no scope mismatch, no weakened guardrail, no supply-chain change (T1–T4 clean).
  • Cross-checked the PR's own load-bearing R10 claim ("composition proven by the super terminus roster, charly#204's table + logs") against real evidence on disk, since this PR defers its entire composition-proof to that claim instead of running its own bed. Located the actual run artifacts in /tmp/super-leg-worktree (a worktree on feat/55-import-purity-super @ 1af9926d, binary 2026.215.1641 — matches the PR's claimed binary exactly) and opened every claimed bed's summary.yml:
    • check-pod (nested box/fedora/.check) @ 2026.215.1648: 13/13 steps ok: true — matches.
    • check-group @ 2026.215.1654: 7/7 steps ok: true — matches.
    • check-sidecar-pod @ 2026.215.1649: 17/17 steps ok: true — matches.
    • check-builder-vm @ 2026.215.1649: 10/10 steps ok: true — matches.
    • check-local-vm @ 2026.215.1649: 8/8 steps ok: true — matches.
    • check-k3s-vm @ 2026.215.1641: 8/8 steps ok: true — matches.
      All six run-calvers cluster within a 13-minute launch window with overlapping multi-minute durations — consistent with the claimed concurrent fan-out. This claim is genuinely verified, not fabricated — initially concerning since none of these bed directories exist in the main /home/atrawog/Atrapub/o/charly checkout, but the runs are real, just in a sibling worktree.
  • Placement: none of this diff touches charly/*.go (different repo), so the mechanical alias/kit-import trace is structurally N/A. Substantively, relocating these value/wire-adjacent types further into spec — the lowest-dependency shared contract layer, below both sdk and charly core — is the CORRECT outward direction the boundary law/counterfactual test wants. placement: CORRECT.

Blocking findings

  1. CHANGELOG H1 heading fails the mandatory byte-equal-CalVer check (item 18). head -1 CHANGELOG/2026.215.1928.md is:
    # CalVer placeholder — the pr-validator rewrites at merge
    
    The strict check requires # <filename-without-.md> — <title>, i.e. # 2026.215.1928 — <title> — byte-equal CalVer. The actual heading uses the literal string "CalVer placeholder" instead of the placeholder digits, and "the pr-validator rewrites at merge" is a note-to-self, not a real title describing the change. This is exactly the "filename↔H1 divergence" class the git-workflow skill names as a recurring incident (it has already shipped once in this repo's own history — CHANGELOG/2026.214.0434.md's H1 reads # 2026.214.0900 — …, a mismatched historical precedent, not something to repeat). I cannot silently "fix" this at merge by find-replacing the CalVer number, because there is no real title text to preserve — the author must supply one (e.g. mirroring the H2 subject: # 2026.215.1928 — #55 import-purity: capability/matcher/value-type relocations + testkit + exec-hang fix).
  2. Rule-compliance section still incomplete against the mandatory org template (item 1), and the R10-tested block is missing pasted lint/race evidence. Round 1 explicitly required "the per-rule Harness rulebook compliance section (R0–R10 / RDD-ADE-SDD / hard-cutover / kernel-boundary / disposable-only / clean-architecture evidence lines)". The current body's "## Rule compliance" section answers only R1, R3/R4, R5, R10, and SDD — it still omits R0, R2, R6, R7, R8, R9, RDD (as its own line, distinct from SDD), ADE, Hard cutover, Kernel/plugin boundary law, Disposable-only autonomy, Clean architecture + Go gates, and CHANGELOG, each of which the template requires as its own line with either a one-line HOW or an explicit N/A — <reason> (nearly all of these ARE legitimately N/A for a bare contract-module PR — but the template requires that be stated, not omitted; item 1: "an unanswered applicable rule FAILS"). Separately, the "How R10-tested" paste block includes go build/go vet/gofmt/go test output but not the golangci-lint run output (0 issues, independently confirmed by me) nor the -race / repeated-run evidence for the exec fix — the body instead references "see the commit message" / "in its RCA" rather than pasting it, which is the same "described-but-unrun-in-THIS-evidence" gap item 13d warns against (my own re-run happens to confirm the claim is true, but the PR's own body must carry it).

Comments considered

  • Round-1 pr-validator FAIL comment (https://github.com/opencharly/spec/pull/13#issuecomment-5169601288) — verified-blocking at the time; re-verified against the current head: the CHANGELOG-missing finding is now addressed (file exists, filename format correct) but a new defect surfaced in that same file (the H1 heading); the template-completeness finding is partially addressed (real progress: Change class, How R10-tested with paste, Attribution tier, 5 rule-compliance lines added) but not fully closed. Disposition for this round: superseded by the two findings above.

Cross-PR interactions considered

  • sdk#118 (feat/55-import-purity-sdk) — the consumer leg; depends on this PR merging first. verified-non-blocking for this PR's own correctness (its own concern once this merges).
  • plugins#123 (feat/55-import-purity-plugins) — docs-only stale-claim sweep, no file overlap. verified-non-blocking.
  • pkg-arch#6 — unrelated PKGBUILD build-flag fix. verified-non-blocking.
  • charly#204 (feat/55-import-purity-super) — the terminus leg; its claimed 6-bed roster is the composition evidence this PR's own R10 rests on. Independently verified genuine (see above) — verified-non-blocking for this PR (no coordination comment needed; the evidence checks out).
  • charly#203 (docs-site) — no overlap, unrelated.

Decision

FAIL. The underlying code is sound — build/vet/gofmt/test/lint all independently clean, the exec deadlock fix is a genuine root-cause synchronization fix verified under -race and repetition, the type relocations verbatim-match their sdk origin, the terminus composition claim this PR rests on is genuinely verified on disk, and the architectural placement is correct. But the PR still fails two mechanical, checklist-mandated gates: (1) the CHANGELOG's H1 heading does not byte-match its own filename's CalVer and instead carries a placeholder note as its "title" — needs a real title; (2) the rule-compliance section, while much improved, still omits several rules the template requires to be answered (even if trivially N/A), and the R10-tested block should paste the lint + race-specific output directly rather than referencing it by description. Both are small, mechanical fixes — push them as a new commit on feat/55-import-purity-spec (no force-push); the status resets and I (or the next fresh validator) re-run.

Assisted-by: Claude Code Claude Sonnet 5 (analysed on a live system)

…al title (round-2 validator finding)

Assisted-by: Claude Code Claude Fable 5 (documentation reviewed)
@atrawog

atrawog commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

pr-validator — APPROVED ✅ (round 3)

Change class: charly-or-sdk Go (spec contract module — pure-Go value-type relocations + a test-hang fix; no candy/box config, no deploy/check-bed surface of its own).

Independently re-cloned feat/55-import-purity-spec at 715fafbd8d3fa66d8a9fd1df4e4feee2094e9d56 (matches git ls-remote origin refs/heads/feat/55-import-purity-spec) into a fresh, isolated clone (/tmp/val-spec3/repo) and re-derived everything myself — nothing here is taken on the author's or prior rounds' word.

Round-2 blocking findings — both verified fixed

  1. CHANGELOG H1 heading. head -1 CHANGELOG/2026.215.1928.md now reads:
    # 2026.215.1928 — refactor(spec)!: #55 import-purity — capability/matcher/value-type relocations + testkit + exec-hang fix
    — byte-equal CalVer, real descriptive title (matches the PR title). Filename 2026.215.1928.md confirmed. FIXED.
  2. Rule-compliance template completeness + pasted evidence. The PR body's "Harness rulebook compliance" section now answers every applicable rule as its own line: R0–R10, RDD, ADE, SDD, Hard cutover, Kernel/plugin boundary, Disposable-only autonomy, Clean architecture + Go gates, CHANGELOG — each with a one-line HOW or an explicit N/A — <reason> (R8/ADE correctly N/A for a contract module with no Containerfile/candy-plan surface). The "How R10-tested" block now pastes the golangci-lint run ./... output (0 issues.) and the -race -count=5 output (ok github.com/opencharly/spec/exec 39.550s) directly, not just by description. FIXED.

What I verified directly, this round (all green)

  • go build -buildvcs=false ./... — clean.
  • go vet -buildvcs=false ./... — clean.
  • gofmt -l . — empty.
  • go test -buildvcs=false -count=1 ./... — every package green, incl. exec (7.65s).
  • golangci-lint run ./... (isolated GOLANGCI_LINT_CACHE=/tmp/val-spec3/lintcache, fresh per-worktree cache) — 0 issues.
  • TestStartProcessWaitMonitorNeverClosesConsumerPipes re-run under -race → PASS, and independently at -count=20 -race (targeted) → PASS (0 recurrence), plus the full ./exec/... -race -count=5 suite → PASS (39.51s). The fix (concurrent stdout/stderr drain via sync.WaitGroup) is a genuine synchronization-primitive fix for a classic exec.Cmd multi-pipe deadlock (sequential-read starves the peer pipe) — R4-compliant, not a sleep/retry — with a real root-cause explanation in the diff comment (R1-compliant, matching the commit's documented 30x-race/100x-count//proc RCA).
  • The TestSSHProcessExecutorsPreserveRemoteLaunchAndPipes bounded-context addition mirrors the existing sibling real-subprocess-test deadline pattern already in this module (transport.TestGRPCOverRealOpenSSH) — R3-compliant, no new duplication.
  • git grep -n "kernelFloor\|residueOwner" (tracked) — only hit is CHANGELOG/2026.215.1928.md:19, itself narrating the historical sweep. Clean per R5.
  • Read all 8 new/changed non-test spec files in full (capability/capability.go, spec/build_resolved_box.go, spec/bundle_config.go, spec/cloud_init_runtime_params.go, spec/ledger_records.go, spec/matchers.go + _test.go, climodel/validate.go's diff, testkit/candy_fixture.go, spec/install_step_vocab_test.go, spec/provider_carriers.go's doc-only diff): every relocated type is a verbatim move whose fields already resolve to spec-native/CUE-generated types, using the catalogued gengotypes json:"-" exception (per /charly-internals:go "Generation coverage") — no new hand-written wire type, no new @go(-) def, per-plugin schema n/a (contract module, no plugin here). SDD gate (item 12) clean.
  • Security screen (T1–T4): no secrets/exfiltration, no scope mismatch (every file matches the PR's own commit-by-commit accounting), no weakened guardrail, no supply-chain change, no embedded instruction-to-validator anywhere in commit messages/comments/code. Clean.
  • Re-cross-checked the composition-proof claim (this PR defers its own R10 composition evidence to charly#204's terminus roster): the /tmp/super-leg-worktree bed-summary evidence round 2 verified on disk ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], all ok: true, all step-counts matching) is still present and unchanged — same run-calvers, same binary 2026.215.1641. No new claim to re-verify this round.
  • Placement (item 15): no charly/*.go touched (different repo) — mechanical alias/kit-import trace structurally N/A. Substantively, relocating pure value/contract types further into spec (the lowest shared dependency layer, below both sdk and charly core) is the CORRECT outward direction. placement: CORRECT.
  • Diff scope unchanged since round 2 except the two CHANGELOG/body-only fix commits (58fc499→715fafb) — no new source files, no new behavior introduced this round.

Comments considered

  • Round-1 FAIL (#issuecomment-5169601288) — verified-non-blocking now: both its findings (missing CHANGELOG, template incompleteness) were addressed across rounds 1–2.
  • Round-2 FAIL (#issuecomment-5169750441) — verified-blocking at the time; both named findings (H1 heading, rule-compliance completeness + pasted lint/race evidence) independently confirmed FIXED this round (see above). Disposition: superseded — no longer blocking.

Cross-PR interactions considered

  • sdk#118 (feat/55-import-purity-sdk, OPEN) — the consumer leg; depends on this PR merging first. verified-non-blocking for this PR's own correctness.
  • plugins#123 — MERGED (v2026.215.1738), no longer open, no interaction.
  • pkg-arch#6 — MERGED (v2026.215.1737), no longer open, no interaction.
  • charly#204 (feat/55-import-purity-super, OPEN) — the terminus leg; its 6-bed roster is this PR's composition evidence, independently re-confirmed present and unchanged on disk. verified-non-blocking.
  • No other open PRs in opencharly/spec besides this one.

Decision

PASS. Both round-2 blocking findings are verified fixed at 715fafb: the CHANGELOG H1 now byte-matches its filename's CalVer with a real descriptive title, and the rule-compliance section now answers every applicable rule with the mandated evidence (including pasted lint + race output). Every other item — build/vet/gofmt/test/lint (all independently re-run clean), the exec-deadlock fix (genuine sync-primitive fix, RCA'd, re-verified under -race and repetition), R5's grep self-test, SDD's CUE-source mandate (verbatim relocations under the catalogued exception, no new hand-written wire type), the composition-proof cross-check against the terminus roster's on-disk evidence, and architectural placement (CORRECT — outward into spec) — is compliant. Proceeding to Phase 3: finalize the merge-time CalVer, merge (squash), and tag.

Assisted-by: Claude Code Claude Sonnet 5 (analysed on a live system)

pr-validator Phase 3: rename the placeholder CHANGELOG entry to the
merge-time CalVer and rewrite its H1 to match byte-for-byte.

Assisted-by: Claude Code Claude Sonnet 5 (analysed on a live system)
@atrawog
atrawog merged commit 04c2754 into main Aug 3, 2026
@atrawog
atrawog deleted the feat/55-import-purity-spec branch August 3, 2026 17:50
@atrawog

atrawog commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

Merged + tagged. Squash-merged as 04c2754b6d66c3c48aeb940763e0fa8cfbcd20b2 on main, tagged v0.2026215.1748. CHANGELOG finalized as CHANGELOG/2026.215.1748.md (H1 byte-matches). Trailer verified on the fetched merge object: Assisted-by: Claude Code Claude Sonnet 5 (analysed on a live system).

This unblocks sdk#118.

Assisted-by: Claude Code Claude Sonnet 5 (analysed on a live system)

atrawog added a commit that referenced this pull request Aug 4, 2026
… entry

Round-1 review findings, all three mine.

deploy_executor.go:207 said "the host target's --yes". There is no --yes flag —
`charly bundle add --yes` exits 80. The field is EmitOpts.AssumeYes and its flag
is --assume-yes. This is the SAME misconception the PR exists to correct, about
the SAME field, in the SAME repo: my sweep fixed the sentence I was looking at
and never asked where else the belief lived. The neighbouring --dry-run is
accurate, since DryRun derives to --dry-run under either tag form.

Re-swept claim-keyed over all eight known-wrong spellings, instrument asserting
what it read: 276 files enumerated, 276 read, 0 failures. Two hits remain, both
inside the corrected comment itself, both stating that --yes/--force are NOT
accepted — correct negatives rather than surviving claims.

Added CHANGELOG/2026.216.0717.md. This repo keeps 14 tags and 14 entries; the
immediately preceding link in this same chain shipped one for a change of the
same class and size, and task #13 already tracks a missing spec entry. Landing
another would compound a known problem.

Corrected the tag count: 326 -> 328. The tree says 328
(`git grep -o 'long:"' main | wc -l`), which is what the tracking task recorded;
I carried 326 from a report without re-deriving it. It appears only in
narrative, but a squash body inherits it.

Assisted-by: Claude Code Anthropic Claude Opus 5 (documentation reviewed)
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