Assistant: codex Assistant-Model: gpt-6-astra Assistant-Session: 01a0cffe-206f-7323-89d3-b20ca4cf4bf9
38 lines
1.8 KiB
Markdown
38 lines
1.8 KiB
Markdown
---
|
|
title: Derived State
|
|
status: draft
|
|
maturity: hypothesis
|
|
families: [projection, affordance]
|
|
scales: [L3, L6]
|
|
admission: research-candidate-only
|
|
---
|
|
|
|
# Derived State
|
|
|
|
Context: totals, filters and enabled states can be calculated from existing inputs.
|
|
Keeping separate mutable copies risks disagreement; repeated computation costs time.
|
|
|
|
Proposed solution: identify the authoritative inputs and derive a read-only result
|
|
from a coherent input snapshot. Cache expensive results only with explicit dependency
|
|
and invalidation rules. An independently editable proposal is a new input, not a
|
|
computed value to overwrite when its source changes.
|
|
|
|
Result: fewer mutable synchronization obligations, at the cost of computation and
|
|
cache bookkeeping. Deriving from stale input does not make the output fresh. Time,
|
|
locale and access context must be represented when they influence the result.
|
|
|
|
Evidence: B02 locates Redux selector guidance. This is a documented mechanism,
|
|
not a requirement to adopt Redux or a global store. Alternative: a maintained
|
|
materialized view when recomputation is too expensive, with its consistency contract.
|
|
Historical snapshots and user overrides must retain their distinct meanings.
|
|
|
|
Proposed relations: supplies [Presentation Model](PresentationModel.md); refreshing
|
|
inputs through [Invalidate and Reproject](InvalidateAndReproject.md) is conditional.
|
|
|
|
Next test: change a filtered record and its filter together; verify list and total
|
|
use the same snapshot, then challenge a cached result with a changed locale.
|
|
|
|
Evidence locators: [breadth review](../reviews/PatternBreadthExpansion.md).
|
|
All relations are research proposals; no canonical identity or admitted graph edges.
|
|
The next test is planned, not executed. Known uses of the complete proposed contract
|
|
have not been verified in this investigation.
|