Skip to content

Fix metadata validation when reusing values across fields - #76

Merged
dschwartznyc merged 1 commit into
mainfrom
fix/metadata-reuse-empty-slots
Nov 12, 2026
Merged

dschwartznyc merged 1 commit into
mainfrom
fix/metadata-reuse-empty-slots

Conversation

@plamen-neykov

Copy link
Copy Markdown
Contributor

Summary

Reusing an object in a reference-capable field could initialize empty @ref metadata slots on that object. Subsequent validation in a field without reference permissions then rejected those slots, even though their values were None.

Validate only populated metadata against the receiving field's permissions. Preserve existing slots so later reference assignments continue to work. Forbidden non-None values remain rejected, including False, 0, and empty strings.

Broader ownership and copying behavior remains tracked in #66 and #49.

Validation

  • Added 14 regression cases covering construction, model validation, ObjectBuilder, lists, assignment, reuse order, key preservation, and reference permissions.
  • Confirmed nine regression cases failed before the fix.
  • 413 targeted tests passed.
  • git diff --check passed.

Fixes #15.

@plamen-neykov plamen-neykov self-assigned this Nov 12, 2026
@plamen-neykov plamen-neykov added the bug Something isn't working label Nov 12, 2026
@github-actions

Copy link
Copy Markdown

Test Results

591 tests  +14   571 ✅ +14   2s ⏱️ -1s
  1 suites ± 0    20 💤 ± 0 
  1 files   ± 0     0 ❌ ± 0 

Results for commit ef44b27. ± Comparison against base commit 272e179.

@dschwartznyc
dschwartznyc merged commit 40abe43 into main Nov 12, 2026
6 checks passed
@plamen-neykov
plamen-neykov deleted the fix/metadata-reuse-empty-slots branch November 12, 2026 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

2 participants