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
Phase: implemented Last updated: 2026-08-13 by idd-all / spectra-apply
Key Decisions
Phase 0 uses ZIP entry names only: Session.plist is legacy; otherwise noteBundle is modern FlatBuffers.
Modern .ntb and renamed .note containers fail locally with one stable Traditional Chinese diagnostic.
Legacy .note HTML/PDF conversion remains unchanged; full FlatBuffers parsing is not claimed.
Scope Changes
Delivery intentionally selects the issue Expected fallback: precise unsupported-generation handling, not full .ntb conversion.
Blocking
(none)
Tasks
1.1 Implement the Prove behavior with synthetic metadata-only archives test contract in Tests/MacDocCLITests/NotabilityContainerDetectionTests.swift: generate payload-free ZIP fixtures for .ntb and renamed .note, then verify the Modern Notability container rejection coverage scenarios are RED because the compiled CLI lacks the exact modern-generation diagnostic and no-output guarantee.
2.1 Implement Classify from normalized ZIP entry names without extracting payloads and Classify Notability container generation from ZIP entry metadata in Sources/MacDocCLI/NotabilityContainerDetector.swift, including legacy precedence, modern detection, unknown fallback, and a direct ZIPFoundation dependency in Package.swift; verify focused unit assertions classify synthetic entry sets and swift package describe --type json succeeds without changing the resolved ZIPFoundation revision.
2.2 Implement Gate both HTML and PDF note routes before converter construction and Reject modern FlatBuffers note conversion precisely and before output in Sources/MacDocCLI/MacDoc+Convert.swift; verify .note and .ntb HTML/PDF compiled cases emit the exact diagnostic, empty stdout, non-zero exit, and leave destinations absent while existing legacy note smoke tests remain green.
[P] 3.1 Implement Qualify documentation rather than overstate support and State the Notability generation support boundary in README.md and CONVERSIONS.md; verify a documentation regression finds legacy plist-based .note, detected-but-not-supported modern .ntb, and an explicit statement that FlatBuffers replay is not implemented.
4.1 Run the complete phase-0 acceptance: focused Notability tests, existing Note HTML/PDF smoke tests, root swift test, spectra validate detect-notability-ntb-container, dependency and privacy checks, and git diff --check; record exact results and confirm no real Notability fixture or payload content is added.
Problem
Notability 的現行筆記容器是
.ntb(實測 app 版本16.8.1),而note-core-swift的
NoteParser只認舊的 plist-based.note。拿現在的 Notability 匯出檔跑note-to-html,一定失敗。實跑(macdoc 0.5.0):
錯誤訊息本身是對的(檔案裡確實沒有
Session.plist),但它會把使用者導向錯誤的結論——「這不是 Notability 檔案」。實際上它就是 Notability 檔案,只是新世代容器。
Type
feature
Expected
note-to-html能吃現行 Notability 版本匯出的筆記;或者,若本專案決定不支援新容器,錯誤訊息要明講「偵測到新版
.ntb容器,目前僅支援舊版.note」而不是暗示檔案不對。Actual
Parser 從頭到尾找 plist,對新容器沒有任何解析路徑,錯誤訊息把格式世代問題誤報成
「不是 Notability 筆記檔」。
兩種容器的差異(實測)
.note.ntbPK\x03\x04,compression method=store)Session.plistnoteBundle— FlatBuffersHandwritingIndex/index.plistindex/ios/HandwritingIndex.fb— FlatBuffersRecordings/library.plistindex/ios/RecordingIndex.fb— FlatBuffersRecordings/*.m4aassets/<sha512>.mp4(AAC;bundle 內字串標為audio/mp4)version(內容為1)、manifest.json({"appVersion":"16.8.1"})、thumbnail.pngunzip -l的實際條目(一則含兩段錄音的筆記):FlatBuffers 表頭(前 12–16 bytes):
三個檔都是無
file_identifier的 FlatBuffers root table。manifest.json只有appVersion,沒有 schema 版本欄位——所以格式判定要靠容器內的條目結構(有無
noteBundle/Session.plist),不能靠manifest.json。已知可行的部分(不必等 parser)
assets/*.mp4是未加密的標準 AAC,ffprobe直接讀得到 duration,unzip拆出來即可用。所以「從新容器取回錄音」today 就做得到,缺的是筆跡與時間軸——也就是
note-to-html的互動重播本體。一則實測筆記的兩段錄音:
3600.02秒與1234.14秒,皆codec_name=aac。Impact
note-to-html/note-to-pdf就完全不可用。CONVERSIONS.md標示Note (.note) → HTML ✅ implemented,對這些使用者是過期的承諾。.note只會越來越少。Open questions(需要確認才好定範圍)
.note匯出? 若分享選單裡還有舊格式,本 issue 降級為「錯誤訊息要講清楚 + 文件註明版本前提」;若已完全汰換,
那就是真正的功能缺口。這題會實質改變優先級,應先回答再開工。
assets/錄音 +thumbnail.png」的降級路徑,讓使用者至少拿得回音訊與預覽圖,筆跡重播留待 schema 逆向完成?
建議的分階段做法
noteBundle就說「新版.ntb,尚未支援」);CONVERSIONS.md註明支援的是舊格式assets/*錄音與thumbnail.png,不解析筆跡階段 0 不論 open question 的答案是什麼都值得做——現在的錯誤訊息本身就是誤導。
Clarity Surface(idd-clarify run 2026-08-11T06:51:55Z)
.ntb".ntb是唯一/預設格式,亦未確認 16.8.1 是最新版(該值來自manifest.json的appVersion,即寫檔當下的 app 版本)。建議把 Problem 段改為「至少自 16.8.1 起,匯出得到的是.ntb」Current Status
Phase: implemented
Last updated: 2026-08-13 by idd-all / spectra-apply
Key Decisions
Session.plistis legacy; otherwisenoteBundleis modern FlatBuffers..ntband renamed.notecontainers fail locally with one stable Traditional Chinese diagnostic..noteHTML/PDF conversion remains unchanged; full FlatBuffers parsing is not claimed.Scope Changes
.ntbconversion.Blocking
Tasks
Tests/MacDocCLITests/NotabilityContainerDetectionTests.swift: generate payload-free ZIP fixtures for.ntband renamed.note, then verify the Modern Notability container rejection coverage scenarios are RED because the compiled CLI lacks the exact modern-generation diagnostic and no-output guarantee.Sources/MacDocCLI/NotabilityContainerDetector.swift, including legacy precedence, modern detection, unknown fallback, and a direct ZIPFoundation dependency inPackage.swift; verify focused unit assertions classify synthetic entry sets andswift package describe --type jsonsucceeds without changing the resolved ZIPFoundation revision.Sources/MacDocCLI/MacDoc+Convert.swift; verify.noteand.ntbHTML/PDF compiled cases emit the exact diagnostic, empty stdout, non-zero exit, and leave destinations absent while existing legacy note smoke tests remain green.README.mdandCONVERSIONS.md; verify a documentation regression finds legacy plist-based.note, detected-but-not-supported modern.ntb, and an explicit statement that FlatBuffers replay is not implemented.swift test,spectra validate detect-notability-ntb-container, dependency and privacy checks, andgit diff --check; record exact results and confirm no real Notability fixture or payload content is added.Commits
6a5663bfeat: detect unsupported Notability containers (note-to-html 不支援 Notability 現行的 .ntb 容器(FlatBuffers),只認舊的 plist-based .note #148)