Class: OpenLoamGuardrailsTest
- Inherits:
-
ActiveSupport::TestCase
- Object
- ActiveSupport::TestCase
- OpenLoamGuardrailsTest
- Defined in:
- lib/generators/open_loam/install/templates/guardrails_test.rb
Overview
Structural guardrails. These are not feature tests — they enforce OpenLoam's invariants on the codebase itself. If one of these fails, an agent (or a human) stepped outside the conventions.
Constant Summary collapse
- TENANCY_ALLOWLIST =
Models that are legitimately not tenant-scoped. OpenLoam::Config holds both global (tenant_id NULL) and per-tenant override rows, so tenancy is a nullable column and resolution lives in vetted gem code (OpenLoam::Configs). OpenLoam::MfaCredential belongs to the person, who spans tenants — MFA is verified at login before any tenant is chosen.
%w[ApplicationRecord User OpenLoam::Tenant OpenLoam::Config OpenLoam::MfaCredential OpenLoam::AuthAttempt].freeze
- FRAMEWORK_NAMESPACES =
Rails' own engine models (storage, rich text, jobs) are framework plumbing, not business data — they are out of scope for tenant linting.
%w[ActiveStorage:: ActionText:: ActionMailbox:: SolidQueue:: SolidCache:: SolidCable::].freeze
- AGENTS_MD_BUDGET_BYTES =
Agent harnesses read AGENTS.md into a context window and truncate what doesn't fit — silently. An overweight file doesn't warn, it just loses its tail, and the tail is where the invariants live.
32_768