Repository navigation
test(placement): check long-image placement and share the default report - #1419
Merged
Merged
Conversation
Classify CombinePages using the selected PDFium render step, including paged document inputs while distinguishing direct picture conversions. Keep the default report in a Lazy snapshot and exercise its graph guard with a small normal and deliberately changed traversal. Cover route selection, report sharing and graph-guard regressions without changing product code or default placements. Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
KnifeLemon
approved these changes
Nov 12, 2026
KnifeLemon
left a comment
Owner
There was a problem hiding this comment.
@SeoJCalive 님, 후속 PR 고마워요. #914 리뷰에서 부탁한 두 가지(긴 이미지 분류, 보고서 한 번만 계산)가 그대로 들어왔고, mutation 여섯 개로 실패 경로를 확인해 주셔서 믿고 볼 수 있었어요. CI도 전부 통과했어요.
물어보신 세 가지
- 선택된 경로를 테스트 헬퍼에서 확인하는 방식: 이대로 좋아요. 긴 이미지는
PdfiumConverter가 실행 중에 정하는 거라서,Preset에 public 메서드를 만들면 앱에서 아무도 안 쓰는 두 번째 기준이 생겨요.CombinesPagesOf는PresetAvailability와 같은 플래그로Plan을 부르고,PdfiumConverter의 조건(pdfium단계, 여러 페이지 대상 제외)과 똑같이 맞춰져 있어서 실제로 돌 경로를 보고 있어요. - 지금 배치 유지: 네, 유지해 주세요. 제 리뷰의 "PDF 도넛에만 있다"는 말은 #914 머지 다음 날 #806 슬롯 표로 기본 배치가 바뀌면서 맞지 않게 됐어요. 짚어 주셔서 고마워요. 슬롯마다
AsNamed입력이 있으니KnownGenericOnly가 비어 있는 게 맞고,pub이Generic으로 나오는 것도 맞아요(LibreOffice Draw의 PNG 내보내기는 첫 페이지만 나와요). 그 부분은 이 PR에서 다룰 건 아니에요. - 공유 방식: 좋아요.
MainWindow컬렉션이DisableParallelization = true이고AvaloniaFact가 헤드리스 디스패처 하나에서 돌아서,Lazy와Priority변경이 다른 테스트와 겹치지 않아요. 기본Lazy는 예외도 캐시하니까 그래프 검사가 실패하면 다섯 테스트에 같은 메시지가 나오는데, 오히려 보기 편해요. 공유 보고서가 첫 순회의 스냅숏이라는 설명도 정확해요.
사소한 것 (선택, 머지에 영향 없음)
Graph_fingerprint_is_stable_during_the_run의Assert.Throws<Xunit.Sdk.TrueException>은ClassifyAll의 다른Assert.True(알 수 없는 프리셋)로도 통과할 수 있어요. 지금은to-png라서 괜찮지만, 반환된 예외 메시지에"Graph changed during ClassifyAll"이 들어 있는지까지 보면 더 단단해져요.CombinesPagesOf의("tiff" or "gif" or "apng" or "mng")는PdfiumConverter.MultiPageTargets와 같은 목록이에요. 같이 바뀌도록 주석으로 출처를 남겨 두면 좋겠어요.p7m이 "Partly generic"으로 나오는 건 테스트가p7m → png직행 간선을 고르기 때문이에요. 앱에서는 봉투를 열고 안쪽 파일 기준으로 경로를 짜서(PlanThrough) 서명된 PDF나 DOCX도 긴 이미지가 돼요. 원하시면 한 줄 주석이면 충분해요.
머지할게요.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this change?
Follow-up to your review of #914: the default-placement tests now check the long-image (
CombinePages) slots by the route that would actually run, and the full placement report is computed once and shared. Onlytests/Filee.App.Tests/DefaultPlacementTests.cschanges; three implementation choices I'd like your opinion on are under Notes for review.Type of change
How was it tested?
dotnet format --verify-no-changes:dotnet format Filee.slnx --verify-no-changes --no-restore --severity warnexits 0.dotnet test: placement and availability tests 29/29, Core full suite 1,342 passed / 4 skipped / 0 failed on5b91b379. The App full suite could not finish on my Linux server (see below), so it is left to this PR's CI.Details
Rebased onto
5b91b379before measuring the new baseline.dotnet test tests/Filee.App.Tests -c Release --filter FullyQualifiedName~DefaultPlacementTestsworks with the X11 wrapper and TMPDIR: 10/10 pass.5b91b379with this change: 1,342 passed, 4 skipped, 0 failed (the change is test-only inFilee.App.Tests).47e24cd3with this change: 2,281 passed, 6 failed, 28 skipped (2,315 total; the clean47e24cd3run had 2,313 total, the difference being the two new tests). All six failures also fail on the clean47e24cd3run in this environment:AnnotateWindowTests.A_label_is_drawn_as_its_box_showed_it_while_it_was_typed(Hindi),RenderTests.Engines_page_shows_versions_descriptions_and_download_speed, bothGnomePointerBridgeTests.Real_unix_socket_*tests, and the Japanese cases ofLocalizationResourceTests.Han_characters_take_the_embedded_font_of_the_ui_languages_regionandFileeFontCollectionTests.A_letter_Noto_Sans_lacks_reads_its_family_and_leaves_later_ones_unread. No failure appears only with this change.c458122f, the local App full run did not complete: the test host aborted after about 3 h 56 min when this server's per-user thread limit was reached (reported by .NET as out of memory). The failures it recorded before that point were four of the same pre-existing ones (both GNOME socket tests and the two Japanese font cases).puband the newly addedp7m(P7mConverter has a direct edge, so p7m→PNG is reported as ordinary without a PDFium step); no new generic-only slot appears.Screenshots (UI changes)
None; this change has no UI.
Checklist
src/Filee.App/Assets/i18n/*.jsonfilesTHIRD-PARTY-NOTICES.mdNotes for review
In the review, you asked for long-image classification in a follow-up:
CombinePagescan mean an ordinary PNG conversion on a picture rather than the named page operation. You also suggested a staticLazy<Report>as a later, non-blocking way to avoid recalculating the whole report, and said PDF merge did not need another special-operation check. This PR covers those two directions and leaves PDF merge out.What changed:
CombinePagesrequest and selected-route classification without changing product code.Lazy<Report>and assert both reference identity and one factory invocation.N-up adds palette presets and a PDF-to-PDF option but no default donut slots; it is outside this special-operation list.
Implementation choices for your opinion:
Presetmethod? It recognizes apdfiumstep from PDF to a target other than TIFF/GIF/APNG/MNG, with the same catalog, priorities and frame/motion/live/OCR/translation flags used for availability. This counts documents that actually render through PDF, while rejecting an available but unselected PDF detour. It does not open files or count pages: a one-page PDF is still a page-capable format here.KnownGenericOnlylist? All three have runnable inputs that satisfy the operation.pubis the office exception: its selected LibreOffice-to-PNG route bypasses PDFium, so it changes fromAsNamedtoGeneric. It does not make the whole slotGenericOnly. Mail inputs keep their existingUnusableclassification.AvaloniaFactaccessor, retain the first traversal's graph check, and use a one-slot probe for the independent graph regression? The probe exercises both an unchanged traversal and a deliberate Priority change, restoring the original reference infinally. It also catches removal of the graph assertion. The shared report is a snapshot of its initial traversal, not a promise that the graph stays unchanged for the assembly's lifetime.