fix(query): keep tight ProjectableGuard on project() + dual-tag/optional harden - #850
Merged
Conversation
@effect-app/cli
effect-app
@effect-app/eslint-codegen-model
@effect-app/eslint-shared-config
@effect-app/infra
@effect-app/vue
@effect-app/vue-components
commit: |
Revert the loose ProjectableKeyGuard paper-over. project() and projectComputed both require domain-owned keys (tag-aware). Call sites that project view DTOs must derive from domain tagged members instead. Co-authored-by: Patrick Roza <42661+patroza@users.noreply.github.com>
Keep tag-aware ProjectableGuard on project() and projectComputed. Fix dual same-tag domain variants (KeysOfUnion for single literal tags) and optionalKey false negatives (key-presence check). Multi-tag flat DTOs still fail when they claim state-only fields. Co-authored-by: Patrick Roza <42661+patroza@users.noreply.github.com>
patroza
marked this pull request as ready for review
August 4, 2026 11:24
omegent-app
Bot
force-pushed
the
fix/restore-tight-project-guard
branch
from
August 4, 2026 11:26
5864aae to
e50c93e
Compare
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.
Why
Scanner Overview.List SchemaErrors require tag-aware projections. Softening
project()to a key-only guard papers over illegal multi-tag DTOs. Keep the tight guard and fix the real dual-tag / optionalKey type holes.What
ProjectableGuardonproject()(same asprojectComputed)KeysOfUnionof matched domain members (dual packing/closed shapes)stringtags: still key intersection (batchId on initial still fails)UnprojectableKeys) sooptionalKeydoes not false-negativeHow
See
ProjectableFromDomain/ProjectableGuardinpackages/effect-app/src/Model/query/dsl.ts.Remarks
Scanner branch
chore/effect-app-beta-306validates against this underpnpm embedded:effect:link.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.