Skip to content

[finding] External object-draft output fails os build as generated — object name lacks the ${namespace}_ prefix and no sharingModel is emitted #10712

Description

@os-zhuang

Extracted from #10675's secondary observation (QA run #10663, cli.datasource-introspect-codegen at framework 79ebb37) so it doesn't ride the CLI envelope fix — the defect is server-side.

What

ExternalDatasourceService.generateObjectDraft (packages/services/service-datasource/src/external-datasource-service.ts) renders a draft whose object definition does not compile: measured at 79ebb37, the rendered source fails os build because (a) the object name lacks the ${namespace}_ prefix the author-time rules require, and (b) no sharingModel is set — security-owd-unset rejects it (same rule family that #9666 hit for the app template). The review-before-commit flow therefore hands the user a draft the platform's own validator refuses.

Scope notes

Fix direction

Emit a draft that passes os build out of the box: derive the namespace prefix from the datasource/package context and set an explicit sharingModel (or emit the field with a loud TODO the validator accepts — whichever the acceptance rules already prescribe for generated scaffolds; cf. #9666's resolution for the template case).

Filed unassigned as a finding awaiting first-touch grading.

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions