Repository navigation
docs(data-modeling): an OData datasources guide, and the three-way choice between declarative OData, a plugin driver and a synced real object - #27871
Conversation
…ice between OData, a plugin driver and a synced real object Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ihL2fzEsUhDQ2VCWQJ5eu
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ihL2fzEsUhDQ2VCWQJ5eu
…dex and the hand-written docs audit scope Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ihL2fzEsUhDQ2VCWQJ5eu
📓 Docs Drift Check
What this run could not see
Coarse fallback — 1 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
|
epic:#27261#1 · marchtian · session_017ihL2c5z3q4h8inrn5kwqV 维护者速读
席位意见:ACCEPT。无契约面( 席位核对
|
Requested by 田騏 · project thread
Fixes #27747
Clause-②: no
Metadata-protocol: none
维护者速读
credentialsRef认证、下推与兜底、写入门槛、失败时调用方看到什么)。「Virtual objects」页开头改为三选一规则:慢变参考数据用真表加定时同步,有 OData v4 用声明式 OData,没有 OData、按需计算或私有 API 才写插件驱动;并注明 Salesforce 不对外提供自身数据的 OData,需要自己的驱动。content/docs/data-modeling/odata-datasources.mdx;virtual-objects.mdx的「Which way in」一节。os serve不把自己的密钥存储交给 stack 里的插件,OData 插件在os serve下只能用宿主自带的resolve。What changes
content/docs/data-modeling/odata-datasources.mdx(nav: after External datasources). Sections: check the service (v4 only, a key per entity set, the auth it takes); mountcreateODataDriverPluginin the stack'spluginswith its option table; declare the datasource and bind objects (anos:checkexample:schemaMode: 'external',driverequal to the plugin name,remoteNameas the entity set,columnMap,idas the entity key, lazy$metadata,checkOnBoot: false); credentials throughexternal.credentialsRefonly (bearer, basic, none; resolved at the first request and again after a 401; fail-closed; whatsecretsmust be on a composed kernel and onos serve); what the service is asked behind the engine floor ($filteroperators, what is left to the engine, the never-narrower rule,$orderbywith the key,@odata.nextLinkpaging, the 1000-row cap); writes (double opt-in, POST / PATCH / DELETE by key,If-Match, refusal mapping, what is refused by name) and the sharing-model choice; the failure table; what the driver does not do.virtual-objects.mdx: "Virtual, or a real object?" becomes "Which way in: OData, a plugin driver, or a real object", opening with the card's three rules in order (slow-changing reference data, then OData v4, then a plugin driver) above the existing copy-or-not table. A paragraph says Salesforce publishes no OData service for its own records, so it takes a plugin driver over its REST API. The SAP sales-orders example points to the OData page when the ERP publishes OData v4, and See also links it.external-datasources.mdx: the opening callout and See also route OData v4 services to the new page.meta.json,index.mdxandscripts/docs-audit/handwritten-docs.json: list the new page (the nav, the module index block, and the hand-written docs audit scope, regenerated withcheck-audit-scope.mjs --write).packages/drivers/driver-odata/README.md: one cross-link to the guide, with apatchchangeset (.changeset/27747-odata-guide-readme-link.md), since the README ships in the package.Why
Epic #27261 P2 (ruling 6486145005, Tier B = declarative OData; 田騏 2026-10-29T21:58Z 「现在启动全部 P2」). #27741 shipped the driver (PR #27796,
0a4b0fb2); no guide page showed an OData datasource or said when to choose declarative OData, a plugin driver, or a synced real object.Verification
main's schema. Theos:checkblock run throughdefineStackfrompackages/spec/srcwithtsx: it parses (one datasource, one object,externalkept as written). The plugin options in the mount example run throughparseODataDriverConfig: accepted. The four refusals the page names (credentials inserviceRoot, a query string,version: '2.0', an unknown key) are each refused with the message the page describes.0a4b0fb2:config.ts,plugin.ts,transport.ts(401 re-resolve, same-origin links,Prefer: odata.maxpagesize),filter.ts(the pushdown list and the never-narrower rules),odata-driver.ts(key asid,columnMapboth ways, lazy$metadata, writes and refusals), and the floor and conformance tests. Theos servestatement was read offpackages/cli/src/commands/serve.ts(the binder is built inline and passed only toDatasourceAdminServicePlugin) andservice-datasource(no service exposes it).node scripts/pm/dispatch-gates.mjs --commandsderived 88 families from the changed files (71 before the changeset, index row and audit-scope row were added); every one was run, exit codes recorded before any pipe. First pass:check-section-landing-indexandcheck:docs-audit-scopered on the new page (the module index row andscripts/docs-audit/handwritten-docs.json), both fixed;check:skill-examples(which type-checks the page'sos:checkblock),check:dual-build-cjs-loadsandcheck:lean-entry-closureexited 3 until the packages were built. Final pass, after building./packages/**:dispatch-gates --ran: "88 derived famil(ies) accounted for — 88 run, 0 NOT-MEASURED (a DERIVED zero)".origin/mainmerged atc62ec8e2(none of the 12 incoming commits touched these files);check:doc-anchors,check-section-landing-indexandcheck:docs-audit-scopere-run green on the merged head. The full battery is CI's.Acceptance notes
os servegives a stack's OData plugin no way to reach its secret store.os servebuilds itssys_secretbinder inline (serve.ts) and passes it only toDatasourceAdminServicePlugin; no kernel service exposes it. So underos serve,createODataDriverPlugin({ secrets })cannot be handed the binder that resolves asys_secret:handle, and the page tells the reader to pass aresolvebacked by the host's own secret handling. Reported to the epic PM to decide whether it is a card (and whether service-datasource: a datasource driver resolves a borrowed connector credential through ADR-0143 D4's per-dispatch resolver (D7 runtime seam) — epic #27261 P2 #27746's credential seam covers it); this PR documents what the runtime does today.external.connectormention (skills + docs: teach external.connector (D7) beside credentialsRef in the datasources skill rule and the two data-modeling guides — epic #27261 P2 #27786's), and the pointer to objectql: publish a driver conformance kit that out-of-repo plugin drivers run in their own CI, so a contract change here is caught there — epic #27261 P2 #27744's conformance kit (feat(objectql): a conformance kit a plugin driver outside this repository runs in its own CI #27798 is not onmain; the epic PM moves it to skills + docs: teach external.connector (D7) beside credentialsRef in the datasources skill rule and the two data-modeling guides — epic #27261 P2 #27786 if it lands after this PR is ready).checkOnBoot: true) over an OData service.objectstack-issue-27747; the worktree isobjectstack-27747on the claimed branch.Human Minimum
packages/specholds no runtime logic. (Not touched.)pnpm lintis CI's).main, one pull request.packages/spectouched: not touched.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
https://claude.ai/code/session_017ihL2fzEsUhDQ2VCWQJ5eu