feat: two log lines to corner the import hang #17
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/import-hang-pinpoint"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Field report #2 (with #16's logging live): a 47-file wizard upload transferred perfectly, then hung with
Import of 47 upload(s) into chapter … beginsas the last line. Everything in that silent window is a first touch of a data volume: the chapter/pages reads (db volume), then the first file write (projects volume). Both were only logged after completing — which is exactly when a stuck mount never lets them.Two lines close the gap:
Chapter found with {N} existing page(s); storing images— after the SQLite reads. Hang before it → db volume.Storing {FileName}…— before every save (theStored … in N msline stays as the completion). Hang after it → projects volume.The next hang names its volume in the last line it prints. All 285 tests pass.
🤖 Generated with Claude Code
Summary
Summary
Coverage
Orihon.BlazorAdapter - 80.3%
Orihon.Domain - 100%
Orihon.Infrastructure - 99%
Orihon.Kernel - 90.9%
Orihon.Server - 92%
Orihon.UseCases - 99%
🔮 fufu~ Jibril reviewed your code!
Oh? Oh! A two-line follow-up to #16, still chasing that import hang across its volume boundaries~ ♪ The Flugel does love a method that narrates itself — every disk touch announced, every silent window closed. Let me look closely, fufu~
Verdict: ✅ Looks good to me~
This is a textbook surgical diagnostic addition. +8/-0 across a single file, two
LogInformationcalls, two informative comments. Nothing more, nothing less. Exactly the right shape for the job.Both placements are correct and load-bearing — I traced them against the actual I/O order in
ExecuteAsync:Chapter found with {ExistingCount} existing page(s); storing images) lands afterpages.ListByChapterAsync(line 55, the db-volume read) and beforeimages.SaveAsync(line 88, the projects-volume write). A hang before this line → db volume; after → projects volume. The comment says exactly that. ♡Storing {FileName}…) sits beforeStopwatch.StartNew()+SaveAsync, pairing with the existing completion line at 97 (Stored … in N ms). The comment's defense of "before, not just after" is the whole point — a dead mount hangs the start of the write forever, and only a preceding line can name it. Sharp reasoning~Sibling consistency — perfect. Every other log call in this method (lines 46, 51, 79, 91, 97, 109, 121, 148, 157, 167) uses
log.LogInformation/LogWarningwith structured placeholders{LikeThis}— never string interpolation. Both new lines match exactly:{ExistingCount},{FileName}. The ellipsis…(U+2026) in "Storing {FileName}…" mirrors the existing "Buffering zip {FileName} into memory…" at line 157. The casual tone of the two new comments ("the two first-touches this method makes on separately mounted disks", "the write is the line's whole point") matches the prose style of the surrounding code's doc comments. Nothing sticks out.No new code branches → no coverage debt. Logging is unasserted everywhere in this codebase by convention (I grepped — no
TestLogger/CaptureLogger/VerifyLogsanywhere in tests/), and these two lines ride the already-testedImportPagespaths. Asking for direct log assertions here would be inventing a convention this project deliberately doesn't follow.Verification:
Microsoft.TestPlatform.TestHost, zero overlap with this PR's file).e6457fb(PR just opened, no coverage bot comment yet) — local verification used.No blockers, no non-blocking nits — there's genuinely nothing to tease here, fufu~ The comments don't just narrate what the lines do, they explain why each one is placed exactly where it is. That's the difference between diagnostic logging that rots and diagnostic logging that survives. The next hang will name its volume in its last line. Go catch it~ ♡
Automated review by Jibril · 2026-07-25
CI/CD: absent for head
e6457fb(PR just opened) · Local checks: build 0/0, 285/285 tests pass