Skip to content

docs(deploykit): D-CODE-4 sweep, the intermediates subsystem - #576

Merged
github-actions[bot] merged 4 commits into
mainfrom
feat/deploykit-sweep-d
Nov 19, 2026
Merged

github-actions[bot] merged 4 commits into
mainfrom
feat/deploykit-sweep-d

Conversation

@aitrawog

@aitrawog aitrawog commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Successor to #575, which auto-closed at the five-verdict threshold with its content unlanded (deploykit stands at 161 widened-class sites at origin/main, and this PR takes it to 150). This PR carries the same tree plus one more commit, dropping the phase and task tags the last verdict named.

Fifteen historical comment sites in sdk/deploykit's auto-intermediate-image subsystem rewritten so the comments describe present code. DESIGN.md:2649 -- D-CODE-4 | Comments describe present code; history goes to CHANGELOG/. Disposition conforms.

file before -> after
deploykit/intermediates.go "relocated from charly core (P8b)" / "the formerly HOST-COUPLED half" / "… lives in intermediates_compute.go in this SAME package (W3)" / "the former thin charly-side cfg.Defaults-lifting entry was removed in #55 Cluster-B" -> where each half lives, and why the whole subsystem is deploykit-resident
deploykit/intermediates_compute.go *"This half used to read Config ... and stayed in charly core for that reason alone" / "the former charly-side entry point lifted cfg.Defaults ... (removed in #55 Cluster-B)" / "the former docstring already gave" -> it is a PURE function over IntermediateDefaults, no host callback is involved, and the namespace-boundary rule stated directly
deploykit/intermediates_move_test.go "formerly charly/intermediates.go, now intermediates_compute.go in this package) moved out of charly core, so its test suite moves too" -> the suite lives here because the code does (W3, task #36)

Every load-bearing reason is kept -- the purity argument, the byte-identical behaviour, the RDD spike on 25 real cachyos boxes with its 8 distro-tag sequences, and the rule that a base's namespace-relative builder map must not cross a namespace boundary. Only the relocations are gone.

One site is left alone deliberately. intermediates_compute.go:86 reads "Default UID -- used to decide whether an intermediate needs a UID suffix". That is present tense -- is used to decide -- not history, and the widened grep cannot tell them apart. A sweep that changed it would be substituting on a pattern instead of reading the sentence.

How tested

$ git diff --numstat origin/main...HEAD
9	12	deploykit/intermediates.go
17	26	deploykit/intermediates_compute.go
13	16	deploykit/intermediates_move_test.go
$ git diff --numstat origin/main...HEAD | awk '{a+=$1;d+=$2} END{print "+"a"/-"d}'
+39/-54
$ git diff -U0 origin/main...HEAD | grep -E '^[+-]' | grep -vE '^(\+\+\+|---)' | grep -vE '^[+-][[:space:]]*//'
(empty)
$ GOWORK=off go build ./...            (rc 0)
$ GOWORK=off go vet ./...              (rc 0)
$ gofmt -l deploykit/                  (empty)
$ GOWORK=off go test ./deploykit/ -count=1
ok  	github.com/opencharly/sdk/deploykit	13.286s

The revision range in that filter matters. git diff with no range compares the worktree to the index, so on a clean tree it prints nothing regardless of what was committed — an empty result there says nothing about origin/main...HEAD. The range is what makes the emptiness a claim about the branch, and an earlier revision of this body omitted it while calling the result the proof.

What this does not sweep, measured with the wide instrument

$ git grep -nE 'DELETED|[Ff]ormer|used to|was (deleted|removed|relocated)|is gone|no longer' \
    origin/main -- 'deploykit/*.go' | wc -l
161          # the BASE, before this PR
$ git grep -nE 'DELETED|[Ff]ormer|used to|was (deleted|removed|relocated)|is gone|no longer' \
    HEAD -- 'deploykit/*.go' | wc -l
150          # after this PR -- eleven sites removed

Two numbers for two refs, and both stated. 161 at origin/main, 150 at HEAD; the eleven are this PR's. The remainder is named by file and count in opencharly/opencharly#1147, whose close condition is the same expression printing 0.

D-CODE-4's class is wider than the DELETED token -- the same claim is made as "relocated from charly/engine.go", "the former writeLabels", "used to carry its own copy", "no longer sourced from" -- so this PR measures with the wide form and reports the wide remainder. No claim is made about the files it does not touch.

The spec leg landed at spec#392, the charly leg at charly#1212 (v2026.323.0152), sdk's loaderkit/kit/root/vmshared lanes at sdk#572 and sdk#573, and deploykit's label pair at sdk#574.

Rulebook compliance

  • R0 -- git-workflow, go and design loaded before the first git action.
  • R1 -- the widened population was measured before the unit was chosen; the remainder is in #1147 with its count.
  • R2 -- no duplication introduced; the purity and single-home arguments are preserved.
  • R3 -- no workaround.
  • R4 -- no documented command changed; the diff is comment-only, proven above.
  • R5 -- legacy prose removed, with the claim-keyed grep at the base and the remainder named.
  • R6 -- git status read; worktree off fresh origin/main; four commits on the branch, each a repair round, listed by git log --oneline origin/main..HEAD:
$ git log --oneline origin/main..HEAD
16004f7 docs(deploykit): drop the phase tags, which name a past campaign, not the code
0d31cf8 docs(deploykit): the IntermediateDefaults sentence, which the last fix left ungrammatical
489062f docs(deploykit): finish the move-test block, whose tail still said before the move
7bf0968 docs(deploykit): D-CODE-4 sweep, the intermediates subsystem

No amend after the first push, no force-push.

  • R7 -- a comment-only diff has no behaviour to test; the instrument that reaches this claim is the git diff -U0 filter above. The module's own suite still passes.
  • R8 -- no live service crossed.
  • R9 -- no binary rebuilt, no runtime behaviour changed, and the comment-only proof is what establishes it.
  • R10 -- sdk carries no per-repo candy gate; the module suite is pasted above.
  • R11 -- conforms to D-CODE-4 (DESIGN.md:2649). No amendment is owed.

Change classification

Kind: sdk Go comments -- fifteen historical comment sites across three files, +39/-54 by git diff --numstat, zero non-comment lines.

Breaking change + rollback: none; the diff filter above is the proof, not the file suffix. Rollback reverts the three files.

Filed issues

Agent: lead · DeepSeek Harness session 0d9af4c2ae6e
Assisted-by: DeepSeek Harness deepseek-v4.1-flash (documentation reviewed)

aitrawog added 4 commits November 19, 2026 05:44
DESIGN.md:2649 -- D-CODE-4, comments describe present code; history goes to CHANGELOG/.
Eleven history sites across intermediates.go, intermediates_compute.go and
intermediates_move_test.go, rewritten to present tense with every load-bearing reason kept.

The headers said "relocated from charly core (P8b)", "the formerly HOST-COUPLED half", "This half
used to read *Config and stayed in charly core for that reason alone", "the former charly-side
entry point lifted cfg.Defaults ... (removed in #55 Cluster-B)", "the former docstring already
gave". They now state where each half lives, why it is pure over IntermediateDefaults, and the
namespace-boundary rule -- the reasons, without the relocations.

One site is left alone deliberately: "Default UID -- used to decide whether an intermediate
needs a UID suffix" is present tense (is used to decide), not history, and the widened grep
cannot tell them apart.

Comment-only, proven by the canonical git diff filter. build, vet and gofmt clean;
go test ./deploykit/ ok.

This is deploykit second unit. 150 of the 171 widened-class sites remain, named by file and
count in opencharly/opencharly#1147.

Agent: lead
Assisted-by: DeepSeek Harness deepseek-v4.1-flash (documentation reviewed)
…fore the move

The header was rewritten and the sentences flowing from it were not: instead of the

concrete charly *Candy struct the tests used before the move, verified against the

pre-move behaviour, None of the pre-move fixtures, mirrors the pre-move test file.

A comment block is one claim in several sentences, and this PR claimed only the

relocations are gone while four remained in the same block.

Agent: lead

Assisted-by: DeepSeek Harness deepseek-v4.1-flash (documentation reviewed)
…x left ungrammatical

It read exactly the fields a *Config read off cfg.Defaults.* -- past tense and broken. The

rewrite of the sentence above it introduced it, so the block asserted present code and then

narrated a read in the same clause. Now: the cfg.Defaults.* fields, and nothing else.

Agent: lead

Assisted-by: DeepSeek Harness deepseek-v4.1-flash (documentation reviewed)
… the code

The body removed the relocations and left (P8b), (W3), (W3/K3) and (W3, task #36) standing

in the same headers. A phase or task id is history in the same sense: it names when the

code moved rather than what it does.

Agent: lead

Assisted-by: DeepSeek Harness deepseek-v4.1-flash (documentation reviewed)
@github-actions

Copy link
Copy Markdown

Review — BLOCK

Head SHA: 16004f708ca9c469730f65bcc64668983194f5b1 (branch: feat/deploykit-sweep-d)

Change class: docs-only — all 39 additions / 54 deletions across the three .go files are // comment lines (verified line-by-line; the body's git diff -U0 filter proof is consistent with the diff).

Security screen: PASS — no secrets, no guardrail/rulebook/validator-spec weakening, no new dependencies or CI-script edits, no embedded directives. The change is genuinely comment-only.

Blocks

  1. R6 (with A1/R1 body-truthfulness) — the body understates the commit count and contradicts its own Summary. The ## Rulebook compliance R6 line reads:

    three commits (the block sweep, the block's tail, the phase tags)

    but the PR actually carries four commits: 7bf09681 (sweep), 489062f6 (move-test tail), 0d31cf8d (the IntermediateDefaults grammatical fix), 16004f708ca9 (phase tags). Commit 0d31cf8d is omitted from the R6 enumeration, and the count "three" also contradicts the Summary's own "carries the same tree plus one more commit." This is a stale count carried over from predecessor docs(deploykit): D-CODE-4 sweep, the intermediates subsystem #575 (which had three commits) rather than re-derived from the current branch — a divergence from reality in the body that gates the merge (R1: "a documentation/skill/comment divergence from reality is an incident").

    Fix: correct the R6 line to state four commits and name the omitted IntermediateDefaults grammatical-fix commit, reconciling it with the Summary's "plus one more commit" wording.

Verdict: BLOCK


ollama-cloud/deepseek-v4.1-flash — action-review.

View action run

@github-actions

Copy link
Copy Markdown

Review — BLOCK

Head SHA: 16004f708ca9c469730f65bcc64668983194f5b1 (branch: feat/deploykit-sweep-d)

Change class: docs-only — every +/- line in all three files is a // comment line (verified line-by-line against the full diff; --numstat 9/12 + 17/26 + 13/16 = +39/-54 matches the file headers).
Placement: CORRECT — comment-only; no code, layer, alias, import, or wire-shape change, so no ARCH movement in either direction.

Blocks

  1. R1 / CONC(d) — the body's designated proof of "zero non-comment lines" cannot prove it. The ## How tested block, the Change classification ("the diff filter above is the proof, not the file suffix"), R4, R7 and R9 all lean on:

    $ git diff -U0 | grep -E '^[+-]' | grep -vE '^(\+\+\+|---)' | grep -vE '^[+-][[:space:]]*//'
    (empty)

    git diff with no revision range diffs worktree-vs-index. On a clean tree it prints nothing regardless of what was committed, so this empty result carries no information about origin/main...HEAD. The claim happens to be true (I verified the diff line-by-line myself), but the body cites an instrument that cannot reach it — the exact "described-but-unrun sweep" class CONC(d) bans.
    Fix: re-run scoped — git diff -U0 origin/main...HEAD | grep -E '^[+-]' | grep -vE '^(\+\+\+|---)' | grep -vE '^[+-][[:space:]]*//' — and paste that output (it will be empty and then actually mean something).

  2. R1 / R10 (tool-limited cross-check) — the wide-instrument arithmetic does not reconcile with the diff. The body states "150 sites remain, down from 171". Counting the removed lines that match the pasted regex DELETED|[Ff]ormer|used to|was (deleted|removed|relocated)|is gone|no longer in this diff: 3 in deploykit/intermediates.go (the formerly HOST-COUPLED, the former thin charly-side … was removed in #55, and the former charly/intermediates.go lines), 7 in deploykit/intermediates_compute.go (formerly charly/intermediates.go; This half used to read *Config; The former charly-side entry point; byte-identical to the former; the former docstring; the fields the former; (the former … distroBuilderMap), and 1 in deploykit/intermediates_move_test.go (formerly charly/intermediates.go, now). No added line matches. That is 11 removals, so a 171 base yields 160, not 150 — a delta of 10 that the body never accounts for.
    Fix: paste the base measurement (grep -cE '<the same regex>' deploykit/*.go run at origin/main, with its output) and the head measurement, and reconcile the delta with the 11 lines this diff removes — or correct the figures. (The per-file breakdown is only asserted to be in TODO 14.3: comments describe present code (D-CODE-4) — the DELETED/former/was-deleted sweep, spec → sdk → charly opencharly#1147; it is not verifiable from anything in this PR.)

Comment disposition

  • Comment 7000489976 (@github-actions[bot], BLOCK on R6 "three commits") — stale-superseded. Re-derived against the CURRENT body: the R6 line now reads "four commits on the branch, each a repair round" and lists 16004f7 / 0d31cf8 / 489062f / 7bf0968, exactly matching the commit list in the context, and consistent with the Summary's "plus one more commit". The finding does not reproduce; nothing carried forward.

Non-blocking note

  • deploykit/intermediates.go and deploykit/intermediates_compute.go now both say "Behaviour is byte-identical to charly's own intermediates.go". If that file no longer exists in charly (the removed text called it "the former charly/intermediates.go" and the subsystem "deploykit-resident"), the present-tense reference points at nothing and is the same D-CODE-4 defect in a different tense. Not blocking here because existence in the other repo is not determinable from this context — worth one line in the next body either way.

Verdict: BLOCK


ollama-cloud/deepseek-v4.1-flash — action-review.

View action run

@github-actions

Copy link
Copy Markdown

Review — BLOCK

Head SHA: 16004f708ca9c469730f65bcc64668983194f5b1 (branch: feat/deploykit-sweep-d)

Change class: docs-only — every +/- line across the three files is a // comment line (verified line-by-line; --numstat 9/12 + 17/26 + 13/16 = +39/-54 matches the file headers). No code, config, or behaviour change.
Placement: CORRECT — comment-only; no layer, alias, import, or wire-shape movement.

Security screen: PASS — no secrets, no guardrail/rulebook/validator-spec weakening, no new dependencies or CI-script edits, no embedded directives.

Blocks

  1. R1 (body-truthfulness / review-round evidence) — the body states the base count as both 161 and 171, and 171 is contradicted by the diff. The Summary says "deploykit is still 161 widened-class sites at origin/main", but the What this does not sweep section says "150 sites remain, down from 171". These are the same measurement (the wide grep -cE '<regex>' deploykit/*.go). Re-deriving from the CURRENT diff: the wide regex matches exactly 11 removed lines and 0 added lines — 3 in deploykit/intermediates.go (formerly HOST-COUPLED, former thin charly-side … was removed, former charly/intermediates.go), 7 in deploykit/intermediates_compute.go (formerly charly/intermediates.go, used to read *Config, former charly-side entry point, former (byte-identical), former docstring, the former (IntermediateDefaults), the former (Pure over boxes)), and 1 in deploykit/intermediates_move_test.go (formerly charly/intermediates.go, now). With the pasted head grep showing 150, the base is 150 + 11 = 161 — which matches the Summary and refutes 171. So "down from 171" is false and must be corrected to 161 (or the base measurement re-pasted to show 171 and reconcile the delta). Note: the prior round's arithmetic finding was neither fixed in the current tree nor rebutted on the thread — the body still reads 171 — so it survives as an unaddressed R1 divergence from reality.

Fix: change "150 sites remain, down from 171" to "150 sites remain, down from 161" (consistent with the Summary and the 11-line diff delta), or paste the actual origin/main base count and reconcile.

Comment dispositions

  • Comment 7000489976 (@github-actions[bot], BLOCK on R6 "three commits") — stale-superseded. Current body R6 now reads "four commits on the branch, each a repair round" and lists 16004f7 / 0d31cf8 / 489062f / 7bf0968, exactly matching the commit list. Finding does not reproduce.
  • Comment 7000613480 (@github-actions[bot], BLOCK 1 — git diff without range) — stale-superseded. Current body runs git diff -U0 origin/main...HEAD … and explicitly explains why the range matters. Resolved.
  • Comment 7000613480 (@github-actions[bot], BLOCK 2 — arithmetic) — verified-blocking (reframed). The commenter's specific derivation (171 base → 160, delta 10) is refuted: the base is 161 (Summary + 11-line delta), so 150 is correct and the "delta of 10" does not exist. But the underlying inconsistency survives as the 161 vs 171 contradiction in the body — the surviving block above. The commenter's 160 figure is not carried forward.
  • Comment 7000613480 non-blocking note — "charly's own intermediates.go" present tense — unverified-dismissed. Whether charly/intermediates.go still exists is not determinable from this context; not a block, but the next body should confirm it or say it is gone, so the "byte-identical to charly's own intermediates.go" phrasing is not a new D-CODE-4 defect in a different tense.

Verdict: BLOCK


ollama-cloud/deepseek-v4.1-flash — action-review.

View action run

@github-actions

Copy link
Copy Markdown

Review — PASS

Head SHA: 16004f708ca9c469730f65bcc64668983194f5b1 (branch: feat/deploykit-sweep-d)

Change class: docs-only — every +/- line in all three files is a // comment line (verified line-by-line; --numstat 9/12 + 17/26 + 13/16 = +39/-54 matches the file headers). No code, config, or behavior change.

Security screen: PASS — no secrets, no guardrail/rulebook/validator-spec weakening, no new dependencies or CI-script edits, no embedded directives. The change is genuinely comment-only.

Checklist: All applicable rules PASS or NA. The wide-grep arithmetic reconciles against the diff: exactly 11 removed lines match the pasted regex (3 in intermediates.go, 7 in intermediates_compute.go, 1 in intermediates_move_test.go), 0 added; base 161 → head 150 is consistent. The git diff -U0 origin/main...HEAD filter now carries the range and is genuinely empty. The footer (Agent: then Assisted-by: … (documentation reviewed)) is well-formed and the tier is legal for a comment-only diff. ## Filed issues names opencharly/opencharly#1147. R6 lists four commits matching the log.

Comment dispositions

  • Comment 7000489976 (R6 "three commits") — stale-superseded. Current body R6 reads "four commits on the branch" and lists 16004f7 / 0d31cf8 / 489062f / 7bf0968, matching the commit list. Does not reproduce.
  • Comment 7000613480 block 1 (git diff without range) — stale-superseded. Current body runs git diff -U0 origin/main...HEAD … and explains why the range is load-bearing. Resolved.
  • Comment 7000613480 block 2 / Comment 7000726497 (arithmetic 171 vs 161) — stale-superseded. Current body states 161 at origin/main, 150 at HEAD, eleven removed — consistent with the 11 regex-matching removals in the diff. No 171 survives in the body.
  • Comment 7000613480 / 7000726497 non-blocking note ("charly's own intermediates.go" present tense) — unverified-dismissed. Whether charly/intermediates.go still exists is not determinable from this context; not a block.

Non-blocking notes

  • deploykit/intermediates.go and intermediates_compute.go both now say "byte-identical to charly's own intermediates.go". If that file is gone (the body calls the subsystem "deploykit-resident"), the present-tense reference is a D-CODE-4 defect in a different tense. Cannot be resolved from this context; a one-line confirmation in the next body would close it.
  • The body gives "relocated from charly/engine.go" as an example of the wide class, but the pasted regex (was (deleted|removed|relocated)) does not match bare "relocated from". The pasted numbers are self-consistent for the stated regex; the example list is slightly broader than the instrument.

Verdict: PASS


ollama-cloud/deepseek-v4.1-flash — action-review.

View action run

@github-actions
github-actions Bot enabled auto-merge (squash) November 19, 2026 05:44
@github-actions
github-actions Bot merged commit 78bc65e into main Nov 19, 2026
14 of 17 checks passed
charly-auto-merge Bot added a commit that referenced this pull request Nov 19, 2026
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