Skip to content

E01 · F06 · AUD-009 — Audit F06: polygon stretched to fill its box ​

Full check of F06 in depth and of the project in breadth, following audit.md (ADR-0020), with the /audit skill.

Acceptance criteria ​

  • Given the functions of F06, when audited, then every formula is re-derived, every expected value recomputed by hand, and each function survives a mutation spot-check.
  • Given the sources, when audited, then every @see of F06 is re-verified online and dated.
  • Given the project, when audited, then no duplicate, no copied code and no inconsistency between code, domain, ADRs and docs remains unrecorded.

Tasks ​

One task = one commit, referenced as AUD-009.Tn.

Findings (2026-10-12) ​

Independent review by the auditor subagent (sections A to E, on a copy of the committed tree, its own implementation of the derivation), quality gates and sections F to H by the agent. Each story of F06 had its own review before (pull requests #143, #144, #146, #147).

CheckResultEvidenceAction
A1 — derivation re-derivedcorrectsteps 1–6 implemented again without the code: the 9 check rows, λ_lo and λ_hi for every n (pentagon 6.74030, hexagon 1/3), note 0011's table—
A2 — a test commentwrong angleφ₁ ≈ 8.7°, not 9.2°, for the pentagon at λ = e⁻³ (the conclusion, NaN, holds)fixed
A3 — very large sizescorrect, untested above 1000boxes up to 100 000 and 1 × 100 000 checked by hand: finite, the four sides touched within 1e-9properties raised to 100 000
A4 — one mutation per function (14)caughtbisection halves swapped, boxAspect inverted, the guard halved, no mirror, the ratio inverted, no reversal, no y flip, the bracket at 1.8…—
A4 — three survivorsequivalentbisection returning its low end (one ulp), >= as > in the guard (no case lands on π/n exactly), the low bracket halved (λ_lo ≥ 1/3)recorded
A5 — propertiesthe even closure for every λ only tested at three valuesstep 2 of the derivationa property over ln λ in [−3, 3]
B — sourcesreachable, quotes verbatim8 sources re-opened (the two lecture PDFs decompressed by hand)three old [verified] dates set to 2026-10-12
B — derivation headerREF-SVG2-COORDS cited in step 6, missing from the headerdocs/derivations/stretched-polygon.mdadded
C — provenancewritten from the derivationno library pattern, no dependency added—
D — duplicatesnoneunitStretchedPolygon(n, 1) and unitRegularPolygon both give a regular polygon, kept apart so that F02 is drawn bit for bit—
E — research note 0011sides turning for side directionsthe other equal-sided octagonsfixed
E — code, TSDoc, derivation, domain, ADR-0037consistentrule C, guard π/n, anchor without effect, radii per corner, conversion without moving; every criterion tagged in tests—
F — quality gatesgreencheck:all, 673 tests, coverage 100 % of src/, npm run build; no .skip; two justified casts in tests—

G. Next steps ​

F06 is the last feature of E01: after VAL-009 come REV-001 and RET-001. The next epic, E14 (curves with handles, ellipses, round shape), will need at its first spike: the offset of a cubic Bézier curve and of an ellipse (no closed form: approximation and tolerance), Bézier intersections for booleans (E03) and arc length for dashes (E04), SVG's elliptical arc command, Figma's three handle modes and Inkscape's smooth nodes, and the round shape of F10 kept on the tag archive/f10-round-shape (research note 0010).

H. Light evolvability check ​

QuestionAnswer
Size116 modules in src/, 673 tests; F06 added 12 small files (one export each)
Toolsthe auditor's own implementation of each derivation keeps catching what one-per-story reviews miss (the pentagon's highest scale in EN-017)
Fitness functionsthe monotonic sweeps run in 0.3 s; proving them is in the improvement log
Patternsa sound interval found by bisection, then a value inside it: reusable
Agent configurationnothing new beyond CHK-009's three pitfalls
Processthe Product Owner asked mid-run to compare rule C with rule B at the validation: the demo page shows both, generated outside the library