[REFAC#204] internal/parser → internal/processor/parser 이동 (메타 이슈 #195 완료) - #205
Conversation
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ 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 (4)
📝 WalkthroughWalkthroughThe pull request relocates the parser implementation from Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~20 minutes Possibly related issues
Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Review rate limit: 0/1 reviews remaining, refill in 29 minutes and 4 seconds.Comment |
There was a problem hiding this comment.
Code Review
This pull request performs a major architectural reorganization by moving the internal/parser package to internal/processor/parser, ensuring all pipeline stages are grouped under the processor directory. The changes encompass widespread updates to import paths, documentation links, and test structures. Review feedback identifies several documentation inconsistencies where link labels were not updated to match the new paths and notes a misalignment in an ASCII architecture diagram caused by the longer directory names.
There was a problem hiding this comment.
Actionable comments posted: 4
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
docs/architecture/README.md (1)
3-5:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winFix minor wording inconsistency (“두 layer” → “두 레이어”).
Static analysis flags “두 layer 로” in this doc. For consistency with the rest of the Korean architecture writing, consider changing it to “두 레이어로”.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/architecture/README.md` around lines 3 - 5, Replace the inconsistent phrase "두 layer" with the Koreanized form "두 레이어" in the README content; search for the exact token "두 layer" in the document and update it to "두 레이어" so the wording matches the rest of the architecture docs and static analysis warnings are resolved.
🧹 Nitpick comments (2)
docs/architecture/internal/locks/README.md (1)
56-62: 💤 Low valueDoc link granularity check for “parser/worker” row
The “호출 측” table updates to
internal/processor/parser/worker, and the description matchesProcessingLock(StageParser). citeturn0relevant_code_snippet1turn0relevant_code_snippet2
One small consistency check: the row text includes/worker, but the href is../processor/parser/README.md(not a worker-specific page). If a dedicated worker doc exists, consider linking directly to it to avoid confusion.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/architecture/internal/locks/README.md` around lines 56 - 62, The parser row currently labels the caller as "internal/processor/parser/worker" but links to ../processor/parser/README.md; update the doc so the link and label are consistent: either change the link to point to the worker-specific page (if one exists, i.e., the worker doc for internal/processor/parser/worker) or change the label to "internal/processor/parser" to match the README; ensure the description still references ProcessingLock(StageParser) so readers can find the lock behavior.docs/architecture/internal/processor/fetcher/README.md (1)
53-56: ⚡ Quick winMinor doc grammar/wording polish
Linking to
internal/processor/parser/README.mdfor “Parser engine … 별도 패키지 …” is correct per the relocation, but the wording “Parser engine 은” looks like it may trigger the LanguageTool orthography hint. Consider adjusting phrasing to the project’s doc style (e.g., “Parser 엔진은” / “Parser 엔진은 …”) to reduce lint noise.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/architecture/internal/processor/fetcher/README.md` around lines 53 - 56, The phrase "Parser engine 은" in README.md should be changed to the project's preferred wording to avoid LanguageTool orthography hints; update the sentence that currently starts with "Parser engine 은 별도 패키지 (`internal/processor/parser/`) 로 분리됨" to use "Parser 엔진은" (or "Parser 엔진은 별도 패키지 (`internal/processor/parser/`)로 분리됨") and ensure spacing/punctuation follows existing doc style (e.g., remove extra space before "로" if present) so the link to ../parser/README.md remains intact.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/architecture/internal/processor/parser/README.md`:
- Line 66: The relative link target in the README entry for
`internal/processor/fetcher/domain/general` is incorrect (it points to
`../processor/fetcher/domain.md`); update that link target to the correct
relative path (e.g., `../fetcher/domain.md`) so the link for the
`ConvertPageToContent` entry resolves to the actual `fetcher/domain.md`
document.
- Line 3: The README contains several intra-repo links using four-level relative
paths like ../../../../internal/... which incorrectly resolve; update every
occurrence in docs/architecture/internal/processor/parser/README.md (e.g., the
links shown around the current first instance and the other occurrences at lines
~20-22 and ~57-58) to use five-level upward segments ../../../../../internal/...
so they point to the repo-root internal/ paths consistently.
In `@docs/architecture/internal/processor/parser/rule.md`:
- Around line 5-6: Update broken relative code links in
docs/architecture/internal/processor/parser/rule.md by changing all occurrences
of "../../../../internal/..." to "../../../../../internal/..." so they correctly
point from this deeply nested docs path; specifically update links referencing
internal/processor/parser/parser.go, the internal/processor/parser/rule/
directory, and the Resolver.Invalidate anchor (and any other
"../../../../internal/..." occurrences on lines near 11-12, 40-44, 64-73) to use
the extra "../" segment; ensure every markdown link and reference in the file is
updated consistently.
- Around line 127-132: The two link targets in the “호출 측” bullets incorrectly
point to the same rule.md (self) — update the links so they point to the
intended worker docs/implementation for ParserWorker and issuetracker refiner;
specifically change the links for the bullets that mention
internal/processor/parser/worker.ParserWorker (the lines referencing
ParserWorker, ParsePage, ParseLinks, and ErrNoRule / llmGen.Enqueue) to the
correct worker README or specific worker doc (e.g., ../worker/README.md or the
worker's doc page) and change the cmd/issuetracker.buildRefiner bullet to the
correct issuetracker doc page so readers land on the actual implementation docs
rather than rule.md.
---
Outside diff comments:
In `@docs/architecture/README.md`:
- Around line 3-5: Replace the inconsistent phrase "두 layer" with the Koreanized
form "두 레이어" in the README content; search for the exact token "두 layer" in the
document and update it to "두 레이어" so the wording matches the rest of the
architecture docs and static analysis warnings are resolved.
---
Nitpick comments:
In `@docs/architecture/internal/locks/README.md`:
- Around line 56-62: The parser row currently labels the caller as
"internal/processor/parser/worker" but links to ../processor/parser/README.md;
update the doc so the link and label are consistent: either change the link to
point to the worker-specific page (if one exists, i.e., the worker doc for
internal/processor/parser/worker) or change the label to
"internal/processor/parser" to match the README; ensure the description still
references ProcessingLock(StageParser) so readers can find the lock behavior.
In `@docs/architecture/internal/processor/fetcher/README.md`:
- Around line 53-56: The phrase "Parser engine 은" in README.md should be changed
to the project's preferred wording to avoid LanguageTool orthography hints;
update the sentence that currently starts with "Parser engine 은 별도 패키지
(`internal/processor/parser/`) 로 분리됨" to use "Parser 엔진은" (or "Parser 엔진은 별도 패키지
(`internal/processor/parser/`)로 분리됨") and ensure spacing/punctuation follows
existing doc style (e.g., remove extra space before "로" if present) so the link
to ../parser/README.md remains intact.
🪄 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: 39be66e3-bcc6-4c32-8beb-34862cd8ff8e
📒 Files selected for processing (46)
.claude/rules/01-architecture.mdCLAUDE.mdcmd/issuetracker/main.godocs/architecture/README.mddocs/architecture/cmd/issuetracker.mddocs/architecture/internal/README.mddocs/architecture/internal/locks/README.mddocs/architecture/internal/processor/fetcher/README.mddocs/architecture/internal/processor/fetcher/core.mddocs/architecture/internal/processor/fetcher/domain.mddocs/architecture/internal/processor/parser/README.mddocs/architecture/internal/processor/parser/rule.mddocs/architecture/internal/publisher.mddocs/architecture/internal/storage/service.mddocs/architecture/pkg/config.mddocs/architecture/pkg/links.mddocs/architecture/pkg/llm.mddocs/architecture/pkg/metrics.mddocs/architecture/pkg/queue.mdinternal/locks/processing_lock.gointernal/processor/fetcher/domain/general/convert.gointernal/processor/fetcher/domain/general/types.gointernal/processor/parser/parser.gointernal/processor/parser/rule/discovery.gointernal/processor/parser/rule/errors.gointernal/processor/parser/rule/llmgen/dedup.gointernal/processor/parser/rule/llmgen/generator.gointernal/processor/parser/rule/llmgen/prompt.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/resolver.gointernal/processor/parser/worker/cleanup.gointernal/processor/parser/worker/parser_worker.gomigrations/up/007_seed_parsing_rules.sqltest/internal/processor/parser/rule/discovery_test.gotest/internal/processor/parser/rule/llmgen/generator_test.gotest/internal/processor/parser/rule/parser_test.gotest/internal/processor/parser/rule/pathinfer/llm_test.gotest/internal/processor/parser/rule/pathinfer/pathinfer_test.gotest/internal/processor/parser/rule/refiner/refiner_test.gotest/internal/processor/parser/rule/resolver_test.gotest/internal/processor/parser/worker/cleanup_test.go
…195 완료) 이동: - internal/parser → internal/processor/parser - parser.go (도메인 중립 인터페이스) - rule/{,llmgen,pathinfer,refiner} - worker/ (Claim Check ParserWorker + RawContentCleaner) - 16개 .go 파일 import 경로 sed 일괄 치환 (issuetracker/internal/parser → issuetracker/internal/processor/parser) - internal/processor/fetcher/domain/general/types.go, internal/locks/processing_lock.go 의 doc 참조 갱신 - migrations/up/007_seed_parsing_rules.sql comment 갱신 테스트 mirror: test/internal/parser → test/internal/processor/parser 내부 동작 / 패키지명 / DB 스키마 / Kafka topic / Redis 동작 변경 없음 — 단순 path prefix 교체. git mv 로 history 보존. 28개 패키지 race test 모두 통과. 본 PR 머지 시 internal/parser/ 가 top-level 에서 사라지고, 모든 분리 worker 프로세스 (fetcher/parser/validate) 가 internal/processor/<stage>/ 하위로 일관 정렬됨. 메타 이슈 #195 완료. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- docs/architecture/internal/parser/ → docs/architecture/internal/processor/parser/ (디렉토리 이동)
- 모든 .md 의 path 참조 갱신 (internal/parser → internal/processor/parser)
- 이동된 docs 의 sibling-link 깊이 +1 보정 (../locks/ → ../../locks/, 등)
- 다른 docs 의 inverse cross-link 갱신:
- internal/processor/fetcher/{domain,core,README}.md 의 ../../parser/ → ../parser/ (sibling)
- internal/storage/service.md / internal/locks/README.md 의 ../parser/ → ../processor/parser/
- publisher.md / internal/README.md 의 (parser/README.md) → (processor/parser/README.md)
- docs/architecture/README.md 디렉토리 트리 — parser 를 processor 하위로 이동
- .claude/rules/01-architecture.md 디렉토리 트리 동일 정렬 + test mirror 갱신
- CLAUDE.md cmd/ 줄 — 실제 바이너리 목록 반영 (#198 PR 에서 누락된 분 함께 commit)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…deRabbit)
CodeRabbit (broken paths — Major):
- docs/architecture/internal/processor/parser/{README.md,rule.md} 의
../../../../internal/X / ../../../../cmd/X 는 깊이 4 (이전 위치 기준) — 이동 후 깊이 5 필요
- 모든 ../../../../internal/ → ../../../../../internal/ 일괄 치환
- 모든 ../../../../cmd/ → ../../../../../cmd/ 일괄 치환
- README.md:78 / rule.md:131 의 ../../cmd/ → ../../../cmd/ 추가 보정
CodeRabbit (Minor):
- README.md:66 의 ../processor/fetcher/domain.md → ../fetcher/domain.md
(sibling 단순 참조)
gemini (Medium — link text 일관성):
- docs/architecture/README.md:152 [parser/worker] → [processor/parser/worker]
- docs/architecture/internal/README.md:17 [parser/README.md] → [processor/parser/README.md]
- docs/architecture/pkg/queue.md:121 [`parser/worker`] → [`processor/parser/worker`]
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
연관 이슈
구현 내용
메타 이슈 #195 의 단계 4 (마지막) —
internal/parser/를internal/processor/parser/로 이동하여 정렬 원칙 완성. 본 PR 머지 시 모든 분리된 worker 프로세스 (fetcher / parser / validate) 가internal/processor/<stage>/하위로 일관 정렬되어 메타 이슈 #195 도 함께 close.코드 변경 (commit 1)
디렉토리 이동:
internal/parser/→internal/processor/parser/parser.go(도메인 중립 인터페이스)rule/{,llmgen,pathinfer,refiner}(DB-driven engine + LLM-driven 자동화)worker/(Claim CheckParserWorker+RawContentCleaner)Import 갱신: 16개 .go 파일 (
issuetracker/internal/parser→issuetracker/internal/processor/parser) sed 일괄 치환Doc 참조 정리:
internal/processor/fetcher/domain/general/types.go와internal/locks/processing_lock.go의 path-mention comment 갱신SQL comment:
migrations/up/007_seed_parsing_rules.sql갱신테스트 mirror:
test/internal/parser/→test/internal/processor/parser/(12개 test 파일)문서 변경 (commit 2)
docs/architecture/internal/parser/→docs/architecture/internal/processor/parser/(디렉토리 이동)../locks/→../../locks/, 등)internal/processor/fetcher/{domain,core,README}.md의../../parser/→../parser/(sibling 관계로 단순화)internal/storage/service.md/internal/locks/README.md의../parser/→../processor/parser/publisher.md/internal/README.md의(parser/README.md)→(processor/parser/README.md)docs/architecture/README.md디렉토리 트리 — parser 를 processor 하위로 이동.claude/rules/01-architecture.md디렉토리 트리 동일 정렬 + test mirror 갱신CLAUDE.mdcmd/ 줄 — 실제 바이너리 목록 반영 ([REFAC] crawler 잔여 fetcher 영역 → processor/fetcher 이동 (이슈 #195 단계 3, 메타 이슈 close) #198 PR 에서 일부 누락된 부분 함께 commit)변경 후 최종 구조
internal/parser/가 더 이상 top-level 에 없음. 모든 분리 worker 프로세스 가processor/<stage>/정렬 완료.CI / 머지 게이트 점검
변경 영향 범위
internal/parser/*(전체 제거),internal/processor/parser/*(전체 신규),cmd/issuetracker/main.go(import),internal/processor/fetcher/domain/general/types.go(path comment),internal/locks/processing_lock.go(path comment), 다수 docsLow-Mediumgit mv로 git history 보존go build ./... && go test -race ./...28 패키지 모두 통과 (failure 0)Required Status Checks
Commit LintPR Title LintLinked Issue CheckFormat CheckBuildTestLint롤백 계획
git revert2개 commit (코드 / 문서). DB / Redis / Kafka 영향 없음.TODO
parser/rule/flatten,domain/general/rename) 는 별도 메타 이슈로 분리논의 사항
parser/rule/의llmgen/pathinfer/refiner가 함께processor/parser/rule/하위로 이동 — LLM-driven 파싱 룰 자동화 인프라가 모두 단일 패키지 경계 안에 위치.internal/scheduler/(seed producer) 와internal/publisher/(chained sync helper) 는 worker 가 아니므로 정렬 대상에서 제외 — 사용자 확인 후 명시 (이슈 본문의 "분리된 워커" 정의 = Kafka consumer + worker pool).🤖 Generated with Claude Code
Summary by CodeRabbit
Refactor
Documentation