Skip to content

db tenant - #24

Merged
KilianBoute merged 1 commit into
mainfrom
refactor/project-scope-from-models
Aug 20, 2026
Merged

KilianBoute merged 1 commit into
mainfrom
refactor/project-scope-from-models

Conversation

@KilianBoute

@KilianBoute KilianBoute commented Aug 20, 2026 •

Copy link
Copy Markdown
Member

Description

This change introduces DefaultCompatibleProjectScope, a tenant-scoping helper designed to support the migration of historical resources to project-aware tenancy without breaking access to existing data.

The main motivation is backward compatibility during the backfill period. Resources associated with the deterministic default project may still exist without a projectId field or with a null value. The new scope allows queries against the default project to transparently match:

  • resources explicitly assigned to the default project,
  • legacy resources missing projectId,
  • legacy resources with null project values.

For non-default projects, strict project isolation is preserved by continuing to require exact project equality.

This improves the project by enabling a safer rollout of project-scoped tenancy, reducing migration risk, and preventing legacy resources from becoming unintentionally inaccessible while data is being normalized. Comprehensive tests were added to validate the compatibility and isolation rules across all supported cases.

@KilianBoute
KilianBoute merged commit eb62d44 into main Aug 20, 2026
5 checks passed
@KilianBoute
KilianBoute deleted the refactor/project-scope-from-models branch August 20, 2026 09:17
@codecov

codecov Bot commented Aug 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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.

1 participant