Expand description
Goal-presence sensor (PSP-8): the verifier that refuses false stability.
The SRBN gate accepts a state once its energy V drops below the declared
floor. But an empty or placeholder file compiles, has no failing tests, and
no diagnostics — so every code-quality sensor reports r_e = 0 and the gate
would declare it stable even though the requested work was never done. That
is false stability: convergence to a fixed point that does not satisfy the
goal.
PSP-8 closes this with a goal-presence sensor: a node carries a GoalSpec
naming the symbols its work must bring into existence, and the sensor emits a
blocking ResidualClass::SymbolMismatch residual for every expected
symbol that is absent from the observed workspace. A blocking residual is a
hard-gate failure (hard(y) is false), so the node cannot be accepted while
its goal artifact is missing, regardless of how low the other energy
components are.
This module is domain-neutral: it compares names. Extracting the expected
names from a task contract and the observed names from source is the domain
package’s job (see perspt-coding), keeping the mechanism/domain split of
PSP-8 intact.
Structs§
- Goal
Spec - The set of symbols a node’s work is required to bring into existence.
Functions§
- goal_
presence_ residual - Emit a single blocking goal-presence residual when any expected symbol is
absent from
observed. ReturnsNonewhen the spec is empty or the goal is already satisfied. - goal_
presence_ sensor - The goal-presence sensor identifier and its independence route. It is a deterministic AST/source query, not a model critique, so it is full-weight eligible.
- missing_
symbols - The expected symbols absent from
observed, preserving declared order and de-duplicating. Comparison is exact on the name string; the domain is responsible for normalizing names (e.g. stripping amodule::prefix) before building theGoalSpecand the observed set.