fix(objectql): seed reference resolution falls back to matching by id#1814
Merged
Conversation
SeedLoaderService.resolveFromDatabase only matched a reference value against the target's natural-key field. A seed that wires a lookup to a REAL existing record by its internal id — e.g. a people field (approver/applicant → user) pointed at the current user — dangled to null when that id is not a UUID/ObjectId (so the caller's `looksLikeInternalId` guard did not short-circuit) and is not the target's natural key. Add an id fallback: when the natural-key lookup finds nothing, try resolving the value as the target's `id`. Safe — an id either exists or it doesn't, so there's no risk of a false natural-key match; and it's tenant-scoped like the primary lookup. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Jun 14, 2026
xuyushun441-sys
added a commit
that referenced
this pull request
Jun 14, 2026
* docs(skills): sync objectstack-* skills with 9.0→9.4 changes Audited all changes from @objectstack/types@9.0.1 to 9.4.0 and updated the six skills whose documented contracts had drifted or gained capabilities: - ui: fix matrix report example (rows down × columns across, ADR-0021 D2) + drilldown; add Action opensInNewTab/newTabUrl (#1787); App.hidden (ADR-0045); userFilters toggle deprecation - platform: correct namespace prose — manifest.namespace is enforced (ADR-0048, validateNamespacePrefix/NamespaceConflictError); split-app boot sequence; os package install/publish; cloud-connection; sys_metadata opt-in - automation: inbound webhook (api) triggers + queue prerequisite (ADR-0041); ADR-0044 send-back-for-revision (revise/back edges, maxRevisions) - api: document the /meta REST surface — ?preview=draft (#1763), ?package= (ADR-0048), /meta/doc content omission (ADR-0046) - ai: built-in data_chat assistant + visualize_data + query-only gate (ADR-0040); fix stale guardrails example keys; model-registry providers - data: seed lookup id-fallback (#1814) query/formula/i18n skills required no changes (no contract drift in range). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * chore: add empty changeset for docs-only skills sync Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
os-zhuang
added a commit
that referenced
this pull request
Jun 20, 2026
#2066) Now that the SDUI renderer fixes landed in objectui (#1814), restore the showcase features that were dropped as workarounds: My Work — KPI hero row moves from `flex` back to an equal-width `grid` (layout grid no longer shadowed by ObjectGrid); sidebar gains a per-user `visible`-gated note (`user.email == 'admin@objectos.ai'` shows for the admin, a different-email note stays hidden) demonstrating component-level role gating. Account 360 — the History tab returns: `record:history` now self-fetches from sys_activity field_change events (trackHistory on status/industry), so the tab lists real audit entries instead of "No history yet". Browser-verified on :5181: grid-cols KPI row, role-gated visibility, and the History tab populating after an industry change. typecheck + 20 tests pass. Co-authored-by: Claude Opus 4.8 <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.
Problem
SeedLoaderService.resolveFromDatabaseonly matched a reference value against the target's natural-key field. A seed that wires a lookup to a real existing record by its internal id — e.g. a people field (approver/applicant→user) pointed at the current user — dangled to null when:looksLikeInternalIdguard didn't short-circuit and write it directly), andThis surfaced while wiring AI-built approval apps' sample rows to a real user (cloud apps#285): the approver field is a proper
userlookup, the seed carries a valid user id, yet it resolved to null.Fix
When the natural-key lookup finds nothing, try resolving the value as the target's
id. Safe: an id either exists or it doesn't, so there's no risk of a false natural-key match; tenant-scoped like the primary lookup.Notes
Small, additive change in
resolveFromDatabase; covers both pass-1 and the deferred pass-2 resolution (both route through this method). Verified by typecheck; cloud-side e2e is pending the next framework bump (the local rig is currently on an unrelated newer framework commit).🤖 Generated with Claude Code