Task: Implement Hotfix: three reporting tables carry a tenant and no row-level security
Table of Contents
This page documents a task in the Hotfix: three reporting tables carry a tenant and no row-level security story. It captures the goal, current status, acceptance, and any notes or results.
1. Goal
Take validate_schemas.sh to 0 warnings, so the continuous builds and the
pull-request verifier stop failing before they build anything.
2. Status
| Field | Value |
|---|---|
| State | DONE |
| Parent story | Hotfix: three reporting tables carry a tenant and no row-level security |
| Now | Nothing. |
| Waiting on | Nothing. |
| Next | Nothing. |
| Last touched | 2026-09-30 |
3. Acceptance
- The three models carry
:rls_tenant_isolation: truein the SQL flags drawer. - The generated create SQL enables row-level security and creates the tenant isolation policy; the drop SQL drops the policy.
validate_schemas.shis green andcheck_sql_hygiene.pyis clean.- The full suite passes on a database created from the new SQL.
4. Plan
- Add the facet to the three models.
- Regenerate the reporting component and read the SQL diff.
- Run the validator and the hygiene check.
- Recreate the database, then run the reporting suites and the full suite, because row-level security changes what a write is allowed to do.
5. Measurements
| What | Value | Command | Commit |
|---|---|---|---|
| Validator before | 3 RLS_001 warnings, exit 1 | validate_schemas.sh |
main at ed5e7756cf |
| Validator after | 0 warnings, 1796 files checked, exit 0 | same | this branch |
| SQL hygiene | 1796 files checked, 0 problems | check_sql_hygiene.py projects/ores.sql |
this branch |
| Tables now carrying the policy | 3, in both the create and the drop tree | git diff projects/ores.sql |
this branch |
| Full suite | on a database created from the new SQL | ctest --preset linux-clang-debug-make -j 4 |
this branch |
6. Notes
- The tables did not exist in the worktree's database at all: main added them after the last recreation, which is also why three suites failed on a column main had added. The verification therefore needs a database built from this branch's SQL, not a patch applied to the old one.
check_cmake_component_files.pyand the generator's file list are untouched: no source file was added.
7. PRs
| PR | Title |
|---|---|
| #2413 | Fix the schema validation: enable row-level security on three reporting tables |
8. Review
| Comment summary | File | Decision | Notes |
|---|---|---|---|
9. Result
The three models declare the tenant isolation facet and their create and drop
SQL carry the policy. validate_schemas.sh reports 0 warnings over 1796
files and the hygiene check is clean; the suites run on a database built from
the new SQL.