Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/backlog/features/E14-F13-every-calculation-named.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The Product Owner asked for no further questions: F13 is done after F10, and bot
## Acceptance criteria

1. Every calculation in `src/` that mathematics names is a call to a function of that name, with its `@see` source; a list of those left inline, each with its reason, is kept in the feature's audit.
2. The duplicates found by the audits are merged into one function each.
2. The duplicates found by the audits are merged into one function each, unless merging would change a floating-point result (then both are kept and say why).
3. Every drawing is identical bit for bit: the tests' exact values unchanged, no expected value edited.
4. No new feature, no business rule changed, the approximations kept.

Expand All @@ -37,7 +37,7 @@ The Product Owner asked for no further questions: F13 is done after F10, and bot
| [EN-029](../stories/E14-F13-EN-029-name-model-and-playground.md) | Enabler | Pass 1: name the calculations of the model, io, render and playground | done |
| [CHK-013](../stories/E14-F13-CHK-013-checkpoint-f13.md) | Checkpoint | Checkpoint between the two passes | done |
| [EN-030](../stories/E14-F13-EN-030-second-pass.md) | Enabler | Pass 2: what pass 1 missed, and the duplicates | done |
| [AUD-014](../stories/E14-F13-AUD-014-audit-f13.md) | Audit | Audit F13 | ready |
| [AUD-014](../stories/E14-F13-AUD-014-audit-f13.md) | Audit | Audit F13 | done |
| [VAL-013](../stories/E14-F13-VAL-013-validate-f13.md) | Validation | Validate F13 | ready |

Set ready by the run (ADR-0045).
Expand Down
19 changes: 17 additions & 2 deletions docs/backlog/stories/E14-F13-AUD-014-audit-f13.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ id: AUD-014
epic: E14
feature: F13
title: "Audit F13"
status: ready
status: done
points: 1
---

Expand All @@ -19,4 +19,19 @@ Independent audit of F13 (ADR-0020): each new name checked against its source, t

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

- [ ] T1 — Run the auditor and fix its findings (2 h)
- [x] T1 — Run the auditor and fix its findings (2 h)

## Findings

Auditor, on F13's own diff (`feat/val-012-validate-f10...`), 2026-10-14. The library before and after F13 was bundled and compared on 70 970 seeded results, signed zeros told apart: no difference. No expected value of a test was edited.

| Check | Result | Action |
| ---------------------- | ------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
| AC4, playground | the Add button's edge count used `!isFlat`, the action `hasArea`: they could disagree on an underflowing size | fixed: both `hasArea` |
| AC1, left inline | three items carried to pass 2 not recorded; `halfSmallerSide` missing from the note | recorded in [research note 0016](../../research/notes/0016-f13-named-calculations.md), the list of what stays inline |
| AC2, wording | the kept pairs (`midpoint`, `pointBetween`; `cubicVelocity`, `derivativeCoefficients`) against "merged" | criterion aligned; both TSDoc say why |
| E, TSDoc | `pointBetween` and `midpoint` claimed more exactness than holds | fixed |
| E, Q35 | the page never shows the 180° of a zero handle (`readKeptAngle`) | Q35 settled: nothing to decide |
| E, folders and sources | `files.md` rows; the zero vector's quote in `REF-OPENSTAX-CALC3-VECTORS` | fixed |
| D, test helpers | `isAddGreyed`, `isGreyed` remain beside `readDisabledState` | recorded: they read the state with its message |
| H, evolvability | the golden file is a scratch tool | already in the improvement log, to become a script |
2 changes: 1 addition & 1 deletion docs/backlog/stories/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
| [EN-029](./E14-F13-EN-029-name-model-and-playground.md) | F13 | Pass 1: name the calculations of the model, io, render and playground | done |
| [CHK-013](./E14-F13-CHK-013-checkpoint-f13.md) | F13 | Checkpoint between the two passes | done |
| [EN-030](./E14-F13-EN-030-second-pass.md) | F13 | Pass 2: what pass 1 missed, and the duplicates | done |
| [AUD-014](./E14-F13-AUD-014-audit-f13.md) | F13 | Audit F13 | ready |
| [AUD-014](./E14-F13-AUD-014-audit-f13.md) | F13 | Audit F13 | done |
| [VAL-013](./E14-F13-VAL-013-validate-f13.md) | F13 | Validate F13 | ready |
| [SP-013](./E14-F10-SP-013-research-f10.md) | F10 | Research for F10: an ellipse from four cubic sides | done |
| [EN-027](./E14-F10-EN-027-round-shape-model.md) | F10 | The round shape in the model, its curve and conversions | done |
Expand Down
16 changes: 8 additions & 8 deletions docs/conventions/files.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ Every code folder has an `index.ts` barrel (see [imports.md](./imports.md)). Fol

A code folder holds **modules or domain folders, never both**: beside folders sits only the barrel (and the playground's entry). `local/folder-layout` reports a TypeScript file beside folders at once, in the editor; `tests/folders.test.ts` checks every other file.

| Folder | Domains |
| --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `src/math/` | `vector/` (the point, the vector, its products and distance), `angle/` (degrees and radians, quarter and half turns, explement, directions, signed and central angles), `rotation/` (rotate, quarter turns), `interpolation/` (midpoint, point between, regular partition), `arithmetic/` (average, clamp, modulo), `polynomial/` (the quadratic, its discriminant and roots), `bisection/`, `precision/` (`EPSILON`, without negative zero) |
| `src/geometry/` | `contour/` (arcs, segments, cubics, corners, `cyclicItem`), `corner-radius/` (fillets, clamp, turning angles), `handles/` (a point's handles, curved sides, their box, F12), `regular-polygon/` (regular and stretched), `layout-box/` (alignment, anchor, fit, stretch, size, box size, half size, area — Q21), `placement/` (straight box, turn — `shapes.md` §1), `curve/` (cubic sides, their box and split, F12), `fillet-side/`, `curve-fillet/` and `curve-contour/` (a fillet beside a curve, ADR-0047), `round-shape/` (the ellipse as four cubics, ADR-0048) |
| `src/model/` | one folder per shape, its type inside (`rectangle/`, `regular-polygon/`, `free-shape/`, `round-shape/`), `shape/` (the three kinds of shape told apart: `isFreeShape`, `isRegularPolygon`, `isRoundShape`), then `corner-radius/` (`shapes.md` §2), `handles/` (handles' default, validity, typing), `layout-box/` (anchor and size checks), `placement/` (position, angle, turned corners), `selection/` (`interaction.md`) |
| `src/io/` | modules only: the writing of path data, one domain |
| `src/render/` | modules only: the SVG elements, one domain |
| `playground/` | one folder per panel (`toolbar/`, `shape/`, `points/`, `handles/`, `position/`, `drawing/`, `guided-test/`), the steps of the guided tests (`guided-steps/`), the fields every panel reads and writes (`page/`), the wiring of the panels (`mount/`), the tests' actions (`user-actions/`) |
| Folder | Domains |
| --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `src/math/` | `vector/` (the point, the vector, its products and distance), `angle/` (degrees and radians, quarter and half turns, explement, directions, signed and central angles), `rotation/` (rotate, quarter turns), `interpolation/` (midpoint, point between, regular partition), `arithmetic/` (average, clamp, modulo), `polynomial/` (the quadratic, its discriminant and roots), `bisection/`, `precision/` (`EPSILON`, without negative zero) |
| `src/geometry/` | `contour/` (arcs, segments, cubics, corners, `cyclicItem`), `corner-radius/` (fillets, clamp, turning angles), `handles/` (a point's handles, the empty handles and corner, their turn and stretch, F12), `regular-polygon/` (regular and stretched), `layout-box/` (alignment, anchor, fit, stretch, size, box size, half size, half the smaller side, area — Q21), `placement/` (straight box, turn — `shapes.md` §1), `curve/` (cubic sides, their box and split, F12), `fillet-side/`, `curve-fillet/` and `curve-contour/` (a fillet beside a curve, ADR-0047), `round-shape/` (the ellipse as four cubics, ADR-0048) |
| `src/model/` | one folder per shape, its type inside (`rectangle/`, `regular-polygon/`, `free-shape/`, `round-shape/`), `shape/` (the three kinds of shape told apart: `isFreeShape`, `isRegularPolygon`, `isRoundShape`), then `corner-radius/` (`shapes.md` §2), `handles/` (handles' validity and typing), `layout-box/` (anchor and size checks), `placement/` (position, angle, turned corners), `selection/` (`interaction.md`) |
| `src/io/` | modules only: the writing of path data, one domain |
| `src/render/` | modules only: the SVG elements, one domain |
| `playground/` | one folder per panel (`toolbar/`, `shape/`, `points/`, `handles/`, `position/`, `drawing/`, `guided-test/`), the steps of the guided tests (`guided-steps/`), the fields every panel reads and writes (`page/`), the wiring of the panels (`mount/`), the tests' actions (`user-actions/`) |

A shape's type lives in its folder (`free-shape/free-shape.ts`); folders may use each other's types, their value imports go one way (`import-x/no-cycle`). A test of the whole page sits in the folder of the panel it exercises. Why: [ADR-0043](../adr/0043-folders-by-domain.md).

Expand Down
Loading
Loading