# Full ADR Compliance Sweep — All PWAs — 2026-07-03
_Session: RESEARCH · Method: fixed `/mdd-reverse` 7-item checklist (ADR-009, 011/012, 001, 070/071, 074, 081, 106) applied to every module — 17 formalized directly from this session's prior findings, 11 fresh via 3 parallel agent queues, plus a mid-sweep correction after discovering `finance` is actually 5 separate hub-registered apps, not 1._

---

## Headline

**Total violations found across the full platform: 8**, up from the 5 found in the first-pass audit (this sweep is more exhaustive — it checked all 28+ modules against all 7 patterns uniformly, not just the 2 patterns the first pass sampled). No new architectural surprises beyond the `finance` inventory correction below — the platform is largely compliant; violations cluster in the same small set of "forgot the one-liner" categories already being tracked.

| # | Module | ADR | Verdict | New or already known? |
|---|---|---|---|---|
| 1 | expense | ADR-001 | ⚠️ Missing `?next=` | Known (first-pass audit) |
| 2 | hr | ADR-001 | ⚠️ Missing `?next=` | Known |
| 3 | production | ADR-001 | ⚠️ Missing `?next=` | Known |
| 4 | vehicle | ADR-001 | ⚠️ Missing `?next=` | Known |
| 5 | dispatch | ADR-001 | ⚠️ Missing `?next=` | Known (found during citation backfill) |
| 6 | **tour-pg** | **ADR-001** | ⚠️ **Missing `?next=`** (lines 764-766; line 3123 does it correctly — inconsistent, not absent) | **NEW — found this sweep** |
| 7 | contacts | ADR-081 | ⚠️ Missing safe-bottom.css | Known |
| 8 | vrs | ADR-081 | ⚠️ Missing safe-bottom.css | Known |
| 9 | oc-admin | — | Re-checked: **not applicable**, no bottom chrome — the original audit's "4 PWAs missing ADR-081" list included oc-admin; this sweep found oc-admin has no fixed-bottom UI at all, so ADR-081 doesn't apply. **Correction: it's 3 real ADR-081 violations (contacts, vrs, dispatch), not 4.** | **Correction to prior finding** |
| 10 | dispatch | ADR-081 | ⚠️ Missing safe-bottom.css | Known |
| 11 | **counters** | **ADR-074** | ⚠️ **Inconsistent** — most fetches include Accept/Content-Profile, but several bare-table calls don't (lines 1811, 2489, 3632, 3698, 4561, 4582). Low practical risk (grants are broad, `public` schema isn't exposed so these likely still 404 rather than silently misrouting — confirm before treating as urgent) but violates the ADR's explicit-routing intent. | **NEW — found this sweep** |

**Net new this sweep: tour-pg (ADR-001), counters (ADR-074).**
**Net correction this sweep: oc-admin does not have an ADR-081 obligation (no bottom chrome) — the original "4 PWAs" count for that finding should read 3.**

---

## The `finance` inventory correction (the actually interesting part of this sweep)

The original module inventory (and this session's earlier MDD work) treated `finance` as one PWA. It is not — the Hub registry (`hub.pwa_registry`, queried directly) shows **5 separate live tiles** sharing the `/finance/` directory tree:

| Hub tile | URL | Backing | Status |
|---|---|---|---|
| **Finance** | `/finance/` (top-level `index.html`, 1239 lines) | **Google Apps Script** (`Code.gs`), zero PostgREST calls, zero DB schema | ⚠️ Live per registry, but architecturally a completely different, older tool than everything else under `/finance/` |
| **Custodian** | `/finance/custodian/` (5561 lines) | `custodian` schema | ✅ Fully compliant (this is what `MDD_finance.md` documents — correctly, but the MDD's title should probably clarify it covers the sub-app, not the top-level tile) |
| **UPI Pay** | `/finance/upi/` (984 lines) | `custodian` schema | ✅ Compliant (safe-bottom present, en-IN present, no login-gate issue) — never audited before this sweep |
| **Credit Card** | `/finance/credit-card/` (1635 lines) | `creditcard` schema + reads `hub`/`vehicle` | ✅ Compliant on the checks run — never audited before this sweep, cross-schema reads not yet deep-characterized under ADR-106's owner-bypass lens |
| **Vendor Management** | `/finance/vendors/` (1537 lines) | `custodian` schema + reads `hub`/`sales` | ✅ Compliant on the checks run — same caveat as Credit Card |

**Why this matters:** the top-level `/finance/` Google-Sheets tool is still registered `is_live=true` in the hub, meaning it's reachable and presumably still used by someone, alongside its own architectural family (Custodian/UPI/Credit Card/Vendors) that has fully migrated to PostgREST. This wasn't a documentation gap so much as a genuine open product question: **is the legacy `/finance/` Google Sheets tool still needed, or should its hub tile be retired/relabeled now that FundCustodian exists?** Flagging this the same way `dispatch`/`production`'s "still a live requirement?" questions were flagged — not answering it myself.

`Credit Card` and `Vendor Management`'s cross-schema reads (into `hub`/`vehicle`/`sales`) were only spot-checked (schema names confirmed, live-vs-dead-code not deeply traced) — recommend a follow-up pass with the full ADR-106 decision tree if/when those apps get touched next.

---

## Sweep methodology note

3 parallel agent queues (2-concurrent per the project's VPS rule) ran the fixed `/mdd-reverse` checklist against the 11 modules never checked this session (`hub, recce, finance, sales, admin, oc-admin, learn, counters, printing, tour-pg, rentveh`). One queue's finding (`finance` "ADR-009 NOT implemented, uses Google Sheets not a DB") initially looked like it contradicted this session's own verified `MDD_finance.md` — investigated directly rather than trusting either source, which is what surfaced the 5-tile inventory correction above. The other 17 modules were formalized from this session's already-verified findings (first-pass audit + citation backfill), not re-run from scratch.

## Sources
- Full per-object `web_anon` grant dump (`information_schema.role_table_grants`), fetched once and shared across all sweep agents to avoid redundant DB hits and the "can't see foreign-schema grants" blind spot found during the `/mdd-reverse` skill validation.
- `hub.pwa_registry` — live query, resolved the `finance` inventory question directly rather than inferring from file layout.
- Per-module `index.html`/`sw.js`/migrate-SQL reads, this session (activity, stores, installation, recce-client, client, mother, tours, tutorials, yagya-portfolio, tour-planner, expense, vehicle, production, vrs, contacts, dispatch, hr) and via the 3 sweep-queue agents (hub, recce, finance-family, sales, admin, oc-admin, rentveh, learn, counters, printing, tour-pg).
