fix(engine): always include builtin registry in resolved lock#2536
fix(engine): always include builtin registry in resolved lock#2536daryllimyt merged 9 commits intomainfrom
Conversation
The resolved registry lock could omit `tracecat_registry` when no workflow action bound to it, which broke custom-action execution (they import decorators, secrets, and SDK helpers from the builtin). Always include the builtin origin, using the platform version when synced and falling back to the installed package version otherwise so workflows continue to start on unsynced bootstraps.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 311961dbc8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
✅ No security or compliance issues detected. Reviewed everything up to 3cd594b. Security OverviewDetected Code Changes
|
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
1 issue found across 2 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="tracecat/registry/lock/service.py">
<violation number="1" location="tracecat/registry/lock/service.py:213">
P1: The new fallback path drops the builtin `tracecat_registry` origin from the lock, which can break action execution in bootstrap/unsynced states where builtin artifacts are still required.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
The builtin tracecat_registry platform row is pre-seeded by registry_version_with_manifest in some worker runs under pytest-xdist, causing the two new lock tests to fail on CI: - test_resolve_lock_always_includes_builtin_registry tried to insert a duplicate platform repo. - test_resolve_lock_skips_builtin_origin_when_platform_not_synced saw the seeded current_version_id and returned the builtin origin. Reuse the seeded repo when present and clear its current_version_id in the unsynced scenario so both tests behave correctly with or without the fixture-driven seed.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e21044af68
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
1 issue found across 4 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="tracecat/registry/lock/service.py">
<violation number="1" location="tracecat/registry/lock/service.py:218">
P1: Always overwrite `tracecat_registry` with the platform/fallback version here. Leaving an org-scoped same-origin entry in place makes artifact lookup miss later.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
1 issue found across 7 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="tests/unit/test_registry_lock_service.py">
<violation number="1" location="tests/unit/test_registry_lock_service.py:706">
P2: This test now asserts the pre-fix error path instead of the required installed-version fallback, so it no longer covers the unsynced bootstrap behavior the change is meant to add.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3e080ccb44
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 987b88ded8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Summary
tracecat_registryorigin in the resolved registry lock so custom actions retain access to decorators, secrets, and SDK helpers imported from it.tracecat_registry.__version__with a warning log when the platform registry has nocurrent_version_id, so workflows still start on unsynced bootstraps instead of failing at tarball mount.Test plan
uv run pytest tests/unit/test_registry_lock_service.py -x -quv run ruff check+ruff format --checkuv run basedpyright --warnings tracecat/registry/lock/service.pySummary by cubic
Always include the builtin
tracecat_registryin resolved registry locks using the platform-selected version. If it isn’t synced, block lock resolution and surface a clear, retryable error across API endpoints, MCP tools, and the Temporal agent; the executor now prefetches all lock origins.tracecat_registrywith the platform-selected version; if missing, raiseBuiltinRegistryHasNoSelectionError(no fallback).registry.builtin_sync_pending.create_workflow,publish_workflow,execute_action_tool) and the agent (build_tool_definitionsactivity, durable workflow) surface the same message asToolError/TemporalApplicationError.Written for commit 3cd594b. Summary will update on new commits.