Skip to content

3xx: Add it:host:account subforms#4793

Draft
mikemoritz wants to merge 7 commits intosynapse-3xxfrom
redox/syn10233-hostacct-subforms
Draft

3xx: Add it:host:account subforms#4793
mikemoritz wants to merge 7 commits intosynapse-3xxfrom
redox/syn10233-hostacct-subforms

Conversation

@mikemoritz
Copy link
Copy Markdown
Contributor

No description provided.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.24%. Comparing base (c3aaad9) to head (3cd1257).
⚠️ Report is 3 commits behind head on synapse-3xx.

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           
Flag Coverage Δ
linux 96.24% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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


('groups', ('array', {'type': 'it:host:group'}), {
'doc': 'Groups that the account is a member of.'}),
('sid', ('it:os:windows:sid', {}), {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be an opportunity to make :id an it:os:windows:sid?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Making this change is blocked on supporting types on polyprops. Summarizing the discussion though:

  • Add it:host:account:id which is a poly of it:os:windows:sid, it:os:posix:id(?), meta:id
  • Remove it:host:windows:account:sid and override :id with the current docstring and only supporting it:os:windows:sid
  • Remove it:host:posix:account:uid and override :id with the current docstring and only supporting it:os:posix:id
  • Make it:host:posix:gid of type it:os:posix:id(?).
  • Open question on the it:os:posix:id name versus breaking out uid and gid.

'prevnames': ('it:account',),
'doc': 'A local account on a host.'}),

('it:host:account:posix', ('it:host:account', {}), {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call — renamed to it:host:posix:account and it:host:windows:account.

mikemoritz and others added 4 commits March 17, 2026 16:26
…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):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
parent_ifaces = prop.type.ifaces

if child_types:
if not child_types.issubset(parent_types):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
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.

3 participants