Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## synapse-3xx #4793 +/- ##
============================================
Coverage 96.23% 96.24%
============================================
Files 259 259
Lines 63244 63257 +13
============================================
+ Hits 60866 60879 +13
Misses 2378 2378
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
synapse/models/infotech.py
Outdated
|
|
||
| ('groups', ('array', {'type': 'it:host:group'}), { | ||
| 'doc': 'Groups that the account is a member of.'}), | ||
| ('sid', ('it:os:windows:sid', {}), { |
There was a problem hiding this comment.
This could be an opportunity to make :id an it:os:windows:sid?
There was a problem hiding this comment.
Making this change is blocked on supporting types on polyprops. Summarizing the discussion though:
- Add
it:host:account:idwhich is a poly ofit:os:windows:sid,it:os:posix:id(?),meta:id - Remove
it:host:windows:account:sidand override:idwith the current docstring and only supportingit:os:windows:sid - Remove
it:host:posix:account:uidand override:idwith the current docstring and only supportingit:os:posix:id - Make
it:host:posix:gidof typeit:os:posix:id(?). - Open question on the
it:os:posix:idname versus breaking outuidandgid.
synapse/models/infotech.py
Outdated
| 'prevnames': ('it:account',), | ||
| 'doc': 'A local account on a host.'}), | ||
|
|
||
| ('it:host:account:posix', ('it:host:account', {}), { |
There was a problem hiding this comment.
Hm... it:host:posix:account or it:host:account:posix 🤔 You probably did the right thing, but worth a quick noodle since it's precedent setting.
There was a problem hiding this comment.
Good call — renamed to it:host:posix:account and it:host:windows:account.
…-hostacct-subforms
…dows:account Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add it:os:posix:id type and it:host:account:id poly type. Add :id property to it:host:account with narrowed types on subforms (it:os:posix:id on posix, it:os:windows:sid on windows). Update it:host:group:posix:gid to use it:os:posix:id. Allow subforms to narrow parent poly prop types in datamodel inheritance. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
|
||
| return tuple(virts) | ||
|
|
||
| def _isPolySubset(self, prop, newdef): |
There was a problem hiding this comment.
I think we need to check the interfaces allowed as well as the types.
… guards Update _isPolySubset to validate child interfaces as a subset of parent interfaces, and allow child types that are forms implementing parent interfaces. Remove unreachable defensive guards. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
synapse/datamodel.py
Outdated
| parent_ifaces = prop.type.ifaces | ||
|
|
||
| if child_types: | ||
| if not child_types.issubset(parent_types): |
There was a problem hiding this comment.
Should probably just make it so that types has to be a subset of types and interfaces has to be a subset of interfaces rather than computing the set of forms to avoid something where a form is added to one of the interfaces and now it is no longer a subset.
Remove formsbyiface cross-lane resolution per review feedback. Enforce types subset of types and interfaces subset of interfaces only, avoiding fragile dependency on which forms currently implement an interface. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
No description provided.