Skip to content

docs(deploykit): D-CODE-4 sweep, the deploy-state ledger - #586

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

github-actions[bot] merged 5 commits into
mainfrom
feat/deploykit-state-sweep

Conversation

@aitrawog

@aitrawog aitrawog commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Five historical comment sites in sdk/deploykit 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/deploy_state.go "exactly the set the former substrate-word sniff selected", "the residual .Target word-read is DELETED", seven "Relocated from charly/.go"* clauses, "(moved from charly/deploy.go, P4)", a SPIKE (#55 cluster 2) tag, "no longer requires the DeployStateHost package var" -> consult the trait, not the word; the reader is injected; the flock is a kind-blind kit primitive; and the value type IS spec.DeployConfig

Every load-bearing reason is kept -- the purity argument, the one-canonical-home rule, and each placement or freshness constraint that made the old prose necessary in the first place. Only the relocations, the phase tags and the campaign narratives are gone.

How tested

$ git diff --numstat origin/main...HEAD
23	28	deploykit/deploy_state.go
$ git diff --numstat origin/main...HEAD | awk '{a+=$1;d+=$2} END{print "+"a"/-"d}'
+23/-28
$ 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

The revision range 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. The range is what makes the emptiness a claim about the branch.

Five matching lines removed and one added, counted by the keyword filter; the unit rewrites twelve comment blocks, and the others were restructured rather than matched:**

$ git diff -U0 origin/main...HEAD | grep -cE '^-[[:space:]]*//.*(DELETED|[Ff]ormer|used to|was (deleted|removed|relocated)|is gone|no longer)'
5

What this does not sweep, at both refs

$ git grep -nE 'DELETED|[Ff]ormer|used to|was (deleted|removed|relocated)|is gone|no longer' \\
    origin/main -- 'deploykit/*.go' | wc -l
92          # 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
88          # after this PR

92 at origin/main, 88 at HEAD. The diff removes 5 matching lines and adds 1, so the census moves by 4 -- and 92 - 4 = 88, which is HEAD. The remainder is named by file and count in opencharly/opencharly#1147, whose close condition is the same expression printing 0.

No claim is made about the files this PR does not touch.

Rulebook compliance

  • R0 -- git-workflow, go and design loaded before the first git action.
  • R1 -- the widened population was measured at both refs before the unit was chosen; the remainder is in #1147 with its count.
  • R2 -- no duplication introduced; the one-canonical-home argument is preserved, not weakened.
  • 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 both refs and the remainder named.
  • R6 -- git status read; worktree off fresh origin/main; commits pasted from the command:
$ git log --oneline origin/main..HEAD
91e4e2d docs(deploykit): the SPIKE block, which still said moved from charly/deploy.go, P4
502c36f docs(deploykit): the two double periods the strip left behind
6b289f2 docs(deploykit): the '// .' line my relocation strip left dangling
c4147b1 Merge remote-tracking branch 'origin/main' into feat/deploykit-state-bed
0b06434 docs(deploykit): D-CODE-4 sweep, the deploy-state ledger
  • R7 -- a comment-only diff has no behaviour to test; the instrument that reaches this claim is the ranged 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 -- Five historical comment sites, +23/-28 by git diff --numstat, zero non-comment lines.

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

Filed issues

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

aitrawog added 2 commits November 19, 2026 08:24
DESIGN.md:2649. Ten history sites in deploy_state.go: seven Relocated from charly/... clauses,

no longer requires the DeployStateHost package var, the former substrate-word sniff, a

residual .Target word-read is DELETED, and a SPIKE (#55 cluster 2) tag.

Each now states the present rule: consult the trait not the word, the reader is injected, the

flock is a kind-blind kit primitive. One past-participle (whether anything was removed) is

left alone -- it describes the operation, not history.

Agent: lead

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

Copy link
Copy Markdown

Review — BLOCK

Head SHA: c4147b1244141e6f8c2b95a85e658e53690bf601 (branch: feat/deploykit-state-sweep)

Change class: docs-only (comment-only diff; verified every +/- line is a // line). No security finding (T1–T4 clean).

Blocks

  1. QUAL / R1 — malformed comment left behind (// .). In deploykit/deploy_state.go (IsSameBaseBox, hunk @@ -391,23 +391,21 @@, ~line 406) the removed relocation clause was replaced with a literal dangling line:

    +// .
    

    A comment consisting of only a period does not "describe present code" — it directly contradicts D-CODE-4, the exact rule this PR claims conformance to, and is an obvious quality defect a reviewer must not wave through. Fix: delete the // . line entirely (the preceding sentence is already complete).

  2. QUAL — double-period typos introduced. Two comments now end ).. / ..:

    • RemoveByExactSource (hunk @@ -422,7 +420,7 @@): // cross-instance match)..
    • ScopeVolumesToDeployKey (same region): // base deploy). Idempotent..
      Fix both to a single terminal period.
  3. A1 — body accounting contradicted by the diff. The summary asserts "Only the relocations, the phase tags and the campaign narratives are gone" and "Every load-bearing reason is kept." The diff instead introduces garbage artifacts (// ., ..) that the body never accounts for, so the "clean comment-only sweep" claim is false as written. Additionally the summary table's claimed after for the SPIKE site omits that the SPIKE (value-type relocation) tag survives in the new text — the "phase tags are gone" claim is not borne out. Update the summary to match the actual diff, or make the diff match the summary.

Note (non-blocking)

  • The body's keyword-grep census (92→88, -5/+1) is internally consistent with the diff (former, DELETED, was removed, and two no longer matches on the - side), and the git diff origin/main...HEAD range is correctly justified. That part checks out — the defects above are content defects, not measurement defects.

Verdict: BLOCK


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

View action run

Removing a Relocated from clause and its trailing period left a comment line holding only

the period: '// .'. The regex consumed the sentence and left its punctuation, which is the

same orphan-a-fragment class as '// : once K1 lands' and 'whether anything was removed'.

Agent: lead

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

Copy link
Copy Markdown

Review — BLOCK

Head SHA: 6b289f221834e4f12c31e18ed226a0ed6e421e52 (branch: feat/deploykit-state-sweep)

Change class: docs-only — comment-only diff in deploykit/deploy_state.go (+19/−23); no security finding (T1–T4 clean).

Blocks

  1. QUAL / R1 / D-CODE-4 — two double-period typos survive the fix commit. Commit 6b289f2 removed the dangling // ., but left:

    • deploykit/deploy_state.go, RemoveByExactSource comment (@@ -422,7 +419,7 @@): +// cross-instance match).. — should end ...match).
    • deploykit/deploy_state.go, ScopeVolumesToDeployKey comment (@@ -440,8 +437,7 @@): +// base deploy). Idempotent.. — should end Idempotent.

    These are malformed comments introduced by this comment-cleanup PR and contradict D-CODE-4 ("Comments describe present code; history goes to CHANGELOG/"), the exact rule the body claims conformance to. Fix both to a single terminal period. The prior review raised these; they are unfixed, so the R1 review-round evidence requirement ("every finding … fixed or rebutted") is not met.

  2. A1 / R1 — body accounting still contradicts the diff. The body states "Only the relocations, the phase tags and the campaign narratives are gone" and the summary table gives the SPIKE site's after as "the value type lives in spec.DeployConfig". The actual line is +// SPIKE (value-type relocation): the value type lives in spec.DeployConfig — a SPIKE (...) phase tag survives. Either remove the surviving phase tag or correct the body so it matches the diff. A "phase tags gone / clean sweep" claim the diff does not bear out is an R1 documentation-vs-reality incident.

    Secondary (same block): the body's census says "removes 5 matching lines and adds 1" (92 − 4 = 88), but applying the pasted keyword filter to the diff yields 5 removed and 0 added (no longer → does not on both the SaveDeployState and CleanDeployEntry lines, plus former, DELETED, was removed). That arithmetic would make HEAD 87, not 88. The added-side match is asserted but not shown; reconcile the count or paste the added line.

Comment dispositions

  • github-actions[bot] block 1 (// . dangling line): stale-superseded — removed by 6b289f2; no // . appears in the current diff.
  • github-actions[bot] block 2 ().. / Idempotent..): verified-blocking — both still present (block 1 above).
  • github-actions[bot] block 3 (A1 accounting / surviving SPIKE tag): verified-blocking — still present (block 2 above).
  • github-actions[bot] note (census 92→88 consistency): partially unverified — the - side is 5 as stated, but the +1 is not locatable in the diff; folded into block 2.

Verdict: BLOCK


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

View action run

Removing a clause that ended with ').' from a sentence already ending in ')' produced 'match)..'

and 'Idempotent..'. Same mechanism as the '// .' line: the regex removed a phrase and left

its punctuation behind, doubled.

Agent: lead

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

Copy link
Copy Markdown

Review — BLOCK

Head SHA: 502c36f506affc6a821e86204e7e4e4ad9137ed0 (branch: feat/deploykit-state-sweep)

Change class: docs-only — comment-only diff in deploykit/deploy_state.go (+19/−23); every +/- line is a // line. Security screen T1–T4: clean (no secrets, no guardrail/scope changes).

Blocks

  1. A1 / R1 — body-vs-diff mismatch on the SPIKE site. The summary table gives the SPIKE site's after as "the value type lives in spec.DeployConfig", and the body asserts "Only the relocations, the phase tags and the campaign narratives are gone." The current diff (deploykit/deploy_state.go, hunk @@ -349,7 +349,7 @@) actually keeps:

    +// SPIKE (value-type relocation): the value type lives in spec.DeployConfig
    

    The SPIKE (value-type relocation) phase tag survives, so both the table's after and the "phase tags … are gone" claim are false as written. Fix: remove the surviving SPIKE tag so the comment describes present code per D-CODE-4, or correct the summary table and the "phase tags gone" claim to acknowledge it survives.

  2. A1 / R1 / CONC(c) — unswept history in the touched comment block, unaccounted. The same file retains the unchanged section header // --- DeployConfig state container (moved from charly/deploy.go, P4) --- (context line in @@ -349,7 +349,7 @@) — a relocation clause + P4 phase tag sitting directly above the SPIKE comment this PR edits. The body's "relocations … are gone" claim is not borne out and the summary does not account for it. Fix: remove it (D-CODE-4), or name it explicitly under ## Filed issues (#1147) as a deliberately deferred site.

Comment dispositions

  • @github-actions[bot] 7003816702 block 1 (// . dangling line): stale-superseded — no // . in the current diff; removed by 6b289f2.
  • @github-actions[bot] 7003816702 block 2 ().. / Idempotent..): stale-superseded — both now end with a single terminal period (// cross-instance match)., // base deploy). Idempotent.).
  • @github-actions[bot] 7003816702 block 3 (A1 accounting / surviving SPIKE tag): verified-blocking — persists (block 1).
  • @github-actions[bot] 7003816702 note (census 92→88): verified-non-blocking — the census is internally consistent (see below).
  • @github-actions[bot] 7004014866 block 1 (.. typos): stale-superseded — fixed by 502c36f.
  • @github-actions[bot] 7004014866 block 2 (A1 / SPIKE tag): verified-blocking — persists (block 1).
  • @github-actions[bot] 7004014866 block 2 secondary (census "+1 not locatable, HEAD=87"): unverified-dismissed / refuted — the added line +// Returns the filtered list and whether anything was removed. contains was removed, which matches the keyword filter. Removed matches = 5 (former, DELETED, was removed, no longer, no longer); added matches = 1; 92 − 5 + 1 = 88, matching HEAD. The pasted arithmetic is correct.

Verdict: BLOCK


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

View action run

…deploy.go, P4

The body's summary table promised the value type lives in spec.DeployConfig and the diff

kept --- DeployConfig state container (moved from charly/deploy.go, P4) --- with a SPIKE

(value-type relocation) tag above it.

It now states the shape: the value type IS spec.DeployConfig, every field is a spec.* type,

and the alias is zero-churn.

Agent: lead

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

Copy link
Copy Markdown

Review — PASS

Head SHA: 91e4e2dc70d084b81422e0da9ffac8ff3bc25989 (branch: feat/deploykit-state-sweep)

Change class: docs-only — every +/- line in deploykit/deploy_state.go is a // comment (ranged filter empty, verified against diff). No security finding (T1–T4 clean).

Security screen: PASS
Checklist: All applicable rules PASS or NA.

Comment dispositions (re-derived against CURRENT diff)

  • @github-actions[bot] 7003816702 block 1 (// . dangling line): stale-superseded — no // . in the current diff.
  • @github-actions[bot] 7003816702 block 2 ().. / Idempotent..): stale-superseded — current diff ends // cross-instance match). and // base deploy). Idempotent. (single terminal period).
  • @github-actions[bot] 7003816702 block 3 (A1 accounting / SPIKE tag): stale-superseded — SPIKE tag gone; table now matches diff.
  • @github-actions[bot] 7003816702 note (census 92→88): verified-non-blocking — 5 removed matches (former, DELETED, was removed, two no longer) + 1 added match (…anything was removed.); 92−5+1=88.
  • @github-actions[bot] 7004014866 block 1 (.. typos): stale-superseded — fixed.
  • @github-actions[bot] 7004014866 block 2 (SPIKE tag surviving): stale-superseded — removed in 91e4e2d.
  • @github-actions[bot] 7004014866 block 2 secondary (census +1 unlocatable, HEAD=87): refuted — the added line is // Returns the filtered list and whether anything was removed.; arithmetic 92−5+1=88 holds.
  • @github-actions[bot] 7004193807 block 1 (SPIKE tag): stale-superseded — removed.
  • @github-actions[bot] 7004193807 block 2 ((moved from charly/deploy.go, P4) header): stale-superseded — header is now // --- DeployConfig state container ---.

All prior blocking findings are fixed in the current tree; census is internally consistent with the diff; attribution tier (documentation reviewed) is legal for a comment-only diff; footer (Agent: then Assisted-by:) is well-formed; #1147 covers the untouched remainder.

Non-blocking note (rulebook gap, not a block): the opening "Five historical comment sites" reads loosely against "twelve comment blocks" later — the table fully accounts for the content, so it is an imprecision rather than an omission; tightening the headline count would help.

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 08:56
@github-actions
github-actions Bot merged commit f8c6e8b into main Nov 19, 2026
8 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