[REFAC#301] 코드 주석 정리 — 단순 이슈/PR 참조 제거 - #302
Conversation
코드베이스 전반의 주석에서 git log / PR 본문에 속하는 단순 이슈/PR 참조를 일괄 제거. 주석에는 WHY (race window / hidden invariant / non-obvious fallback) 만 남기고, 변경 이력 / reviewer 피드백 메타데이터는 제거. 처리 패턴: - " (이슈 #N)" / " (이슈 #N 단계 K)" / " (이슈 #N 후속)" 류 끝부분 단순 참조 — 삭제 - "// 이슈 #N: <WHY>" / "// PR #N <reviewer>: <WHY>" 시작부 — "// <WHY>" 로 단순화 - "// PR #N <reviewer> 피드백 — <WHY>" — "// <WHY>" 만 보존 - "이슈 #N 의 / 이후 / 에서" 본문 mid-clause — 조사 정리 후 본문만 보존 - "본 PR scope" 자기 참조 — "현재 구현" 등 시점 중립 표현으로 교체 검증: - 593 → 0 매칭 (이슈 #N / PR #N 참조) - 본 PR 자기 참조 0건 - go build / go test -race 통과 - go vet 통과 - gofmt 적용 scope: - internal/ 전체 - pkg/ 전체 - cmd/ 전체 - test/ 제외 (검증 의도 명시 주석 보존 우선) 본 PR 은 단순 메타데이터 정리 — 기능적 변경 0. Docstring 정합성 (식별자명 첫 단어 등) 추가 보강은 후속 sub-issue 권장. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Warning Rate limit exceeded
To continue reviewing without waiting, purchase usage credits in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughMonorepo refactor updates comments/docs and rewires startup. Adds resolver caches, retry schedulers (immediate/delayed), chromedp graceful capture/status checks, publisher/scheduler pipeline guard, SampleURL repository, blacklist normalization, parser worker blacklist handling, plus minor API surface tweaks. ChangesEnd-to-end pipeline refactor with targeted functional updates
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested labels
Poem
✨ Finishing Touches🧪 Generate unit tests (beta)
|
There was a problem hiding this comment.
Code Review
This pull request primarily focuses on cleaning up code comments by removing redundant issue references (e.g., '이슈 #123') across various files in the codebase. The changes improve the clarity and conciseness of the documentation. I have identified three specific instances where the removal of these references left behind dangling punctuation or empty comment lines that should be cleaned up to maintain code quality.
이슈 참조 sed 처리 후 잔존한 5건의 sed artifact 정리: - retry_scheduler.go:24 / pathinfer.go:135 / parser_worker.go:832 / emitter.go:119: 마침표 단독 주석 라인 (`//.` 또는 `// .`) 4건 → 통째 삭제 - pool.go:236: `// . 본문` 형태 1건 → `// 본문` (마침표+공백만 제거, 본문 보존) gemini 3건 피드백 반영. 본문 의미 손상 없이 가독성 회복. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 5
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
internal/processor/fetcher/worker/chromedp_handler.go (1)
23-31:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winResidual issue references contradict the PR objective claim of "593 → 0".
PR objectives state all issue/PR references and reviewer-feedback metadata were removed (
이슈/PR 참조 라인 593 → 0), but several remain in this file and across the diff:
- This file, line 30:
다음 sub-issue#230에서 worker_id 별 Chrome RemoteURL 까지 매핑하면 ...- This file, line 23:
per-worker Semaphore 모델 + 실효 동시성 정정 (gemini 피드백)internal/processor/fetcher/domain/general/chain_handler.goline 61:sub-issue#229머지 직후 시점cmd/issuetracker/main.goline 302:다음 sub-issue (#230) 에서 worker_id 별 RemoteURL 까지 매핑하면 ...If these are intentionally retained (because they encode WHY/future-context the author wants to keep), please reconcile the PR description statistics; otherwise drop the issue numbers and reviewer-attribution suffixes per the stated cleanup policy. The technical content is fine to keep — only the metadata (
#229,#230,(gemini 피드백),(CodeRabbit 피드백),(Copilot 피드백)) should be stripped or rephrased as neutral WHY notes.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@internal/processor/fetcher/worker/chromedp_handler.go` around lines 23 - 31, Remove residual issue/PR references and reviewer-attribution tokens from the comment blocks that contradict the PR claim (e.g., the Semaphore comment containing "gemini 피드백" and "sub-issue `#230`" and any nearby "sub-issue `#229`" or reviewer tags); replace them with neutral explanatory notes about intent (e.g., "future work: map worker_id to Chrome RemoteURL" or "feedback: adjust per-worker semaphore semantics") or delete the metadata entirely so the comment only conveys technical rationale. Update the comments in chromedp_handler.go (the per-worker Semaphore block) and the other referenced comment locations to strip any "#<number>" markers and parenthesized reviewer names, ensuring the content remains clear but contains no issue/PR or reviewer identifiers.
🧹 Nitpick comments (1)
internal/processor/parser/rule/pathinfer/llm.go (1)
37-37: 💤 Low valueConsider removing the refactoring suggestion or converting to a TODO.
The comment "그곳으로 이전 가능" (can be moved there) describes a potential future refactoring rather than explaining WHY the constant is currently at package level. Per the PR objective of removing metadata and preserving only WHY comments, this note could be removed. If the relocation is genuinely tracked work, convert it to a TODO with a username or issue reference; otherwise, delete the sentence.
♻️ Proposed simplification
-// pathinfer 패키지 안 inline 상수. 그곳으로 이전 가능. +// pathinfer 패키지 안 inline 상수.Or, if actionable:
-// pathinfer 패키지 안 inline 상수. 그곳으로 이전 가능. +// TODO(juhy0987): pathinfer 패키지 안 inline 상수로 이전 검토🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@internal/processor/parser/rule/pathinfer/llm.go` at line 37, In llm.go inside the pathinfer package remove the ephemeral refactor note that reads "그곳으로 이전 가능" (or replace that single sentence with a TODO that references an owner or issue, e.g., TODO(`@username`|#issue) if this move is tracked); keep the explanatory WHY comment only and do not introduce extra metadata or rationale lines.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@internal/processor/fetcher/core/models.go`:
- Line 123: The PR added a new field LLMRetryCount on RawContentRef /
TopicFetched (LLMRetryCount int `json:"llm_retry_count,omitempty"`) which is a
schema/data-contract change; decide whether to keep it here or remove it: if
this PR must remain comments-only, remove the LLMRetryCount field from
RawContentRef/TopicFetched and any usage in requeue logic/tests, and create a
follow-up PR that documents and adds the field with migration notes; otherwise,
mark this PR as a schema change, add a short PR description documenting the new
field and its purpose (llm_retry_count used by requeue logic), and ensure tests
and consumers are updated accordingly.
In `@internal/processor/fetcher/rule/upgrader.go`:
- Around line 291-294: The GoDoc above hostnameOf incorrectly includes text
about newRepublishJobID; remove or move the stale newRepublishJobID description
so the comment block only documents hostnameOf (its parameters, behavior on
parse failure, and return value). Ensure newRepublishJobID retains its own GoDoc
(as already present at its definition) and that hostnameOf's GoDoc starts with a
clear one-line summary for hostnameOf followed by the brief details about
fallback behavior.
In `@internal/processor/fetcher/worker/pool.go`:
- Around line 235-238: The comment about worker goroutines is split incorrectly
with a leading period at the start of the next line; merge the broken sentence
so the period is at the end of the previous line and remove the stray leading
"." at the start of the following line—update the comment that references
"worker goroutine", "worker_id", "JobHandler" and "ChromedpJobHandler" so it
reads as one continuous sentence (preserving the existing wording about
per-worker resources, priority pools, and consistent wiring).
In `@internal/processor/parser/worker/parser_worker.go`:
- Around line 831-833: Remove the stray comment line containing just "//." near
the LLMRetryCount comment and the ref creation; either merge that period back
into the preceding comment about LLMRetryCount/serialization or delete the
orphaned comment so the block around item.RawRef and the comment describing
serialization (referencing ref := item.RawRef and LLMRetryCount) is clean and
grammatically correct.
In `@internal/scheduler/emitter.go`:
- Around line 117-120: Remove the stray orphan comment line containing only
"//." in emitter.go inside the error handling after e.producer.Publish; either
delete that line or fold the period into the preceding comment that documents
releaseGuardOnFailure so the comment reads naturally; ensure the block around
e.producer.Publish(ctx, msg) and the call to e.releaseGuardOnFailure(ctx,
guardURL, guardAcquired, job) has a single coherent comment (no standalone
"//.") to avoid leftover artifacts.
---
Outside diff comments:
In `@internal/processor/fetcher/worker/chromedp_handler.go`:
- Around line 23-31: Remove residual issue/PR references and
reviewer-attribution tokens from the comment blocks that contradict the PR claim
(e.g., the Semaphore comment containing "gemini 피드백" and "sub-issue `#230`" and
any nearby "sub-issue `#229`" or reviewer tags); replace them with neutral
explanatory notes about intent (e.g., "future work: map worker_id to Chrome
RemoteURL" or "feedback: adjust per-worker semaphore semantics") or delete the
metadata entirely so the comment only conveys technical rationale. Update the
comments in chromedp_handler.go (the per-worker Semaphore block) and the other
referenced comment locations to strip any "#<number>" markers and parenthesized
reviewer names, ensuring the content remains clear but contains no issue/PR or
reviewer identifiers.
---
Nitpick comments:
In `@internal/processor/parser/rule/pathinfer/llm.go`:
- Line 37: In llm.go inside the pathinfer package remove the ephemeral refactor
note that reads "그곳으로 이전 가능" (or replace that single sentence with a TODO that
references an owner or issue, e.g., TODO(`@username`|#issue) if this move is
tracked); keep the explanatory WHY comment only and do not introduce extra
metadata or rationale lines.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 66a5ce1e-8089-4359-8395-7e68c96c8e53
📒 Files selected for processing (110)
cmd/issuetracker/main.gocmd/processor/main.gocmd/rule-validator/main.gointernal/locks/ingestion_lock.gointernal/locks/pipeline_guard.gointernal/locks/processing_lock.gointernal/processor/fetcher/core/http2_metrics.gointernal/processor/fetcher/core/http_client.gointernal/processor/fetcher/core/http_status.gointernal/processor/fetcher/core/models.gointernal/processor/fetcher/core/worker_id.gointernal/processor/fetcher/domain/general/chain_handler.gointernal/processor/fetcher/domain/general/handler.gointernal/processor/fetcher/domain/general/sources/registry.gointernal/processor/fetcher/domain/general/types.gointernal/processor/fetcher/handler/handler.gointernal/processor/fetcher/implementation/chromedp/fetch.gointernal/processor/fetcher/implementation/chromedp/graceful_timeout.gointernal/processor/fetcher/implementation/chromedp/parse.gointernal/processor/fetcher/implementation/chromedp/types.gointernal/processor/fetcher/implementation/goquery/fetch.gointernal/processor/fetcher/implementation/goquery/parse.gointernal/processor/fetcher/rule/counter.gointernal/processor/fetcher/rule/downgrader.gointernal/processor/fetcher/rule/force_fetcher_token.gointernal/processor/fetcher/rule/raw_id_tracker.gointernal/processor/fetcher/rule/resolver.gointernal/processor/fetcher/rule/upgrader.gointernal/processor/fetcher/stage.gointernal/processor/fetcher/worker/chromedp_handler.gointernal/processor/fetcher/worker/circuit_breaker.gointernal/processor/fetcher/worker/manager.gointernal/processor/fetcher/worker/pool.gointernal/processor/fetcher/worker/retry_scheduler.gointernal/processor/fetcher/worker/semaphore.gointernal/processor/parser/parser.gointernal/processor/parser/rule/blacklist_matcher.gointernal/processor/parser/rule/claudegen/container.gointernal/processor/parser/rule/claudegen/worker.gointernal/processor/parser/rule/discovery.gointernal/processor/parser/rule/invalidating_repo.gointernal/processor/parser/rule/llmgen/confidence.gointernal/processor/parser/rule/llmgen/dedup.gointernal/processor/parser/rule/llmgen/generator.gointernal/processor/parser/rule/llmgen/pending.gointernal/processor/parser/rule/llmgen/prompt.gointernal/processor/parser/rule/llmgen/stale_counter.gointernal/processor/parser/rule/llmgen/wiring/wiring.gointernal/processor/parser/rule/parser.gointernal/processor/parser/rule/pathinfer/llm.gointernal/processor/parser/rule/pathinfer/pathinfer.gointernal/processor/parser/rule/refiner/llm_adapter.gointernal/processor/parser/rule/refiner/metrics.gointernal/processor/parser/rule/refiner/refiner.gointernal/processor/parser/rule/refiner/wiring/wiring.gointernal/processor/parser/rule/resolver.gointernal/processor/parser/rule/seeded.gointernal/processor/parser/rule/validator/adapter.gointernal/processor/parser/rule/validator/llm_validator.gointernal/processor/parser/rule/validator/pool.gointernal/processor/parser/rule/validator/validator.gointernal/processor/parser/stage/stage.gointernal/processor/parser/worker/cleanup.gointernal/processor/parser/worker/parser_worker.gointernal/processor/processor.gointernal/processor/validate/community/validator.gointernal/processor/validate/news/validator.gointernal/processor/validate/stage.gointernal/processor/validate/types/types.gointernal/processor/validate/validator.gointernal/processor/validate/worker.gointernal/publisher/publisher.gointernal/scheduler/emitter.gointernal/scheduler/entries.gointernal/scheduler/scheduler.gointernal/scheduler/source.gointernal/storage/blacklist.gointernal/storage/content.gointernal/storage/errors.gointernal/storage/fetcher_rule.gointernal/storage/parsing_rule.gointernal/storage/postgres/blacklist.gointernal/storage/postgres/content.gointernal/storage/postgres/fetcher_rule.gointernal/storage/postgres/parsing_rule.gointernal/storage/postgres/sample_url.gointernal/storage/sample_url.gointernal/storage/service/content.gointernal/storage/service/raw_content.gointernal/storage/validation_status.gopkg/config/config.gopkg/llm/capabilities.gopkg/llm/chain/chain.gopkg/llm/chain/policy.gopkg/llm/llm.gopkg/llm/measured.gopkg/llm/policy/fixed.gopkg/llm/policy/hybrid.gopkg/llm/policy/latency.gopkg/llm/policy/policy.gopkg/llm/prompt/prompt.gopkg/llm/providers/anthropic/anthropic.gopkg/llm/providers/gemini/gemini.gopkg/llm/providers/openai/openai.gopkg/llm/providers/providers.gopkg/llm/wiring/wiring.gopkg/metrics/metrics.gopkg/queue/config.gopkg/urlguard/gate.gopkg/urlguard/pattern.go
CodeRabbit Minor: hostnameOf 위에 newRepublishJobID 의 stale 첫 줄이 잔존하여 godoc 이 잘못된 함수 설명을 hostnameOf 에 attach. newRepublishJobID 는 본인의 godoc 을 별도로 보유. Stale 라인 1줄 삭제. CodeRabbit 의 다른 3건 sed artifact 지적 (pool.go / parser_worker.go / emitter.go) 은 직전 commit b09b3cd 에서 이미 fix 됨. CodeRabbit 의 Minor #1 (RawContentRef schema 호환성 verify-only) 은 코드 변경 요구 아님 — LLMRetryCount 는 omitempty + Go json decoder 가 unknown 필드 ignore — 호환성 OK. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
연관 이슈
구현 내용
코드베이스 전반의 주석에서 git log / PR 본문에 속해야 하는 단순 메타데이터 를 일괄 제거.
주석에는 WHY (race window / hidden invariant / non-obvious fallback) 만 보존하고, 변경 이력 /
reviewer 피드백 / 이슈 번호 등은 제거하여 향후 churn 방지.
처리 통계
처리 패턴
적용 범위
CI / 머지 게이트 점검
변경 영향 범위
Required Status Checks
로컬 검증 통과
롤백 계획
PR revert 만으로 즉시 복원 — 기능 코드 변경 0 이라 데이터/운영 영향 없음.
TODO (후속 권장)
논의 사항
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Documentation