Skip to content

feat(kit): P12a follow-up — pure-helper extraction tier + reportSteps dedup - #60

Merged
atrawog merged 6 commits into
mainfrom
feat/p12a-check-fold
Jul 16, 2026
Merged

atrawog merged 6 commits into
mainfrom
feat/p12a-check-fold

Conversation

@atrawog

@atrawog atrawog commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Summary of changes

Follow-up to PR #59 (P12a check/ADE architecture fold, already merged): relocates the "pure-helper" candidates the original P12a-rest trace scoped OUT of that cutover, plus a small dedup surfaced while investigating a related (ultimately reverted) move. Same wave member, same branch (feat/p12a-check-fold), landing as its own PR because the predecessor already merged.

  • kit/ports.go — new ParsePublishedPort (+ ports_test.go), relocated from charly/check_venue.go's parsePublishedPort. Pure string parsing.
  • kit/vnc_bridge.go (+ vnc_bridge_test.go, new coverage) — new UnixToTCPBridge, relocated from charly/vnc_helpers.go's unixToTcpBridge. Pure host-side networking (UNIX-socket→TCP bridge).
  • kit/hostrefs.go (+ hostrefs_test.go) — new CloseHostCleanups, CollectHostRefs, SplitHostKey, relocated from charly/check_members.go. Pure over spec.Op + the already-kit-native TestVarRefs/CollectAnyStrings/HostVar.
  • kit/description_merge.go — new MergeDeployDescriptions, relocated from charly/description_collect.go. Pure over LabelDescriptionSet/spec.Step (already kit-native types).
  • kit/report.go — new ReportStepResults/ClassifyStepFailures, factoring out a format-selection switch + fail/infra classification that was duplicated between charly/check_feature_run.go's reportSteps and candy/plugin-check/check_cmd.go's reportSteps/failErrorFor (R3 — surfaced while investigating a candy/plugin-box move that was ultimately reverted; see the companion superproject PR).
  • CHANGELOG/2026.197.1320.md — this follow-up's content folded into the merge-time-stamped file PR feat(kit)!: P12a check/ADE architecture fold — movable-now sub-batch #59 produced (the placeholder 2026.197.1300.md this follow-up originally targeted no longer exists post-merge).

RDD correction (no code follow-up needed, documented for the record): re-tracing the "pure-helper" candidates from FRESH reads (not trusting the prior trace) found 2 of the originally-listed 8 are actually GATED on core state (charly/check_bed_run.go's waitForContainerReady → loadedReadiness() → LoadUnified; deployNestedLocalChildren → nodeTraits() → the provider registry) and correctly did NOT move.

Change class

charly-or-sdk Go (sdk only; the companion charly-core repoint lands in the sibling superproject PR on the same branch).

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

  • The gate for this change class: go build/go vet/gofmt/golangci-lint run + go test ./... on the sdk module (a pure library relocation — no bed directly exercises sdk/kit in isolation; the composing superproject's charly check run check-sidecar-pod bed is the real end-to-end gate and is reported in the sibling superproject PR).
  • Eval beds run: N/A directly on this repo — this is a library-only change; the composing bed run (check-sidecar-pod, PASS, 12/12 steps, 315s) is reported and pasted in the companion superproject PR, which built its binary against this exact sdk commit (via the in-tree go.work replace directive).
  • Fresh rebuild: N/A (sdk has no standalone binary); the composing binary rebuild + version check is in the superproject PR.
  • Did the CHANGED code path execute live? Yes — every new/relocated function has direct unit test coverage that exercises it (see below), AND the composing charly check run check-sidecar-pod bed (superproject PR) drives kit.CollectHostRefs/kit.CloseHostCleanups/kit.MergeDeployDescriptions through charly check live's host-var resolution + description-merge paths live against a real deployed container, plus kit.ReportStepResults/kit.ClassifyStepFailures through candy/plugin-check's feature-run step.
  • Concurrency: N/A — no shared-state path touched (pure functions + tests).
$ cd sdk && go build ./... && echo BUILD_OK
BUILD_OK

$ go vet ./... ; gofmt -l . ; echo VET_FMT_OK
VET_FMT_OK

$ golangci-lint run ./...
0 issues.

$ go test ./...
ok  	github.com/opencharly/sdk	(cached)
ok  	github.com/opencharly/sdk/deploykit	(cached)
ok  	github.com/opencharly/sdk/enginekit	(cached)
ok  	github.com/opencharly/sdk/kit	(cached)
ok  	github.com/opencharly/sdk/loaderkit	(cached)
ok  	github.com/opencharly/sdk/spec	(cached)
ok  	github.com/opencharly/sdk/vmshared	(cached)

Attribution tier

fully tested and validated — every new function has direct unit coverage AND is exercised live through the composing superproject's check-sidecar-pod bed (PASS, 12/12 steps, fresh-rebuild included), reported in the sibling superproject PR.

Assisted-by: Claude Sonnet 5 (fully tested and validated)

Harness rulebook compliance

  • R0 skills: /charly-internals:go, /charly-internals:go-quality, /charly-internals:cutover-policy, /charly-internals:git-workflow loaded before touching Go source / landing.
  • R1 RCA + zero warnings: golangci-lint 0 issues after a shared-cache clean (the same stale-cache-artifact root cause seen earlier in this session, RCA'd not dismissed); no warnings in build/vet/test output.
  • R2 no out-of-scope: the reportSteps/failErrorFor duplication was surfaced while investigating a DIFFERENT item (a candy/plugin-box move) and fixed here immediately rather than deferred, since a 3rd copy would have been the R3 trigger.
  • R3 no duplication: kit.ReportStepResults/kit.ClassifyStepFailures eliminate a duplicate that existed between charly-core and candy/plugin-check even before this PR.
  • R4 no workaround: N/A — no sleep/retry/shim in this diff.
  • R5 hard cutover + grep: git grep -n 'parsePublishedPort\|unixToTcpBridge\|\bcollectHostRefs\b\|\bsplitHostKey\b\|\bcloseHostCleanups\b' in the companion superproject repo returns only the CHANGELOG + this PR's own doc comments referencing the OLD names for context (no live core caller of the bare names remains — all repointed to kit.*).
  • R6 git safety: no destructive git action; git status/git stash list checked before the cross-repo merge conflict resolution (see the merge commit on the companion superproject branch).
  • R7 runtime gate: N/A directly (library-only); the composing bed run is the runtime gate, reported in the superproject PR.
  • R8 artifact invariants: N/A — no Containerfile/label generation touched.
  • R9 binary == source + deps: N/A on this repo (no standalone binary); the composing superproject binary was rebuilt + content-marker-verified for all 8 new/relocated symbols (strings bin/charly | grep sdk/kit.<symbol>), reported in the superproject PR.
  • R10 disposable + coverage: every new function ships direct unit tests that would FAIL without the relocation (moved verbatim with their existing/new test coverage); the composing check-sidecar-pod bed (disposable, fresh-rebuilt) is the end-to-end proof, reported in the superproject PR.
  • RDD / ADE / SDD: RDD — the "pure-helper" classification was re-derived from fresh code reads, not trusted from the prior trace, and caught 2 of 8 candidates as actually gated (documented above, not moved). ADE/SDD: N/A (no candy/schema touched).
  • Hard cutover: one atomic commit landing this content (plus a second, small commit reconciling the CHANGELOG filename after PR feat(kit)!: P12a check/ADE architecture fold — movable-now sub-batch #59 merged mid-session); no deferred work in this diff's own scope.
  • Kernel/plugin boundary law: N/A — sdk/kit is the designated home for exactly this class of pure, core-callable helper (per the same reasoning PR feat(kit)!: P12a check/ADE architecture fold — movable-now sub-batch #59 already established for AgentGrader et al.); no kind-specific schema/switch introduced.
  • Disposable-only autonomy: N/A — no destroy/rebuild of a deploy target from this repo directly.
  • Clean architecture + Go gates: gofmt -l . empty, golangci-lint run ./... 0 issues, go vet ./... clean, go test ./... green (pasted above).
  • CHANGELOG: CHANGELOG/2026.197.1320.md updated (the file PR feat(kit)!: P12a check/ADE architecture fold — movable-now sub-batch #59's merge produced) rather than a new placeholder, since this is the SAME wave member continuing on the SAME branch.

atrawog added 4 commits July 16, 2026 14:45
Relocates the genuinely-portable half of the P12-rest RDD trace (the
check/ADE surface) into sdk/kit and sdk/deploykit: AgentGrader (+
RunAgentOnce/parseVerdict/buildGraderPrompt), ContainerInspection +
ResolveCheckVarsBuild/Runtime, the HTTP-do path (HTTPClientFor/
DoHTTPRequest/FormatHTTPHeaders), ValidatePlanSteps, and the local-image
resolution surface (ListLocalImages/ResolveLocalImageRef/
ExtractCalVerTag/LooksLikeFullRef/ErrImageNotLocal) plus
CheckBoxContainerChain in deploykit. Every piece needed no host callback —
the trace's actionable finding was that this batch has a much larger
movable-now surface than the P8b-rest precedent.

BareVolumeName relocated from deploykit to kit (a pure string helper with
no deploykit-specific coupling) so checkvars.go's mergeRuntimeVars can call
it without a kit->deploykit import cycle; deploykit's own caller now calls
kit.BareVolumeName.

The GATED-R-ITEM half of the trace (needs the live core *Config/*Generator
graph) is unchanged and joins the tracked K-wave-exit list.

Verified via: go build/vet/test + golangci-lint (0 issues, after clearing
a stale shared lint cache referencing another worktree) on every sdk
package; gofmt clean.

Assisted-by: Claude (fully tested and validated)
… dedup

Relocates the 6 confirmed-movable pure helpers the P12a-rest trace scoped
out (ParsePublishedPort, UnixToTCPBridge, CloseHostCleanups/CollectHostRefs/
SplitHostKey, MergeDeployDescriptions) into sdk/kit, and factors the
format-selection + fail/infra classification duplicated between core and
candy/plugin-check into kit.ReportStepResults/kit.ClassifyStepFailures.
An RDD re-trace found 2 of the originally-listed 8 helpers are actually
core-state-gated (waitForContainerReady, deployNestedLocalChildren) and
correctly stayed put.

Assisted-by: Claude (fully tested and validated)
PR #59 (the P12a-proper cutover) merged as 94956cd while this follow-up
was in flight, renaming the placeholder CHANGELOG/2026.197.1300.md to the
merge-time CHANGELOG/2026.197.1320.md. Moves this follow-up unit's content
onto the canonical file and drops the now-orphaned placeholder-named copy.

Assisted-by: Claude (fully tested and validated)
@atrawog

atrawog commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

pr-validator — CHANGES REQUESTED ❌

Change class: charly-or-sdk Go (sdk library relocation — pure-helper follow-up tier, no wire-format/schema change)

Checklist:

  • [PASS] 0. security & anti-tampering (T1–T4): every changed file read; scope matches description exactly; no secrets/exfiltration/new deps/weakened guardrails; no instruction-injection attempt
  • [PASS] 1. description complete — full template filled, including the honest 3(b) revert narrative (attempted box feature Kong-nesting, panicked on a registry flat-namespace collision, reverted byte-identical, routed to a named future item)
  • [PASS] 2. change-class gate — sdk has no bed of its own; build/vet/test/lint/gofmt on every sdk package is the correct gate and I independently re-ran it, all green
  • [PASS] 3. attribution tier — fully tested and validated is plausible given the direct unit coverage on every new function plus the cited companion bed run, but see the BLOCKING finding below: this cannot be certified while the CHANGELOG defect stands
  • [PASS] 4. R0 skills — /charly-internals:go, /charly-internals:go-quality, /charly-internals:cutover-policy, /charly-internals:git-workflow all correctly named and honored
  • [PASS] 5. R1 — the golangci-lint stale-cache issue is RCA'd (same root cause as PR feat(kit)!: P12a check/ADE architecture fold — movable-now sub-batch #59); zero warnings in my own re-run of every gate
  • [PASS] 6. R2 — the reportSteps/failErrorFor duplication, surfaced while investigating an unrelated item, was fixed immediately in-tree rather than deferred (correct R2 handling — the opposite failure mode would have been to defer it)
  • [PASS] 7. R3 — every new symbol (ParsePublishedPort, UnixToTCPBridge, CloseHostCleanups, CollectHostRefs, SplitHostKey, MergeDeployDescriptions, ReportStepResults, ClassifyStepFailures) verified defined EXACTLY ONCE across the whole sdk tree (grep-verified); kit/report.go's two new functions correctly eliminate the charly-core/candy/plugin-check duplicate the PR describes
  • [PASS] 8. R4 — no ad-hoc workaround; the AllocateAutoPorts/UnixToTCPBridge host-networking code is legitimate, pre-existing-pattern host orchestration, not a workaround
  • [PASS] 9. R5 (code identifiers) — grep self-test for the old bare-name callers is credible and no duplicate definition survives in sdk
  • [FAIL] 9b/18. CHANGELOG / R5 (historical-record integrity) — BLOCKING. Independently confirmed via git diff origin/main..HEAD -- CHANGELOG/2026.197.1320.md: this PR does not add a new placeholder file. It modifies the content of CHANGELOG/2026.197.1320.md — a file that is ALREADY MERGED, ALREADY on origin/main (commit 94956cd), and ALREADY under the immutable tag v0.2026197.1320 produced by PR feat(kit)!: P12a check/ADE architecture fold — movable-now sub-batch #59's own merge (index deb3f64 → d7bf521, +60 lines appended: the "Follow-up (same wave member)" and "Item 3(b)" sections). CLAUDE.md's own contract is explicit: "one file per CalVer release version... the version computed once and shared by the changelog filename and the release git tag." PR feat(kit): P12a follow-up — pure-helper extraction tier + reportSteps dedup #60 is a SEPARATE atomic cutover that will get its OWN new CalVer/tag at its OWN merge instant (necessarily later, and different, than 2026.197.1320) — it cannot legitimately land its narrative inside a file already bound 1:1 to a DIFFERENT, already-shipped tag. If merged as-is: the immutable tag v0.2026197.1320 will forever point to a commit where this file has only the ORIGINAL ~64 lines, while main HEAD after this PR shows the SAME filename with 122 lines describing content that never actually shipped under that tag/version — a permanent filename↔tag divergence, and precisely the "documentation divergence is an incident" class (R1) applied to the changelog itself. This is not a matter I can fix mechanically at Phase 3 (unlike PR feat(kit)!: P12a check/ADE architecture fold — movable-now sub-batch #59's H1-heading typo) without restructuring the PR's own diff — the fix is scope for the author: (a) revert CHANGELOG/2026.197.1320.md to be byte-identical to its content on origin/main (i.e. drop this PR's appended sections from that file entirely), and (b) add a NEW placeholder file (any unused valid CalVer, e.g. CHANGELOG/2026.197.9999.md) carrying this PR's own narrative (the follow-up + item 3(b) content), which the validator will rename + re-stamp to the real merge-time CalVer in the normal Phase 3 flow.
  • [PASS] 10. R6 — no destructive git action; git status/stash checked before the cross-repo merge (per the PR's own narrative)
  • [N/A] R8 — no OCI-label/Containerfile generation touched
  • [N/A] R9 — sdk ships no binary directly; the PR cites companion-binary content-marker verification for all 8 symbols (not independently re-verified this round, since the CHANGELOG finding is already sufficient to FAIL — no need to exhaust every corroboration path when a blocking finding already stands)
  • [PASS] 11. R10 (sdk-side) — direct unit tests exist for every new function (ports_test.go, vnc_bridge_test.go, hostrefs_test.go); build/vet/test/lint/gofmt/mod-verify/mod-tidy all independently re-run green, zero drift
  • [PASS] 12. RDD/ADE/SDD — genuine RDD correction documented (2 of 8 originally-assumed-movable helpers re-traced from fresh reads and correctly identified as core-GATED, not moved) — this is exactly the "never trust a prior trace" discipline RDD demands. No .cue/*_gen.go touched, TestGenReproducible passes, no new wire-shaped hand-written struct
  • [PASS] 13. concurrency — N/A, no shared-state path touched, correctly claimed
  • [FAIL] 14. hard cutover — one atomic commit for the CODE is fine, but the changelog handling described above is itself a scope violation: amending a past, already-tagged cutover's historical record from within a NEW cutover is not "one atomic commit," it is retroactively editing a DIFFERENT, already-landed commit's documentation
  • [PASS] 15. ARCHITECTURE GATE — placement: CORRECT. Every new symbol is a portable, kind-blind helper with sdk-only dependencies, matching the exact precedent PR feat(kit)!: P12a check/ADE architecture fold — movable-now sub-batch #59 already established (kit is the designated home for core-callable pure helpers pending the loader/Config K-wave exit). The 2 correctly-NOT-moved helpers (waitForContainerReady→loadedReadiness→LoadUnified; deployNestedLocalChildren→nodeTraits→provider registry) are properly left core-side per the SAME placement test. The item-3(b) revert is itself evidence of correct architectural discipline: the author attempted a further externalization, hit a genuine registry-namespace limitation (provKey(class,word) has no CommandParent component), reverted byte-identical rather than forcing a broken workaround, and routed the real fix to a named future item (confirmed to exist in the project's task ledger as task feat(deploykit)!: plugin-declared DeployTraits unify into the descent descriptor (P9 sdk half) #26) — this is the CORRECT response to a HOW-finding that changes scope (STOP, revert, escalate), not a violation. No charly/*.go touched by this PR (sdk-repo producer leg only)
  • [PASS] 16. disposable-only autonomy — N/A directly to this repo
  • [PASS] 17. clean architecture + Go gates — independently re-run: gofmt clean, go vet clean, go build clean, go test all green, golangci-lint 0 issues, go mod verify all-modules-verified, go mod tidy zero drift
  • [FAIL] 18. CHANGELOG present — see the blocking finding above (item 9b)

Comments considered: none (PR carries zero comments).

Cross-PR interactions considered: sdk has no other open PRs. opencharly/charly currently has 2 open PRs (#130 fix/r10-validation-followup, #118 feat/p16-kernel-manifest-gate, which merges LAST by design) — neither touches sdk/kit content or this branch. opencharly/plugins has zero open PRs. Disposition: none-found.

Decision: CHANGES REQUESTED. Every code-level check passes cleanly — the relocations are correctly placed, single-sourced, individually tested, and the RDD re-trace + the honest item-3(b) revert both reflect real engineering discipline. The BLOCKING issue is structural, not cosmetic: this PR edits the content of CHANGELOG/2026.197.1320.md, a file that already shipped under PR #59's merge and is bound to the immutable tag v0.2026197.1320. That breaks the one-file-per-CalVer/tag invariant CLAUDE.md states explicitly, and is not something I can safely repair as a mechanical Phase-3 version-stamp edit (it requires moving content between files, which is a change to the PR's own substance, not its version numbering). Required fix: revert CHANGELOG/2026.197.1320.md to its origin/main content and add a new placeholder CHANGELOG file carrying this PR's own narrative; push the fix (status resets); re-run.

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

…is PR

A merged + tagged CHANGELOG file is immutable history, exactly like its
tag — this PR's follow-up narrative belongs in its OWN entry, not folded
into the already-shipped file. Reverted CHANGELOG/2026.197.1320.md
byte-identical to origin/main and moved this PR's content (the 6 helpers,
the R3 reportSteps dedup, the RDD correction, and the 3(b) revert) into a
new placeholder CHANGELOG/2026.197.1600.md, which the validator re-stamps
at merge as usual.

Assisted-by: Claude (fully tested and validated)
@atrawog

atrawog commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

Fixed the round-1 finding: reverted CHANGELOG/2026.197.1320.md byte-identical to origin/main (confirmed via diff), and moved this PR's own narrative (the 6 helpers, the R3 reportSteps/failErrorFor dedup, the RDD correction, and the 3(b) revert) into a new placeholder CHANGELOG/2026.197.1600.md, which the validator will re-stamp at merge as usual.

Pushed as commit 8a8c868 (append, not amend/force-push). git diff origin/main --stat now shows only this PR's own kit files + the new CHANGELOG entry — zero touch on the merged file.

@atrawog

atrawog commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

pr-validator — APPROVED ✅ (round 2)

Round 1 blocking finding: this PR modified the content of CHANGELOG/2026.197.1320.md (already merged + tagged v0.2026197.1320 by PR #59) instead of adding its own new changelog entry.

Round 2 verification (independently re-checked, not taken on the fix commit's word):

  • git diff origin/main..HEAD -- CHANGELOG/2026.197.1320.md → empty. The file is now byte-identical to its origin/main content — the revert is genuine, not partial.
  • git show 8a8c868 --stat → touches exactly CHANGELOG/2026.197.1320.md (58 deletions, the restore) and CHANGELOG/2026.197.1600.md (66 insertions, new). No other file touched by the fix commit — the code from round 1 (all 8 relocated kit symbols) is unchanged.
  • CHANGELOG/2026.197.1600.md read in full — carries the complete follow-up narrative (the 6 pure-helper relocations, the ReportStepResults/ClassifyStepFailures R3 dedup, the RDD correction on the 2 gated helpers, and the item-3(b) attempted-then-reverted Kong-nesting writeup) faithfully preserved from what was previously mis-placed in the old file.
  • Re-ran the full sdk gate suite on the new head: gofmt -l . clean, go build/go vet/go test ./... all green, golangci-lint run ./... → 0 issues. No regression from round 1.

All other round-1 findings stand as PASS (see the round-1 comment for the full itemized checklist: R3 single-definition greps, architecture placement, the RDD re-trace, the item-3(b) revert handling, all Go gates). The CHANGELOG defect is now fully resolved.

Decision: APPROVED. Proceeding to Phase 3 (CalVer finalization, merge, tag).

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

pr-validator finalization: rename the follow-up's placeholder CHANGELOG
entry to the merge-time CalVer and correct its H1 to match.

Assisted-by: Claude (fully tested and validated)
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