Settings Scope Precedence
Settings in the SDK are scoped: the same setting key can carry a different value at each scope level, and the runtime resolves them in a fixed precedence order.

The five scopes
The ladder is Core's Scope enum (LaravelUi5\Core\Parameters\Enums\Scope), from least to most specific:
| Scope | Meaning |
|---|---|
Platform | The default declared in code, seeded by ui5:sync (least specific) |
Installation | Shared override, written by an operator admin |
Tenant | Shared override, written by a tenant admin or above |
Site | Shared override, written by a local admin or above |
User | Personal override for one partner (most specific) |
Each shared scope holds at most one value per setting. The rows carry no tenant or site id: one installation is one tenant (Tenancy). Who may write which scope is on Reading & Writing.
Resolution order
Platform < Installation < Tenant < Site < UserWhen the runtime asks "what is the value of approval.threshold for this artifact?", the highest scope present wins. A User value wins over a Site value, a Site value over a Tenant value, and so on down to the Platform default.
User is the only personal scope. A read sees every shared row (Platform to Site) plus the current actor's own User rows, never another partner's.
This means:
- Defaults live at
Platform. Declare a setting with Core's#[Setting]attribute;ui5:syncwrites its default as thePlatformrow. That row belongs to code: the settings writer refusesScope::Platform, so a default changes only when its declaration changes. - Overrides live above it. Writing at
Installation,Tenant,SiteorUseris gated by the setting's edit level and by which scopes the actor's system level may write. - Resetting an override deletes that one row, and the value falls back to the next scope present.
Storage
All settings live in a single table, sdk_settings, one row per artifact, scope, key and (for User scope) partner:
| Column | Meaning |
|---|---|
artifact_id | the artifact the setting belongs to (FK → sdk_artifacts.id) |
setting | the key (the semantic name) |
scope | tinyint holding the Scope value |
partner_id | the owning partner (FK → sdk_partners.id, cascade on delete); set only for User scope |
set_by | the partner who last wrote the row; the system actor for the seeded Platform row |
value | the JSON-encoded value |
value_type | Core ValueType; see Type Validation |
level | Core EditLevel, the minimum level allowed to edit the setting |
value_help, value_help_scope | the value-help picker bound to a Model-typed setting |
model_class | the Eloquent model class of a Model-typed setting |
Reading a setting
Your code reads a setting with SdkContext::setting() and gets the value that wins for the acting partner. Which artifact's settings a request sees is on Reading & Writing.