Skip to content

docs: describe present code in comments (D-CODE-4) - #1212

Merged
github-actions[bot] merged 1 commit into
mainfrom
feat/present-tense-comments
Nov 19, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
feat/present-tense-comments

Conversation

@aitrawog

Copy link
Copy Markdown
Contributor

Summary

The charly leg of TODO 14.3 (opencharly/opencharly#1147): every comment in this repo that narrated a removal as history now states what the code does. Requirement, confirmed rather than taken on trust:

$ grep -n 'D-CODE-4' DESIGN.md
2649:| D-CODE-4 | Comments describe present code; history goes to `CHANGELOG/`. |

Disposition: conforms.

The count is a pair, both halves produced by a command at its own ref:

$ git -C charly grep -cF 'DELETED' a836856b -- '*.go' | awk -F: '{s+=$NF} END{print s+0}'
64
$ git -C charly grep -cF 'DELETED' f8e09580 -- '*.go' | awk -F: '{s+=$NF} END{print s+0}'
0

The split, measured at the base rather than inferred. spec#392 excluded 19 generated projections by name, so this leg asked the same question of its own 64:

$ git -C charly grep -cF 'DELETED' a836856b -- '*.go' | awk -F: '{s+=$NF} END{print s+0}'
64
$ git -C charly grep -cF 'DELETED' a836856b -- '*.go' | wc -l
41
$ git -C charly grep -cF 'DELETED' a836856b -- '*_test.go' | awk -F: '{s+=$NF} END{print s+0}'
17
$ git -C charly grep -cF 'DELETED' a836856b -- '*.go' ':!*_test.go' | awk -F: '{s+=$NF} END{print s+0}'
47
$ git -C charly grep -l 'Code generated .* DO NOT EDIT' a836856b -- '*.go'
a836856b:charly/internal/pluginsgen/main.go
a836856b:charly/plugins_generated.go
a836856b:charly/plugins_refs_generated.go
$ git -C charly grep -lF 'DELETED' a836856b -- '*.go' | sed 's|^a836856b:||' | grep -cE 'plugins_generated|plugins_refs_generated|pluginsgen/main'
0

64 occurrences / 41 files: 0 in a generated file, 17 in tests (14 files), 47 non-test (27 files). So unlike spec, this leg hides no generated majority — every site is hand-written, and every site took the per-site judgement.

Each rewrite keeps the reason and drops the obituary, in the safe direction the wave policy names: a load-bearing reason is restated in present tense, never moved and never deleted. The reasons that survive in substance, because they are what the code is FOR:

  • charly/image.go — "What stays core is the genuine floor a sdk-only candy cannot run: the git clone/cache … reached over the thin HostBuild("remote-image-resolve") seam, and the build-engine RESOLVE legs."
  • charly/plugin_loader.go — "freshness IS the key: … a path key cannot answer it — the same source builds under a different path per worktree", and "the per-key lock lives in buildcache under the runtime root, never inside the cache tree (the homes rule); … such a root ignores CHARLY_CACHE_DIR."
  • charly/build_overlay.go — "nothing on the step-emit path reads a base distro … the alternative is to fall back to the operator host's own distro, which is the cross-distro bug itself."
  • charly/provider_step.go — the F11 zero-per-kind-residue assertion, kept as the standing fact it is.
  • the "there is no duplicate of it here" notes in charly/checkspec_test.go, which are what stop a removed test being re-added.

One site was not history at all but a standing rule in the passive (reverse_channel_three_legs_test.go: "those seams are DELETED, not thinned"); it is restated as "those seams go entirely rather than being thinned", so the rule keeps its force without the historical participle.

How tested

The change class is prose, and that is proved, not asserted — all three commands run at the head this PR publishes:

$ git diff --numstat a836856b f8e09580 | grep -v '\.go$'
(no output — no non-Go file in the diff)

$ git diff -U0 a836856b f8e09580 | grep -E '^[+-]' | grep -vE '^(\+\+\+|---) ' | grep -vE '^[+-][[:space:]]*//'
(no output — every changed line is a comment line)

$ git diff --stat a836856b f8e09580 | tail -1
 41 files changed, 190 insertions(+), 213 deletions(-)

Non-comment changed lines: 0. The diff therefore cannot reach a runtime path: no behaviour, no wire key, no generated artifact and no build input changes, so the R10 bed is not entered for this change class and the tier is documentation reviewed on that proof — not on the fact that the changed files happen to end in .go.

Gates on the committed tree f8e09580, from charly/, with GOWORK=off:

$ go build ./...
$ echo $?
0

$ go vet ./...
$ echo $?
0

$ go test ./... -count=1
ok  	github.com/opencharly/charly/charly	343.652s
ok  	github.com/opencharly/charly/charly/internal/pluginsgen	111.923s

The -count=1 run is a forced re-execution at the committed head (an earlier run against the identical working tree reported 345.153s / 122.795s; the second was made uncached so the pasted fence is a run on the commit, not a cache hit).

Rulebook compliance

  • R0 — loaded /charly-internals:git-workflow, /charly-internals:go, /charly-internals:design before any repo command.
  • R1 — no failure or warning on the final tree (build, vet and test all rc 0). One separable finding filed, below.
  • R2 — no duplication: each reason is restated once, in the file that owns it; no second copy of a claim was created.
  • R3 — no workaround; the sweep is a judgement per site, applied as exact single-match replacements that fail loudly rather than silently no-op.
  • R4 — product before prose: no product change, and no prose routes around a defect.
  • R5 — the claim-keyed grep is pasted above, 64 → 0 at the head; no obituary is left half-rewritten.
  • R6 — worktree /home/atrawog/Sync/Atrapub/lo/dsh/opencharly/.worktrees/p143-charly/charly, git rev-parse --show-toplevel confirmed equal to the path edited before committing; git status --porcelain stated and empty after the commit; no force-push, no bypass, no submodule checkout edited in place.
  • R7 — the proof that the diff cannot change behaviour is the comment-only diff above (0 non-comment lines), and the suites that would catch a code change are green on the same tree.
  • R8 — no live boundary in scope (no behaviour change), so nothing to run live and nothing to mock.
  • R9 — charly/'s gate (go build / go vet / go test) is run in the worktree, not against a shared install; the sweep adds no runtime OS dependency, so packaging: is untouched.
  • R10 — change class is prose by the proof above; the R10 bed is not entered, and that is stated rather than implied.
  • R11 — the touched requirement is cited (DESIGN.md:2649), disposition conforms.
  • COORD — tracking issue TODO 14.3: comments describe present code (D-CODE-4) — the DELETED/former/was-deleted sweep, spec → sdk → charly opencharly#1147 carries this leg's STATUS.

Change classification

Breaking change + rollback: none — comment-only. 190 added and 213 removed lines, every one of them a comment line (git diff -U0 … | grep -vE '^[+-][[:space:]]*//' is empty), no non-Go file, no wire key, no generated artifact. Rolling back is reverting this commit, and nothing can depend on a comment's text.

Filed issues

Agent: ir-sweep-4 (subagent of lead) · DeepSeek Harness session cf75466d-4cea-4c59-8a87-e58bae388c70
Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (documentation reviewed)

The charly leg of TODO 14.3 / #1147: every comment in this repo that narrated
a removal as history now states what the code does instead. The requirement is
DESIGN.md:2649 — "D-CODE-4 | Comments describe present code; history goes to CHANGELOG/."

Count pair, both ends:

  $ git grep -cF 'DELETED' HEAD -- '*.go' | awk -F: '{s+=$NF} END{print s+0}'   # base a836856
  64
  $ grep -rF 'DELETED' --include='*.go' charly/ | wc -l                         # this tree
  0

64 occurrences across 41 files, all comments. The split, measured rather than inferred
(spec#392 excluded 19 generated projections by name, so this leg asked the question):

  - generated files: 0. The module's only generated Go is pluginsgen/main.go,
    plugins_generated.go and plugins_refs_generated.go; none carries the token.
  - _test.go: 17 occurrences / 14 files.
  - non-test: 47 occurrences / 27 files.

So unlike spec this leg hides no generated majority: every site is hand-written and every
site took the per-site judgement.

Disposition: conforms to D-CODE-4.

Each rewrite keeps the reason and drops the obituary, in the safe direction the wave policy
names: where the history was load-bearing it is restated in present tense, never moved and
never deleted. The reasons that survive verbatim in substance — because they are what the
code is FOR — include: "the genuine floor a sdk-only candy cannot run" (image.go); "freshness
IS the key, because a path key cannot answer it — the same source builds under a different
path per worktree" and "the per-key lock lives in buildcache under the runtime root, never
inside the cache tree (the homes rule)" (plugin_loader.go); "the alternative is to fall back
to the operator host's own distro, which is the cross-distro bug itself" (build_overlay.go);
"shedding deploykit.ResolveSpecBox" and the three reverse-channel legs the host_build_* seams
exist for; the F11 zero-per-kind-residue assertion (provider_step.go); and every "there is no
duplicate of it here" note that stops a removed test from being re-added.

No behaviour, no wire key, no generated artifact and no build input changes. Proven, not
asserted, on the committed tree:

  $ git diff --numstat | grep -v '\.go$'
  (empty — no non-Go file in the diff)
  $ git diff -U0 | grep -E '^[+-]' | grep -vE '^(\+\+\+|---) ' | grep -vE '^[+-][[:space:]]*//'
  (empty — every changed line is a comment line)
  added comment lines 190, removed comment lines 213, non-comment changed lines 0

Gates, from charly/ with GOWORK=off:

  go build ./...   rc 0
  go vet ./...     rc 0
  go test ./...    ok github.com/opencharly/charly/charly 345.153s
                   ok github.com/opencharly/charly/charly/internal/pluginsgen 122.795s

Because no non-comment line changes, the diff cannot reach a runtime path and the change class
is prose: the R10 bed is not entered, and the tier is "documentation reviewed" on that proof
rather than on the fact that the changed files end in .go.

Out of scope here and filed rather than silently widened: 192 further occurrences outside
*.go, almost all in .agents/skills/go/references/*.md, are prose rather than code comments —
a separable surface with its own risk of falsifying a source map.

Agent: `ir-sweep-4` (subagent of `lead`) · DeepSeek Harness session `cf75466d-4cea-4c59-8a87-e58bae388c70`
Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (documentation reviewed)
@github-actions

Copy link
Copy Markdown
Contributor

Review — PASS

Head SHA: f8e09580c73455424c3e00d59540021a360c336e (branch: feat/present-tense-comments)

Security screen: PASS — no instruction injection, secrets, scope mismatch, guardrail weakening, or supply-chain change; diff is comment-only.
Checklist: All applicable rules PASS or NA. Change class is comment-only documentation; body supplies the comment-only proof (git diff -U0 … | grep -vE '^[+-][[:space:]]*//' empty), the 64→0 DELETED sweep with per-ref counts, and green build/vet/test at the committed head. D-CODE-4 (DESIGN.md:2649) cited with disposition conforms; tier documentation reviewed is legal for a comment-only diff; Agent:/Assisted-by: footers well-formed and in order; separable remainder filed as opencharly/charly#1211. Placement: CORRECT (no structural change).

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 01:52
@github-actions
github-actions Bot merged commit 6332283 into main Nov 19, 2026
4 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