Skip to content

🎨 Make the default record writing space consistent - #3844

Open
sunnyosun wants to merge 1 commit into
mainfrom
default-space
Open

🎨 Make the default record writing space consistent#3844
sunnyosun wants to merge 1 commit into
mainfrom
default-space

Conversation

@sunnyosun

@sunnyosun sunnyosun commented Aug 5, 2026

Copy link
Copy Markdown
Member

Summary

  • When creating a typed record without an explicit space, default to the type's _aux.ss single-space policy (1/"1" → type owning space, or an exact space uid).
  • Keep existing precedence otherwise: explicit space/space_id > single-space policy > context/settings.space > all.
  • Aligns SDK create behavior with the Hub write-space default so callers no longer need to pass the locked space manually (DB triggers still reject explicit mismatches).

Test plan

  • Extend test_single_space_enforces_type_space_or_specific_space for auto-default on ss=1 and exact uid
  • Keep coverage that wrong explicit space= still fails the Postgres trigger

@sunnyosun sunnyosun changed the title 🎨 Make the default writing space consistent 🎨 Make the default record writing space consistent Aug 5, 2026
@sunnyosun
sunnyosun requested a review from falexwolf August 5, 2026 12:31
@codecov

codecov Bot commented Aug 5, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 89.47368% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.97%. Comparing base (112244e) to head (caaf079).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
lamindb/models/sqlrecord.py 89.47% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3844      +/-   ##
==========================================
- Coverage   91.55%   86.97%   -4.58%     
==========================================
  Files          88       88              
  Lines       15747    15765      +18     
==========================================
- Hits        14417    13712     -705     
- Misses       1330     2053     +723     
Files with missing lines Coverage Δ
lamindb/models/sqlrecord.py 92.02% <89.47%> (-0.05%) ⬇️

... and 15 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

Deployment URL: https://d6dcd07a.lamindb.pages.dev

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