ump_spec.models.decision
module ump-spec
Decision records and approvals (spec §12, §15, §18).
Classes
Section titled “Classes”MaterialityInputs
Section titled “MaterialityInputs”class
class MaterialityInputs(StrictModel)Fields
| Name | Type | Default | Description |
|---|---|---|---|
spend_at_stake | float | ||
weeks_to_reverse | float | 0 | |
evoi | float | None | None | |
client_recommendation | bool | False | |
public_claim | bool | False |
Source: packages/ump-spec/src/ump_spec/models/decision.py, line 18
Expected
Section titled “Expected”class
class Expected(StrictModel)Fields
| Name | Type | Default | Description |
|---|---|---|---|
median | float | ||
interval | Interval | ||
p_beats_current | float | None | None | |
expected_regret | float | None | None |
Source: packages/ump-spec/src/ump_spec/models/decision.py, line 26
Realised
Section titled “Realised”class
class Realised(StrictModel)Fields
| Name | Type | Default | Description |
|---|---|---|---|
value | float | ||
date | date | ||
within_curse_band | bool | None | None |
Source: packages/ump-spec/src/ump_spec/models/decision.py, line 33
IntegrityRef
Section titled “IntegrityRef”class
class IntegrityRef(StrictModel)Fields
| Name | Type | Default | Description |
|---|---|---|---|
leaf_index | int | None | None | |
leaf_hash | str | None | None | |
domain_tag | str | 'ump/decision/v1' | |
key_version | str | None | None | |
checkpoint_size | int | None | None |
Source: packages/ump-spec/src/ump_spec/models/decision.py, line 39
DecisionRecord
Section titled “DecisionRecord”class
class DecisionRecord(ArtifactDoc)Fields
| Name | Type | Default | Description |
|---|---|---|---|
client_id | str | None | None | |
question | str | ||
options | list[str] | list() | Scenario artifact ids. |
chosen_option | str | None | None | |
comparison_estimand | Estimand | None | None | |
expected | Expected | None | None | |
headline | ShownNumber | None | None | |
uplift_raw | float | None | None | |
uplift_curse_adjusted | float | None | None | |
curse_adjust_status | Literal['provisional', 'validated'] | 'provisional' | |
audit_level | Literal[1, 2, 3, 4] | 2 | |
materiality_tier | MaterialityTier | None | None | |
materiality_inputs | MaterialityInputs | None | None | |
gate_results | list[GateResult] | list() | |
fallbacks | list[FallbackEntry] | list() | |
drafted_by | str | None | None | |
approved_by | str | None | None | |
review_after | date | None | None | |
realised | Realised | None | None | |
integrity | IntegrityRef | None | None | |
rationale | str | None | None | |
model_id | str | None | None | Model the options were scored on. Written by planner (service.py) and Newton’s actor (actor_tools.py). |
model_version | int | None | None | Version of that model. Written by planner (service.py) and Newton’s actor (actor_tools.py). |
baseline_option | str | None | None | Scenario id of the baseline option. Written by planner (service.py) and Newton’s actor (actor_tools.py). |
baseline_plan | dict[str, Any] | None | None | Baseline spend per channel. Written by planner (service.py) and Newton’s actor (actor_tools.py). |
chosen_plan | dict[str, Any] | None | None | Chosen spend per channel. Written by planner (service.py) and Newton’s actor (actor_tools.py). |
crn_seed | int | None | None | Common-random-numbers seed shared by the compared options. Written by planner (service.py) and Newton’s actor (actor_tools.py). |
thinning_index | str | None | None | Which draws were used, e.g. first:200. Written by planner (service.py) and Newton’s actor (actor_tools.py). |
curse_adjustment | dict[str, Any] | None | None | Optimiser’s-curse shrinkage: status, method, shrink_factor (provisional until study 7). Written by planner (service.py) and Newton’s actor (actor_tools.py). |
dependence | dict[str, Any] | str | None | None | Dependence declaration the comparison used (§8). Written by planner (service.py) and Newton’s actor (actor_tools.py). |
ladder_step | str | None | None | Fallback-ladder rung the numbers came from (§8). Written by planner (service.py) and Newton’s actor (actor_tools.py). |
materiality | dict[str, Any] | None | None | Materiality tier with reasons and the proposed thresholds (G-MAT-01). Written by planner (service.py) and Newton’s actor (actor_tools.py). |
review_after_default_days | dict[str, Any] | None | None | Default review window {value, proposed}. Written by planner (service.py) and Newton’s actor (actor_tools.py). |
seed_key | str | None | None | Seed-run key that made this record (e2e seed only). Written by planner (service.py) and Newton’s actor (actor_tools.py). |
notes | list[dict[str, Any] | str] | None | None | Notes (code, message, severity, gate). Written by planner (service.py) and Newton’s actor (actor_tools.py). |
newton_session | str | None | None | Newton session that drafted this record. Written by planner (service.py) and Newton’s actor (actor_tools.py). |
reader_findings | list[str] | None | None | Reader finding ids the actor drew on (§17). Written by planner (service.py) and Newton’s actor (actor_tools.py). |
reader_findings_untrusted | list[str] | None | None | Reader finding ids marked untrusted text (§17). Written by planner (service.py) and Newton’s actor (actor_tools.py). |
injection_flagged_findings | list[str] | None | None | Reader findings flagged as possible prompt injection (§17). Written by planner (service.py) and Newton’s actor (actor_tools.py). |
Source: packages/ump-spec/src/ump_spec/models/decision.py, line 47
Approval
Section titled “Approval”class
class Approval(StrictModel)Fields
| Name | Type | Default | Description |
|---|---|---|---|
artifact_id | str | ||
artifact_version | int | ||
approver | str | ||
submitter | str | None | None | |
decision | Literal['approve', 'reject'] | 'approve' | |
comment | str | None | None | |
payload_digest | str | ||
signature | str | ||
key_version | str | ||
acknowledged_fallbacks | list[str] | list() | Fallback codes acknowledged. |
at | datetime | None | None |
Source: packages/ump-spec/src/ump_spec/models/decision.py, line 143
Constants
Section titled “Constants”| Name | Type | Value | Description |
|---|---|---|---|
MaterialityTier | Literal['light', 'standard', 'full'] |