Chapter 9 · section 7 of 8
In production
One function builds the corpus for every consumer. publishedLawsOf in scripts/statutes/laws.ts reads the manual’s laws, the hand-written statutes, every chunk of every committed section and the agency’s page rows, dates each one, and returns the list. The site publishes what it returns; the embedding script embeds it; the store script writes it to the table; the measurement in Chapter 11 retrieves from it. The browser tests in Chapter 12 retrieve from lawsOf, the same list before the page rows are appended. The file’s header comment: so the law the box quotes, the law the index ranks and the law a test drives cannot be three different cuts of the same section.
The store script has one ordering rule that your manifest does not need and a database does. A state’s rows are written over, and only then are the rows the corpus no longer holds deleted:
deleting first would leave the state with no laws for the length of the push, and every nationwide question in that window would name it as having no rule.
One more file sits beside the corpus, superseded.json, listing manual laws the box does not answer from because the state’s code says otherwise: Vermont’s manual gives 15 days to show proof of insurance and its § 800(c) seven business days. Only a misstated limit or penalty is listed; a manual line stricter than the law is kept.