Skip to content

Comments

fix: resolve contract scope by project name instead of UUID#2756

Merged
migmartri merged 1 commit intochainloop-dev:mainfrom
migmartri:migmartri/fix-contract-scope-lookup
Feb 18, 2026
Merged

fix: resolve contract scope by project name instead of UUID#2756
migmartri merged 1 commit intochainloop-dev:mainfrom
migmartri:migmartri/fix-contract-scope-lookup

Conversation

@migmartri
Copy link
Member

@migmartri migmartri commented Feb 18, 2026

Summary

Fix workflow creation failing when using a project-scoped contract after the project was soft-deleted and recreated. The scope check now resolves contracts by project name instead of UUID, handling the case where a project with the same name gets a new UUID.

Includes comprehensive test coverage for project-scoped contracts, including the soft-delete-and-recreate scenario.

Fixes #2755

When creating a workflow with a project-scoped contract, the scope check
compared UUIDs directly, which broke when the project was soft-deleted and
recreated (same name, different UUID). Fix by looking up the scoped project
by its stored UUID and comparing project names instead.

Also add comprehensive test coverage for project-scoped contracts, including
the soft-delete-and-recreate scenario.

Fixes chainloop-dev#2755

Signed-off-by: Miguel Martinez <miguel@chainloop.dev>
@migmartri migmartri merged commit 8e66bd0 into chainloop-dev:main Feb 18, 2026
13 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.

fix(contracts): workflow creation fails with "contract is scoped to a different project" for valid project-scoped contract

3 participants