E-SYNTHESIZED-WRITE
Assignment to an auto-synthesized property. Validity-surface properties are read-only.
What it means
Validator-bearing compound state cells auto-synthesize a validity surface at two levels (per SPEC §55.5 + §55.6): compound rollup and per-field. The synthesized properties are read-only — they reflect the validity of the cell's current data; they don't represent independently-settable state.
The auto-synthesized properties are:
-
@cell.isValid— boolean rollup -
@cell.errors— compound-level errors array (enum tags from ValidationError) -
@cell.touched— any field interacted with yet? -
@cell.submitted— was a form submit attempted? -
@cell.fieldName.isValid / .errors / .touched— per-field
Writing to any of these fires E-SYNTHESIZED-WRITE. The compiler rejects the write at compile time.
Minimal reproducer
<signup>
<name req length(>=2)> = <input type="text"/>
<email req email> = <input type="email"/>
</>
function forceSubmit() {
@signup.submitted = true
// ^^^^^^^^^
// E-SYNTHESIZED-WRITE: .submitted is read-only.
}
How to fix
-
Drive the property indirectly via its trigger.
Each synthesized property has a deterministic source:
-
.submitted— flips true when the user submits the compound state's parent<form>(compiler attaches a document-level submit listener per §55.5). -
.touched— flips true on first interaction with any bound field input. -
.isValid/.errors— recompute reactively from the cell's current value vs validator predicates.
-
-
Use a separate cell for independently-controllable state.
If you need a "force submit" flag that's distinct from
user submission, declare a sibling reactive cell:
<forcedSubmit> = falseand read both@signup.submitted || @forcedSubmitwhere the value is consumed. -
Reset the cell.
Per §6.8,
reset(@signup)clears the cell to its default state, which also resets the validity surface. The reset operation is the canonical way to clear .touched / .submitted.
Why read-only is structural
The validity surface is a DERIVATION of the cell's data + validator vocabulary. Allowing user writes would split the source of truth — two places carrying validity state (the predicates and the manual override). Per the scrml design intent, "every transition is intentional, every effect runs at the right moment" (PRIMER §2 pillar 6). User writes to .isValid would silently override predicate-derived truth; structural rejection preserves the single-source-of- truth invariant.
Related
- <errors> — first-class element for rendering the validity surface.
- E-DERIVED-WITH-VALIDATORS — companion error for validators on derived cells.
Specification
Normative text: SPEC §6.11 (auto-synthesized validity surface stub at the state-cell layer), §55.7 (synthesized-property semantics — read-only normative statement), §55.5 / §55.6 (compound + per-field synthesis rules), §34 catalog row. Spec lives at compiler/SPEC.md .