Skip to content

docs(test): put each deploy-connect test helper doc on its own function (#1042) - #1043

Merged
github-actions[bot] merged 1 commit into
mainfrom
feat/1042-comment-placement
Oct 23, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
feat/1042-comment-placement

Conversation

@aitrawog

@aitrawog aitrawog commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Post-merge fix for the charly/pr-validator's two non-blocking observations on #1042 (PASS,
merged as b92d1aa5):

  1. The closeClosersFrom doc comment sat above registeredCloserCount, so the function above was
    annotated with the wrong function's contract. It is moved onto closeClosersFrom, and
    registeredCloserCount now has its own short doc.
  2. closeClosersFrom deliberately leaves closed entries in providerRegistry.closers:
    snapshotProviderState's LIFO restore replaces that slice, so truncating in the helper would
    duplicate the restore's work. That reason is now stated in the comment; no behavior change.

Comment-only; no code path, schema, wire, or CLI change.

How tested

Comment-only change, so the non-runtime standards are the gate (no runtime tier):

# head 3f2eecc4
$ gofmt -l charly tools
(empty)
rc=0

$ cd charly && GOTOOLCHAIN=go1.26.8 go vet ./...
rc=0

$ GOTOOLCHAIN=go1.26.8 go test -run 'TestResolveTarget_AlreadyConnectedSubstrateStillResolves' -count=1 .
ok  	github.com/opencharly/charly/charly	4.550s
rc=0

$ cd charly && GOTOOLCHAIN=go1.26.8 go run github.com/golangci/golangci-lint/v2/cmd/[email protected] run ./...
0 issues.
rc=0

$ git diff HEAD^ -- charly/deploy_provider_connect_test.go | grep -E '^[+-]' \
    | grep -vE '^(---|\+\+\+)' | grep -vcE '^[+-][[:space:]]*//'
0
# 12 changed lines, 0 non-comment lines.

Rulebook compliance

  • R1: Both observations came from the fix(deploy): connect the substrate deploy provider at the resolution boundary #1042 verdict. Observation 1 was a real doc-comment
    placement defect and is FIXED here. Observation 2 (closeClosersFrom leaves closed entries in
    the slice) is rebutted with the mechanism: snapshotProviderState's LIFO cleanup restores the
    slice, so removing entries in the helper is redundant; the comment now records that reason. No
    finding is filed away.
  • R2–R5: No new abstraction, workaround, or legacy path; comments only.
  • R6: The primary umbrella checkout and other sessions' dirty submodules were not touched; this
    branch is off fresh origin/main (eda33c00). No force-push, no direct push to main.
  • R9/R10: No binary or runtime path change; no runtime gate is required for a comment-only
    change. The worktree-local gate above passed.
  • No agent merges.

Change classification

Documentation/comment-only change in a Go test file. No behavior, schema, wire, or CLI change.

Filed issues

None.

Agent: containerd-crabbox-program/fix1038 · session 8b1c01cf-7f79-4a75-bff8-240415a06208
Assisted-by: Claude Code deepseek-v4.1-flash:cloud (documentation reviewed)

…tion (#1042)

The post-merge pr-validator observation on #1042: the `closeClosersFrom`
doc comment sat above `registeredCloserCount`, describing the wrong
function. Move it onto `closeClosersFrom`, and state why that helper
keeps the closed entries in the registry slice — snapshotProviderState's
LIFO restore replaces the slice, so truncating in the helper would
duplicate the restore's work (the validator's second observation).

Comment-only; no behavior change.

Assisted-by: Claude Code deepseek-v4.1-flash:cloud (documentation reviewed)
@github-actions

Copy link
Copy Markdown
Contributor

Review — PASS

What the diff does

The change is confined to charly/deploy_provider_connect_test.go (+8/−4). Line by line:

  • The four-line closeClosersFrom doc that previously sat directly above func registeredCloserCount() is removed.
  • A new short doc is placed above registeredCloserCount, describing what that helper actually returns (len(providerRegistry.closers)), which matches the visible body of the function.
  • The original closeClosersFrom contract is restored onto func closeClosersFrom(before int) error, extended with the rationale for leaving closed entries in providerRegistry.closers (the snapshotProviderState LIFO restore replaces the slice, so truncating in the helper would be redundant).

Every removed line is a // comment (4) and every added line is a // comment (8): 12 changed lines, 0 non-comment lines. That exactly matches the body's grep evidence.

Body honesty / consistency

  • "1 changed files" — matches the single ### FILE: header.
  • "12 changed lines, 0 non-comment lines" — matches the diff arithmetically and by content.
  • The head SHA cited in the transcript (3f2eecc4) matches the stated head 3f2eecc48e16….
  • Observation 1 (misplaced doc) is genuinely fixed: the old comment described closeClosersFrom but was attached to registeredCloserCount.
  • Observation 2 (closed entries left in the slice) is now documented in the comment rather than dismissed. The stated mechanism is consistent with the existing "Cleanups are LIFO … registers it AFTER snapshotProviderState" note in the same comment.
  • "Comment-only; no behavior change" is accurate — no code, signature, import, or test-logic line changes.

Minor nit (non-blocking): the body calls the new registeredCloserCount doc a "one-line doc," while it physically wraps to two lines. This is a wording imprecision, not a contradiction of the diff's substance.

Tests

No new test coverage is shipped, which is appropriate here: the change cannot alter behavior, and the body documents the relevant non-runtime gate (gofmt, go vet, the existing TestResolveTarget_AlreadyConnectedSubstrateStillResolves, and golangci-lint). Nothing in the diff would require a new test to fail without it.

Security / scope

No secrets, injection surface, dependency, privilege, or input-handling change. The edit is coherent, complete, and introduces no duplication or dead code — it removes a misattached comment and replaces it with two correctly placed, mutually consistent comments.

Comments

The comment thread is empty, so there are no third-party claims to re-derive and no maintainer sign-off to weigh. With no designated maintainers configured, the change correctly stands on its own evidence, and that evidence (a clean comment-only diff matching the body) is sufficient.

Verdict: PASS


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

View action run

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.

2 participants