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.
Extracted from #10675's secondary observation (QA run #10663,
cli.datasource-introspect-codegenat framework79ebb37) 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 at79ebb37, the rendered source failsos buildbecause (a) the object name lacks the${namespace}_prefix the author-time rules require, and (b) nosharingModelis set —security-owd-unsetrejects 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
isPrimary/primaryKeyseam) — same generator, different defect; if one dev covers both, the family-dispatch five gates apply.{ error: '<string>' }#3843 envelope) — that card explicitly excludes this gap from its fix.Fix direction
Emit a draft that passes
os buildout of the box: derive the namespace prefix from the datasource/package context and set an explicitsharingModel(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.