Relationship evidence / lesson 08
Keep findings separate from decisions
A structural observation is evidence. The caller decides what it means.
Know what the primitive owns.
Problem
If a constraint owns severity or workflow action, a generic relationship check silently imports one domain’s policy.
System boundary
Constraints retain lossless findings with caller-defined kinds and codes. createConstraintEvaluator requires an explicit interpretation callback.
State changes become visible.
Inspectable: Every executed check, duplicate and empty results, stable finding codes, evidence, and the separate interpretation.
Apply the same findings report to draft and publication contexts.
Static specimen / JavaScript adds controls without changing the lesson.
Same idea, honest surfaces.
const constraints = composeConstraints(
referencesResolve,
apiLevelsSupported,
consumersReachable,
);
const report = await constraints.check(manifest);
constraints = compose_constraints(
references_resolve,
api_levels_supported,
consumers_reachable,
)
report = constraints.check(manifest)
What this does not imply.
No findings means only that the checks executed did not detect a violation. It is not proof that every relevant relation was checked.