This glossary defines LearnStack-specific terms. When a term is ambiguous across the industry, this document is the source of truth for how LearnStack uses it.
| Term | Definition |
|---|---|
| LearnStack | The core platform engine. Not a single product, not a single LMS. The reusable foundation that hosts education products of any domain. |
| LearnStack Hub | The companion control-plane application in the separate learnstack-hub repository. Owns plans, custom-domain admin, license-key issuance, and the entitlement projection that LearnStack core mirrors. See ADR-0019 and 24-learnstack-hub.md. |
| Tenant | A logical education platform or brand running on LearnStack. One LearnStack deployment can host many tenants. Each tenant has its own domain, branding, content, courses, and members. |
| Organization | A sub-unit within a tenant — a branch, campus, studio, department, or cohort. Two-level hierarchy strict (Tenant → Organization, no nesting) per ADR-0017. Every tenant has at least one default organization. |
| Brand | Synonym for Tenant in product-facing language. In code, prefer Tenant. |
| Platform Admin | A LearnStack operator who manages tenants, plans, infrastructure-level settings. Authenticates against the learnstack-hub Keycloak realm, or another issuer the deployment controls. Authority comes from LearnStack-held Platform grants, never from realm roles (ADR-0101). Operates above tenants. |
| Platform Admission | The gate's proof that one authenticated operator may perform one registered operation now: the operator witness, the operation, an optional ticket and the correlation id. Minted only by the operator gate after it evaluates a grant, required by the platform scope and by every operator act (ADR-0101). |
| Operator act | One operation an admitted platform operator performs: the killswitch toggle, an inspection or a fenced recovery of asynchronous work, the federation report, remove or disable (Federation operator), or one of the five onboarding acts of ADR-0102 (provision a tenant, map its host, initialize a Role template, create the first administrator, recover an administrator). The gate admits one operation per act. The killswitch act, an inspection and the federation acts run in the platform scope; a recovery transition runs on the dispatcher's outbox role; an onboarding act runs on the application role through the ordinary pipeline under the target tenant's resolved ambient context, with PlatformOperator as its only authorization source (not a Seed act, not a Membership act), and is idempotent on operator-supplied identifiers. |
| Federation operator | The platform operator's report, remove and disable of identity-provider brokers a tenant's federation left orphaned (no live connection row names them), unreadable owned (the owner marker proves them LearnStack's and they no longer read as an admitted broker) or nonconforming (they differ from the fixed profile or carry a mapper). It acts only on a broker whose marker parses strictly to a tenant and a connection whose derived alias it is, writes an intent row before and a completion row after the provider call, removes an unreadable owned broker that is disabled even when a live row names it (the tenant's own Delete cannot reach one) and refuses to remove one that reads, or that is still enabled, while a live row names it, and cannot list or remove a realm user, so the account review a remove or a disable owes is a runbook step (ADR-0099 Amendment 10, corrected by Amendments 12 and 13, and the runbook). |
| Operator recovery | The operator's inspection of dead-lettered outbox rows and deliveries and of quarantined jobs, and its two fenced transitions: a replay resets one dead-lettered subscriber delivery and a producer reset resets one retry-exhausted outbox row, which renews its six-attempt budget. Each transition carries a fence, the state the operator read at inspection (for a replay the replay count, the dead-letter instant to the microsecond and the terminal reason; for a reset the attempts and the instant), and is refused with a stale-fence conflict when the row no longer shows it. It writes a MUST audit row on the same transaction. Job recovery and a dashboard do not exist (ADR-0103, runbook). |
| Hub Operator | A subset of Platform Admins who use the operator portal (operator-portal). Same Keycloak realm; the finer-grained realm roles (hub-platform-admin, hub-operator, hub-billing-viewer) are Hub portal roles and grant no LearnStack authority. |
| Tenant Admin | A user with administrative rights inside a single tenant. Authenticates against the learnstack Keycloak realm. Cannot see other tenants. |
| Org Admin | A user with administrative rights inside a single organization within a tenant. |
| Deployment Mode | One of Development / SaaS / Dedicated / SelfHostedOnline / SelfHostedAirGapped per ADR-0020. Selected at composition root; module code never branches on it. The two SelfHosted* variants differ on phone-home availability (entitlement source). |
| Core | The reusable platform layer. Does not contain domain-specific business rules. |
| Tenant Customization | Per-tenant data (JSON Schemas + DSL expressions) that defines the tenant's domain shape: content types, page blocks, lesson item types, level taxonomies, scoring rules, completion rules, custom fields, notification templates. Authored by tenants, not by LearnStack. See ADR-0018. |
| Term | Definition |
|---|---|
| Provider event receipt | Durable application acceptance identity and frozen routing disposition for one authenticated provider event. Its finite recovery and retention contract is in ADR-0097. |
| Provider event target | Immutable tenant projection of one provider-global fact, with its own stable outbox event identity. It describes provider history rather than a tenant-authorized action; ADR-0097 owns the attribution contract. |
| ProviderEventRecipient | Single-use machine execution witness for one claimed provider event target, separate from a human Membership or a generic integration-event envelope. ADR-0097 owns its scope boundary. |
| User | A global application binding identified by the existing strongly typed UserId, separate from contextual Memberships. The permanent authority/subject-key mapping and lifecycle follow Accepted ADR-0072. |
| Identity authority | Stable provider namespace identified by a UUID and anchored to one current exact issuer URI in a deployment-installed, application-read-only singleton. Issuer drift cannot replace it. Accepted ADR-0072 assigns installation to P03-1; only the controlled issuer rebind of ADR-0104 changes the issuer. |
| Identity subject binding | Permanent mapping from stable identity authority and exact opaque subject, through the subject key, to one application actor. Accepted ADR-0072 / ADR-0073 contract. |
| Identity subject key | Nonsecret SHA-256 equality and audit-linkage key derived from stable authority UUID and exact opaque subject under Accepted ADR-0072. It remains personal data, including for low-entropy subjects vulnerable to guessing. The Database standard owns canonical encoding; Data Protection owns retention purpose. |
| Issuer rebind | The controlled change of the one current issuer URI of the identity authority, under the same realm path, that preserves the stable AuthorityId, every subject key, actor id and closed tombstone. Run only by an offline tool on the confined learnstack_identity_rebind role, after the operator's token and platform.identity_authority.admin grant are admitted, a freeze (an exclusive advisory lock, with no session of a runtime role open) and a continuity proof against the new realm: every Active subject is still reported, and no closed person's key reappears. Writes an intent row and a result row under the platform sentinel. ADR-0104, runbook. |
| Global-self bootstrap | Admitted creation of only the verified provider subject's application binding, with no tenant Membership or permission. Accepted ADR-0072 supplies the common internal owner; Accepted ADR-0078 defines bounded opt-in new-user HTTP/BFF entry. Implementation and qualification live in the Phase 03 Status block. |
| Bootstrap admission | Eligibility of a verified provider subject to attempt binding creation under independently admitted operation, authority, lifecycle, source and allocation-budget checks. Accepted ADR-0072 and ADR-0078 establish no tenant Membership, invitation acceptance or ordinary BFF session merely by creating the actor. |
| Closure tombstone | Retained Closed binding preserving subject key and actor indefinitely to refuse recreation, with raw subject removed by separately authorized closure. It remains linkable personal data, not anonymisation or a reusable actor reservation. Accepted ADR-0072 defines the foundation; Data Protection assigns actual closure/retained-copy fulfillment to P03-10. |
| Proposed identity target | Audit attribution for the actor a creation attempt intended to establish, distinct from its authenticated actor. A failed or indeterminate attempt proves neither User commitment nor target authentication. Accepted ADR-0072 contract. |
| Membership | Contextual relationship between a global User, tenant and optional organization. Accepted ADR-0073 defines a typed MembershipId and null-safe current uniqueness on (tenant_id,user_id,organization_id) for Active/Suspended rows; Revoked is terminal and rejoin creates a successor. |
| MembershipProfile | Tenant-owned, organization-scoped contained contextual profile of one Membership under Accepted ADR-0073. P03-1 supplies bounded contextual fields; ADR-0079 defines self/admin DTOs and P03-5 adds revision-aware custom values. No dynamic-value column or consent authority is implied by the foundation; consent follows Data Protection. |
| Role | A named scoped capability bundle. Accepted ADR-0073 stores tenant-wide templates with Tenant or Organization capability; exact branch authority comes from the Membership assignment. Platform roles have no tenant template. Finite initial/adopted grants follow Permissions. |
| Permission | A fine-grained capability {module}.{resource}.{action} with a scope (Platform / Tenant / Organization). Action set is closed: read | write | delete | admin. |
| Invitation | A pending offer for a user to accept a membership in a tenant + organization. |
| Invitation handoff | Durable transfer of an invitation message to the SMTP submission boundary, distinct from inbox delivery or recipient acceptance. The private custody/provider evidence contract is in ADR-0093. |
| Invitation entry witness | Single-use evidence binding verified subject/actor, native request/host, exact stored offer and operation mode to InvitationEntryScope. It grants only the closed nonmember invitation consumers, never ordinary Membership or session authority. ADR-0093 owns the boundary. |
| Invitation generation | A monotonically advancing offer-link revision with an immutable generation identity. Reissue invalidates the former acceptance verifier and queues new email; it does not release an older uncertain SMTP operation. ADR-0093 owns its lifecycle. |
| Invitation verifier | Domain-separated one-way digest of the random invitation code; sensitive credential-derived material. The consumed verifier permits only exact same-actor result reconciliation. Encoding and custody belong to Database Standards. |
| Invitation continuation | Bounded volatile host/browser custody of one opened invitation through sign-in, verification, confirmation and recovery. Its opaque cookie supplies no Membership. Security owns lifetime and quota rules. |
| SMTP submission evidence | Reproducible provider-attempt observation of accepted submission, definite rejection, positively fenced pre-send cancellation or unresolved effect. It is not inbox delivery, recipient read or reservation-release authority. Database Standards owns the receipt contract. |
| Development realm reconciliation | P02b-6 tooling operation that converges the named tenant-realm configuration and demo identity attributes on a fresh or existing local Keycloak database. It preserves account identity and credentials, does not provision application memberships and is not the runtime IIdentityProvider. The P02b-6 decision package owns its approved field/capability boundaries; the Step 3 record records delivered entry-point convergence and the Step 4 record owns remaining qualification. |
| Verified provider subject | Immutable VerifiedProviderSubject evidence produced by stock credential validation: exact issuer and opaque subject, with optional compatibility actor and tenant/organization claims. It grants no application actor, Membership or permission; ordinary admission independently resolves an existing binding before publishing a validated tenant identity. Security Standards owns the ordered handoff. |
| Validated tenant identity | Normalized request-local application identity after verified provider-subject admission and existing-binding resolution under Accepted ADR-0072. Its actor is nonnullable; optional API wire user_id is evidence checked against the binding. It proves neither live Membership nor permission. ADR-0078 keeps provider scope evidence distinct from separately confirmed native scope. |
| Claimless principal | A validated tenant API identity without a tenant claim. Its actor UUID alone grants no tenant authority. The legacy path retains ADR-0064's HostOnly public ceiling; ADR-0078 separately defines authenticated native-candidate confirmation. |
| BFF session owner | Process-local credential and lifecycle authority in the native web process, separate from public request admission. Accepted ADR-0070 governs it; its opaque host-bound cookie proves no tenant membership or permission. |
| Provider session target | Exact verified issuer and opaque provider sid, optionally constrained by the token's subject. It identifies provider SSO rather than a tenant, browser handle or application scope; ADR-0098 describes its notification use. |
| Logout publication fence | Retained target evidence preventing matching delayed credential work from publishing after an accepted native logout notification. It is separate from token replay evidence and supplies no physical retirement credit; ADR-0098 owns its contract. |
| Back-channel TLS bridge | A fixed-purpose local transport from the provider container to the native logout handler, with independently configured TLS and no caller-selected forwarding destination. ADR-0098 describes its bounded ownership. |
| Federation connection | The one tenant-owned record of a tenant's brokered SAML/OIDC identity provider, with a state (Draft, TestOpen, TestPassed, Active, Disabled, and the terminal Deleted tombstone), a configuration revision and no stored secret. It confines a realm-level broker to its tenant; ADR-0099 defines its contract. |
| Federation alias | The opaque Keycloak broker alias LearnStack derives from a connection ID. It is a provider hint, not a secret and never tenant input; ADR-0099 defines its ownership proof. |
| Federation test attempt | A single-use, short-lived, actor- and revision-bound real broker sign-in as the administrator's own account that discards its tokens, publishes no session and ends in a sign-out. Its result gates activation but is an administrator-run check, not a security control; ADR-0099 defines its contract. |
| Brokered session | A LearnStack browser session whose authentication came through a tenant's brokered identity provider, recognized by the idp claim and its recorded provenance. Admitted only on its own tenant's host while that tenant's connection is Active; ADR-0099 decides the host binding and Security § Federation host binding states its rules. |
| Intent-first provider operation | A provider write recorded as a pending operation (Begin) before the call, applied with a full desired state, and settled as applied, failed or uncertain (Complete). Resume settles a pending operation later. ADR-0099 defines its contract. |
| Provider drift | A difference between the provider's representation of a federation connection and its stored desired state, found by readback. Drift downgrades the connection and queues a corrective write; ADR-0099 defines it. |
| BFF session revision | Logical server-side version published by one successful session refresh, independent of cookie delivery. See ADR-0070; P02b-7 owns implementation. |
| Native scope candidate | Server-owned application context authenticated separately from provider identity and the public host hop. Accepted ADR-0078 requires actual host, binding, Membership and lifecycle confirmation before it supplies scoped authority. Acceptance is separate from implementation qualification. |
| Association witness | Bounded API evidence associating stable authority, subject key and stored actor with the applicable context. The native owner compares it with independently validated provider identity before publication; it is not a bearer grant or anonymous identifier. Security owns its association/custody contract; Database Standards owns canonical subject-key encoding. |
| Self-context discovery | Own-person navigation across eligible Membership contexts, returning bounded relationships and verified entry destinations rather than a global directory or role grant. Accepted ADR-0078 defines the Off/no-store read and confined subject-derived owner. Data Protection treats the relationships as personal data. |
| Protected receipt target | Immutable resource kind/ID retained with a completed protected idempotency outcome, separate from its version-only wire receipt. Accepted ADR-0079 requires fresh disclosure authority against that original target, including after a Membership successor. Database Standards owns durable binding/reclamation; the phase Status block owns qualification. |
| Relying party (RP) | The OIDC client that relies on the identity provider's validated response. LearnStack's native BFF uses openid-client for this role; it is distinct from the API's access-token authority. See ADR-0070. |
| BFF browser group | Host-bound server index connecting one opaque browser binding to its pending transactions and current local session. Its epoch fences competing callbacks and logout; it grants no tenant authority. See ADR-0070. |
| AccountSite | Exact authenticated host-backed API read of validated actor UUID, resolved tenant/organization and the existing public site projection. It grants no Membership or permission. ADR-0064 defines its boundary; ADR-0078 adds the confirmed native origin without admitting a platform-host read. |
| TenantAssertionSource | The closed diagnostic origin of an assertion: header or validated jwt-claim. It selects neither tenant nor organization. See ADR-0064. |
| TenantAssertionAuditBudget | Singleton API-instance allowance shared by scoped recorders: 600 authenticated audit write attempts per independently defended host tenant per first-request-anchored monotonic minute. Failed writes consume allowance; suppressed occurrences retain refusal, counter and one attributed Warning without a durable row or database I/O. It grants no actor-coverage guarantee, adds no tenant-registry cap and cannot be overridden by tenant AuditConfig. Admitted events remain MUST; general mutation durability is unchanged. Accepted ADR-0065 owns the evidence-loss and capacity costs; the remediation record records delivered implementation and local proofs. |
| Subject quota | Additional API request budget keyed on validated issuer and subject, stable across access-token rotation and tenant selection. It does not replace the earlier visitor/peer quotas or promise independent end-to-end throughput. Accepted ADR-0064 owns the decision; P02b-5 implements it. |
| Subject admission registry | API-instance singleton retaining at most 4096 validated issuer/subject quota partitions, shared across tenants and hosts. Accepted ADR-0066 bounds idle-only retirement ownership and distinguishes spent quota, registry capacity and sticky cleanup fault. Acquisition can synchronously dispose one limiter; a blocked disposal can indefinitely delay its request and joined shutdown. Its implementation has local runtime/exported proofs; the implementation record owns independent reviews and final-source CI qualification. |
| ExplicitReadOnlyRequestCatalog | Singleton immutable exact-type set built from composition declarations. Every MediatR transaction behavior shares this snapshot; naming or a request-supplied flag never selects physical read-only mode. See ADR-0064. |
| Authorization read owner | Confined fresh app-role READ ONLY owner for verified candidate Membership/grants and lifecycle facts. Its independent bounded source and progress contract are defined in Database Standards, accepted under ADR-0076. |
| Operation read authority | Immutable permission-derived witness bound to one declared application invocation and its actual transaction; it can widen only that operation's read scope. Database Standards owns mint/consume, nesting and cleanup. |
| Fixed seed prerequisite authority | Separate, single-use read evidence for the eight fixed pristine-continuation writers on their existing transaction owner. It grants no human capability or completion authority. Database Standards owns its closed source, projection and lifetime. |
| Fixed origin completion authority | Separate read evidence for the one fixed management-origin adoption command to verify its retained Tenant-local foundation. It is neither pristine-resume evidence nor provider eligibility. Database Standards owns its source, prepared target and completion boundary. |
| Authorization denial occurrence | One decided policy act with centrally minted identity, fixed decision time and captured attribution, distinct from its ordinary resource audit intents. Audit Coverage owns its pre-success durability and exact evidence contract; a new request/restarted execution is not automatically the same occurrence. |
| Portal Public capability | Virtual, nonassignable classification for the exact admitted anonymous public reads, with no stored Membership or Role. Permissions owns its finite definitions; it grants no protected or widened scope. |
| Term | Definition |
|---|---|
| Content Type | A schema definition for structured content (e.g. BlogPost, Testimonial). Defined by a tenant. |
| Content Entry | An instance of a content type. |
| Page | A public URL surface owned by a tenant. Has a slug, SEO metadata, and an ordered set of blocks. |
| Page Version | A draft or published snapshot of a page. |
| Page Block | A typed, composable unit inside a page (Hero, RichText, CourseList, etc.). |
| Block Schema | The JSON shape that a block expects. Versioned. |
| Navigation Menu | A named tree of links rendered by the public site (header, footer, sidebar). |
| Term | Definition |
|---|---|
| Program | A higher-level grouping of related courses or learning paths. |
| Course | A tenant-owned learning product with a stable id. P02d-1 implements its domain, schema and isolation; P02d-2 ships command and seed writes; P02d-4 delivers isolated public GET/HEAD reads. Phase 05 adds versioning and catalog visibility. |
| Publication | The independent draft / published lifecycle of a walking-skeleton Course or Lesson. A published state is one condition of anonymous-read eligibility; tenant, organization, translation, deletion and parent eligibility still apply. It does not create a Course Version or grant Course Access. ADR-0050 retains the lifecycle and separates content-access policy. |
| Revision pin | A stored binding to a particular customization definition's key and schema version, rather than whichever revision is active when content is read. Education uses pins for lesson content types and optional course taxonomy/band references; a successor does not implicitly rebind existing content. Education data model owns the binding contract. |
| Course Version | A versioned, publishable structure of modules and lessons attached to a Course. Enrollments target a specific version. |
| Module (course aggregate) | An ordered grouping of lessons inside a course version. Distinct from the backend module-loading concept IModule (see Module-Loading Contracts below). When the term "module" appears unqualified in code or docs, prefer this domain meaning unless the surrounding text is clearly about the backend loader. |
| Lesson | A unit of learning consumption. In the Phase 02d model, it is an independent aggregate root referencing a Course by typed id, with its own translations. Phase 05 introduces membership in a Module within a Course Version. |
| Lesson Item | A single piece inside a lesson: rich text, video, file, quiz reference, live-session reference, embedded tool. |
| Learning Path | An ordered or conditional traversal across multiple courses or lessons. |
| Completion Rule | A rule that determines when a lesson, module, or course is considered complete. |
| Term | Definition |
|---|---|
| Enrollment | A learner's grant of access to a specific course (and specific course version). |
| Course Access | A learner's right to open a specific course, derived from an Enrollment (or from a tenant-side purchase, cohort membership, or admin grant). Evaluated inside the Enrollment module against tenant data. Not an Entitlement — see Feature Flags & Entitlements. The two words were used interchangeably in earlier drafts; they are different subjects (a learner versus a tenant), different owners (LearnStack versus Hub), and different lifecycles. |
| Course Content Access Policy | Accepted creation-time Course classification public or enrollment_required, inherited by lessons under ADR-0050. Distinct from publication, tenant entitlements and a particular learner's Course Access. P02d-2 ships its domain, migration, explicit writers and exact-policy seed verification; P02d-4 delivers anonymous-read enforcement; learner grants remain Phase 07. |
| Cohort | A group of learners progressing through the same course version on a shared timeline. Cohorts may have scheduled live sessions. |
| Progress | The learner's recorded advancement against the structure of a course version. |
| Term | Definition |
|---|---|
| Live Session | A scheduled live event in which one or more participants meet inside the LearnStack classroom. Owns time, participants, materials, attendance. |
| Live Booking | A reservation tying a learner (or cohort) to a Live Session. |
| Live Room | The runtime media room provisioned by a live-class provider. Lives for the duration of a Live Session. |
| Live Room Provider | The backing implementation of ILiveClassProvider that creates rooms and tokens (e.g. self-hosted LiveKit, LiveKit Cloud, Daily). |
| Live Room Token | A short-lived join token issued by the provider, scoped to a user, a room, and a role. |
| Live Attendance | A computed or recorded record of who joined a Live Session, for how long, and in what role. |
| Live Session Material | A file, link, or content entry attached to a Live Session and visible inside the classroom. |
| Live Session Event | An append-only event emitted during a Live Session (join, leave, screen-share start, recording start, etc.). |
| Live Recording | Metadata for a recording produced by the provider's egress pipeline. The file lives in SeaweedFS / S3; LearnStack stores the metadata and consent state. |
Cohort vs. Classroom vs. Live Session. Cohort is a group of people. Live Session is a scheduled event. Live Room is the runtime artifact of a Live Session. Earlier drafts used
Classroomfor both group and runtime; the termClassroomis deprecated in favor of the explicitCohort/Live Session/Live Roomsplit.
| Term | Definition |
|---|---|
| Assessment | A quiz, exam, placement test, or survey definition. |
| Question Bank | A reusable collection of questions. |
| Question | A single prompt with an answer definition. |
| Attempt | A learner's session against an assessment. |
| Attempt Answer | A submitted answer inside an attempt. |
| Score | The computed result of an attempt. |
| Term | Definition |
|---|---|
| Course Marketplace | The endorsed learner-facing target for discovering and buying institutions' education through platform checkout, commission and seller payouts. ADR-0049 and Phase 09a remain Proposed; initial pilot candidate is a dated cohort, not the Hub Marketplace or a shipped commerce capability. |
| Hub Marketplace | The optional, post-MVP exchange of reusable tenant customization bundles owned by Phase 12. Its initial scope is free-only and its ADR-0034 content-boundary decision remains open; it is distinct from the Course Marketplace. |
| Product | A sellable platform item. |
| Plan (tenant storefront) | A package or subscription definition referencing one or more products. Lives in the LearnStack core Billing module — what a tenant sells to its own learners. Distinct from the Hub-side Plan (see Hub & Licensing) that governs the tenant's own LearnStack subscription. |
| Price | A currency / interval / amount combination attached to a plan. |
| Order | A purchase intent and lifecycle record. |
| Subscription | A recurring access grant. |
| Invoice Reference | A pointer to an external invoice or payment record. |
| Payment Provider Account | Per-tenant configuration of an upstream payment provider. |
| Term | Definition |
|---|---|
| Domain Event | An event raised inside one module to express that a meaningful change happened in its aggregate. Stays inside the module. |
| Integration Event | An event published outward via the outbox so that other modules or external consumers can react. |
| Outbox | The transactional buffer that turns domain changes into integration events without dual-write inconsistency. |
| Producer frame | Per-invocation bookkeeping implemented by scoped ProducerExecution in P02b-1 Steps 1–3, including nested ancestry, sticky successful INSERT/save-promotion receipts and no-listener W3C Activity. Saved facts retain the saving invocation's span and causal actor through owner-only translation. Receipts are distinct from transaction and audit ownership. See ADR-0057. |
| Audit frame | The boundary grouping classified operation intents and captured changes. Nested operations contribute intents; only the outermost frame reconciles and clears them. P02b-1 Step 1 supplies AuditExecutionCoordinator for request and direct entry; the scoped capture's HasOpenFrame identifies outermost reconciliation, independently of transaction/producer ownership. AuditLogBehavior is the step-3 adapter. P02b-3 Step 3 wires delivery through the same owner; Step 5 activates both real defaults under ADR-0057. |
| Transaction announcement snapshot | Read-only TenantContextAnnouncement returned by IUnitOfWork.GetTenantContextAnnouncement(DbTransaction?): a record of the tenant/organization context successfully announced on one physical transaction generation. It supplies producer checks without granting a new tenant-context writer or setter. P02b-1 Steps 1–3 implement the reader/generation lifecycle, outbox admission and save-origin checks under ADR-0057. |
| Delivery completion gate | Attempt-local, single-use arbitration implemented by P02b-3 Step 3. Closing an open gate prevents commit; admission and cancellation cannot both win. Acknowledged COMMIT remains definitive through later cleanup, while an unacknowledged admitted COMMIT requires durable reconciliation. The gate changes no SQL authority. See ADR-0046. |
| Domain-event collector | Scoped DomainEventCollector, implemented in P02b-1 Step 3. A SaveChanges interceptor stages only changed sources of the saving context and promotes them after nonzero successful persistence. A FIFO queue retains those facts and their producer origins until owner-only completion; a separate retained-source set clears even uncollected/detached facts at owner termination. Retention is never save eligibility. See ADR-0057. |
| Learning Event | An analytics event describing learner behavior (lesson viewed, assessment completed). |
| Commerce Event | An analytics event describing the commerce funnel. |
| Classroom Event | An analytics event derived from LiveSessionEvent streams. |
| Term | Definition |
|---|---|
| Tenant-owned table | A database table whose every row belongs to one tenant, protected by an EF global query filter and a Row Level Security policy from the migration that creates it — both layers, always, once the pair exists. Both layers are live as of Packet 7 step 3. Each fails closed on its own: an unset app.tenant_id makes every policy predicate NULL, and an unresolved context narrows every filter to the all-zero tenant, which no row can carry. RLS is the boundary; the filter is the layer above it. Three sub-classes, per Database Standards § Table classes. |
| Tenant-owned, tenant-wide | The ordinary sub-class: a tenant_id column, one AND-ed policy keyed on it. |
| Tenant-owned, organization-scoped | Adds a nullable organization_id, the app.scope read hatch, and two AS RESTRICTIVE write guards. |
| Parent organization mirror | A child's organization scope matching its parent's exactly, including tenant-wide NULL scope. The factory derives it; the database's parent-scope guard independently checks it on INSERT and UPDATE. Database Standards owns the guard alongside the tenant-composite foreign key and organization immutability control. |
| Tenant-owned, self-keyed | tenants itself. It has no tenant_id column — its id is the tenant id, so its policy keys on id. |
| Platform-scoped table | A table no tenant predicate can isolate, because it is read before tenant resolution or its rows belong to no tenant. The shipped tables are platform_host_to_tenant and platform_killswitches; Accepted ADR-0072 adds the deployment-installed identity_authority anchor. Exact role/command policies and grants live only in Database Standards. A new table needs its own class decision. |
| Global table | A relation without tenant/organization columns whose rows represent global identity, rather than a person-in-a-tenant. Accepted ADR-0072 assigns users to the global self-identity class with independent verified-subject EF filtering and FORCE RLS. No global-directory or platform bypass follows. tenants remains tenant-owned/self-keyed. |
| Tenant context | The ambient resolved tenant and optional organization for a request, job or background task. Factory-preserved HostScope records the independent host ceiling under ADR-0036 Amendment 8; P02d-4 Step 1 delivers this provenance and admission guard. |
HostScope |
Immutable nullable host tenant/organization provenance constructed only by TenantContextFactory from the reconciled host signals, independently of claim-selected organization scope. Ambient, unresolved and claim-only contexts carry none. Accepted in ADR-0036 Amendment 8 and ADR-0052; delivered by P02d-4 Step 1. |
| Query filter | EF Core global query filter that injects WHERE tenant_id = @current_tenant_id automatically. |
TenantContextOrigin |
The authority ceiling on a resolved context. ADR-0036 § The reconciliation matrix owns the host/claim origins; later confined origins admit only their named execution paths. A HostOnly context may retain a validated claimless actor for attribution, but reaches only request types marked [PublicSurface]; authentication never raises that ceiling. ProviderEventRecipient admits only the claimed target's tenant outbox production owner under ADR-0097, never HTTP, job or generic integration-event authority. |
| Tenantless membership refusal | A validated platform-host claim rejected before any host tenant is confirmed. RecordNoTenantRefusal carries closed source/dimension and captured actor/correlation, with no tenant or asserted tenant value; it counts and diagnoses without audit-store I/O. ADR-0064 owns this boundary. |
TenantResolutionAttempt |
Every signal the reconciliation matrix may look at, gathered before any context exists: what the host mapping named, what a validated claim named, and the answers — never the ports — to the two questions that need a database. Carrying answers is what lets TenantContextFactory.Create be pure, total and synchronous, so every row expressible as one — the twelve the factory decides, rows 2, 3 and 6–15 — is drivable from a unit test. It deliberately carries no host string, no X-Tenant-Id / X-Organization-Id and no host class. Per ADR-0036 § The reconciliation matrix. |
TenantContextFactory |
The single entry point that constructs the sealed TenantContext: it returns Result.Fail on any disagreement between the signals and never a partially populated context. TenantContext has no public constructor; TenantContext_Is_Constructed_Only_By_The_Factory enforces both halves. Per ADR-0036 § The reconciliation matrix. |
IOrganizationScopeValidator |
The reader that answers "does this organization belong to this tenant", resolving organizations by the composite key (tenant_id, id) in its own short read-only transaction that sets app.tenant_id as its first statement — one of the sanctioned out-of-band setters of that GUC (Security Standards § The out-of-band setters, per ADR-0040 Amendment 3). A valid organization id from another tenant is a mismatch, not an override. |
DenyAllTenantMembershipReader |
The Packet 7 ITenantMembershipReader that denies every membership question, so the reconciliation matrix's rows 7, 10 and 14 fail closed until Phase 03 ships Membership. It makes the Studio tenant switcher 404 for everyone in that window; that is correct and it will look like a bug. Per ADR-0036. |
EnterPlatformAdminScope |
The explicit, scoped entry to cross-tenant access: a connection and transaction opened on a second, separately-credentialed data source that connects as learnstack_platform — never SET ROLE, which would make the four-role separation a naming convention rather than a boundary. Not one of the ITenantContextAccessor writers, and not an out-of-band setter of app.tenant_id — a BYPASSRLS role has no policy to announce to. Logged in Packet 7, audited in Packet 9: Packet 7 records entry through ILogger at Warning; Packet 9 adds the durable security-event row, written through IAuditStore.WritePlatformScopeAsync — a fourth write method with exactly one caller, and no relaxation of "no update method" — on the scope's own platform-role connection, in a transaction of its own that commits before the operation's begins, so an operation that later fails — or is abandoned — is still recorded. That row carries TenantId.PlatformSentinel (ADR-0044 §§ 1, 10). The C# member is IPlatformAdminScope.EnterAsync; EnterPlatformAdminScope(reason) is how the corpus names the path. See Database Standards § How EnterPlatformAdminScope(reason) reaches learnstack_platform. Entry takes a PlatformAdmission minted by the operator gate; there is no caller-supplied reason (ADR-0101 § 7). |
These entries distinguish P02d-2 contracts from P02d-3 internal read contracts:
| Term | Definition |
|---|---|
IExactCustomizationDefinitionReader |
Contextual uncached application reader for exact content-type/taxonomy revision values, with NewBinding versus ExistingPin eligibility; Customization spec. |
ICustomizationDefinitionProjectionReader |
Accepted P02d-3 internal batched display reader for exact tenant-owned revision pins, with immutable generation-keyed definition families. Step 3 implements coherent loading, generation caching and scope-safe bypass; both review rounds passed. Not a public API; the decision package records acceptance on 2026-10-02. |
ResolvedLocalizedText |
An immutable display label paired with its actual authored canonical locale, following Localization § Fallback Rules. P02d-3 delivers internal metadata; P02d-4 Step 3 delivers its public {value, locale} projection. P02d-6 implements page language/direction attributes, independently of the UI fallback language. |
ITenantSettingsAccessor |
Accepted P02d-3 typed, uncached ambient settings reader with registered scope/grammar and explicit organization precedence. Step 1 implements the reader; the Tenancy contract owns its scope. Both review rounds passed. |
IPublicTenantConfigurationReader |
P02d-4's typed internal live-scope and locale configuration reader, on the announced read-only transaction. Valid emptiness, unavailable scope and invalid stored configuration stay distinct; Tenancy contract. |
ITenantLocaleEligibilityReader |
Contextual uncached Tenancy contract for canonical enabled locale membership and valid locale configuration; Tenancy spec. |
x-fields |
Optional root JSON Schema array of ordered property names and Pattern-B labels for the bounded text-card profile; ADR-0051. It is metadata, not a schema or a new renderer primitive. |
| Custom-field revision pin | Association of one contextual value with the exact tenant/target-qualified definition ID and version that interpret and classify it. A successor definition does not change that association. ADR-0095 owns the P03-5 contract. |
| Custom-field form profile | Finite field shapes and metadata admitted in addition to the existing JSON Schema gates so each accepted field has a supported form control and bounded representation. ADR-0095 owns the profile. |
| Membership field consent | Personal grant or withdrawal for an exact contextual Membership, sensitive definition revision and purpose/notice pin. Its evidence is separate from stored values and administrative permission; withdrawal is not erasure. ADR-0095 owns the accepted Tenancy contract. |
| Term | Definition |
|---|---|
| Tenant Customization Aggregate | One of TenantContentType, TenantPageBlock, TenantLessonItemType, TenantLevelTaxonomy, TenantScoringRule, TenantCompletionRule, TenantCustomFieldDef, TenantTemplateLibrary. Per ADR-0018, per-tenant domain shapes live here as data, not code. |
| Genericity Boundary | The stated edge of the claim "the domain is tenant data". Inside — content shape, presentation, and pure rule evaluation: all three are pure functions of tenant data and already-recorded state, so a JSON Schema plus an evaluator is a complete answer, and a tenant declares them without a LearnStack release. Outside — stateful entitlement (credit packs, session quotas: a schema declares a shape, it cannot declare a ledger) and external capability invocation (executing submitted programs, scoring audio: a rule DSL evaluates, it does not execute arbitrary programs). Outside-the-boundary needs are met by generically named, plan-gated platform features written by LearnStack — never by per-vertical code and never by a customization row. Per ADR-0018 Amendment (2026-08-08); stated product-facing in Platform Vision. |
| Composite Renderer Key | A reference from a TenantPageBlock / TenantLessonItemType to a built-in composite renderer that the runtime resolves to a React component. The registry is closed and lives in 32-tenant-customization-model.md § 2: default-card, content-list, media-gallery, rich-page, lesson-shell, quiz-shell, placement-shell, live-shell, submission-shell. Every key names a capability, never a domain. Tenants compose; they do not bring code. Distinct from a page block key (hero, rich-text, card-grid, …), which is the page-builder's own built-in set — the two registries are described in different documents and their reconciliation is owned by Phase 06. |
| Four Gates | The ordered checks a tenant-authored json_schema passes before a row exists, fixed by ADR-0043 § 2: it is JSON, it is inside the schema profile, it satisfies the draft 2020-12 meta-schema, and it builds. Ordered so the gates that can name a JSON pointer run before the one that cannot. A refusal is a 400 naming the position; nothing revalidates on the read path. |
| Schema Profile | Gate 2 of the four — the clauses the evaluator does not enforce and LearnStack does: the exact root $schema, an object root declaring a non-empty properties, no $id / $anchor / $dynamicRef / $dynamicAnchor, fragment-only $ref with no cycle and a costed reference graph, no regex keywords, § 8.4's declared limits, and nothing a jsonb column refuses. Every clause exists because the library's behaviour without it was measured (ADR-0043 § 3). |
| Customization Generation | The monotonic counter in customization_generations, one row per tenant, bumped in the same transaction as every customization write and embedded in every cache key the module's reads compose — so one write strands every stale key at once, across every pod, without enumerating anything. Not an aggregate: it carries no decision and is deliberately unaudited (ADR-0043 § 7). Distinct from the entitlement projection's generation, which versions a payload from the Hub. |
| Provider Adapter | A concrete implementation of an infrastructure-side interface (payment, live-class, search, storage, email, SMS, event bus, cache, secrets, entitlement source, host resolver). |
| Vertical (deprecated) | Pre-2026-05-18 term for a domain-specific code module. Verticals as code no longer exist — see ADR-0018. Domain shapes live as tenant customization data. |
| Term | Definition |
|---|---|
| Feature Flag (tenant-level) | A typed capability toggle stored in tenant_feature_flags for experimental / rollout / opt-in features. Resolved through IFeatureFlags. Catalog is code-defined (FeatureKeys); per-tenant overrides are data. A plan-projected key is never served from this table — IFeatureFlags resolves those through IEntitlementProvider, and PlanProjected_Keys_NotInTenantFlags is the guard. |
| Entitlement | The single definition. The set of capabilities a tenant holds by virtue of its plan: which features are enabled, which numeric limits apply, which compliance caps are forced. Its subject is always a tenant, never a learner. It is owned by the Hub and mirrored into LearnStack; LearnStack reads it and never authors it. Per ADR-0021 and ADR-0034. Three things in the corpus are frequently called "entitlement" and are distinguished by name below. |
| Entitlement Aggregate (Hub-side) | The authoritative aggregate in the learnstack-hub repository, recomputed from Plan + HubSubscription + operator-set compliance caps. The only writer of an entitlement anywhere. |
| Entitlement Projection | The read-only copy LearnStack holds, delivered by PUT /api/internal/tenants/{id}/entitlements or embedded in a signed licence key, stored durably in platform_entitlement_cache and served through IEntitlementProvider. The record carries TenantId, PlanCode, Features, Limits, Compliance, ExpiresAt, GraceUntil and a monotonic Generation — every field entitlement-v1.schema.json requires, the compliance caps that gate data residency and recording consent included. One name differs from the wire and one from the column: PlanCode is tier on the wire and plan_code in the column, and ExpiresAt is expires_at on the wire and persists to the valid_until column; grace_until and generation keep theirs in both. ExpiresAt and GraceUntil are both nullable: a null expiry means no scheduled expiry — trials and perpetual licences, the cohort the Hub creates first — and it persists as valid_until NULL rather than as a far-future sentinel somebody eventually has to explain, so Packet 9 alters the column Packet 6 shipped NOT NULL. RefreshAsync is generation-guarded inside the write statement — never read-then-write — and applies a push whose generation is at least the stored one, reporting IgnoredAsStale only for one that is older: a stale push cannot resurrect a revoked plan, and a redelivery at the same generation is idempotent rather than discarded, which is what keeps the provisioning row's default 1 from swallowing the Hub's first real projection (ADR-0045 Amendment 1). Delivery is push-primary, not push-only: ADR-0034's normative read order keeps a demand-driven POST /api/v1/internal/license/verify as its last step. Wire shape pinned by entitlement-v1.schema.json in both repositories. See ADR-0045 § 1. |
| Course Access | Not an entitlement — a learner's right to open a course. See Enrollment & Access. |
| Feature Key / Limit Key | A typed value object (FeatureKey, LimitKey) from the FeatureKeys / LimitKeys static catalogs. Free-form strings are forbidden. A feature key is spelled {area}.{name} with no .enabled suffix — classroom.recording — and its descriptor additionally declares two things that are never inferred from the string: whether the key is fail-open or fail-closed when no projection exists at all, and the KillswitchKeys entry that gates it, by name and nullable. An existing projection past grace_until instead yields every feature false and every limit zero, regardless of key class (ADR-0045 Amendment 3). A limit key carries the limits. prefix the Hub already ships — limits.max_users, limits.classroom_minutes_per_month — because the Hub has merged plan validators built on that vocabulary and LearnStack has no implementing line; the earlier tenancy.max_learners / classroom.minutes_per_month / media.storage_gb spellings are withdrawn (ADR-0045 Amendment 1, ADR-0021 (2026-09-08)). A LimitKey's value is a sentinel-carrying long: -1 is unlimited, 0 is denied, > 0 is the allowance. GetLimitAsync returns long and never long? — "not projected" is not a state a caller can act on — and a key absent from the projection resolves to the catalog default the key declares (ADR-0045 § 3). See 26-hybrid-license-model.md § 0. |
| Killswitch | A KillswitchKeys.* flag whose default is "enabled" and gates an expensive or risky code path. Flipped off during an incident to disable the path platform-wide. The overlay is applied last and wins over both the plan projection and the tenant flag, and it reaches a key only through the KillswitchKey that key's descriptor names — the correspondence is declared, never derived from the spelling, so a renamed key cannot go silently ungated. It lives in platform_killswitches — one platform-scoped row per key, no tenant_id and no foreign key — and not in tenant_feature_flags, whose foreign key to tenants the deliberately absent sentinel cannot satisfy and which no role or BYPASSRLS attribute moves. Read through the L1 cache under the platform:tenancy:killswitch family and invalidated on toggle; a read failure resolves to the key's default (true) and logs at Error, because a cache outage must not disable every gated path platform-wide. Packet 9 shipped the table, the policies, the overlay and the cache family, and no writer. The writer ships with P03-9 Step 1: a service entered with an operator admission for the Platform permission platform.killswitch.write (ADR-0101 § 13), which records a MUST row on the same transaction and drops the overlay cache entry after the commit; see the killswitch runbook. Per ADR-0045 § 5 and Amendment 1. |
| Soft vs Hard Limit | A LimitKey declares LimitEnforcement = Soft | Hard. Hard refuses the operation with 403 ProblemDetails; Soft surfaces a banner and emits a Hub-side soft-limit alert. The descriptor is declared with each key in Phase 02a Packet 9; the enforcement path — the refusal and the usage.alert.soft_limit_reached signal — lands in Phase 02c with IUsageReporter and POST /api/v1/usage/report, and each individual gate ships with the feature it gates rather than speculatively (ADR-0045 § 6). |
| Term | Definition |
|---|---|
| Search Index | A Meilisearch index named <env>-<kind>-<locale> (e.g. prod-course-en). |
| Search Kind | A document type (course, content-entry, media, ...). A tenant's searchable TenantContentType materialises a kind of its own as data (Search § Tenant Content-Type Kinds); no module registers a domain-specific one (Search_Kinds_AreNot_Domain_Prefixed_In_Code). |
| Tenant Filter (search) | The mandatory tenant_id = ? predicate every tenant-scoped search query carries. Enforcement lives in ITenantSearch; direct Meilisearch client calls are forbidden. |
| Reindex | A platform-admin operation that streams documents from the source-of-truth table into a fresh index, then atomically swaps the alias. |
| Term | Definition |
|---|---|
| Custom Domain | A tenant-chosen hostname (learn.acme.com) that resolves to a tenant via platform_host_to_tenant. Hub owns the issuance + TLS lifecycle; LearnStack mirrors the host → tenant mapping. See ADR-0022 and 27-custom-domain-tls.md. |
| Domain Verification | The DNS-01 / HTTP-01 challenge that proves the tenant controls the host before TLS issuance. Hub-side flow. |
| Reserved Host | A hostname the platform refuses to assign to a tenant (e.g. api.*, admin.*, hub.*, any platform domain). |
IHostToTenantResolver |
The interface every backend host lookup goes through, backed by platform_host_to_tenant and nothing else. Accepted P02d-4 supplies frontend bootstrap through a host-resolved public configuration endpoint, without a separate edge registry lookup or tenant/organization ids; P02d-4 Step 2 delivers the site endpoint and P02d-5 owns its server consumer. See ADR-0052. |
| Term | Definition |
|---|---|
| TenantBranding | The tenant's presentation tokens. Not an aggregate of its own: the values are tenant settings held in tenant_settings (Frontend Architecture Standards § Tenant Branding). G16(a–e) is Accepted and delivered in P02d-2; the Tenancy contract owns the keys and value grammar. Anonymous projection and attribution are delivered G16(f/g) in P02d-4 Step 2, and P02d-6 Step 1 delivers G42 server-rendered injection, recorded in Phase 02d's decision register. |
branding.theme |
P02d-2 delivers the writer for a single tenant-wide TenantSetting document with four validated color fields; one root/version protects contrast during concurrent replacement. The Tenancy spec owns the command-local registry; other generic setting keys remain legal. Anonymous projection is delivered by P02d-4 Step 2; P02d-6 Step 1 implements atomic document color injection. |
| OrganizationBranding | A planned per-organization design-token override owned by Phase 06. Its partial token merge is not implemented by P02d-2/3; the generic settings scope model does not authorize an organization override of branding.theme. |
| Term | Definition |
|---|---|
IModule |
The module-loading contract every backend module exposes: a single AddXxxModule(IServiceCollection) extension that registers the module's MediatR handlers, EF DbContext, validators, permission catalogue, and any provider adapters. The composition root calls each module's contract exactly once at startup; modules never register cross-module dependencies. Intended shape, not shipped code: no type by this name exists in backend/src today — handlers and validators are registered by passing the module's assembly marker to AddLearnStackMediatRPipeline, and each DbContext through AddModuleDbContext<T>. The audit catalogue is not a method on this contract: a module declares its defaults through its own IAuditCatalogSource.Describe(IAuditCatalogBuilder), discovered from DI (ADR-0044 § 6), shipped in Phase 02a Packet 9. |
IPermissionRegistry |
The interface modules use to declare their permission keys + scope (Platform / Tenant / Organization) + default role grants. Registry is composed at startup from every module's contributions; CI fails on duplicates. See 19-permissions.md. |
IAuthorizationHandler<TOperation, TResource> |
The application-layer policy class that evaluates whether an actor with a given permission can perform an operation on a specific resource (e.g. instructor with education.course.write against Course.OwnerId == actor.UserId). Sits behind IAuthorizationService.AuthorizeAsync calls. |
| Term | Definition |
|---|---|
[TenantOwned] |
Marks a domain entity whose rows are scoped to a tenant. The build inspects the marker to assert: the entity carries a tenant key (TenantId, or Id on the tenant-owned self-keyed class), an EF global query filter for tenant scope is configured, and a PostgreSQL RLS policy on the backing table reads current_setting('app.tenant_id'). See 05-database.md. |
[OrganizationScoped] |
Marks a [TenantOwned] entity that additionally carries OrganizationId (nullable; null means tenant-wide). The build asserts a matching org-aware EF filter + RLS policy reading current_setting('app.organization_id', true). Per ADR-0017. |
[PiiSensitive] |
A LearnStack.SharedKernel property attribute marking a value the audit capture redacts before anything reaches IAuditStateCapture. A marked property — or one whose name matches the shipped SensitiveTokenCatalog — has its value replaced with SensitiveTokenCatalog.RedactedValue in before, after and changes. Name the constant, never the string: the shipped value is ***REDACTED***, and a second literal would make a log line and an audit snapshot disagree about what a redacted value looks like. The property is not dropped, so the diff still records that it changed. Per ADR-0044 § 8 and Amendment 2. |
[ConsistencyTier(...)] |
Optional marker on a command handler that explicitly states the distributed-consistency tier (1 / 2A / 2B / 3) per 01-architecture-standards.md § Distributed-Consistency Tiers. Reviewers use it to reason about failure modes. |
[PublicSurface] |
Marks a request type a HostOnly context may reach; TenantContextBehavior rejects anything else. Accepted ADR-0052 requires the P02d-4 set to dispatch through ISender as GET/HEAD, with audit Off and a physical read-only ambient transaction. P02d-4 Steps 2–3 deliver the site and Education requests; API Standards § Public surface owns its enumeration. Independent assertion-rejection audits remain enabled. |
[AllowsUnresolvedTenantContext] |
Marks the narrow set of tenant-provisioning and platform-admin request types that legitimately run before a tenant is resolved. A deliberate hole in the tenant-context assertion at pipeline step 4, counted by AllowsUnresolvedTenantContext_Only_On_Provisioning_Commands — a hole nobody counts becomes a hole everybody uses. See Standards 21. |
| Term | Definition |
|---|---|
| Durable asynchronous store | Persisted event/job envelope, execution or completion history that outlives its request/process, including linkable control identifiers. The canonical inventory distinguishes those stores from ordinary module tables and volatile BFF custody. |
| Retained copy | A separate provider, diagnostic, database/WAL or backup copy whose removal is not established by deleting its source row or invalidating a local session. Its retention and completion evidence belong to the inventory's named owner. |
| PII Category | One of PII-Identity, PII-Behaviour, PII-Sensitive, Payment, Audit. None is a separate explicit nonpersonal-data declaration, never a default or an automatic exclusion of subject-linked data from fulfillment. Each category has its own redaction, retention, and erasure rules. |
| Data Controller | The tenant. Decides what personal data is collected and why. |
| Data Processor | LearnStack. Processes personal data on the controller's instructions. |
| Right of Access | The user's KVKK/GDPR right to receive an export of their personal data. |
| Right to Erasure | The user's right to have their personal data deleted, subject to retention exceptions (legal hold, financial records). |
| Anonymisation | Replacement of PII fields with pseudonymous values; row stays for analytics / audit integrity. Distinct from soft delete and hard delete. |
| Consent Record | An append-only per-purpose record (terms of service, recording, marketing). "Changing one's mind" creates a new record, never edits an old one. |
| Sub-processor | A third-party service LearnStack uses to process tenant data (Keycloak, LiveKit, S3 / SeaweedFS, email provider, ...). Changes require 30-day tenant notice. |
| Term | Definition |
|---|---|
ProviderEventAuditEvidence |
Closed typed attachment binding one retained provider fact to the exact tenant delivery and central MUST audit intent. Its provider occurrence/result and affected UserId remain distinct from the mirror's processing time/outcome and SystemActor. Audit Coverage Standards owns its producer/consumer and durability contract. |
| AuditEntry | The append-only aggregate owned by LearnStack.Modules.Audit. Inherits Entity<TId>, not AuditableEntity<T> — append-only by design (AuditEntry_Inherits_Entity_Not_AuditableEntity). Persisted to audit_log, whose primary key is the composite (id, timestamp) and whose AuditEntryId is minted app-side at pipeline step 3 — the one append-only table that is, because the Indeterminate pair has to carry a single identity across two connections (ADR-0023 Amendment 9). PostgresAuditStore always supplies timestamp from IClock — the intent's DeclaredAt for the in-transaction row, a fresh reading for a standalone re-write — which is what keeps that pair legal under the composite key rather than a 23505; DEFAULT now() stays only as a backstop. It carries Outcome — success | denied | failed | indeterminate, a text column under a CHECK, superseding ADR-0016's is_success boolean — and Reason. Ordinary rows carry the tenant the ambient transaction announced, never a request payload. Accepted ADR-0072 separately fixes sentinel attribution for typed global creation. audit_log is tenant-owned, organization-scoped and uses the ordinary tenant template plus Accepted ADR-0072's exact global-identity insertion/evidence departure from Database Standards, in the Audit migration chain; it carries no foreign key to tenants, because the sentinel has no tenants row and a record that cascades on tenant deletion is not an audit log. audit_config keeps its FK. See ADR-0033, ADR-0044 §§ 2, 5, 9 and 31-audit-subsystem.md. |
OperationType / OperationClass / AuditClassification |
Three enums, two of which are fields on AuditEntry. OperationType is what kind of operation produced the row: create, update, delete, read-sensitive, security-event, platform-admin, action. OperationClass { Must, Should, May } is the coverage tier the matrix and the catalogue declare, and the tier the row persists. AuditClassification { Off, May, Should, Must, Unclassified } is what IAuditConfigService.ClassifyAsync returns, after the tenant's AuditConfig override and the MUST floor: Off is how a request that writes no row is registered — the test-only request types among them — and Unclassified is the rejection behind audit_unclassified_operation. The two are not one enum with a spare member: OperationClass is a persisted column no row can legally hold an Off in. All three live in LearnStack.SharedKernel.Audit beside the ports that name them, never in the Audit module's Domain, which would make SharedKernel reference the module back. OperationType and OperationClass, with the default class for each type, are defined once in Audit Coverage Standards § Operation Types; the audit catalogue supplies both alongside the operation slug. Per ADR-0044 §§ 6, 11 and Amendment 3. |
| Audit Operation Key | The catalogue key (module, operation), where operation is the dotted slug {module}.{resource}.{verb} — tenancy.tenant.create, customization.content_type.publish. It borrows the shape of a Permission Key and shares its first two segments with the permission gating the same resource, but not its closed action set: an audit verb records what happened and comes from the module's own coverage matrix (create, publish, revise, rename, soft_delete, …), where a permission action bounds what a principal may do. There is no RequestKind.Other — every IRequest<Result<T>> reaching pipeline step 3 must be classified, an unregistered one is rejected with audit_unclassified_operation (500), and test-only request types register through the same builder in their fixture. Per ADR-0044 § 6. |
| Audit Coverage Matrix | The per-module table in docs/modules/<module>/audit.md mapping resources × operations to MUST / SHOULD / MAY / – classifications, with an Operation column carrying the dotted slug. Required for every module spec. It is the human-readable artifact; the audit catalogue — declared in code through IAuditCatalogSource.Describe(IAuditCatalogBuilder), discovered from DI and keyed by request type — is the executable one. Neither is parsed from the other: Every_TenantOwned_Command_HasAuditCoverage (catalogue → matrix) and Every_Matrix_Row_Whose_Command_Exists_Is_Registered (matrix → catalogue) assert they agree, in two directions with two domains. Catalogue → matrix is total — every entry a module's source registers has a row in that module's matrix carrying the same slug, no exemption. Matrix → catalogue binds only to slugs whose request type exists — a row classified ahead of the command that will raise it carries (planned) in the Operation cell and is outside that direction, because classifying before the command ships is what the standard asks for. The marker is a claim the rule re-checks, not an escape: a (planned) row whose command has shipped fails. Operations that are not MediatR requests at all carry (off-path), are outside the join in both directions, and register by slug rather than by type; the closed list of them is enumerated once, in the amendment that decides it. Per ADR-0044 § 6 and Amendment 3. |
| AuditConfig | The per-tenant override of the catalogue's coverage, held as a cached projection whose loader runs on a cache miss on its own short transaction — once per tenant and generation, never once per request. It narrows and never elevates: is_enabled = false silences a SHOULD or a MAY, true is the baseline, and neither touches a MUST. The classifier applies the override and then re-applies the catalogue's MUST floor. Elevation is refused rather than deferred: a lever that moved an operation onto the durable path would let a tenant admin provoke a 503 on operations the platform classified MAY (ADR-0033 Amendment 4). A failure to read it does not reject the operation: classification falls back to the in-process catalogue, which carries the same MUST floor, so nothing proceeds unaudited and one cache outage does not deny every request platform-wide. The failure logs at Error; the audit health check does not move, because it answers only whether a MUST-class row can be written. Per ADR-0033 and its Amendment 6. |
| Audit Capture Pipeline | AuditChangeTrackerInterceptor (EF) → IAuditStateCapture (before/after/changes JSON) → AuditExecutionCoordinator (MediatR adapter or direct owner) → IAuditStore. Modules never write audit_log directly. The interceptor captures every ChangeTracker entry in state Added, Modified or Deleted, minus the named machinery/audit exclusion list (including P3's shared inbox and delivery ledger), owned by Audit Coverage below. The earlier AuditableEntity<>-descendants predicate is withdrawn: it was blind to every plain class the modules ship, PlatformHostMapping and the other MUST-classified ones among them — Audit Coverage § Required Behaviours lists them with their classes. It sees only what the ChangeTracker holds, so EF Core's set-based writes (ExecuteUpdate, ExecuteDelete, ExecuteSql*) would escape it and backend source uses none. It captures only — no row construction, no SQL — and reaches every module DbContext through AddModuleDbContext, which resolves IEnumerable<ISaveChangesInterceptor> from the provider, because DI registration alone does not attach it. An entity that is not an aggregate root and is reached through its root's navigation — a taxonomy's bands — is captured inside its root's diff rather than on its own, and in its root's snapshot only when the root was created in the same request and every member it was seen with is still tracked, the one case its membership is known to be complete; a filtered Include marks a partial collection loaded, so a loaded one is left out as unknown. changes serialises as a JSON array of { path, before, after } with an instance-qualified pointer — /{EntityType}/{EntityId} and then an RFC 6901 pointer into that instance's snapshot — never ADR-0016's polymorphic object-or-array shape. Per ADR-0044 § 7 and Amendment 6 §§ 4–5. |
| Elision Record | What replaces a snapshot value too large to store: {"_elided": true, "bytes": <n>, "sha256": "<hex>"} — never an empty object and never a silent truncation. Each of before_state, after_state and changes is capped at JsonValue.MaxRowBytes (256 KiB). The elision preserves the column's JSON type: changes is an array on both sides of the cap, so an elided changes is [{"_elided": …}], while before_state and after_state take the object form — a reader must not have to branch on shape to know what it is reading. audit_blob_id is struck from the corpus: it exists in no DDL and names no blob store. Per ADR-0044 § 8. |
| Audit Intent | One parked declaration that an audited (resource, operation) happened, minted with its AuditEntryId by AuditExecutionCoordinator (through step 3 for requests) and held in IAuditStateCapture as an ordered list — one intent per audited (resource, operation), not one per request. ProvisionTenantCommand declares two, tenancy.tenant.create and tenancy.organization.create, which is why "exactly one intent per request" is retired. Only the owning unit-of-work frame (IUnitOfWorkScope.IsOwner) flushes the intents, signals Committed / RolledBack / Indeterminate, and it drains every intent in the scope rather than only its own; a joiner writes nothing and signals nothing. Only the outermost audit frame reconciles and calls Clear(); a nested frame that cleared would erase the outer execution's intents before commit. It also carries the TenantId and optional OrganizationId its row will be written under, resolved by AuditExecutionCoordinator before deferred work — through step 3 for requests, where ADR-0044 § 2's original tenant/platform cases are decidable, and the reason PostgresAuditStore composes a row from the intent rather than resolving a tenant itself. It carries the actor and the correlation id too, read at the same moment, so both writers write them. Every classified AuditExecutionCoordinator invocation opens an audit frame: an intent belongs to the frame that declared it, a captured change to the frame whose handler flushed it, and closing a frame records on its intents what that request returned — so a nested request refused under an outer one that commits keeps its refusal. Per ADR-0044 §§ 2, 3, 4, Amendment 3 and Amendment 6 §§ 2–3 and ADR-0033 Amendment 2. |
| Audit Subject | The one aggregate instance an audit row is about: its entity_id, before_state and after_state. The composer finds it among the captures of the intent's declared type; when a request writes two instances of that type — a publication retires the incumbent revision and activates the successor — the handler names it through IAuditSubject.Designate(aggregate), and every other instance stays in changes under its own instance-qualified pointer. Undesignated, two instances are refused rather than guessed between. A designation binds only the current request's intents of that type. Per ADR-0044 Amendment 6 § 1. |
| Durable Audit Intent | The MUST-class audit row, written by IAuditStore.WritePendingAsync on the same transaction as the business write — AuditExecutionCoordinator classifies and parks each intent (through step 3 for requests), and TransactionExecutionCoordinator writes them all, on the owning frame only, immediately before COMMIT — so each commits with that write or not at all, and so each ordinary tenant write executes under its announced scope. Accepted ADR-0072's typed global pending seam uses its separately enrolled identity scope, never a tenant sentinel announcement. "The same SaveChanges" was the earlier formulation and ADR-0033 withdraws it: the guarantee is the transaction, which needs no cross-DbContext machinery. If it cannot be written, the business operation fails closed. Enrichment, redaction, projection, and external fan-out happen after the commit, reading the durable row, and are best-effort. SHOULD/MAY-class audit is not a durable intent: it is written outside the transaction, and its accepted loss is written down rather than assumed. Per ADR-0033, which supersedes ADR-0016. |
| MUST-class audit | The coverage tier whose admitted event's row is part of the operation's contract (the only bounded authenticated assertion admission exception is ADR-0065; tenant AuditConfig cannot weaken general mutation coverage), and whose two shapes fail differently. In-transaction — the durable intent above: a row that cannot be written leaves zero business rows and answers 503 audit_unavailable. Standalone — written by IAuditStore.WriteStandaloneAsync on its own transaction, which announces both app.tenant_id and app.organization_id from the draft, since an org-scoped row written with the organization GUC unset fails WITH CHECK: its failure changes the response only when the operation would otherwise have succeeded. A standalone row recording an operation that is already being refused — a denied authorisation outcome, a rejected tenant assertion — keeps its own 403 / 404; the failure logs at Critical, increments the standalone-write-failure counter and marks the audit health check unhealthy. Per ADR-0033 Amendments 1 and 2 and ADR-0044 §§ 9, 11. |
| Retention Class | The retention floor for a category of audit entries (7y for security-event / platform-admin / financial; 2y for others). Enforced by a daily Hangfire purge job from Phase 11. |
| Term | Definition |
|---|---|
| Permission Key | A dotted string {module}.{resource}.{action} with action drawn from the closed set read | write | delete | admin. Domain terms (CEFR, English, yoga, …) are forbidden in keys. |
| Permission Scope | One of Platform, Tenant or Organization. Definitions are identified by (scope,key) under Accepted ADR-0073; Tenant/Organization may register the same key as distinct capabilities. Platform definitions never enter tenant Roles. |
| Permission Matrix | A per-module table mapping Resource × Action to ✓ / – plus default role grants. Required for every module spec. |
| Term | Definition |
|---|---|
| Block Schema Version | The (key, schemaVersion) tuple that identifies a page block's payload shape. Schemas are immutable after publish; breaking changes bump the version. |
| Lazy Migration (blocks) | The studio-side upgrade of an existing block instance from an older schemaVersion to a newer one on save. The published version is untouched until the editor publishes. |
| Bulk Migration (blocks) | A platform-admin operation that walks every tenant's stored block instances of a given (key, schemaVersion) and migrates them to a new version. |
| Term | Definition |
|---|---|
| Tier 1 | A command with no external calls; DB transaction is the boundary. |
| Tier 2A | A command where the external system is a mirror of DB state; DB-first, external call after, failure non-fatal (retry via outbox). |
| Tier 2B | A command where the external system returns an ID we must store; external call first, then DB write, compensating action on DB failure. |
| Tier 3 | A cross-system commit with provider-confirmed completion (payment, recording); idempotency key + pending row + provider webhook. |
| Term | Definition |
|---|---|
| Ingress Provenance | The private, domain-separated HMAC envelope over the native web listener's captured host, canonical socket peer, method and request target. It is not a tenant identity, API-hop header or browser-visible value. P02d-5 Step 1 implements capture/verification; Step 3 delivers downstream caller admission; Step 4 proves the real API/render boundary. See ADR-0053. |
| BFF (Backend-for-Frontend) | The app-local server boundary serving browser-specific protocol and API needs. It is not a general proxy or a tenant/organization selector: ADR-0064 confines authenticated reads, and ADR-0053 owns the trusted host hop. Credential custody and session delivery follow ADR-0070; no tenant/organization authority headers are forwarded from the browser. |
| Idempotency Key | A client-supplied Idempotency-Key header on unsafe operations with external side effects (payments, notification sending, recording start/stop). It is a nonce inside a tenant's key space, not an identity: the stored record is addressed by (tenant, key) and carries a fingerprint of the organization, principal, method, path, query and body, so the same key presented for a different request is refused rather than replayed. Inbound webhooks do not use it — they deduplicate on (provider, event_id). See ADR-0037 and 04-api-design.md § Idempotency. |
| Problem Details | RFC 7807 JSON error envelope used by every LearnStack error response: type, title (the lockey_* key), status, code, messageKey, instance, correlationId, and errors for field-level failures. There is no detail — an earlier version of this entry listed one and omitted messageKey. The canonical example lives in 09-error-handling.md § API Surface; this entry names the fields rather than restating it. |
| Hub Contract Surface | The enumerated set of endpoints between LearnStack core and the Hub, governed by two invariants rather than by a count (ADR-0034): (1) the Hub stores no tenant content — only tenant metadata: plan, subscription, licence, custom domain, compliance caps, aggregated usage; (2) every crossing goes through a named adapter — IEntitlementProvider, IUsageReporter, IHubTenantSync — and no other type may hold a Hub client. All crossings carry mTLS + RS256 JWT + HMAC body signature. Adding an endpoint still requires an ADR, because the surface is a cross-repository contract. The superseded "closed at four endpoints" phrasing was never true, and protecting the number is what caused TLS private keys to be tunnelled through the entitlement payload. ADR-0034 § The endpoint set is the authoritative enumeration; this entry deliberately does not restate a count, because a count here is a second thing to keep in step. |
| Term | Definition |
|---|---|
Result<T> |
The sealed record in LearnStack.SharedKernel.Results implementing IResultBase: carries IsSuccess, Value, optional Error, and an optional SuccessMessage (a LocalizedMessage). Primary constructor is internal; callers go through Ok (throws on null value) / Fail. Application + Domain layer methods return Result<T> for expected outcomes (validation failed, not found, forbidden, business-rule violation). Exceptions are reserved for unexpected bugs / infrastructure faults. Result<None> is the payload-less success shape. See 09-error-handling.md § Two-Track Model and ADR-0032. |
Error |
The sealed record (LocalizedMessage Message, IReadOnlyDictionary<string, IReadOnlyList<LocalizedMessage>>? Details) that travels inside Result<T>.Fail(error). Code is the unprefixed stable identifier (e.g. "validation_failed") derived by stripping the lockey_ prefix from Message.Key — so routing logic (Result.ToActionResult(), Problem Details writers) and frontend localization read consistent values without manual sync. Field-level Details flow as LocalizedMessage lists, keeping the prefix invariant uniform across the entire error payload. See 09-error-handling.md § Result Type. |
LocalizedMessage |
The sealed record (string Key, IReadOnlyDictionary<string,string>? Params) in LearnStack.SharedKernel.Localization. Key MUST begin with lockey_, enforced at construction; this is the backend-message wire namespace, distinct from general frontend UI identifiers. Consumers own supported error resources; the SDK normalizes errors and contains no translations. See Error Handling § Mapping Problem Details → UI. Equality is structural (Key + Params); ctor defensively copies Params; empty params normalised to null. Params values must be plain text — resolved messages use React text nodes, never dangerouslySetInnerHTML. Per Phase 02a Packet 2. |
| UI Catalogue | App-owned platform messages under frontend/apps/web/src/i18n/messages/<locale>/<namespace>.json. Accepted ADR-0027 selects exact next-intl 4.14.9 and complete en/tr public catalogues, implemented by P02d-6 Step 1 with the server request runtime and catalogue controls. General UI identifiers are dotted feature keys, distinct from backend lockey_*. Whole-catalogue language fallback never changes admitted content locale; missing used keys in supported catalogues fail validation. The SDK contains no translations. |
None |
The readonly record struct value used as Result<None> when a command/query succeeds without returning data — replaces the Result<T> with IsSuccess = true and Value = null shape Standards 09 § Forbidden bans. |
IClock / IRandom / IGuidFactory |
The three deterministic-test abstractions in LearnStack.SharedKernel. Production code never reads DateTime.UtcNow, instantiates System.Random, or calls Guid.NewGuid() directly — those calls go through the abstractions so tests pin the values via FixedClock / FixedRandom / FixedGuidFactory. Per Standards 02 § Time. |
UserId |
The existing cross-cutting strongly typed actor identifier in LearnStack.SharedKernel.Identifiers (Vogen [ValueObject<Guid>]), also used by global User under Accepted ADR-0072. Audit columns retain typed actor references without a User FK; Membership's separately declared same-module User reference does not change that. |
Entity<TId> / AuditableEntity<TId> |
The two aggregate bases in LearnStack.SharedKernel.Domain. Entity<TId> is the append-only / audit-row base — identity, in-process domain events, identity-based equality with uninitialized-id + cross-runtime-type guards so HashSet-backed collection navigations, Distinct() and Contains behave correctly before ids are minted. EF Core's change tracker is not among the reasons — it keys on the primary-key value and tracks by reference, never calling these members. AuditableEntity<TId> is the mutable base — adds CreatedAt/By, UpdatedAt/By, DeletedAt/By, Version, and the IsDeleted projection by implementing ISoftDelete + IOptimisticConcurrency. Three ordering guards, all throwing InvalidOperationException: MarkCreated refuses a second call, SoftDelete refuses a second delete (both because audit-trail integrity rules out silent overwrites), and MarkUpdated / SoftDelete refuse to run before MarkCreated — measured, without that last one an update left CreatedAt at the 0001-01-01 sentinel and a later MarkCreated produced a row whose updated_at preceded its created_at. SoftDelete also stamps UpdatedAt with the same instant so a job scanning UpdatedAt sees the delete; that is not a monotonicity promise, which nothing enforces — the caller's IClock is what supplies forward time. AuditEntry (audit subsystem) inherits Entity<TId> — never AuditableEntity<TId> — by architecture-test rule. |
IDomainEvent |
The marker interface (: MediatR.INotification) every in-process domain event implements. Raised from aggregate methods; P02b-1 Step 3 collects successfully saved facts and dispatches them sequentially through MediatR during owner completion, before MUST audit and commit. The abstract DomainEvent base declares EventId and OccurredAt as required init so events are always stamped through IGuidFactory / IClock at the call site. Distinct from integration events, which cross module boundaries through the outbox + IEventBus (InProcessEventBus today; Dapr pub/sub after its trigger) per ADR-0038. |
CursorPagination / Page<T> / PageInfo |
The cursor-first pagination triple in LearnStack.SharedKernel.Pagination matching Standards 04 § Pagination. CursorPagination(Cursor, Limit) is the request (default Limit = 20, max 100; ctor throws on Limit <= 0 — kernel-level guard); Page<T>(Items, PageInfo) is the response; PageInfo(NextCursor, PreviousCursor, HasNext, HasPrevious) carries the opaque cursors the client never parses. |
LearnStackVogenDefaults.IdMask |
The canonical Conversions mask every Vogen-emitted ID and value object opts into: EfCoreValueConverter | SystemTextJson | TypeConverter. Per ADR-0023 every aggregate-root ID writes [ValueObject<Guid>(LearnStackVogenDefaults.IdMask)]. |
| Pipeline Behavior | A MediatR pipeline behavior — one of the eight canonical steps wrapping every command / query: Validation → Logging → AuditLog → TenantContext → Authorization → Transaction → OutboxFlush → Handler. The order is binding per ADR-0032 § Sub-decision 2; the architecture test MediatR_Pipeline_Order_Matches_Canonical_Sequence enforces it. |
IExceptionHandler (LearnStack L1) |
The .NET 8+ exception-handler interface; LearnStackExceptionHandler : IExceptionHandler is the final catch site for every unhandled exception. Maps to Problem Details, attaches correlationId, records the OTel span error, calls IErrorTrackingProvider.CaptureAsync when ShouldCapture(ex) is true. See ADR-0032 § Sub-decision 1. |
| Correlation ID | The W3C traceparent value (or a derived UUID for fallback) that threads through every signal — logs, traces, audit rows, outbox rows, authoritative job envelopes, Problem Details bodies — bound to a single user request or background operation. Same as Activity.Current.TraceId for HTTP requests; reconstructed from the outbox row / authoritative job envelope / event envelope at consumer side. See 10-observability.md § Correlation. |
| Telemetry Signal | One of the three OpenTelemetry signals — logs, traces, metrics. LearnStack emits all three through Microsoft.Extensions.Logging (Serilog implementation) + OTel SDK; errors additionally flow to IErrorTrackingProvider. |
IErrorTrackingProvider |
The composition-root abstraction over the error backend. Implementations: NoOpErrorTracker (Development / SelfHostedOnline-without-DSN), SentryErrorTracker (SaaS / Dedicated / SelfHostedOnline-with-DSN), LocalFileErrorTracker (SelfHostedAirGapped). Modules never import Sentry.SentrySdk; the architecture test Modules_Do_Not_Reference_Sentry_SDK_Directly enforces it. See ADR-0032 § Sub-decision 9. |
IProviderResilience<TPort> |
The Polly v8 ResiliencePipeline (retry + circuit breaker + timeout + bulkhead) that every provider adapter takes as a collaborator and routes outbound calls through. Not a decorator: C# forbids a type parameter as a base type, so no ResilientProviderAdapter<TPort> : TPort can exist (ADR-0032 Amendment 2). The adapter does only SDK exception → ProviderException translation. Configured per port in appsettings.Resilience:<portName>:. See ADR-0032 § Sub-decision 5. |
ITenantContextAccessor |
The singleton, AsyncLocal<ITenantContext?>-backed accessor that cross-cutting infrastructure (TenantContextSpanProcessor, Serilog enricher, Sentry enricher) reads to enrich telemetry without injecting ITenantContext itself, whose production registration is transient and resolves from this accessor on every access. Populated at scope start by TenantResolverMiddleware (HTTP), HubCorrelationMiddleware (/api/internal/*), the JobExecutor boundary (framework admission in P02b-4 Step 3; transactional business execution in Step 5), and the outbox / inbox handler scope. Modules never write to it. See ADR-0032 § Sub-decision 10. |
TenantContextSpanProcessor |
The BaseProcessor<Activity> registered once at the OTel tracing pipeline; its OnStart hook reads from ITenantContextAccessor and enriches every span with tenant.id, organization.id, user.id, module, correlation.id — including spans produced by auto-instrumentation libraries (EF Core, HttpClient, Valkey via Dapr, SeaweedFS S3 SDK, LiveKit). See ADR-0032 § Sub-decision 10. |
ProviderException.IsClientError |
Boolean flag set by adapters when translating upstream 4xx (true) or 5xx (false) responses. The L1 IExceptionHandler reads it to decide whether to Sentry-capture (only 5xx — provider's infra fault) or log-only (4xx — provider's user-error). |
| L1 / L2 / L3 (cache) | "L1 cache" is the per-pod in-process layer — InMemoryCacheService today; "L2 cache" is the cross-pod Valkey state via Dapr. Both layers are managed through ICacheService; do not confuse with error-handling layers. See 20-infrastructure-stack.md § Cache layer cheat sheet. |
Unless explicitly marked Proposed, these terms belong to Accepted ADR-0047, accepted with the expanded nine-step P02b-4 package on 2026-10-15. The contract is implemented and merged through PR #32 on 2026-10-19; the P02b-4 merge closeout owns final implementation, review and CI verification. Production business and recurrence definitions remain empty.
| Term | Definition |
|---|---|
| Background job | Durable intent to execute one module-owned operation at or after a UTC due time. It is distinct from an integration event, which publishes a fact for subscribers. |
| BackgroundJobId | Typed, application-minted UUIDv7 identifying one submitted job; distinct from its definition, a calendar occurrence, a vendor wakeup ID and an event ID. |
| Job definition | A finite code registration binding a stable versioned key to its module, parameter contract, execution scope and queue. Persisted text does not select arbitrary CLR code. |
| Job scope | Tenant execution scope: TenantWide retains a NULL organization; Organization retains the exact non-NULL organization. Neither scope grants platform authority or all-organization access. |
| JobExecutor | Tenant execution boundary that validates stored authority, installs the job context and restores the previous context. P02b-4 Step 3 supplies framework read/start admission; Step 5 adds the existing ordinary transaction owner and exact final completion fence. Its delivery record owns validation/review status. |
| BackgroundJobRoutingClaim | Opaque facts returned by the confined routing acquisition. It grants one framework admission flow, without granting a business attempt or allowing payload-selected tenant authority. |
| ConfirmedStartReceipt | Single-use activation evidence minted only after the existing transaction owner receives the start transaction's COMMIT acknowledgement. It distinguishes an acknowledged start from an unknown commit outcome. |
| BackgroundJobRunGate | Sticky permission for one owned invocation and its finite sequential checkpoint boundaries. Stopping it cannot be reversed by a later durable-history observation. |
| BackgroundJobCommitGate | One exact checkpoint's issuance and COMMIT admission. Physical acknowledgement, known rollback and locked historical confirmation remain distinct facts; none independently proves cleanup or current lease authority. |
| Checkpoint confirmation | Payload-free evidence from a locked, fresh read of an exact original checkpoint. Publication follows the probe's own rollback acknowledgement and actual cleanup; confirmation neither rewrites physical COMMIT history nor mints another business receipt. The Step 7 record owns current implementation and qualification. |
| BackgroundJobExternalRecoveryReceipt | Fresh nonexecuting recovery authority binding the original normal ledger identity separately from the current recovery token, generation and lease. Its immutable purpose comes from the actual stored phase/reason: Reconcile permits reconciliation checkpoints; TerminalNoStart permits only plan-free NoStart cleanup for an existing terminal request. Neither prepares, executes or fabricates a counted start receipt. |
| BackgroundJobExternalRecoveryRenewal | Passive evidence from an actual recovery lease UPDATE, published only after physical COMMIT acknowledgement and resource cleanup. The exact still-live Run may accept its newer window; elapsed or stopped authority cannot be revived, and durable-history confirmation alone cannot mint it. |
| JobExternalReadHandle | Exact acknowledged app-read candidate retained with its original receipt or recovery binding after actual read-owner cleanup. Its canonical envelope and external data supply later attribution and validation, never independent provider permission. |
| JobStartCleanupOwnership | Concrete resources retained after framework scope, activity, authority or cancellation-source cleanup fails. The admission result holds their identities because a completed async task may clear its state-machine locals; a failed cleanup grants no generation replacement. |
| JobTenantContext | Immutable trusted attribution from an acknowledged job receipt or a claimed recurrence recipient. SystemActor is the effective principal; recipient submission has no job, parent, event or causal actor identity yet. Executing jobs retain separate job/parent/event fields. Diagnostic attribution alone grants no execution or submission authority. |
| BackgroundJobExecutionControl | One generation-owned attempt's concrete admission/business tasks, sticky commit gate and renewable immutable execution identity. Deadline or unconfirmed renewal closes permission; only actual operation, timer and private cancellation cleanup releases the identity. |
| JobApplicationSourceOwner | Closed invocation owner allowing one actual main unit and one tracked auxiliary application-source operation at a time. A timed-out cache waiter cannot release an unfinished loader or replace failed cleanup. |
| BackgroundJobActualCleanup | Closed local witness binding the actual invocation, original source owner and positively joined tasks/resources/private callbacks. Its finite kind distinguishes transactional work that ran from work whose unused start permission was permanently sealed. It proves neither database COMMIT outcome nor recovery authority. |
| BackgroundJobCapacityRecoveryReceipt | Nonexecuting capability published from acknowledged or locked-proven recovery acquisition, binding the exact stored job/normal attempt/group and current recovery token. It cannot reconstruct a business start receipt or independently prove cleanup. |
| Capacity cleanup checkpoint | Exact app-role framework transaction recording known transactional cleanup or genuine no-start evidence together with the corresponding reservation release. It follows positive local cleanup and distinct recovery authority, under the existing transaction owner. P02b-4 Step 6 owns implementation and qualification. |
| ApplicationDataSourceLifetime | Sole API owner of the stable lazy application data source. Container disposal requests release; actual disposal waits for the job runtime and both messaging source-use witnesses. Seeder keeps its explicit external lifetime. |
| BackgroundJobApplicationCapacity | Job-only application checkout bound, twice the transactional and external invocation owners. Sequential Prepare/checkpoint/recovery/Finalize phases share those owners. This excludes unrelated HTTP/delivery demand, whose explicit headroom and deployment sizing remain separate. See Database Standards. |
| JobTerminalTransition | Restricted witness minted from the successful fenced job terminal UPDATE. Stored tenant/org/job/definition/attempt/acquisition values and the live transaction bind the sixth audit write; a mismatch rolls back state and audit together. |
| ProducerExecution.JobOrigin | Opaque scheduling attribution bound to the trusted operation type, live producer invocation, physical transaction and announcement generation. Diagnostic values alone cannot authorize submission. |
| PlatformMaintenance | Separate execution class for privileged tenantless maintenance. It is unavailable to ordinary tenant jobs; declaring the class does not authorize a privileged executor. |
| BackgroundJobBridge | Confined handoff from committed LearnStack intent to an opaque stock Hangfire wakeup. Vendor IDs are repair hints; a missing/failed/succeeded hint cannot complete business work or suppress same-generation repair. P02b-4 Step 4 supplies the bridge and qualified API-host activation; vendor completion remains distinct from business completion. |
| BackgroundJobRuntime | API-instance facade owning storage bootstrap, pool owners, shared components and the bridge through actual completion. Its shared-source lifetime also waits for both actual messaging processors. See Events and Outbox; Step 4 implementation and both full reviews are complete; Step 5 extends it with independent renewal, recovery and terminal lanes. |
| BackgroundJobDurableObservation | Complete immutable status aggregate classified against frozen local job/recurrence metadata. Publication requires the read transaction's rollback acknowledgement and actual cleanup. Unknown or incompatible durable work remains visible independently of local declarations, due time and previously written deployment markers; the aggregate grants no execution authority. The Step 9 record owns implementation and qualification. |
| BackgroundJobObservation | Required API/Seeder telemetry singleton with a once-bound concrete API runtime. Observable collection projects immutable memory facts and the last complete durable sample without SQL, worker activation or execution/cleanup authority. Observability Standards owns instrument names and finite dimensions; the Step 9 record owns implementation and qualification status. |
| MessagingPrivilegedLifetime | Closed source-use witness for one actual messaging processor's startup and main loop. Its PrivilegedCompletion task requires positive connection cleanup or irrevocable no-issuance closure; finite caller waiting and unrelated app-role callback completion supply no substitute. See Database Standards. |
| BackgroundJobPhysicalCapacity | Conservative simultaneous-acquisition calculation for the current Step 5 topology, enforced before bootstrap. Database Standards owns its formula and qualification limits; it is distinct from tenant job reservations and deployment-wide PostgreSQL sizing. |
| BackgroundJobRuntimeGate | Process-wide job-start arbitration shared by all pools and independent job-control lanes. Host stop closes starts; final teardown and the closed fatal boundary have distinct ordered terminal states. A prior admission supplies no cleanup or external-quiescence evidence. ADR-0060 owns its exceptional failure policy; runtime qualification precedes activation. |
| HangfireGeneration | One retained stock Core server invocation for a frozen worker pool, including construction, child/outer joins and cleanup. Capture and startup progress are distinct from actual completion; unresolved cleanup grants no replacement. ADR-0059 owns normal lifecycle, qualified by ADR-0060. |
| HangfirePoolOwner | The sole replacement supervisor for one frozen pool. It retains the current generation through actual stock and private-work cleanup, then applies the fixed backoff before replacement. A startup-stalled or cleanup-faulted owner cannot manufacture a completed join. |
| HangfireGenerationWork | Generation-local ownership of admitted private work, its concrete routing/admission tasks and cancellation source. Pool-local drain closes starts without canceling running work; host stop requests asynchronous cancellation and retains callbacks through actual cleanup. Four retained invocations stop further starts; the hard ownership bound is workers plus four. |
| HangfireSharedComponents | The API-instance owners of the cached stock expiration and fetched-job heartbeat components. They outlive pool-local drain and retain each actual invocation through native thread and cancellation cleanup. Their implementation does not activate a worker host. See ADR-0058 and ADR-0059. |
| Wakeup generation | Positive monotonic version of one job's eligibility cycle. Hangfire carries the job ID and this generation; stale vendor callbacks cannot spend a later business attempt. |
| Job execution profile | A finite definition's transactional or external execution shape. External work separates short prepare/finalize transactions from an operation that runs without a business transaction. |
| Job reservation | Tenant-wide durable occupancy of a declared capacity group by one job attempt. Lease expiry does not release unresolved external occupancy. |
| External quiescence | Positive evidence that an old external attempt has ended and cannot start late. Missing heartbeats, expired leases and provider NotFound alone do not prove it. |
| Completed external failure policy | Bounded classification of a known external failure and whether the same stable operation may be attempted again. Accepted ADR-0061 owns the three-state policy and cancellation restriction; the Step 7 closeout owns completed implementation, qualification and both full review rounds. |
| Job occurrence | One durable logical UTC slot of a code-declared recurrence, independent of vendor tick IDs and duplicate wakeups. |
| Job recipient | Immutable tenant/org routing intent for one occurrence, admitted through a restricted stored-row witness before a child job is submitted. |
| BackgroundJobRecipientClaim | Single-use routing witness from an acknowledged, cleaned-up claim of one stored recipient. It binds the frozen manifest, occurrence, tenant/org and live acquisition; it carries no child job identity or general scheduling authority. |
| Recipient submission | The closed framework request that inserts one occurrence-input job and completes its claimed recipient receipt on the existing transaction owner; ADR-0047 owns its scope. |
| BackgroundJobLifecycleProjection | Closed read-model metadata declared by Tenancy for the job framework's minimal lifecycle inventory. It supplies status meanings without constructing module services or accepting a caller-selected query, route or predicate; ADR-0047 owns its finite scope. |
| Job attempt | One counted normal or finalize admission with typed AttemptId, immutable ordinal/deadline and write-once execution/outcome/quiescence evidence. Recovery probes are not counted attempts. |
| Term | Definition |
|---|---|
| Owner process | The one builtins-only public-server.mjs process for a native frontend launch. It holds the frontend/app/SDK reservations, prepares output/cache and joins its private runtime family. It does not host the native listener or restart its child. ADR-0084. |
| Runtime child | The private child admitted by its exact owner/channel and current output identity before native/SDK/Next imports. It owns listener, admission, request/session and framework work in its new POSIX process group, while the parent retains durable output reservations. ADR-0084. |
| Runtime incarnation | One admitted runtime child's lifetime, attributed in proof by a fresh label bound to its authenticated channel/launch handle. The label is observation metadata and grants no cleanup or request/session authority. ADR-0084. |
| Process family | A positively captured qualified process-group leader and its inherited descendants. The launch owner joins actual direct-child close and group absence; direct exit or outer-group absence alone does not retire it. Qualified compiler/installer families and the runtime family retain distinct cancellation/result policies. ADR-0084. |
| Term | Definition |
|---|---|
| Demand-Gated Building Block | An infrastructure choice that ships as a port plus a working default implementation now, and as a vendor adapter later, in a named phase, when a written trigger fires. It qualifies only when all four exist: the port, the default implementation, the owning phase, and the trigger condition. A block missing any of the four is not demand-gated — it is simply missing. Distinguished from a one-way door by the test below. The gated set and each trigger are tabulated in ADR-0035, which also names its own two exceptions — audit_log partitioning, which is schema-internal and so has no port, and LiveKit, which has no default because its absence is a missing product feature rather than a missing implementation. |
| One-Way Door | A decision that gets more expensive with every week of delay, tested by the question: if I add this six months from now, will I have to touch code that is already written? Yes → one-way door; ship it now (tenant and organization isolation, the outbox_messages table and its ownership, strongly-typed identifiers, the localization schema — each touches every query, migration, or job payload ever written). No → additive; ship the port now and the adapter on demand. The test is mechanical, not a matter of taste: tenant isolation's cost grows with the codebase, a Dapr adapter's cost does not. A corollary rule: a deployment mode or customer segment without a signed contract cannot be the deciding factor in a technical choice — it may break a tie between otherwise-equal options, nothing more. Per ADR-0035 and Engineering Principles. |
| Dapr Building Blocks | The three Dapr abstractions LearnStack uses when it uses Dapr: pub/sub (Kafka), state (Valkey), secrets (Vault) per ADR-0038. Service invocation, workflow, bindings, and actors are out of scope. Demand-gated to Phase 11; ADR-0038 decides what, ADR-0035 decides when. |
IEventBus |
Non-generic envelope publication port. InProcessEventBus is the only registered implementation until the Phase 11 trigger. P02b-3 Step 2 implements durable acceptance by every required subscription without business construction; Step 3 implements independent transactional execution and owns business outcomes; failed/unknown acceptance remains producer retry. The outbox processor remains the only production publisher; subscriber retries invoke an internal executor. Context restoration, per-key acceptance and test-owned business execution are implemented; Step 4 implements independent scheduling/terminalization/replay and bounded observation; Step 5 activates both real defaults and semantic Seeder handoff. See ADR-0046. |
IOutbox |
Immediate integration-event INSERT through the enrolled, announced, writable ambient transaction. PostgresOutbox is registered in API and Seeder by P02b-1 Step 2; it opens no connection, commits nothing and calls no transport. Identity is EventId; duplicates fail. Concrete payloads use the frozen serializer, identifiers only, and the inclusive 262,144-byte UTF-8 OutboxPayloadLimits.MaxBytes. metadata is SQL NULL. See ADR-0057. |
IntegrationEventPartitionAttribute |
The concrete event's explicit partition-source declaration: a non-nullable aggregate identifier, or TenantId with tenantWide: true. Runtime admission compares the actual canonical lowercase D GUID value. Inherited declarations and implicit tenant partitioning are refused. ADR-0046 defines eligible-selection order and its limits; the declaration supplies no durable publish-order guarantee. |
IntegrationEventEnvelope |
One integration event plus the dispatch metadata the outbox row carries and the event does not: W3C CorrelationId, optional OrganizationId, CausationId, and causal ActorUserId. Its Topic and PartitionKey are the event's own — both are properties of the event type rather than of one delivery, so neither can hold a second answer (ADR-0038). An event implementing IOrganizationScopedIntegrationEvent requires a non-empty organization in its envelope. Metadata describes the delivery; the event describes the fact. |
IPartitionSerializer |
Runs work sequentially within one partition key and concurrently across different ones in the current process. This invocation serialization establishes no durable publish-order guarantee; ADR-0046 defines eligible-selection order and its limits. Queuing work for the key you are already inside is refused rather than deadlocked: the caller that does it is publishing from inside a handler, which Standards 20 forbids. |
EventTenantContext |
The ITenantContext a consumer runs under, rebuilt from the validated envelope by the delivery executor before business-handler construction or DI resolution. A consumer executes outside the request that produced the fact, so there is no ambient context to inherit. The effective principal is UserId.SystemActor; an envelope human remains available separately as CausalActorUserId. Restoring the tenant and optional organization is what makes query filters and RLS policies evaluate against the right scope. |
TenantId |
The strongly-typed tenant identifier, in LearnStack.SharedKernel.Identifiers per ADR-0023 Amendment 2's cross-cutting placement rule — it rides on ITenantContext, on every [TenantOwned] entity, in cache keys, job payloads and event envelopes, so a Tenancy-owned type would make each of those a reference to that module. It has no New(): a tenant id is assigned by the registry that owns the Tenant aggregate, because a handler minting its own could not satisfy the self-keyed policy's WITH CHECK (Database Standards § Table classes). |
TenantId.PlatformSentinel |
Reserved storage-attribution tenant id 00000000-0000-7000-8000-000000000002, UUIDv7-shaped and distinct from the nil absence value. Exactly two named audit classes may carry it: platform-scope standalone operations and ADR-0072 global identity.user.create attempts. Neither class grants tenant authority or permits a tenant setter to announce it. tenants CHECK and existing factory/announcement guards remain; rejected tenant assertions never use it. Global operation/source/target/evidence rules live in Database Standards; the platform path stays separately confined. |
OrganizationId |
The strongly-typed identifier for a sub-unit within a tenant (ADR-0017), cross-cutting for the same reason as [TenantId]. Nullable at almost every use site, and the null is a scope rather than "unknown": a tenant-owned row with no organization is tenant-wide, which is why the canonical policy reads organization_id IS NULL OR organization_id = …. Modules hold it by value and read organization data through an application contract; the Organization aggregate lives only in LearnStack.Modules.Tenancy.Domain. |
UserId.SystemActor |
Fixed nonempty actor id 00000000-0000-7000-8000-000000000001 used by system executions and separately witnessed seed adoption. It needs no users row and cannot be an ordinary provider binding: audit created_by / actor_user_id columns retain no User FK. Accepted ADR-0072 preserves that boundary; SystemActor alone grants no seed, Platform or closure authority. |
AuditEntryId |
The fourth cross-cutting identifier — the fourth id that lives in LearnStack.SharedKernel rather than in the module owning its aggregate, after TenantId, OrganizationId and UserId — even though AuditEntry is the Audit module's aggregate. Three SharedKernel types name it — AuditIntent, IAuditStateCapture and AuditEntryDraft — so a module-local id would require SharedKernel to reference the module back, which is a project cycle rather than a style preference; it lives in LearnStack.SharedKernel.Audit beside those ports. A UUIDv7-backed [ValueObject<Guid>] on LearnStackVogenDefaults.IdMask with no New(): the call site is AuditEntryId.From(guidFactory.NewUuidV7()). Per ADR-0023 Amendment 9 and ADR-0044 § 11. |
ICacheService |
Interface for cache reads / writes. InMemoryCacheService today; a Valkey-backed implementation when more than one instance runs concurrently. Tenant keys are {tenant_id}:{module}:{logical-name}, or {tenant_id}:{organization_id}:{module}:{logical-name} for organization scope, composed by CacheKey and enforced by CacheKey.EnsureValid. EnsureValid admits exactly two platform-wide families, and admits them by enumeration rather than by opening the guard: the normalized host map platform:hub:host-map:{normalized-host}, composed by CacheKey.ForHostMapping, and the killswitch overlay platform:tenancy:killswitch (ADR-0045 § 5). There is no generic platform factory, and a third family is a decision. RemoveByPrefixAsync is absent per ADR-0038. Set invalidation uses a caller-owned durable generation key embedded in the key template. |
ISecretProvider |
Interface for secret reads. ConfigurationSecretProvider today; the Vault-backed implementation when a production secret must rotate without a redeploy, or more than one operator needs access to production secrets (ADR-0035 — not when a non-development deployment merely exists, which SaaS satisfies on day one). Secret namespace learnstack/{deployment}/{module}/{key}. |
IEntitlementProvider |
The port over the Entitlement Projection source: GetAsync(TenantId) — the tenant is explicit, because RefreshAsync's own writer is an internal endpoint that runs with no tenant context — and RefreshAsync(EntitlementProjection) returning EntitlementRefreshOutcome. An implementation is the only sanctioned reader and writer of platform_entitlement_cache; no module, Tenancy included, may query it. Implementations: NullEntitlementProvider — every feature true, every limit -1, and the registered default in every deployment mode until ADR-0035's Phase 02c trigger fires (ADR-0020 Amendment); HubEntitlementProvider (SaaS / Dedicated / SelfHostedOnline, from Phase 02c); SignedLicenseKeyEntitlementProvider (SelfHostedAirGapped; skeleton from Hub P02c-6, hardened in Phase 11). The Hub-backed provider resolves in the normative order L1 → L2 → platform_entitlement_cache → Hub and never throws out of a feature-flag check. Per ADR-0045 § 1. |
IFeatureFlags |
The only module-facing entitlement read: IsEnabledAsync(FeatureKey) and GetLimitAsync(LimitKey) returning long. It resolves the tenant from ITenantContext and throws when there is none, so module code can never name another tenant. It composes rather than queries: a plan-projected key resolves through IEntitlementProvider.GetAsync — not by reading platform_entitlement_cache — a tenant-flag key reads tenant_feature_flags, and the killswitch overlay is applied last and wins over both. Its implementation lives in LearnStack.Modules.Tenancy.Infrastructure, because tenant_feature_flags is that module's table, and is registered at the composition root. IFeatureFlagService and IUsageLimitService are withdrawn, not renamed (ADR-0021). Per ADR-0045 § 2. |
IHostToTenantResolver / HostResolution |
Interface for host → (tenant_id, organization_id?) resolution, returning the HostResolution(TenantId, OrganizationId?) record or null. Reads platform_host_to_tenant and nothing else — never the Hub, because an anonymous page load must not depend on a control plane being reachable (ADR-0034). |
| APISIX | The gateway in standalone YAML-reload mode per ADR-0015. The intended tenant-facing ingress, demand-gated to Phase 11; until then ASP.NET middleware carries the same responsibilities in-process. /api/internal/* is never proxied by it — that listener is mTLS-only inside the pod. |
OutboxProcessor |
The API-host BackgroundService that claims one admitted outbox row immediately before invocation, with a fresh acquisition token in locked_by, a database-time lease and one counted attempt. Token/expiry-fenced transitions own retry and explicit audited terminal state; stable worker identity is diagnostic only. Accepted ADR-0046 governs P02b-2 implementation: Steps 1–2 completed both review rounds, and Step 3 implements hosted execution/observation with both independent review rounds complete. Step 4 enforcement and local closeout are complete; all four steps completed both independent review rounds. P02b-2 is complete and merged; its merge closeout owns final verification. P02b-3 delivers the independent shared inbox and subscriber runtime for at-least-once recovery; P02b-3 is complete and merged through PR #31; its merge closeout owns final verification. |
IUnitOfWork |
The ambient unit of work: one database connection per scope, and the transaction on it (ADR-0040). Every module DbContext resolved in the scope is built on that connection and enlisted in that transaction, and IAuditStore and IOutbox reach it through the same seam. The connection count is a correctness property, not a performance one: SET LOCAL app.tenant_id is connection- and transaction-local, so a context on its own connection reads zero rows from every tenant-owned table — silently. It exposes no SaveChangesAsync; contexts save themselves and it owns only the transaction boundary. ADR-0040 Amendment 8 accepts explicit read-only/read-write intent, defaulting to writable: same-mode joins preserve ownership, mixed-mode joins poison the unit, and successful read-only completion permits a later writer. P02d-4 Step 1 delivers these modes and lifecycle controls; poison still requires a fresh scope. |
IInboxGuard |
The shared, transport-owned inbox claim seam, implemented as a transaction-bound primitive in P02b-3 Step 2 and integrated with the business owner in Step 3. Deduplication is (tenant_id, subscription_id, event_id), claimed before handler construction on the announced app-role transaction. Business state, completed inbox, produced outbox, MUST audit and fenced ledger completion commit together; rollback removes a new claim. Handlers do not call the guard, and targeted replay never resets a completed inbox. See ADR-0046. |
| Inbox | Shared tenant-owned completion record for one stable subscription/event pair. A new claim is uncommitted business-transaction work; only successful completion persists it. The delivery ledger owns failed/terminal/replay state. P02b-3 Step 1 implements its canonical DDL in Database Standards. |
| Delivery ledger | Shared event_deliveries storage retaining one validated envelope copy per (tenant_id, subscription_id, event_id), independent of the producer row. It owns attempts, leases, completion and terminal/replay state; shared inbox identity owns deduplication. P02b-3 Steps 1–4 implement storage, acceptance, execution and scheduling. See Database Standards. |
DeliveryProcessor |
API-host subscriber worker implemented in P02b-3 Step 4. The confined scheduler claims one exact delivery tuple; a separate app-role executor owns business execution. Retries spend only that subscription's budget, terminal state commits with row-bound MUST audit, and internal replay resets one eligible terminal tuple without broadcast or inbox reset. Controlled tasks retain callbacks/scope cleanup within bounded capacity; the delivery health check is registered and unmapped. Step 5 activates both real defaults; the Step 6 record and external follow-ups own validation/review status; P02b-3 is complete and merged through PR #31, with final verification in its merge closeout. |
| Built-in customization initialization | Create-only installation of the platform's card@1 content type and plain@1 taxonomy, each independently owned by Customization. Any existing concept history is preserved; new IDs are owner-minted, while Seeder verifies matching built-ins semantically and retains warm IDs. P02b-3 Step 5 shares the initializer commands between the two real subscriptions and Seeder. See Customization's flow and its delivery record. |
| Integration-event subscription | One explicitly identified consumer reaction, independent of handler class or assembly. Its stable {module}.{subscription}.v{N} ID versions deduplication semantics, not event schema or built-in revision. Renaming needs a migration/replay decision; a handler refactor preserves identity. ADR-0046 owns the exact grammar. |
| Subscription readiness | Construction-free Pending, Active or IntentionallyUnsubscribed declaration in OutboxEventRegistry, the closed resolver of declared concrete contracts, compatible aliases and retired identities. Any required Pending subscription holds its contract/aliases before acquisition and validation. Active requires a real registered handler; intentional absence is explicit, never inferred from zero discovered handlers. Accepted P02b-2 policy under ADR-0046. |
| Outbox lease | Paired locked_by / locked_until fields; the former holds a fresh canonical UUID acquisition token, the latter a database-time expiry. Every transition checks both current token and unexpired lease. Recovery replaces expired ownership before another transition. Stable worker identity confers no ownership. |
| Dead letter | Explicit completed terminal state after invalid data or exhausted attempts, distinct from a terminal request or delayed availability. On the producer row, terminal_reason requests terminalization and excludes normal publication; only dead_lettered_at records completed terminal state. Producer terminal state retains its envelope and commits with MUST audit; subscriber terminal state belongs to its independent delivery ledger and never completes its inbox. An operator can inspect a dead letter's metadata, replay one dead-lettered subscriber delivery and reset one retry-exhausted producer row, each under a fence (ADR-0103). See ADR-0046. |
EventTerminalTransition |
Restricted immutable witness minted only from the successful fenced terminal UPDATE result in its live transaction. It binds actual row identity, acquisition and terminal values to WriteEventTerminalAsync; substituting draft tenant/org/event or transaction requires rollback of state and audit. Producer fifth seam implemented in P02b-2 Step 2, with both independent review rounds complete; P02b-3 Step 4 adds the subscriber tuple witness and terminal writer using a validated attempt trace without causal-envelope/payload access. |
| DeploymentMode | Enum (Development \| SaaS \| Dedicated \| SelfHostedOnline \| SelfHostedAirGapped) read at the composition root to select provider implementations. Modules never read this enum. |
| Term | Definition |
|---|---|
| Plan (Hub-side) | The plan catalog entry owned by learnstack-hub. Carries default features, limits, compliance caps. |
| HubSubscription | A per-tenant binding to a Plan. Has lifecycle state (trial / active / cancelled / grace / suspended). |
| License Key | An RSA-2048 signed .lic file issued by Hub for Self-Hosted deployments. Carries claims (tenant_id, plan_code, features, limits, valid_until, …) and a signature. See ADR-0020. |
| Phone-Home | The 24h verify call a Self-Hosted instance makes against Hub's POST /api/v1/internal/license/verify. Optional; can be disabled for air-gapped operation. |
| Grace Period | The 30-day window during which an instance keeps operating after the last successful phone-home. Bounded by grace_until in the durable platform_entitlement_cache row — never by a cache TTL. Collapsing the two makes the advertised 30 days into 15 minutes; see 26-hybrid-license-model.md § 5. |
| Platform Entitlement Cache | The platform_entitlement_cache table in LearnStack core — the durable read-only mirror of the Hub-side Entitlement Aggregate, carrying valid_until and grace_until. Despite the name it is a projection store, not a cache: the volatile layers are L1 and L2 in front of it. Third in the normative read path L1 → L2 → platform_entitlement_cache → Hub (ADR-0034). Eager-invalidated on the entitlement-updated event. The only sanctioned reader and writer is an IEntitlementProvider implementation; no module — Tenancy included — may query it (Modules_Do_Not_Read_Entitlement_Cache_Directly), and IFeatureFlags reaches the projection through the provider rather than through this table (ADR-0045 § 2). |
| Operator Portal | operator-portal — the separate Next.js app for Hub operators. Authenticates against the learnstack-hub Keycloak realm. |
| Term | Definition |
|---|---|
| Amendment | A dated, append-only entry at the bottom of an ADR. The only way to add to an accepted record, and the disclosure both correction mechanisms below owe — in every Accepted ADR a diff changes, because an amendment in one ADR discloses nothing to a reader of another. A correction amendment names what was wrong, how it was shown wrong, and every carrier changed, and restates the Decision as unchanged (ADR-0041). |
| Inline Erratum | The default way to correct an Accepted ADR that says something false: a dated blockquote placed immediately before the paragraph or fence it corrects — and immediately below a heading when the span is a subsection, since a reader arriving on the anchor starts their viewport there. The body is not edited, so the accepted wording survives in the document rather than only in git log -L. Shape and rules in 13-documentation.md § Correcting and Amending ADRs. |
| In-Place Replacement | The bounded exception to the erratum default: the false text is rewritten. Licensed only when the statement was false when it entered the record, the text is a canonical artifact rather than an illustrative sketch, and the diff moves no normative content. A carrier outside the ADRs — source, script, workflow — licenses nothing; correct that carrier on its own. |
| Canonical Artifact | Text an ADR presents for reuse: a template other documents are told to copy, a DDL or config block meant to be applied, a command meant to be run. It travels away from any banner placed beside it, which is why it is the one class in-place replacement covers. The corrected RLS policy template in ADR-0003 Amendment 3 is the worked example — four documents had copied it, wrong in all four. |
| Illustrative Sketch | Text an ADR presents to be read, not applied — a code fence showing the shape of a type, a function named in prose. Not a canonical artifact however copyable it looks, and it gets an erratum. ADR-0017's namespace fence is the worked example: its own amendment calls it "superseded as illustrative", and the fence still carries the original text. |
| Term | Definition |
|---|---|
| Phase | A roadmap-level milestone with its own phase-NN-topic.md file under docs/roadmap/. Phases are numbered, sometimes letter-suffixed (02a / 02b / 02c) when sub-streams ship in parallel or in sequence. Each phase doc carries its own ## Phase Exit Decision section spelling out the gate that closes the phase. |
| Packet | A dependency-ordered shipping slice within a phase, sized to be independently reviewable in one pull request. Packet numbering restarts per phase (P02a-0, P02a-1, …); the canonical reference shape is P<PhaseId>-<PacketIndex> (so the kickoff packet of Phase 02a is P02a-0). Commit and PR titles use the prose form (feat(phase-02a): packet 0 — kickoff). A packet may ship documentation only (e.g. a kickoff packet that defines the breakdown), decisions only (an ADR move from Draft to Accepted), code only, or any combination — but always one phase's worth of progress, no cross-phase bundling. A packet's state lives in its row of the phase doc's Status block; its dated history lives in the phase's Delivery Log (ADR-0069). |
| Kickoff Packet | The first packet of a phase when that phase is large enough to need an explicit plan up front. A kickoff packet ships only the per-packet breakdown for its phase plus any glossary / cross-reference updates the breakdown depends on; no code. Phase 01 did not need one (packets fell out cleanly from the existing scaffold targets); Phase 02a does (the foundation surface is wide). |
| Decision Gate | An open question a phase document registers because one of its packets cannot be written without the answer; Roadmap § Decision Timing owns when and how it closes. Not a phase's exit gate (its ## Phase Exit Decision), and not one of the four payload-validation gates of ADR-0043. |
| Decision Pass | The step a packet of a gated phase opens with, in which the decision gates it waits on are closed; Roadmap § Decision Timing defines it. |
| Decision Register | The table in a phase document with one row per decision gate; Roadmap § Decision Timing owns its mechanics, and Phase 02b carries the first. |
| Delivery Log | The sibling of a phase document, docs/roadmap/phase-<id>-delivery-log.md, holding the phase's dated Delivery Records: one ## section per packet plus the declared Phase entry, Cross-packet records and Status archive sections. Append-only; the phase document stays the plan (ADR-0069). It opens with an index generated from its headings — navigation, not a record — which make docs-index rewrites. Phase 02a predates it and keeps its records inside its phase document. |
| Delivery Record | One entry of a Delivery Log — a decision package, a step record, a review round, a correction or a closeout. A shipped packet's records are not rewritten; a false citation gets a dated inline correction (Documentation Standards § Doc Types). Not the log itself. |
| Decision Package | The Delivery Record a packet's decision pass produces: re-verified premises, the gate answers and the implementation steps they authorize. Once the maintainer accepts it, its answers are normative exactly as the phase document's own text would be, and the Decision Register links each one (Roadmap § Decision Timing). |
| Walking Skeleton | A thin vertical slice through every layer that produces a working, browser-visible artefact as early as the foundation allows — deliberately shallow in features and complete in path. LearnStack's is Phase 02d, which owns its scope and exit: two hosts, two tenants in unrelated domains, one backend binary, one database, one schema. Its purpose is evidence, not features: it moves the platform's single most testable claim — that the same code paths serve unrelated education domains — from an assertion five phases away to something a non-engineer can check in a browser. Each capability it touches is delivered shallowly there and completely in its owning phase, and each owning phase records what the skeleton already shipped so no work is claimed twice. |
| Term | Definition |
|---|---|
| Cursor Pagination | The default paging shape for every list endpoint: ?cursor=&limit=, where the cursor is an opaque token the server minted and the client never parses. limit defaults to 20 and is clamped at 100, not rejected. Contract in Standards 04 § Pagination; kernel type CursorPagination. |
| Sort Specification | The parsed form of ?sort=, per Standards 04 § Filtering and Sorting: an ordered list of sort terms, most significant first. Kernel type SortSpecification; parsing (TryParse) and authorising (Restrict) are separate steps, because only the endpoint knows which fields it permits. |
| Sort Term | One key of a sort: a field name plus a direction, where a leading - in the wire form means descending. Named SortTerm rather than SortKey to avoid colliding with System.Globalization.SortKey. |
| Sortable Field Allow-List | The set of field names one endpoint permits in ?sort=. A well-formed field outside it is a 400 naming the field, never a silently ignored key — a page returned in an order the client did not request is the one failure the client cannot detect. |
PascalCasefor entities and aggregates.kebab-casefor slugs, route segments, and config keys.snake_casefor database tables and columns.camelCasefor JSON payloads.