Problem
From verification of #81 (#81 verify report, Finding #6):
「HTML 14-byte stub passes the test — no media/ dir check, no size floor. A converter regression that drops all strokes but keeps the HTML shell would go undetected.」
— Source: devils-advocate, 2026-04-19
NoteHTMLConvertTests.testNoteToHTMLSmoke() asserts exit code 0, output directory exists, index.html exists, and index.html contains <html (case-insensitive). A byte-minimal stub like <html></html> (14 bytes, no media/, no stroke data) would pass all of these.
A converter regression that silently drops all stroke rendering but keeps the HTML shell would not be caught.
Type
enhancement
Expected
Strengthen NoteHTMLConvertTests with at least two additional assertions:
media/ directory exists with ≥ 1 file — note-to-html-swift outputs stroke images and (optionally) audio to media/; an empty media/ means no strokes rendered
index.html size floor — a non-trivial floor (e.g., ≥ 2 KB) catches the empty-shell regression. Choose the floor from a reference render of the current fixture and pin it.
Optionally: for a more behaviour-pinned assertion, parse index.html with a minimal DOM check (e.g., <svg> stroke element count > 0, or JSON-embedded stroke-data size ≥ N).
Actual
// NoteHTMLConvertTests.swift:49-53 — current assertion
XCTAssertTrue(
content.lowercased().contains("<html"),
"index.html SHALL contain an <html tag"
)
Passes for any index.html containing <html, including a 14-byte stub with no actual content.
Strategy
Related
Current Status
Phase: diagnosed
Last updated: 2026-04-22 by idd-diagnose (batch)
Problem
NoteHTMLConvertTests.testNoteToHTMLSmoke()asserts exit code 0, output directory exists,index.htmlexists, andindex.htmlcontains<html(case-insensitive). A byte-minimal stub like<html></html>(14 bytes, nomedia/, no stroke data) would pass all of these.A converter regression that silently drops all stroke rendering but keeps the HTML shell would not be caught.
Type
enhancement
Expected
Strengthen
NoteHTMLConvertTestswith at least two additional assertions:media/directory exists with ≥ 1 file — note-to-html-swift outputs stroke images and (optionally) audio tomedia/; an emptymedia/means no strokes renderedindex.htmlsize floor — a non-trivial floor (e.g., ≥ 2 KB) catches the empty-shell regression. Choose the floor from a reference render of the current fixture and pin it.Optionally: for a more behaviour-pinned assertion, parse
index.htmlwith a minimal DOM check (e.g.,<svg>stroke element count > 0, or JSON-embedded stroke-data size ≥ N).Actual
Passes for any
index.htmlcontaining<html, including a 14-byte stub with no actual content.Strategy
media/directory existence + content check (≥ 1 file) toNoteHTMLConvertTestsindex.htmlsize floor assertion (baseline from reference render of current fixture; pin the number in a comment with date + fixture name so future rebaselining is traceable)index.htmlfor SVG<path>or embedded JSON stroke array length) — evaluate whether it's worth the brittleness vs. the size-floor proxyRelated
ae4bab3for the PDF pathCurrent Status
Phase: diagnosed
Last updated: 2026-04-22 by idd-diagnose (batch)