TML-2841: coordinate-addressing project scaffold — poly variant resolution by namespace coordinate#739
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
tensordreams
left a comment
There was a problem hiding this comment.
Reviewed both docs locally (the plan can't be read on GitHub — see below). Content-wise this is a strong scaffold: the spec's code citations check out (domainModelsAtDefaultNamespace does throw on multi-namespace contracts in domain-namespace-access.ts, the ADR 221 helpers exist and return coordinates as described), the re-anchoring note against #720/TML-2816 is clear about what each slice consumes vs. dissolves, the slice sequencing rationale (front-door throw retired last, in S3, because it's load-bearing) is sound, and the risks section honestly captures the alias-collision and interpreter-materializer limitations.
One fix needed before merge:
projects/sql-orm-coordinate-addressing/plan.md contains a literal NUL byte (0x00) on line 7, inside the cache-key example — the text reads `${ns}<NUL>${model}` where the two-character escape sequence \0 (or a printable separator like @) was presumably intended. The raw NUL makes git and GitHub classify the whole file as binary, so the plan renders as "Binary file not shown" in the PR diff and is unreviewable/un-commentable in the UI (which is also why this review has no inline comments on it). Please replace the raw byte with the literal characters \0 so the file diffs as text.
Signed-off-by: Alexey Orlenko's AI Agent <robot@aqrln.net>
…/ PR #720) Signed-off-by: Alexey Orlenko's AI Agent <robot@aqrln.net>
528903e to
b9ffd76
Compare
… residue) PRs #720/#778 landed the namespace-scoped front door, coordinate-keyed caches, and relation/include namespace threading. Re-scope: S1 unchanged (poly layer still base-namespace-pinned), S2 narrows to the cross-namespace polymorphic include + coverage, S3 narrows to the createCollectionRegistry remnant + MTI write + grep gate. Signed-off-by: Alexey Orlenko's AI Agent <robot@aqrln.net>
What
Scaffolds the sql-orm-client coordinate addressing project (
projects/sql-orm-coordinate-addressing/): migrate the ORM off its remaining namespace-flat resolution onto the ADR 221 entity coordinate(plane, namespaceId, entityKind, entityName).Origin: the TML-2683 review surfaced that polymorphic variant resolution is namespace-flat (TML-2841); investigation showed the pin was module-wide, so the operator promoted it to a three-slice project:
PolymorphismInfo/VariantColumnRefcarry{namespace, table})..include()+ relation-road coverage (re-scoped, see below).Relationship to TML-2816 (#720 / #778, merged)
TML-2816 delivered the namespace-scoped front door (
modelsOf(contract, namespaceId), the multi-namespace throw retired from the collection layer), coordinate-keyed metadata caches, collection-level namespace context, and relation/include namespace threading (rel.to.namespace→toNamespace/relatedNamespaceIdthrough the include builders, decode path, and M:N junction), plus an end-to-end PGlite multi-namespace fixture.Consequences, recorded in the re-anchored
plan.md:resolvePolymorphismInfo), and bare variant table strings are bound in the base's namespace (buildMtiJoins). This is the gap the project closes on top of TML-2816.orm.tscreateCollectionRegistrydefaulting remnant, the MTI two-table write, straggler bare-name surfaces, the grep gate, and the project-DoD integration pass.Contents
projects/sql-orm-coordinate-addressing/spec.md(purpose, non-goals, cross-cutting requirements, project DoD) +plan.md(slice composition, sequencing rationale — loud failure is retired only when resolution is actually correct). Docs only; no code.