Repository navigation
feat: builderSource, and withAllRelations covers later layers (0.31.0) - #11
Merged
Merged
Conversation
builderSource(lens, { sourceValues }) reads a lens path by path into the
serializable source a builder authors against (Zealot's builderSource and
template's emailSurface surfaceNode walk). withAllRelations now turns on, in
the first layer, every path a later layer spells (Zealot's relationTree and
Omni's everyRelation). Folded into the unreleased 0.31.0.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Aron (2026-10-08): "get rid of those duplicate helpers for sure."
Two of the three duplicated lens jobs get their home here (the third, clamps into the first layer, is json-rules#37
clampLens).1. A builder source read off a lens, path by path →
builderSource(lens, { sourceValues })(typeLensBuilderSource, assignable toRuleBuilderSource).Copies: Zealot
@zealot/dbbuilderSource(#2715), and thesurfaceNodewalk inside template'semailSurface(plus Kingdom/Tribe ports) — the same function, line for line. Moved verbatim: model-keyed surface + one layer whoserootspells per path the shown picks, enumPicks and relations; no clamp, no bridge. Zealot's test carried over (per-path gate, nowhere), plus the spelled shape and sourceValues riding the surface.2. Turning relations on →
withAllRelations, extended. Copies: ZealotrelationTreeand OmnieveryRelation(anchor one hop + the config's spelled tree). What they genuinely add overwithAllRelationsis coverage of paths a later layer spells past the model-default tree (e.g. Omni'sbrandMission.missionTypebehind its redaction layer) — that otherwise throwsnot_visible.withAllRelationsnow turns on each later layer'sroot.relationshop by hop in the first layer's root (turn-ons only; picks/omits/clamps stay in the later layer). The one-hop-at-anchor restriction is not carried over: Omni reads only the anchor visit's fields (lensFields) and the where-carrying paths (tenantView), so the full posture changes nothing it emits — and it is the posture Zealot's platform-alertrecordLensalready uses. Tests: a later layer'sorg.parentis refused without it and turned on (only that, no picks) with it; a first-layer node keeps what it says.Folded into unreleased 0.31.0; CHANGELOG names the consumers. Consumers switch after the train.
🤖 Generated with Claude Code