Repository navigation
docs: describe present code in comments (D-CODE-4) - #1212
Conversation
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)
Review — PASSHead SHA: Security screen: PASS — no instruction injection, secrets, scope mismatch, guardrail weakening, or supply-chain change; diff is comment-only. Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
Summary
The
charlyleg 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:Disposition:
conforms.The count is a pair, both halves produced by a command at its own ref:
The split, measured at the base rather than inferred.
spec#392excluded 19 generated projections by name, so this leg asked the same question of its own 64: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 thinHostBuild("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 ignoresCHARLY_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.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:
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 reviewedon that proof — not on the fact that the changed files happen to end in.go.Gates on the committed tree
f8e09580, fromcharly/, withGOWORK=off:The
-count=1run is a forced re-execution at the committed head (an earlier run against the identical working tree reported345.153s/122.795s; the second was made uncached so the pasted fence is a run on the commit, not a cache hit).Rulebook compliance
/charly-internals:git-workflow,/charly-internals:go,/charly-internals:designbefore any repo command./home/atrawog/Sync/Atrapub/lo/dsh/opencharly/.worktrees/p143-charly/charly,git rev-parse --show-toplevelconfirmed equal to the path edited before committing;git status --porcelainstated and empty after the commit; no force-push, no bypass, no submodule checkout edited in place.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, sopackaging:is untouched.DESIGN.md:2649), dispositionconforms.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
*.go, almost all in.agents/skills/go/references/source-map.md(110) plus thegoskill body. Those are prose documents, not code comments, so they are a separable unit: a mechanical substitution there would delete the reason behind each removal, and a source map's editorial shape is a decision this change should not take silently. Related: the go and plugin skill bodies carry two pre-existing stale claims now that charly is their home of record #1041, docs(go): the source map calls spec/schema/*.cue package-less — they are now onepackage schemain a module #1112.Agent:
ir-sweep-4(subagent oflead) · DeepSeek Harness sessioncf75466d-4cea-4c59-8a87-e58bae388c70Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (documentation reviewed)