Skip to content

Route census builds its declared authentication surface - #881

Merged
zlareb1 merged 1 commit into
mainfrom
fix/auth-route-census-isolation
Nov 18, 2026
Merged

zlareb1 merged 1 commit into
mainfrom
fix/auth-route-census-isolation

Conversation

@zlareb1

@zlareb1 zlareb1 commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Related: #878

Changelog category (leave one):

  • Build/Testing/Packaging Improvement

Changelog entry (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):

The route tenancy census builds the authenticated application surface it classifies.

Why

The census expects the sign-in routes, but route attachment depends on settings when the application is imported. A cached application built with authentication disabled omits those routes even after settings change. CI reported all fourteen routes missing. The exact first-import configuration that caused that failure remains unproven.

Scope and risk

The existing census assertions run in an isolated interpreter after explicitly enabling authentication and disabling optional OAuth-connect routes. This gives the census a fresh application with its declared route surface. The interpreter imports the real application without starting its lifespan or an HTTP listener.

Every route classification, middleware comparison and named-handler tenancy assertion is unchanged. The child uses the same Python interpreter, has a finite timeout and reports its output on failure. Production application assembly and authentication behavior are unchanged.

Compatibility, rollout and rollback

  • Wire and storage: no changes.
  • Operator steps: none.
  • Rollback: reverting changes only the test's application construction.

Tests

  • The directly changed census passed in 6.86 seconds. Its child imported the actual application; no service, database or provider was started.
  • AST comparison confirms the entire original census assertion body is unchanged.
  • Scoped Ruff lint and formatting, prose and diff checks pass.
  • Reproduce with pytest -q -n0 tests/unit/test_cell_tenancy.py::test_every_route_is_tenancy_checked_or_org_free.
  • No broad local suite ran. All required final-head GitHub CI checks and applicable workflows passed. Fresh independent whole-diff review has no findings or nits.

AI assistance in the code (leave one; writing this description with AI is fine):

  • AI-generated: An agent wrote the change. The assertion-preservation proof and focused result were checked directly; independent review and full CI passed.

  • I can explain every line of this diff and how it interacts with the rest of Loom.

Checklist

  • Required final-head GitHub CI passes.
  • Fresh whole-diff review has no findings or nits.
  • Existing census assertions and production route behavior are preserved.
  • No generated files, migrations, plugins, frontend or operator steps change.
  • Public text follows repository copy rules.
  • Commits are signed off.

Assemble the real app in an isolated interpreter with explicit route settings. Keep every existing route classification and tenancy assertion.

Signed-off-by: zlareb1 <[email protected]>
@zlareb1
zlareb1 merged commit 7ca465d into main Nov 18, 2026
42 checks passed
@zlareb1 zlareb1 mentioned this pull request Nov 18, 2026
6 tasks done
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.

1 participant