You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From verification of #78 (#78 verify report, finding #7):
「『26 tests passed』claim in commit body is misleading: 565f4c2 adds zero tests; the 26 are pre-existing MacDocCLITests + WordToMDTests that don't exercise NoteToPDF/NoteToHTML at all.」
— Source: devils-advocate, 2026-04-18
After #78 extracted note-* packages to remote repos, macdoc has zero automated test coverage for the convert --to pdf (NoteToPDF) and convert --to html (NoteToHTML) paths. The existing MacDocCLITests and WordToMDTests exercise Word/HTML/Markdown conversions only.
If a future refactor breaks linking between macdoc and the remote note-*-swift packages, no test would catch it — only manual smoke-testing with a .note file would.
Type
enhancement
Expected
Add a smoke-test target (e.g., MacDocCLITests/NoteConvertTests.swift) that:
Bundles a small sample .note file as a test resource (via .copy("Fixtures/"))
Runs macdoc convert --to pdf <sample.note> end-to-end via Process API
Asserts: exit code 0, output file exists, file is a valid PDF (magic bytes), Producer string matches expected
Same for --to html
Optionally, add a sibling test that compares a regression baseline (e.g., expected page count, expected text content via pdftotext).
Actual
swift test# → 26 tests pass, ALL in MacDocCLITests + WordToMDTests; nothing exercises Note* paths
Tests/MacDocCLITests/ contains only Convert/HTMLToPDF/Bib/Error/etc tests — no Note coverage.
Write NotePDFConvertTests.swift with at minimum 2 assertions: (a) exit code 0, (b) output PDF exists + has PDF magic bytes — shipped in ae4bab3 with additional Producer-string assertion (verify escalation)
Write NoteHTMLConvertTests.swift with similar assertions for the HTML path — shipped in ae4bab3 (directory + index.html + <html tag assertions)
Optionally: add expected-page-count assertion using PDFKit to detect the bug: .note → pdf 分頁切錯(筆畫橫跨頁邊界、空白不合理分布) #77 logicalPageHeight regression class — shipped in ae4bab3 (escalated from optional to mandatory by verify Devil's Advocate finding; asserts pdf.pageCount >= 1)
Phase: closed Last updated: 2026-04-19 by idd-close
Key Decisions
Closed 2026-04-19 — PASS after 6-AI ensemble verify + in-scope fixes for Producer/page-count/noteFixture determinism
Verified 2026-04-19 via 5 Claude reviewers + Codex (gpt-5.4 xhigh) ensemble; Devil's Advocate + Codex caught Producer-string gap that 4 Claude reviewers missed
In-scope fixes applied (amended into ae4bab3): Producer Quartz PDFContext assertion, pdf.pageCount >= 1, sorted deterministic fallback in noteFixture(), propagate I/O errors instead of masking as "not found"
4 files / +169/-0 lines; 28 tests green (26 Swift Testing + 2 new XCTest)
Discovered + encoded 2 CLI contracts in the tests: note→html requires --css dark|light; note→html outputs a directory (index.html + media/), not a single file
Complexity: Simple — no SDD needed; 2 test files, zero production-code change
Problem
After #78 extracted
note-*packages to remote repos, macdoc has zero automated test coverage for theconvert --to pdf(NoteToPDF) andconvert --to html(NoteToHTML) paths. The existingMacDocCLITestsandWordToMDTestsexercise Word/HTML/Markdown conversions only.If a future refactor breaks linking between macdoc and the remote
note-*-swiftpackages, no test would catch it — only manual smoke-testing with a.notefile would.Type
enhancement
Expected
Add a smoke-test target (e.g.,
MacDocCLITests/NoteConvertTests.swift) that:.notefile as a test resource (via.copy("Fixtures/"))macdoc convert --to pdf <sample.note>end-to-end viaProcessAPI--to htmlOptionally, add a sibling test that compares a regression baseline (e.g., expected page count, expected text content via
pdftotext).Actual
Tests/MacDocCLITests/contains only Convert/HTMLToPDF/Bib/Error/etc tests — no Note coverage.Strategy
.notefile (single-page handwriting, < 50 KB) — deferred to refactor: extract pdf-to-latex-swift + ocr-swift to PsychQuant repos; commit Tests/WordToMDTests fixtures (continues #78 pattern) #79 (Option B per diagnosis; producing a minimal valid.noteis non-trivial since the format has no public builder API)Tests/MacDocCLITests/Fixtures/sample.note(commit to git) — deferred to refactor: extract pdf-to-latex-swift + ocr-swift to PsychQuant repos; commit Tests/WordToMDTests fixtures (continues #78 pattern) #79 (Option B overrides; usestest-files/*.note+XCTSkipinstead of bundled fixture)NotePDFConvertTests.swiftwith at minimum 2 assertions: (a) exit code 0, (b) output PDF exists + has PDF magic bytes — shipped in ae4bab3 with additional Producer-string assertion (verify escalation)NoteHTMLConvertTests.swiftwith similar assertions for the HTML path — shipped in ae4bab3 (directory + index.html + <html tag assertions)PDFKitto detect the bug: .note → pdf 分頁切錯(筆畫橫跨頁邊界、空白不合理分布) #77 logicalPageHeight regression class — shipped in ae4bab3 (escalated from optional to mandatory by verify Devil's Advocate finding; asserts pdf.pageCount >= 1)Related
Current Status
Phase: closed
Last updated: 2026-04-19 by idd-close
Key Decisions
ae4bab3): ProducerQuartz PDFContextassertion,pdf.pageCount >= 1, sorted deterministic fallback innoteFixture(), propagate I/O errors instead of masking as "not found"test/note-convert-smoke-81; commitff343b5→1631251(CLAUDE.md amend) →ae4bab3(verify fixes)--css dark|light; note→html outputs a directory (index.html + media/), not a single filetest-files/筆記 2026-03-20 15_25_20.note+XCTSkipfallback) — MVP; committable small fixture deferred to refactor: extract pdf-to-latex-swift + ocr-swift to PsychQuant repos; commit Tests/WordToMDTests fixtures (continues #78 pattern) #79Scope Changes
Blocking
Commits
ae4bab3test: add Note → PDF/HTML smoke coverage to MacDocCLITests (test: add NoteConvertTests smoke coverage (.note → pdf/html) to MacDocCLITests #81) — on branchtest/note-convert-smoke-81