Skip to content

docs: reattach doc comments to the declarations they describe - #12767

Open
clippytool wants to merge 1 commit into
mudler:masterfrom
clippytool:master
Open

clippytool wants to merge 1 commit into
mudler:masterfrom
clippytool:master

Conversation

@clippytool

Copy link
Copy Markdown

Description

Two doc comments in the Go tree currently describe a declaration other than the one they
are attached to. Both were caused by the same mechanical mistake: a new declaration was
inserted between a comment and the declaration it documented, so the comment slid down
onto the newcomer.

  1. core/config/distributed_config.go — ModelConfigResyncIntervalOrDefault was added
    between the StaleNodeThresholdOrDefault comment and its function (895d503, fix(distributed): converge model configs across frontends #12558).
    The comment block now opens with "StaleNodeThresholdOrDefault returns the configured
    threshold or the default." above the resync interval accessor, and
    StaleNodeThresholdOrDefault itself has no doc comment at all.

  2. core/backend/video.go — VideoReferenceOptions was added between the
    VideoGenerationOptions comment and its type (e28d500, stablediffusion-ggml: run MiniMax-H3 video with references and add its gallery entries #12668). The two-line comment
    beginning "VideoGenerationOptions is the backend-neutral request passed to video
    generators" now documents VideoReferenceOptions, while VideoGenerationOptions is left
    with no comment.

Both fixes only move comment lines back above the declaration they describe.

Notes for Reviewers

  • No code, no behavior change: git diff -U0 | grep -v '^[+-]\s*//' is empty.
  • gofmt -l reports nothing on either file.
  • go build was not run to completion locally — the clone's pkg/grpc/proto/*.go are stale
    untracked generated files (undefined: pb.Generate3DRequest et al.) and protoc is not
    installed here. That failure predates this change and is unrelated to it.
  • Found with a scan for doc comments whose leading identifier names a different
    declaration in the same file. Two more hits of the same class exist and are deliberately
    left out of this PR to keep the scope tight:
    core/http/endpoints/openai/transcription.go (the whole TranscriptEndpoint swagger
    annotation block sits on resolveTranscriptionLanguage, so swag attributes the
    annotations to the wrong function) and core/services/distributed/gallery.go
    (OperationProgressDetails carries UpdateProgress's comment). Happy to send those
    separately.

Notes for Reviewers

Signed commits​

  • Yes, I signed my commits.
  • Documentation updated (docs/content/) for user-facing changes, or not applicable

Signed-off-by: clippytool <vetclippy@outlook.com>
@localai-org-maint-bot

Copy link
Copy Markdown
Collaborator

@mudler Code-review sign-off at 4a8519ceb: good to merge, subject to repository checks. This only moves three comment lines onto the declarations they describe; there are no executable changes. Reviewed against master 48f358dd9; formatting checks pass. No runtime tests were needed for this comment-only change.

This branch has not been deployed

No deployments
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