Skip to content

check: refuse add attribute on an external entity the script creates (CE6612) - #2711

Merged
ako merged 2 commits into
mainfrom
fix/external-entity-add-attr-script
Dec 1, 2026
Merged

ako merged 2 commits into
mainfrom
fix/external-entity-add-attr-script

Conversation

@ako

@ako ako commented Nov 30, 2026

Copy link
Copy Markdown
Owner

Follow-up to #2477, from re-checking an old backlog note ("add attribute on an external entity passes plain check -p").

The note was mostly stale. For an external entity stored in the project, check -p and exec both refuse add attribute (CE6612), because -p now implies --references.

What was still open: an external entity the script creates. create external entity M.E from odata client … followed by alter entity M.E add attribute X: … passed check, while exec refused the alter once the create had run. So check and exec disagreed. The check skipped every entity in sc.entities, and a script-created external entity was recorded there like any other.

The fix: scriptContext.externalEntities records the external entities a script creates, with their service. validateViewEntityAttributeSet gives them the existing CE6612 refusal.

Evidence


Generated by Claude Code

…(CE6612)

exec refused it once the create had run; check skipped every script-created
entity, so the two disagreed. The script context now records the external
entities a script creates, with their service, and the existing refusal
covers them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011oK82tETa46YQmMS58pQjL
@ako
ako marked this pull request as ready for review December 1, 2026 06:31
@ako
ako merged commit 371f727 into main Dec 1, 2026
19 checks passed
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