fix(agents): compatibility fixes for legacy presets and actions#2584
fix(agents): compatibility fixes for legacy presets and actions#2584jordan-umusu merged 2 commits intomainfrom
Conversation
This comment has been minimized.
This comment has been minimized.
|
✅ No security or compliance issues detected. Reviewed everything up to f11e9ce. Security OverviewDetected Code Changes
|
65397ec to
55c24e2
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d18a6a3208
ℹ️ 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 20 files
Confidence score: 2/5
- There is a clear regression risk in
tracecat/agent/gateway.py:use_workspace_credentialsis ignored, which can cause legacy no-catalog tokens to resolve workspace-scoped credentials instead of org-scoped ones. - Given the 7/10 severity and 7/10 confidence, this looks user-impacting (and potentially permission/scope-sensitive), so merge risk is high until the credential-selection logic is corrected.
- Pay close attention to
tracecat/agent/gateway.py- credential scope resolution may be incorrect for legacy token flows.
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/agent/gateway.py">
<violation number="1" location="tracecat/agent/gateway.py:211">
P1: `use_workspace_credentials` is now ignored, so no-catalog legacy tokens can resolve the wrong credential scope (workspace instead of org).</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
3a6faa7 to
4684104
Compare
d18a6a3 to
a5b8e5d
Compare
This comment has been minimized.
This comment has been minimized.
a5b8e5d to
2348c73
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2348c7319f
ℹ️ 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".
2348c73 to
2aef114
Compare
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2aef114c67
ℹ️ 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".
2aef114 to
f11e9ce
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f11e9cead2
ℹ️ 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".
| credentials = await self.get_runtime_provider_credentials( | ||
| preset_config.model_provider, | ||
| ) |
There was a problem hiding this comment.
Clear catalog_id when falling back to org credentials
If a preset is catalog-linked but get_catalog_credentials returns None and workspace credentials are missing, this branch falls back to org credentials without clearing preset_config.catalog_id. That leaves a stale catalog ID in the emitted config, so downstream token minting still marks the run as catalog-backed and the gateway re-queries catalog credentials, causing execution to fail even though org credentials were successfully resolved here.
Useful? React with 👍 / 👎.
| if (form.getValues("catalog_id")) { | ||
| form.setValue("catalog_id", "", { shouldDirty: false }) |
There was a problem hiding this comment.
Avoid silently unlinking presets from catalog on load
In preset edit mode, this effect clears catalog_id as soon as the current model cannot be matched to an enabled option. Saving any unrelated change then persists catalog_id: null while keeping model_provider/model_name, silently converting a catalog-governed preset into a legacy direct-provider preset without explicit user intent, which changes credential resolution and drops catalog-based access gating.
Useful? React with 👍 / 👎.
No description provided.