Skip to content

chore: bump fig-extract to v2.14.0#32

Merged
onetwothr1 merged 1 commit into
devfrom
chore/bump-fig-extract-2.14.0
Jul 24, 2026
Merged

chore: bump fig-extract to v2.14.0#32
onetwothr1 merged 1 commit into
devfrom
chore/bump-fig-extract-2.14.0

Conversation

@onetwothr1

@onetwothr1 onetwothr1 commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

soft 캡션 문서 게이트 강건화 — 혼합-관습 문서서 hard 앵커 1개가 같은 문서 soft 캡션을 전량 몰살하던 문제 해결.

엔진 변경 (figure-preview-test v2.13.1 → v2.14.0)

  • Part1: 게이트 hard 카운트를 sep-증거 hardBody로 교정 = (비-family sep 앵커) + (반복 동형 bare, 같은 form ≥2). 고립 bare 맨-라벨(캡션 라벨이 컬럼 wrap된 잔재)은 제외.
  • Part2: hardBody 3-체제 라우터 — 0 전량승격 / 1 애매역(잠정승격 → up-점수 floor 8.5 검증 → 강등 → detectPage 재실행 fixpoint) / ≥2 전량기각.

엔진 repo 게이트 (통과)

gate 스코프(3편 promoted 편입, 104편): G0 pending 0 · G1 regressions 0 · G2 resolved 8 / regressed 0 · sCritical 0.9218.
전수 diff v2.13.1 ↔ v2.14.0: ADDED 15(전부 critical/not_detected 복구: Hao 8 · s10854 4 · s11269 3) · REMOVED 0 · MOVED 0.
검증: 3 subagent + 4-critic 적대검증 패널 + 적대 코드리뷰(BUG-minor 1 수정, 코퍼스 산출 Δ0 재검증).

소비자 영향

[계약 무변경]extract() 시그니처·출력 필드·좌표계·(num,page) 키·manifest 스키마 불변.
fig-engine.ts · fig-extract.d.ts · integration.md 갱신 불요.

  • ✅ typecheck (exit 0)
  • ✅ build (exit 0)
  • ⏳ [사람] Margin 스모크 대기 (그림·표 탭 샘플 PDF 스캔·프리뷰 확인)

byte-identical copy from figure-preview-test fig-extract.js (diff 0).

🤖 Generated with Claude Code

Summary by CodeRabbit

  • 버그 수정
    • 캡션 인식 및 문서 게이트 처리의 정확도를 개선했습니다.
    • 애매한 캡션 후보를 추가 검증해 오인식 가능성을 줄였습니다.
    • 최종 추출 결과에서 불필요한 내부 정보가 표시되지 않도록 정리했습니다.

soft 캡션 문서 게이트 강건화 — hardBody sep-증거 + 3-체제 라우터.

## 엔진 repo 게이트 (통과)
gate 스코프(3편 promoted 편입, 104편): G0 pending 0 · G1 regressions 0 ·
G2 resolved 8/regressed 0 · sCritical 0.9218. 전수 diff v2.13.1↔v2.14.0
ADDED 15(전부 critical/nd: Hao 8·s10854 4·s11269 3)·REMOVED 0·MOVED 0.

## 소비자 영향
[계약 무변경] — extract() 시그니처·출력 필드 불변.
fig-engine.ts·fig-extract.d.ts·integration.md 갱신 불요.
typecheck exit 0 · build exit 0 · [사람] Margin 스모크 대기.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

엔진 버전을 2.14.0으로 올리고 soft 캡션 증거 집계와 ambiguous 승격을 변경했다. provisional 앵커의 up 점수를 검증해 낮은 점수 앵커를 강등하고 페이지를 재감지하며, 내부 앵커 태그는 최종 출력에서 제거한다.

Changes

Soft 캡션 게이트 처리

Layer / File(s) Summary
문서 증거 집계와 provisional 승격
src/core/fig-extract.js
문서 단위 hard 구분자와 반복 bare form을 분리 집계하고, ambiguous 레짐에서 승격된 soft 앵커를 provisional로 표시한다.
앵커 추적과 floor 재감지
src/core/fig-extract.js
figure와 캡션 앵커를 연결하고, upScore_가 기준 미달인 provisional 앵커를 강등한 뒤 앵커를 재조립하고 페이지를 재감지한다.
추출 연결과 내부 태그 제거
src/core/fig-extract.js
extractdetectPageWithFloor를 사용하며 최종 figure에서 내부 _anchor 필드를 제거한다.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant extract
  participant detectPageWithFloor
  participant detectPage
  participant assembleAnchors
  extract->>detectPageWithFloor: 페이지 감지 요청
  detectPageWithFloor->>detectPage: 초기 figure 감지
  detectPage-->>detectPageWithFloor: provisional 앵커와 upScore_ 반환
  detectPageWithFloor->>assembleAnchors: floor 미달 앵커 강등 및 재조립
  assembleAnchors-->>detectPageWithFloor: 갱신된 앵커 구성
  detectPageWithFloor->>detectPage: 갱신 구성으로 재감지
  detectPageWithFloor-->>extract: 최종 figure 반환
Loading

Possibly related PRs

  • enu3379/PDFViewer#26: captionAnchorsdetectPage 기반 figure 후보 산정 로직을 함께 변경한다.
  • enu3379/PDFViewer#27: soft 앵커 승격과 페이지 감지 흐름을 수정한다.
  • enu3379/PDFViewer#29: 문서 단위 soft 캡션 앵커 승격 및 hard 증거 게이트를 수정한다.

Suggested reviewers: enu3379

Poem

당근처럼 단단한 게이트가 열리고
provisional 토끼가 점수를 세네.
낮은 앵커는 살며시 내려놓고
새로 조립해 그림을 찾는다네.
속살 태그는 숨겨 둔 채
깔끔한 figure만 깡총!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목이 fig-extract를 v2.14.0으로 올린 핵심 변경을 간결하게 잘 나타냅니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/bump-fig-extract-2.14.0

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ast-grep (0.44.1)
src/core/fig-extract.js

ast-grep timed out on this file


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@onetwothr1
onetwothr1 marked this pull request as ready for review July 24, 2026 09:21
@onetwothr1
onetwothr1 requested a review from enu3379 as a code owner July 24, 2026 09:21

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
src/core/fig-extract.js (1)

206-221: 🚀 Performance & Scalability | 🔵 Trivial

임계값 근거는 이미 자체 문서화됨 — 향후 재교정 트리거만 유의.

애매역 잠정승격 soft 앵커의 최소 up-점수는 애매역 phantom과 진짜 soft 캡션 사이 gap의 중앙값이며, 3편(reject 1 phantom + target 2 recover) 실측 기반 잠정치라는 한계가 주석에 명시되어 있습니다. 코드 자체엔 문제가 없으나, hardBody==1 애매역 문서가 코퍼스에 늘어나면 SOFT_UP_FLOOR/SOFT_GATE_K 재교정이 필요하다는 점을 운영 관점에서 계측(예: regime=ambiguous 발생 빈도 로깅)해두면 향후 회귀를 조기에 잡을 수 있습니다.

🤖 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 `@src/core/fig-extract.js` around lines 206 - 221, Instrument the soft document
gate around SOFT_GATE_K and SOFT_UP_FLOOR to record how often the ambiguous
regime (hardBody between 1 and SOFT_GATE_K - 1) occurs. Preserve the existing
threshold behavior and use the project’s established logging or metrics
mechanism so future corpus growth can trigger threshold recalibration.
🤖 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.

Nitpick comments:
In `@src/core/fig-extract.js`:
- Around line 206-221: Instrument the soft document gate around SOFT_GATE_K and
SOFT_UP_FLOOR to record how often the ambiguous regime (hardBody between 1 and
SOFT_GATE_K - 1) occurs. Preserve the existing threshold behavior and use the
project’s established logging or metrics mechanism so future corpus growth can
trigger threshold recalibration.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 9c964fc9-b3a7-447b-8b8a-12e2d20ce7e0

📥 Commits

Reviewing files that changed from the base of the PR and between fdce661 and 8e2073b.

📒 Files selected for processing (1)
  • src/core/fig-extract.js

@onetwothr1
onetwothr1 merged commit 9b8a732 into dev Jul 24, 2026
3 checks passed
@onetwothr1
onetwothr1 deleted the chore/bump-fig-extract-2.14.0 branch July 24, 2026 09:30
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.

1 participant