Verification 001: Split expenses

  • Feature: specs/001-split-expenses/
  • Date: 2026-12-02
  • Run: 2 (re-run after T13, T14)
  • Verified by: Claude Opus 5.5 (Claude Code) · independent: yes (this chat wrote no code for the feature)
  • Quality command: npm run check, run as is (not from a fresh install) → exit 0. Lint clean; unit: 202 tests, 202 pass; end-to-end: 209 passed, 1 skipped (speed test is Chromium only, by design); npm audit: 0 vulnerabilities.
  • Note: no analysis.md exists for this feature.

Summary

All 30 requirements and 37 acceptance criteria are implemented and tested; the quality command passes. Run-1 findings F1 and F2 are closed; F3 (Low) is still open. New: F4 (Medium, blank-looking or look-alike names through rare pasted characters) and F5 (Low, empty-state text while the unreadable notice is shown). No Critical or High finding. The eight manual checks (M1-M8) are still not done.

Verdict: partly verified

Requirements and criteria

Code paths are in src/; tests in tests/. “met” means the code was read and a test exists that would fail if the behaviour were removed (tests were located by their AC labels and sampled, not every line was read).

Req / AC Status Code Test
R1 / AC1 met ui/people.js submit e2e/people.spec.js
R2 / AC2, AC3 met (F2 closed; see F4) rules.js validateName, grapheme count unit/rules.test.js, e2e/people.spec.js
R3 / AC4 met rules.js nameKey (NFD, no marks, lower case) unit/rules.test.js, e2e/people.spec.js
R4 / AC5 met rules.js MAX_PEOPLE unit/rules.test.js, e2e/people.spec.js
R5, R6 / AC6, AC7 met rules.js canRemovePerson, ui/people.js; message people.error.inUse unit/rules.test.js, e2e/people.spec.js, e2e/result.spec.js
R7 / AC8 met ui/expense-panel.js, ui/expenses.js e2e/expense-add.spec.js
R8 / AC9 met (T14) rules.js validateExpense unit/rules.test.js, e2e/expense-add.spec.js
R9 / AC10 met money.js parseAmount (probed: “12.”, “.5”, “1e3”, full-width digits rejected) unit/money.test.js
R10 / AC11, AC12 met rules.js, split.js unit/rules.test.js, unit/split.test.js, e2e/expense-add.spec.js
R11 / AC13-AC15 met split.js splitExpense unit/split.test.js
R12 / AC16 met rules.js MAX_EXPENSES unit/rules.test.js, e2e/expense-add.spec.js
R13 / AC17, AC18 met ui/expense-panel.js (editing) e2e/expense-edit.spec.js
R14 / AC19 met ui/expense-panel.js, ui/confirm.js e2e/expense-edit.spec.js
R15 / AC20 met split.js computeBalances unit/split.test.js (seeded random sets)
R16 / AC21-AC23 met split.js exact subset method, 12 people max unit/split.test.js (includes a case a greedy pairing fails), e2e/result.spec.js
R17 / AC24 met ui/result.js result.allEven e2e/result.spec.js
R18 / AC25 met main.js change → listeners e2e/result.spec.js
R19 / AC26 met storage.js, main.js unit/storage.test.js, e2e/persistence.spec.js
R20 / AC27 met (F1 closed by T13) storage.js validateRecord (probed: __proto__ key, string payer, id clash, fractional cents, sharers out of order → all rejected) unit/storage.test.js, e2e/persistence.spec.js (test at line 102, both engines)
R21 / AC28 met main.js trial save, ui/notices.js unit/storage.test.js, e2e/persistence.spec.js
R22 / AC29 met ui/reset.js, storage.js resetAll e2e/persistence.spec.js
R23 / AC30 met ui/people.js justAdded, panel saved, tap shield in main.js e2e/people.spec.js, e2e/expense-add.spec.js
R24 / AC31 met values untouched on rejection e2e/people.spec.js, e2e/expense-add.spec.js
R25 / AC32 met textContent only; no innerHTML anywhere in src/ e2e/hardening.spec.js
R26 / AC33 met messages.it.js, money.js formatAmount e2e/hardening.spec.js, unit/messages.test.js
R27 / AC34 met ui/people.js, ui/expenses.js e2e/people.spec.js, e2e/expense-add.spec.js
R28 / AC35 met for automated part styles.css, index.html e2e/hardening.spec.js, e2e/shell.spec.js (axe, 360 px, 44 px, keyboard); real-device part: Needs a human
R29 / AC36 met CSP connect-src 'none' in index.html; no fetch in src/ e2e/hardening.spec.js, e2e/shell.spec.js
R30 / AC37 met rules.js noPayer; radio cannot be cleared unit/rules.test.js, e2e/expense-add.spec.js, e2e/expense-edit.spec.js

Findings

Previous findings (run 1)

ID New state Reason
F1 closed T13: name form and “Add expense” hidden while the notice is shown (ui/people.js, ui/expenses.js); stored text stays untouched after reload; e2e test line 102 in both engines. Design row updated (CR1).
F2 closed T14: rules.js hasNoVisibleText rejects zero-width-only, lone combining accent and control characters; unit cases added. Residual cases found in this run are a new finding (F4), not a reopening: they are other characters.
F3 still open package.json version and description unchanged. Low.

New findings (run 2)

ID Severity Kind Where What is wrong Smallest fix and where it belongs
F4 Medium partial (unusual input) src/rules.js hasNoVisibleText, nameKey Probed with Node: a name of only U+2800 (Braille blank) or U+3164 (Hangul filler) is accepted and looks blank; “An\u200Bna” (zero-width space inside) is accepted next to “Anna”, so two names look identical (R3 intent). Reachable only by pasting unusual characters. New task: treat known blank-looking characters as invisible and strip format characters (\p{Cf}) in nameKey; add unit cases.
F5 Low stale text src/ui/people.js, ui/expenses.js with messages.it.js people.empty, expenses.needPeople While the unreadable-data notice is shown, the empty states still say “Add la prima per cominciare” / “Add prima almeno una persona”, but the form is hidden. The notice above explains what to do, so nobody is blocked. Accept, or a small task: hide or change the empty text while unreadable is true.

Security (C6) checked: text written only as text (no innerHTML, no eval); strict content policy (no external sources, no connections); stored record validated whole with exact keys, plain-object check, safe integer ids, links, limits, duplicates, order; refused storage caught; no secrets; no console output in a session (tested); messages are fixed catalogue strings that never contain input; npm audit clean. Try-to-break inputs run with Node against parseAmount, validateRecord, validateName (results above); only F2 got through. Run 2: same probes repeated against T14 code; zero-width, combining-only, U+0000, NBSP, soft hyphen, BOM, LRM now rejected; U+2800, U+3164 and an inner zero-width space get through (F4). Not checked: behaviour of real Safari private mode (M8).

Accessibility (C7): axe reports no violations in every state, light and dark (automated, both engines). Screen-reader and real-keyboard checks: Needs a human.

Needs a human

From specs/001-split-expenses/manual-checks.md; record the result on each line.

  • M1 iPhone (Safari): full flow (3 people, 2 expenses, edit, delete, result, reload, reset), one thumb, no sideways scroll, nothing cut off. Pass: all steps work.
  • M2 Android (Chrome): same steps as M1.
  • M3 Light and dark on the phone: text, notices and the panel readable in both.
  • M4 VoiceOver or TalkBack: every field and button read (“Remove Anna”), errors read, “Person added”, “Expense saved”, “Expense deleted” heard, focus stays inside panel and questions.
  • M5 Timing on a mid-range phone, normal mobile connection: usable (can type a name) in under 3 seconds.
  • M6 Largest text size on the phone: nothing lost, buttons readable.
  • M7 Safari on a computer, keyboard only (Option+Tab for buttons): whole flow without mouse. Result: ok (Luca Lanzano, 2026-12-02)
  • M8 Safari private window: notice about saving appears if saving is blocked, page still works. Result: ok (Luca Lanzano, 2026-12-02)
  • Also: the page is not published yet (profile D2 open); nothing to check online.

Closure

  • Closed by: Luca Lanzano · Date: 2026-12-02
  • Verdict at closure: partly verified (unchanged)
Finding or check Reason Follow-up
F3 (Low) package metadata Personal page for a few flatmates; harmless Roadmap, Follow-ups
F4 (Medium) blank-looking or look-alike names Rare pasted characters; no data lost Roadmap, Follow-ups
F5 (Low) empty-state text while the unreadable notice is shown Rare case; the notice explains what to do Roadmap, Follow-ups
M7, M8 Reported done: ok none
M1-M6 Accepted: proof of the method, no test phone available now Roadmap, Follow-ups

Back to top

NodFirst is released under the MIT licence. These pages are generated from the files in the repository.

This site uses Just the Docs, a documentation theme for Jekyll.