Rules Hub
Code Ruleset
Rule priority, scope & exceptions
Use this to align rules with the senior-level structure (P0/P1/P2, scope, exceptions/tradeoffs).
Align query membership with normalized cache membership
Trace raw identifiers, aliases and missing-field defaults through queries and entity normalization; use the same inclusion rule on cold reads, publication and rebuilt buckets.
Bad example
| 1 | const matches = raw.primary === id || raw.legacy === id; cache.add(raw.primary ?? raw.legacy); |
Explanation (EN)
Trace raw identifiers, aliases and missing-field defaults through queries and entity normalization; use the same inclusion rule on cold reads, publication and rebuilt buckets.
Objašnjenje (HR)
Trace raw identifiers, aliases and missing-field defaults through queries and entity normalization; use the same inclusion rule on cold reads, publication and rebuilt buckets.
Good example
| 1 | for (const key of new Set([raw.primary, raw.legacy].filter(Boolean))) cache.add(key); |
Explanation (EN)
Align query membership with normalized cache membership
Objašnjenje (HR)
Align query membership with normalized cache membership
Notes (EN)
Trace raw identifiers, aliases and missing-field defaults through queries and entity normalization; use the same inclusion rule on cold reads, publication and rebuilt buckets.
Bilješke (HR)
Primijeniti pri promjenama cachea, fallbacka i obrade skupova podataka.
Exceptions / Tradeoffs (EN)
An alias union is only correct when that is the chosen domain contract; precedence-based matching must instead be enforced consistently in queries.
Iznimke / Tradeoffi (HR)
An alias union is only correct when that is the chosen domain contract; precedence-based matching must instead be enforced consistently in queries.