Repository navigation
fix(ci): repair main after the nix flake input update - #392
Conversation
The flake update in #313 moved nixpkgs past two breaking changes, and CI had not run on main since, so the first PR on top of it went red: - nixpkgs removed the typescript-go alias ("renamed to/replaced by typescript"), so every nix develop failed to evaluate. tsdown's tsgo comes from @typescript/native-preview in node_modules, not from nix. - the newer oxlint only accepts prefer-top-level for import/consistent-type-specifier-style, so lint failed to parse the config. prefer-top-level is the same behaviour under its current name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
commit: |
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
There was a problem hiding this comment.
No issues found across 2 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Auto-approved: Fixes broken CI/dev environment after nixpkgs and oxlint updates: uses the canonical typescript package name and the renamed oxlint option with identical behavior. Config-only changes with no product, rollout, or operational impact.
View guided diff | Turn on auto-fix | Re-trigger cubic
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nt's safe fixes oxlint reads .oxlintrc.jsonc only from 1.52.0, so until the flake update this config was never loaded and CI linted with oxlint's 104 default rules. 1.88 applies it as written. The pedantic and style categories are turned off until they are adopted on their own; the rules named one by one still apply. oxlint --fix applied the safe fixes.
….88 reports Type guards and narrowing in place of casts, explicit nullish checks, hoisted closures, named no-ops and a sorted() helper (ES2022 has no toSorted). Where a cast or an awaited loop is the point, a one-line oxlint-disable-next-line says why. No behaviour change.
…on their declarations Review of the lint pass: where a truthiness test met values a plain JavaScript caller can make falsy in ways the types forbid (null filters, a null tool mode, stored OpenAI tool calls, a null schema type), the explicit comparisons accepted or rejected different values. An isTruthy() guard tests exactly what the old truthiness test did. The StackOneToolSet and toArray JSDoc blocks are back on their declarations.
|
I pushed three commits here to get Why lint fails with your two fixes in place. oxlint only reads What the commits do:
No behaviour change is intended; a reviewer checked the source diff for one. Locally, with oxlint 1.88.0 and tsgolint 7.0.2003 pinned to match the nix shell: lint 0 findings, Adopting |
There was a problem hiding this comment.
1 issue found across 40 files (changes from recent commits).
Confidence score: 3/5
- In
examples/anthropic-integration.ts, an explicitly emptySTACKONE_ACCOUNT_IDbecomesundefined, bypassing the constructor’s validation and exposing tools for every active account. PassaccountIdthrough so the constructor can reject the empty value.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="examples/anthropic-integration.ts">
<violation number="1" location="examples/anthropic-integration.ts:23">
P2: This converts an explicitly empty `STACKONE_ACCOUNT_ID` to `undefined`, bypassing the constructor’s `ToolSetConfigError` and widening the toolset to every active account. Pass `accountId` through so the constructor rejects the empty value.
(Based on your team's feedback about empty account IDs.)</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
| // without one, the toolset uses every active shared account linked to the key | ||
| const toolset = new StackOneToolSet({ accountId: process.env.STACKONE_ACCOUNT_ID || undefined }); | ||
| const accountId = process.env.STACKONE_ACCOUNT_ID; | ||
| const toolset = new StackOneToolSet({ accountId: accountId === '' ? undefined : accountId }); |
There was a problem hiding this comment.
P2: This converts an explicitly empty STACKONE_ACCOUNT_ID to undefined, bypassing the constructor’s ToolSetConfigError and widening the toolset to every active account. Pass accountId through so the constructor rejects the empty value.
(Based on your team's feedback about empty account IDs.)
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At examples/anthropic-integration.ts, line 23:
<comment>This converts an explicitly empty `STACKONE_ACCOUNT_ID` to `undefined`, bypassing the constructor’s `ToolSetConfigError` and widening the toolset to every active account. Pass `accountId` through so the constructor rejects the empty value.
(Based on your team's feedback about empty account IDs.) </comment>
<file context>
@@ -7,19 +7,20 @@ import Anthropic from '@anthropic-ai/sdk';
// without one, the toolset uses every active shared account linked to the key
- const toolset = new StackOneToolSet({ accountId: process.env.STACKONE_ACCOUNT_ID || undefined });
+ const accountId = process.env.STACKONE_ACCOUNT_ID;
+ const toolset = new StackOneToolSet({ accountId: accountId === '' ? undefined : accountId });
// Filter for any relevant tools
</file context>
| const toolset = new StackOneToolSet({ accountId: accountId === '' ? undefined : accountId }); | |
| const toolset = new StackOneToolSet({ accountId }); |
There was a problem hiding this comment.
Not a change: before this PR the line was accountId: process.env.STACKONE_ACCOUNT_ID || undefined, which also turns an empty value into undefined. The rewrite keeps that behaviour exactly; changing what the example does with an empty variable is out of scope for a lint repair.
Dismissed because Cubic found issues in a newer review.
There was a problem hiding this comment.
0 issues found across 1 file (changes from recent commits).
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Requires human review: Auto-approval blocked by 5 unresolved issues from previous reviews.
View guided diff | Turn on auto-fix | Re-trigger cubic
cubic's review of the lint pass: ten checks rewritten to isNonEmpty treated false and 0 as present, which a plain JavaScript caller can pass (endUserId: false sent x-end-user-id: false), and isTruthy narrowed broad types wrongly in its false branch. isTruthy is now a plain boolean, isTruthyString narrows strings while testing exactly what if (value) did, providerErrors is null-safe again, and the example keeps its Number() coercion. Tests pin both helpers to a bare truthiness test.
There was a problem hiding this comment.
0 issues found across 9 files (changes from recent commits).
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Requires human review: CI repair disables oxlint pedantic/style and bundles large src/mock/example refactors beyond the described flake update; truncated diff prevents verifying the refactors are behavior-preserving, so the lint-policy relaxation and runtime changes need human sign-off.
View guided diff | Turn on auto-fix | Re-trigger cubic
… (ENG-3175) search_execute mode now lists StackOne's stackone_search_actions / stackone_execute_action / stackone_list_accounts once for the whole account scope, naming every account as a repeated x-account-id query parameter, instead of a pair per account. search() and execute() make one call each: hits name their accounts in available_accounts rather than one hit per account, and the server, not the SDK, refuses an action whose connector is linked on several accounts. The per-connector merge, connector routing and failed-account retry are gone. Changes for 3.0.0 callers: toolMode 'search_execute' serves the trio, not a pair per account; search() hits carry available_accounts instead of account_id; an ambiguous execute() throws StackOneAPIError from the server rather than ToolSetConfigError. Release-As: 3.1.0 Follows unified-cloud-api#9417. A search_execute listing names its accounts as one comma-separated x-account-id query value, and a scope of more than 50 accounts throws ToolSetConfigError (too-many-accounts) before any request. For one account the server serves <provider>_<accountId>_search_actions and _execute_action rather than the trio. The SDK presents them as stackone_search_actions and stackone_execute_action: the served names read as those names in descriptions, schemas and result strings; a stackone_account_id or provider naming the account or its connector is dropped, any other throws ToolArgumentsError (account-outside-scope, provider-outside-scope); search hits gain provider and available_accounts. search(), execute(), submitFeedback() and fetchTools() look the same for one or many accounts. Changes for 3.0.0 callers: x-account-id is sent as one comma-separated value; search_execute scopes are capped at 50 accounts; SearchHitAccount.name is optional. Rebased onto main after #392 and #391; written in their lint style (oxlint 1.88). Release-As: 3.1.0
… (ENG-3175) search_execute mode now lists StackOne's stackone_search_actions / stackone_execute_action / stackone_list_accounts once for the whole account scope, naming every account as a repeated x-account-id query parameter, instead of a pair per account. search() and execute() make one call each: hits name their accounts in available_accounts rather than one hit per account, and the server, not the SDK, refuses an action whose connector is linked on several accounts. The per-connector merge, connector routing and failed-account retry are gone. Changes for 3.0.0 callers: toolMode 'search_execute' serves the trio, not a pair per account; search() hits carry available_accounts instead of account_id; an ambiguous execute() throws StackOneAPIError from the server rather than ToolSetConfigError. Follows unified-cloud-api#9417. A search_execute listing names its accounts as one comma-separated x-account-id query value, and a scope of more than 50 accounts throws ToolSetConfigError (too-many-accounts) before any request. For one account the server serves <provider>_<accountId>_search_actions and _execute_action rather than the trio. The SDK presents them as stackone_search_actions and stackone_execute_action: the served names read as those names in descriptions, schemas and result strings; a stackone_account_id or provider naming the account or its connector is dropped, any other throws ToolArgumentsError (account-outside-scope, provider-outside-scope); search hits gain provider and available_accounts. search(), execute(), submitFeedback() and fetchTools() look the same for one or many accounts. Changes for 3.0.0 callers: x-account-id is sent as one comma-separated value; search_execute scopes are capped at 50 accounts; SearchHitAccount.name is optional. Rebased onto main after #392 and #391; written in their lint style (oxlint 1.88). Release-As: 3.1.0
… (ENG-3175) (#389) * feat: one search tool and one execute tool spanning the account scope (ENG-3175) search_execute mode now lists StackOne's stackone_search_actions / stackone_execute_action / stackone_list_accounts once for the whole account scope, naming every account as a repeated x-account-id query parameter, instead of a pair per account. search() and execute() make one call each: hits name their accounts in available_accounts rather than one hit per account, and the server, not the SDK, refuses an action whose connector is linked on several accounts. The per-connector merge, connector routing and failed-account retry are gone. Changes for 3.0.0 callers: toolMode 'search_execute' serves the trio, not a pair per account; search() hits carry available_accounts instead of account_id; an ambiguous execute() throws StackOneAPIError from the server rather than ToolSetConfigError. Follows unified-cloud-api#9417. A search_execute listing names its accounts as one comma-separated x-account-id query value, and a scope of more than 50 accounts throws ToolSetConfigError (too-many-accounts) before any request. For one account the server serves <provider>_<accountId>_search_actions and _execute_action rather than the trio. The SDK presents them as stackone_search_actions and stackone_execute_action: the served names read as those names in descriptions, schemas and result strings; a stackone_account_id or provider naming the account or its connector is dropped, any other throws ToolArgumentsError (account-outside-scope, provider-outside-scope); search hits gain provider and available_accounts. search(), execute(), submitFeedback() and fetchTools() look the same for one or many accounts. Changes for 3.0.0 callers: x-account-id is sent as one comma-separated value; search_execute scopes are capped at 50 accounts; SearchHitAccount.name is optional. Rebased onto main after #392 and #391; written in their lint style (oxlint 1.88). Release-As: 3.1.0 * ci(ENG-3175): pin sdk-conformance at #9's merge and the Python SDK at its matching PR (#231) Both SDKs' conformance runs grade the pair together, and the new contract needs both on it. The Python pin moves to its merge commit once #231 lands. * ci(ENG-3175): take the conformance job's pnpm from sdk-conformance's packageManager sdk-conformance moved to pnpm 11.17.0 (#12), and pnpm/action-setup refuses a version key that disagrees with package_json_file. Each SDK checkout still runs its own pnpm 10.26.0: pnpm switches to a project's packageManager version.
Main has been red since the nix flake update in #313 (merged by the scheduled workflow, so CI never ran on it). #391 was the first PR to run on top of it and failed on two things this fixes:
flake.nix:typescript-go->typescript. nixpkgs replaced the alias with a throw ('typescript-go' has been renamed to/replaced by 'typescript', aliases.nix, added 2026-09-08), sonix developno longer evaluates and dry-publish fails. tsdown'stsgoresolves@typescript/native-previewfrom node_modules, so the build does not depend on the nix package..oxlintrc.jsonc:import/consistent-type-specifier-styletop-level->prefer-top-level. The oxlint now in the shell rejects the old variant name (unknown variant top-level, expected one of prefer-top-level, prefer-inline, ...), sopnpm lintfails to parse the config. Same rule behaviour.src/toolsets.search-execute.test.ts,src/vectors.test.ts: reformatted with the oxfmt 0.68.0 now in the shell (lint:oxfmtflagged both). Whitespace only.Requested by guillaume@stackone.com in Slack (follow-up to SEC-104 Node pinning).
🤖 Generated with Claude Code