Skip to content

feat(generated): AdminPortal, Agents, ApiKeys, AuditLogs, Authorization, ClientApi, Connect, DirectorySync, Events, FeatureFlags, Groups, MultiFactorAuth, OrganizationDomains, OrganizationMembership, Organizations, Pipes, PipesProvider, PlatformTeams, Radar, SSO, UserManagement, Vault, Webhooks, Widgets (batch aeefef11) - #752

Merged
gjtorikian merged 2 commits into
mainfrom
oagen/batch-aeefef11
Oct 19, 2026

Conversation

@workos-sdk-automation

Copy link
Copy Markdown
Contributor

Summary

Regenerated SDK from spec changes.

Triggered by workos/openapi-spec@26ae9d6

…iKeys, AuditLogs, Authorization, ClientApi, Connect, DirectorySync, Events, FeatureFlags, Groups, MultiFactorAuth, OrganizationDomains, OrganizationMembership, Organizations, Pipes, PipesProvider, PlatformTeams, Radar, SSO, UserManagement, Vault, Webhooks, Widgets
@workos-sdk-automation
workos-sdk-automation Bot requested review from a team as code owners October 19, 2026 13:23
@workos-sdk-automation workos-sdk-automation Bot added the autogenerated Autogenerated code or content label Oct 19, 2026
@greptile-apps

greptile-apps Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 3/5 Tier: plus

[Medium impact] Auto-generated SDK models and API methods for feature flags and agents.

Fix the removed public export and required constructor argument before merging.

Findings

  1. P1 Existing authorization imports fail ▶
  2. P1 Existing registration constructors fail ▶
  3. P2 Unchanged owners become null ▶
  4. P2 Revoked timestamps go untested ▶
Fix with agent prompt
### Issue 1
src/workos/authorization/models/__init__.py:9
Removing `ListMetadata` breaks existing imports from `workos.authorization.models`. It also removes the name from `workos.authorization`, which forwards these exports. Applications using either import now fail with `ImportError`. Keep the existing export alongside the new export in `agents`.

```suggestion
from workos.common.models.list_metadata import ListMetadata as ListMetadata
from workos.common.models.slim_role import SlimRole as SlimRole
```

### Issue 2
src/workos/agents/models/agent_registration.py:30
Adding `revoked_at` without a default breaks existing `AgentRegistration(...)` calls. A caller supplying every previously required argument now gets `TypeError` because `revoked_at` is missing. Make the new field keyword-only with a default of `None`, or append it with that default, to preserve existing constructor calls.

### Issue 3
src/workos/common/models/flag_updated_context_previous_attribute_data.py:62-65
Serializing previous flag attributes now adds `"owner": null` even when the input omitted `owner`. These attributes describe fields that changed, so an update that only changed `enabled` should not gain a previous-owner entry. Callers that serialize parsed events receive a value the event never supplied. Preserve the difference between an omitted `owner` and an explicit null, and test a round trip where `owner` is absent.

### Issue 4
tests/test_agents.py:205-212
Both new revoke tests return an unrevoked registration fixture, and neither checks `revoked_at`. The added model tests also use only null timestamps, so the new timestamp parsing and formatting paths are never exercised. Return a non-null timestamp in the revoke tests and check both the parsed value and its serialized form.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

Adds registration revocation to the sync and async SDK clients.

  • Applications can revoke agent registrations and see when they were revoked.
  • Flag update events can show who owned the flag before a change.
  • Admin Portal docs use a singular heading for the revoke call.

Reviews (1) · Last reviewed commit: "chore(generated): add release notes frag..." · Reviewed by Greptile

AuthorizationPermission as AuthorizationPermission,
)
from workos.common.models.list_metadata import ListMetadata as ListMetadata
from workos.common.models.slim_role import SlimRole as SlimRole

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.

P1 Existing authorization imports fail

Removing ListMetadata breaks existing imports from workos.authorization.models. It also removes the name from workos.authorization, which forwards these exports. Applications using either import now fail with ImportError. Keep the existing export alongside the new export in agents.

Suggested change
from workos.common.models.slim_role import SlimRole as SlimRole
from workos.common.models.list_metadata import ListMetadata as ListMetadata
from workos.common.models.slim_role import SlimRole as SlimRole
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/workos/authorization/models/__init__.py
Line: 9

Comment:
**Existing authorization imports fail**

Removing `ListMetadata` breaks existing imports from `workos.authorization.models`. It also removes the name from `workos.authorization`, which forwards these exports. Applications using either import now fail with `ImportError`. Keep the existing export alongside the new export in `agents`.

```suggestion
from workos.common.models.list_metadata import ListMetadata as ListMetadata
from workos.common.models.slim_role import SlimRole as SlimRole
```

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

"""Identifier of the organization the agent is registered to."""
status: AgentRegistrationStatus
"""The current verification status of the registration."""
revoked_at: datetime | None

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.

P1 Existing registration constructors fail

Adding revoked_at without a default breaks existing AgentRegistration(...) calls. A caller supplying every previously required argument now gets TypeError because revoked_at is missing. Make the new field keyword-only with a default of None, or append it with that default, to preserve existing constructor calls.

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/workos/agents/models/agent_registration.py
Line: 30

Comment:
**Existing registration constructors fail**

Adding `revoked_at` without a default breaks existing `AgentRegistration(...)` calls. A caller supplying every previously required argument now gets `TypeError` because `revoked_at` is missing. Make the new field keyword-only with a default of `None`, or append it with that default, to preserve existing constructor calls.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Comment on lines +62 to +65
if self.owner is not None:
result["owner"] = self.owner.to_dict()
else:
result["owner"] = None

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.

P2 Unchanged owners become null

Serializing previous flag attributes now adds "owner": null even when the input omitted owner. These attributes describe fields that changed, so an update that only changed enabled should not gain a previous-owner entry. Callers that serialize parsed events receive a value the event never supplied. Preserve the difference between an omitted owner and an explicit null, and test a round trip where owner is absent.

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/workos/common/models/flag_updated_context_previous_attribute_data.py
Line: 62-65

Comment:
**Unchanged owners become null**

Serializing previous flag attributes now adds `"owner": null` even when the input omitted `owner`. These attributes describe fields that changed, so an update that only changed `enabled` should not gain a previous-owner entry. Callers that serialize parsed events receive a value the event never supplied. Preserve the difference between an omitted `owner` and an explicit null, and test a round trip where `owner` is absent.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Comment thread tests/test_agents.py
Comment on lines +205 to +212
def test_revoke_registration(self, workos, httpx_mock):
httpx_mock.add_response(
json=load_fixture("agent_registration.json"),
)
result = workos.agents.revoke_registration("test_id")
assert isinstance(result, AgentRegistration)
assert result.id == "agent_reg_01EHWNCE74X7JSDV0X3SZ3KJNY"
assert result.organization_id == "org_01EHQMYV6MBK39QC5PZXHY59C3"

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.

P2 Revoked timestamps go untested

Both new revoke tests return an unrevoked registration fixture, and neither checks revoked_at. The added model tests also use only null timestamps, so the new timestamp parsing and formatting paths are never exercised. Return a non-null timestamp in the revoke tests and check both the parsed value and its serialized form.

Prompt To Fix With AI
This is a comment left during a code review.
Path: tests/test_agents.py
Line: 205-212

Comment:
**Revoked timestamps go untested**

Both new revoke tests return an unrevoked registration fixture, and neither checks `revoked_at`. The added model tests also use only null timestamps, so the new timestamp parsing and formatting paths are never exercised. Return a non-null timestamp in the revoke tests and check both the parsed value and its serialized form.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

@gjtorikian
gjtorikian merged commit 149fcf6 into main Oct 19, 2026
12 of 13 checks passed
@gjtorikian
gjtorikian deleted the oagen/batch-aeefef11 branch October 19, 2026 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autogenerated Autogenerated code or content

Development

Successfully merging this pull request may close these issues.

1 participant