# Claims

Every public claim about Nidhi sits next to the check that supports it. If a row
here has no check, the claim comes out — that is the rule, and `tools/run-tests.sh`
fails the build when a claim names an id that no suite produces.

The ids below are the ones the suites print. `M` is the record model
(`tests/test-nidhi.js`), `G` is filing suggestions (`tests/test-suggest.js`),
`C` is learning cards, `H` is the health timeline and `L` is the ledger
(`tests/test-modules.js`), `D` is date handling (`tests/test-dates.js`), `X` is export (`tests/test-export.js`), `V` is rendering and `K` is highlighting (`tests/test-render.js`), `P` is the optional model (`tests/test-lm.js`), `I` is translation coverage (`tests/test-i18n.js`), `N` is sync (`tests/test-sync.js`), `I` is integrity (`tools/verify.py`),
`B` is the build, `S` is snapshots.

## What is claimed

| Claim | Check |
|---|---|
| A record keeps its id and creation time when it is edited | `M01`, `M04` |
| An unknown folder is refused and falls back to inbox | `M02` |
| Tags are lowercased, de-duplicated and capped | `M02` |
| A record with no title cannot be saved | `M03` |
| A sealed record may not hold plaintext | `M03`, `M11` |
| `[[Links]]` are parsed and matched case-insensitively | `M05`, `M06` |
| A link to a record that does not exist is reported, not silently dropped | `M06`, `M12` |
| Search ranks a title match above a body match, and requires every term | `M07` |
| Export and import round-trip without changing a record | `M08` |
| An import never silently overwrites: a newer record replaces, an older one is kept as a copy | `M09` |
| Merging two copies of a record is field-level, newest wins, tags unioned, and the fields that differed are listed | `M10` |
| Deleting a record leaves a tombstone that keeps its text, so it can be undone | `M13` |
| A deleted record can be restored whole — text, tags, folder | `M13b` |
| Purging is the real delete: text, tags and cipher are erased, the marker stays | `M13c` |
| The integrity check detects an edit, a deletion and an addition | `I01`, `I02`, `I03`, `I04` |
| The manifest is written outside the vault it measures | `I01` |
| A snapshot is verified before it counts, and the oldest is rotated out past the cap | `S01` |
| Filing suggestions propose a folder from the records already in the vault | `G01`, `G02` |
| A suggestion is never applied without a click, and never returns a folder outside the allowed list | `G05` |
| Tags reuse the vocabulary already in use before inventing new ones | `G04` |
| Suggestions are deterministic for the same input | `G06` |
| Deleted and sealed records are never used as evidence for a suggestion | `G08`, `G09` |
| Text in Devanagari or Gujarati produces no suggestion, and says so | `G10` |
| Importing a vault sorts records into new, identical, conflicting and unreadable | `M14` |
| An import never applies a change to a conflicting record by itself | `M15` |
| A deletion from another device arrives as a conflict, not a silent removal | `M16` |
| A learning-folder record is a card, and a new card is due immediately | `C01`, `C02` |
| Grading a card schedules it with SM-2 and stores the schedule on the record | `C03` |
| A lapse resets the interval and is counted | `C04` |
| Health records become a dated timeline, oldest first | `H01` |
| Severity is clamped to 1..5 and summarised | `H02` |
| A sealed health record contributes its title and never its text | `H03` |
| A transaction that does not balance cannot be posted | `L01`, `L02` |
| Money is integer paise, and rupees are formatted for India | `L06` |
| Net worth is assets minus liabilities, and a deleted transaction stops counting | `L03`, `L04` |
| Two devices in the same room exchange records, and an edit on one arrives on the other | `N01`, `N02` |
| An arriving record is merged field by field, newest wins, tags unioned | `N02` |
| A deletion from another device is applied, not ignored | `N05` |
| Junk on the wire is rejected rather than guessed at | `N04`, `N07` |
| The merge never mutates the caller's vault | `N06` |
| A wrong PIN is refused before the app joins the room | `N08b` |
| An unreachable host, or a bad address, is reported rather than retried silently | `N08b` |
| Every user-visible sentence comes from one dictionary, in three languages | `I01`, `I02` |
| Nothing is left empty, and nothing is left in English in Hindi or Gujarati | `I03` |
| Placeholders survive translation | `I04` |
| No hardcoded string reaches a display sink | `I05` |
| No dictionary key is dead | `I06` |
| The language switcher lists every language the dictionary has | `I07` |
| Folder names are translated, not just the folder keys | `I08` |
| A date renders in the reader's locale, never as a bare ISO slice | `D05`, `D06` |
| "Today" and "yesterday" are calendar days, not 24-hour blocks | `D01`, `D02` |
| A future or invalid timestamp is handled, not thrown at the view | `D03`, `D04` |
| A Hindi or Gujarati draft is compared, filed and tagged like any other | `G10`, `G10c` |
| A word keeps its vowel signs instead of being cut at the first matra | `G10b` |
| Text with no words at all is reported rather than guessed at | `G10d` |
| A clinician summary is one escaped page that says it is not a diagnosis | `R03`, `R04` |
| A sealed record contributes its existence, not its text | `R02` |
| A severity chart places points by date, not by index, and reports the longest gap | `H05` |
| A repeat rule keeps its day of the month across February | `L11` |
| Only unposted instances are due, and posting advances the rule | `L12` |
| A statement is read in the shapes Indian banks export, and unreadable rows are counted not guessed | `Q05`, `Q06` |
| Importing the same statement twice adds nothing | `Q07` |
| A date is never silently swapped between day and month | `Q02` |
| An amount override wins over the file's own sign | `Q07b` |
| A budget is a limit on a tag, counted inside the month, ignoring deletions | `L10` |
| A version that dominates is applied, a branch is held, and no-vector records keep the old rule | `M23` |
| A record that arrives keeps attachments, transactions, schedules and provenance | `M22` |
| A pairing line carries the address, room and PIN, and refuses anything else | `N10` |
| A merge can be asked instead of decided, and hands both copies back | `N11` |
| A file attaches to a record, with limits that are refused before anything is stored | `M21` |
| The model is off unless it is turned on, and nothing is sent when it is off | `P01`, `P04` |
| A model that answers with prose, or an invented folder, changes nothing | `P02`, `P03`, `P06` |
| No key means no request | `P05` |
| The prompt asks for one JSON object and lists the real folders | `P07` |
| Each month reports the closing balance, and the last one equals net worth | `L08` |
| An edit to a posted transaction is revalidated like a new posting | `L09` |
| Tags are ranked by how many live records carry them, and tombstones do not count | `M17` |
| One patch can be applied to many records, and nothing else is touched | `M18` |
| Bulk tagging adds and removes, never duplicates, and cleans the tag like the editor | `M19` |
| Markdown export carries parseable frontmatter and keeps the body intact | `X01`, `X02` |
| A sealed record exports its cipher and never a plaintext body | `X03`, `X07` |
| Exported filenames are safe, unique and survive an empty title | `X04` |
| CSV escapes quotes, commas and newlines, and defuses a leading = + - @ | `X05`, `X06` |
| The Markdown bundle is a zip that a real `unzip` accepts | `X08`, `X09` |
| An empty vault exports an empty archive, not a broken one | `X10` |
| Nothing a person types can become markup in the preview | `V01`, `V06` |
| The preview renders headings, paragraphs, lists, quotes, rules and code | `V02`, `V04` |
| Bold, italic, strikethrough and inline code work, and code is not re-processed | `V03`, `V05` |
| A query highlights its matches and reports how many | `K01`, `K02` |
| Highlighting returns data, not markup, so a query cannot inject anything | `K03` |
| Renaming a tag moves every record and folds into an existing tag | `M20` |
| The shipped app is one file with no external local references | `B02`, `B03` |
| The source parses | `B01` |

## Checked by the browser suite

These behaviours are tested in `tools/e2e*.js`, which need a browser. They run on
every push in the `browser` workflow, so they are gated — just by a different job
from `run-tests.sh`. Listed here because a claim whose check lives in another
workflow is still a claim worth naming:

- deleting a record, finding it in Recently deleted, and restoring it
- purging erases the text and keeps the marker
- an unsaved draft is offered back after a reload, and discarded on purpose
- an unresolved conflict survives a reload, and a resolved one does not come back
- the sync log survives a reload
- switching to Hindi or Gujarati repaints the whole interface, not just the list
- filtering the list by a tag, and clearing it
- selecting several records and moving or tagging them
- undo putting a move, a tag or a delete back
- ? opening the shortcut list, focus moving into it, Escape closing it and focus
  returning to the button that opened it
- 1–5 switching views, with aria-current following
- a digit typed into a field not being treated as a shortcut
- closing the editor putting focus back on the record it came from
- an import showing its counts and writing nothing until confirmed, and cancelling
  writing nothing at all
- the export sheet offering three formats and saying which one is the backup
- an empty vault offering three example records, which link to each other
- the manifest loading with its icons, and a service worker registering
- the app opening with the network off, records intact
- search highlighting its matches and showing a count
- renaming a tag across the vault, and undoing it
- the preview replacing the textarea, and the word count and saved/unsaved state
- a 400-record vault rendering one page of cards, with a count of what is left
- saving a record not building the search index, and searching building it once
- editing a posted transaction in place, with the books still balancing
- an edit that cannot balance being refused
- no draft button while the model is off, and the button returning when it is on
- the lm-kit demo checkpoint running in the tab with no network
- a stubbed local model filling the title, tags and folder, and prose filling nothing
- turning the model off again from the same sheet
- a file attached, its bytes stored beside the vault and not inside the record,
  and both surviving a reload
- removing an attachment clearing both the list and the reference
- a pair line filling the address, room and PIN
- discovery explaining that localhost has no subnet to scan
- an ordinary edit propagating with nothing asked
- a genuine branch (one device disconnected while both edited) opening the review
  with the local copy left alone
- a budget set, shown with what is left, and turning over when spending passes it
- a statement previewed (writing nothing), imported, and imported again to find
  every row already there
- a recurring rule posting three missed months, then nothing, with the next date shown
- the severity chart with a point per reading, a tooltip on each, dated ends and a
  text description
- a clinician summary built, downloaded and opened, carrying the disclaimer

## What is not claimed

- **Quantum-resistant encryption.** Not implemented. There is no Kyber or ML-KEM
  anywhere in this repository. See SPEC §5.1 in the build specification.
- **Conflict-free sync.** Not implemented. No CRDT. Two devices either reconcile
  by exporting and importing a file (the app asks about each record that
  differs), or join a room on the local Wi-Fi and merge automatically, newest
  wins. That is conflict-*aware*, and it is not the same thing.
- **A private room.** The host's PIN gates posting, not reading: the event
  stream is open to anyone who can reach the host. lan-kit is built that way and
  the app says so rather than implying the room is sealed.
- **OCR.** Not implemented. A receipt image can now be attached to a record, but
  nothing reads it — you type the figure into the ledger form yourself.
- **A neural interface.** Not implemented, and not planned.
- **Any percentage of uptime, integrity or recovery.** No such figure is measured
  here, so none is published.
- **A test total.** The suites in this repository are counted separately, in
  `AUDIT_REPORT.md`, with the date they ran. They are never added together.
