refactor(dom): iterate sorted page mappings through items - #818
refactor(dom): iterate sorted page mappings through items#818seonghobae wants to merge 5 commits into
Conversation
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthrough두 페이지 빌더가 정렬된 딕셔너리 항목을 직접 순회하도록 변경되었습니다. 별도의 키 조회를 제거했으며, 동작은 변경되지 않았습니다. Changes페이지 빌더 반복문 정리
Estimated code review effort: 1 (매우 낮음) | ~2 minutes Merge Risk: ⚪ Minimal · up to Page construction now iterates sorted dictionary entries directly, preserving page ordering and content selection while avoiding unnecessary lookups. No current merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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. Comment |
|
@jules Please repair this Draft on ordinary descendants of exact head |
요청하신 대로 |
변경 범위
_build_pages_without_page_idx와_build_pages_with_page_idx에서 정렬된 dict key를 얻은 뒤 같은 mapping을 다시 조회하던 경로를sorted(mapping.items())순회로 바꿉니다. 현재 authority는 behavior-preserving refactor candidate이며 buyer-visible 성능 개선이 아닙니다.develop@e06b1f3fb10903569124af011da213951e6e247395c0d93e16f28af24eef5fc404ae073c200861casrc/newsdom_api/dom_builder.py,tests/test_dom_builder.pybranch-local performance doctrine과 자명한 Bolt 주석은 effective diff에 없습니다.
Correctness acceptance
Current head의 실제
build_dom()regressions가 다음을 고정합니다.page_idxpage_idxSource-string assertion이 아니라
ParseResponse결과를 검증합니다. 이 PR의 product acceptance는 protected implementation과의 동작 보존입니다.Current-head evidence
Terminal GREEN on exact
95c0d93e16f28af24eef5fc404ae073c200861ca:340741052413407410530634074105275340741052473407410524034074105273Two independent blockers remain and neither should be worked around in this leaf PR.
1. Protected-base pypdf security prerequisite
Security Scan
34074105227, exact-head Trivy job101610275500, checked out this exact SHA and reported three MEDIUM findings from the inheriteduv.lockpypdf 6.15.0:Canonical repair is
newsdom-api#794@96a6a50017b8c2525a139492f856cc25541d241f, which raises the declared floor to>=6.16.1,<7.0, locks 6.16.2, and is terminal GREEN in its exact-head Security Scan. This PR must not copy or depend on that mutable sibling head. Merge #794 normally into protecteddevelop, then adopt the protected descendant here by non-force restack and obtain fresh exact-head evidence.2. Organization CodeQL terminal-publication prerequisite
CodeQL PR
34074105324detects languages successfully. Both compatibility jobs dispatch successfully and then fail because no authenticated terminal verdict is available:101610776743101610776787The exact canary is already tracked by canonical owner
ContextualWisdomLab/.github#1929. Native repository CodeQL success is not a substitute.Performance claim boundary
The original benchmark claim remains withdrawn. A performance claim requires the actual DOM build path, representative/right-cleared parser payload, identical Python/runtime/CPU, protected-vs-candidate comparison, warm-up/cardinality, median/p95 and allocation/CPU profile. Removing a dict re-lookup alone is not buyer-visible evidence.
Keep Draft until the pypdf repair is part of protected
develop, this branch is normally restacked on that immutable base, all exact-head security/CodeQL gates are terminal, and qualifying current-head review is clean. No predecessor result transfer, mutable sibling dependency, dummy commit, self-approval, force push, scanner suppression, or gate weakening.