Skip to content

feat(entities): apply resource overrides on all byName paths - #714

Open
deepeshrai-tech wants to merge 2 commits into
mainfrom
feat/refs-entities-overrides
Open

feat(entities): apply resource overrides on all byName paths#714
deepeshrai-tech wants to merge 2 commits into
mainfrom
feat/refs-entities-overrides

Conversation

@deepeshrai-tech

Copy link
Copy Markdown
Contributor

Summary

Data Fabric now honours the ambient resource-overrides table for every path that carries an entity name on the wire — matching the Assets ref-based PR (#684) and closing the parity gap identified in the framework review.

Public byName reads — now applied: getByName, getRecordsByName, getRecordByName.

Operational methods that accept { name } on an EntityRef — one shared code path via unwrapEntityRef now applies overrides for the whole family: insertRecord(s), updateRecord(s), deleteRecord(s), queryRecords, importRecords, downloadAttachment, uploadAttachment, deleteAttachment.

A single resolveEntityName helper is invoked in unwrapEntityRef for the operational family and inline for the three public reads.

Folder scoping caveat. DF does not accept a folderPath header, so the redirect's folderPath field is intentionally ignored — only the redirected name reaches the URL. The unscoped entity.<name> publisher key is what matches; scoped keys with a folder path never apply to DF and are quietly bypassed.

{ id } refs are untouched — id-based routes have no name to override.

Test plan

  • npm run typecheck — clean
  • npm run lint — 0/0
  • npm run test:unit — 2731/2731 pass (single failing file is a pre-existing check-samples.test.ts module-not-found)
  • npm run build — exit 0
  • New tests:
    • getByName — override redirects the URL entity name
    • insertRecord({ name }) — override redirects the URL entity name; documented as the representative for the whole shared unwrapEntityRef code path

🤖 Generated with Claude Code

@deepeshrai-tech
deepeshrai-tech requested a review from a team September 4, 2026 10:07
Comment thread src/services/data-fabric/entities.ts Outdated
Comment thread tests/unit/services/data-fabric/entities.test.ts
@claude

claude Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Two issues found this run — see inline comments for details.

@deepeshrai-tech
deepeshrai-tech force-pushed the feat/refs-entities-overrides branch from e045dce to d276fd1 Compare September 5, 2026 09:10
Comment thread tests/unit/services/data-fabric/entities.test.ts Outdated
@claude

claude Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

One new finding this run — see inline comment for details.

Data Fabric now honours the ambient resource-overrides table for every path
that carries an entity name on the wire — matching the Assets ref-based PR
(#684) and closing the parity gap identified in the framework review.

Public byName reads (`getByName`, `getRecordsByName`, `getRecordByName`) and
every operational method that accepts `{ name }` on an `EntityRef`
(`insertRecord(s)`, `updateRecord(s)`, `deleteRecord(s)`, `queryRecords`,
`importRecords`, `downloadAttachment`, `uploadAttachment`, `deleteAttachment`)
now route the design-time name through `resolveOverride('Entity', name)` before
the URL is built. A single `resolveEntityName` helper is invoked in
`unwrapEntityRef` for the operational family and inline for the three public
reads.

DF does not accept a `folderPath` header, so the redirect's `folderPath` field
is intentionally ignored — only the redirected `name` reaches the URL. The
unscoped `entity.<name>` publisher key is what matches; scoped keys with a
folder path never apply to DF and are quietly bypassed.

`{ id }` refs are untouched — id-based routes have no name to override.

Tests:
- `getByName` — override redirects the URL entity name
- `insertRecord({ name })` — override redirects the URL entity name; documented
  as the representative for the whole shared `unwrapEntityRef` code path.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@deepeshrai-tech
deepeshrai-tech force-pushed the feat/refs-entities-overrides branch from d276fd1 to eb525cd Compare September 7, 2026 06:18
Comment thread tests/unit/services/data-fabric/entities.test.ts Outdated
@claude

claude Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

One new finding this run — see inline comment for details.

@claude

claude Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

✅ No issues found. Checked for bugs and CLAUDE.md compliance.

@sonarqubecloud

sonarqubecloud Bot commented Sep 7, 2026

Copy link
Copy Markdown

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
@deepeshrai-tech
deepeshrai-tech force-pushed the feat/refs-entities-overrides branch from 31f01a1 to 4936227 Compare September 8, 2026 16:51
@claude

claude Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

✅ No issues found. Checked for bugs and CLAUDE.md compliance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants