Skip to content

Defaults a screen picks for you are picked from what you can see - #2

Merged
flaxvin merged 1 commit into
mainfrom
claude/beautiful-gates-1nevt6
Sep 27, 2026
Merged

flaxvin merged 1 commit into
mainfrom
claude/beautiful-gates-1nevt6

Conversation

@flaxvin

@flaxvin flaxvin commented Sep 27, 2026

Copy link
Copy Markdown
Owner

Second top-down pass on current main

The layers below were checked in order, from build down to the money engine. Only the last one found anything.

Layer Check Result
Build npm run typecheck, then the full suite clean, 2073/2073
Runtime production build started in demo mode; every reachable page crawled as each of the three members (15,000 fetches). Each response was checked for the names of another member's private accounts, envelopes and groups no 5xx, no error logs, no leaks. The string hits were UI copy or a household envelope with a similar name
Write side every POST handler that reads an id from the form body all 48 pass through a visibility guard. The other 9 are guarded by other means or are the intended demo/dev sign-in
Money the 36-month household simulation, run on 41 seeds (39 of them new). Checks: the identity closes in every month of every budget, the rollup cache matches a cold compute, transfers cancel, no bank account goes below zero all 41 clean
Static SQL raw queries in route handlers that read member-scoped tables without a visibility predicate 3 found, fixed here

What this fixes

Three places read the whole household to pick something for the reader. None of them showed another member's private data, because each result was filtered before display. But each one made its choice from that data, so the reader got a worse answer than their own history would have given.

  • Review's "File as" suggestion counted every member's filings. Take a payee that Ravi files privately more often than Priya files it anywhere. The suggestion came out as Ravi's envelope, which the page correctly refuses to name, so Priya got no suggestion at all. It now uses the reader's own history, which is what payeeStats already does on /add.
  • /add started on the household's last-used account. When that account was another member's private one, it was not in the reader's list, so nothing was preselected.
  • /health showed the household's total transaction count, which changed whenever someone spent privately.

Each of these now filters with hiddenTransactionSql.

Tests

src/web/viewer-defaults.test.ts adds 3 tests, one per case. All three fail on main and pass with this change. Full suite is 2076/2076, and typecheck is clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_016zXWwzys3K4XksLh3rrcKu


Generated by Claude Code

A second top-down pass on current main: typecheck, the full suite (2073), a
production build started in demo mode and every reachable page crawled as each
of the three demo members, checking every response for the names of another
member's private accounts, envelopes and groups. No server errors, no dead
links, no leaks. Every POST that takes an id from the form body goes through a
visibility guard. The simulated household closes its identity in every month
of every budget on 41 seeds, 39 of them new, with the rollup matching a cold
compute, every transfer cancelling and no bank account overdrawn.

What it did find was three places that read the whole household to pick
something for the reader. None printed another member's private data, since
each was filtered on the way out, but each chose from it:

- Review's "File as" suggestion counted every member's filings. A payee Ravi
  files privately more often than Priya files it anywhere came out as his
  envelope, which the page would not name, so Priya got no suggestion. It now
  uses the reader's history, as payeeStats already does on /add.
- /add started on the household's last-used account. When that was another
  member's private account it was not in the list, so nothing was selected.
- /health showed the household's transaction count, which moved whenever
  somebody spent privately.

Each now filters with hiddenTransactionSql. Three tests fail without it.

2076 tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016zXWwzys3K4XksLh3rrcKu

flaxvin commented Sep 27, 2026

Copy link
Copy Markdown
Owner Author

The github-advanced-security check (run 36302374854) failed on GitHub's side. The cause is the same as on #1, and it has nothing to do with this PR.

GitHub's hosted AI scanner failed while opening its model session (CAPIError: 400 The requested model is not supported). That happened before it read any file, so no findings were produced. Nothing in this repository sets that model, so this PR can't fix it. On #1 the API refused to re-run a run of this kind (403 This workflow run cannot be retried). It will either run again on the next push or can be started from the repo's code-scanning settings.

CodeQL and local checks cover this head: npm run typecheck is clean and npm test passes 2076/2076.


Generated by Claude Code

@flaxvin
flaxvin marked this pull request as ready for review September 27, 2026 08:19
@flaxvin
flaxvin merged commit e25cadd into main Sep 27, 2026
3 of 4 checks passed
febin92 added a commit that referenced this pull request Sep 27, 2026
The fixers updated the docs finding by finding; this pass catches what they
left stale elsewhere, and the website, which nothing had touched.

- website/api.html: status codes (403 for a read-only token, 422 for a
  reused idempotency key with a new body, 404 for a missing or hidden id),
  the real /query parameters, /import/map and its date-order choice, the
  PDF upload field, transfer fees, the token deny-list, and more.
- website/guides.html: three target kinds, fill-from-last-month, moves
  between budgets refused, import date order and Dr/Cr files, recording a
  card payment from Review, rules as the form really writes them, schedules
  recorded when marked paid, investments and tax changes, sessions as an
  absolute lifetime.
- demo and privacy pages: the demo resets on every wake and is re-seeded
  every Wednesday; sign-in is a password, OIDC or Google.
- docs: the error table (Missing is a 404, JSON errors), token rules, PDF
  decompression cap, privacy guards, rule amounts, screens, data model,
  testing counts; index updated.
- home page test count to 2,117; sitemap lastmod for the changed pages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
febin92 pushed a commit that referenced this pull request Oct 5, 2026
Defaults a screen picks for you are picked from what you can see
febin92 added a commit that referenced this pull request Oct 5, 2026
The fixers updated the docs finding by finding; this pass catches what they
left stale elsewhere, and the website, which nothing had touched.

- website/api.html: status codes (403 for a read-only token, 422 for a
  reused idempotency key with a new body, 404 for a missing or hidden id),
  the real /query parameters, /import/map and its date-order choice, the
  PDF upload field, transfer fees, the token deny-list, and more.
- website/guides.html: three target kinds, fill-from-last-month, moves
  between budgets refused, import date order and Dr/Cr files, recording a
  card payment from Review, rules as the form really writes them, schedules
  recorded when marked paid, investments and tax changes, sessions as an
  absolute lifetime.
- demo and privacy pages: the demo resets on every wake and is re-seeded
  every Wednesday; sign-in is a password, OIDC or Google.
- docs: the error table (Missing is a 404, JSON errors), token rules, PDF
  decompression cap, privacy guards, rule amounts, screens, data model,
  testing counts; index updated.
- home page test count to 2,117; sitemap lastmod for the changed pages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants