chore(cli): define error actionability taxonomy#5775
Conversation
Supabase CLI previewnpx --yes https://pkg.pr.new/supabase/cli/supabase@99b1f00ac59ac0cca0b9c6b423288dd53148b436Preview package for commit |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 511b9e3b61
ℹ️ 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: 786bba4590
ℹ️ 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".
786bba4 to
b26bfe6
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b26bfe6b63
ℹ️ 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".
b26bfe6 to
b8a178b
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b8a178ba4f
ℹ️ 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".
b8a178b to
8809e4c
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8809e4c704
ℹ️ 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".
8809e4c to
d9f5099
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d9f509914d
ℹ️ 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".
d9f5099 to
bfe8271
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bfe8271f0c
ℹ️ 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".
bfe8271 to
0aa23a6
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0aa23a6145
ℹ️ 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".
0aa23a6 to
32045e5
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 32045e5fb8
ℹ️ 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".
32045e5 to
d3c25fe
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d3c25fe0e1
ℹ️ 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".
d3c25fe to
99b1f00
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 99b1f00ac5
ℹ️ 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".
| PlatformInputError: provideFlagsTemplate, | ||
| PlatformRouteNotFoundError: provideFlagsTemplate, | ||
| PlatformMethodSelectionError: provideFlagsTemplate, | ||
| LegacyInvalidOutputFormatError: invalidInputTemplate, |
There was a problem hiding this comment.
Map per-command env output rejections
Several legacy commands reject the globally valid -o env format with command-local tags, e.g. LegacyBranchesEnvNotSupportedError in apps/cli/src/legacy/commands/branches/list/list.handler.ts:52-55 and LegacyFunctionsEnvNotSupportedError in apps/cli/src/legacy/commands/functions/list/list.handler.ts:98-101. Since this table only maps LegacyInvalidOutputFormatError and the suffix fallback does not match EnvNotSupportedError, those deterministic flag errors are classified as unknown instead of invalid_input, so the output-format recovery KPI misses these failures.
Useful? React with 👍 / 👎.
| InvalidFunctionDeploySlugError: provideFlagsTemplate, | ||
| InvalidFunctionSlugError: provideFlagsTemplate, | ||
| ConflictingFunctionDownloadFlagsError: provideFlagsTemplate, | ||
| FunctionNotFoundError: provideFlagsTemplate, |
There was a problem hiding this comment.
Include functions new validation tags
The function validation mappings here cover deploy/download/delete, but supabase functions new raises its own tags: invalid slugs fail as LegacyFunctionsNewInvalidSlugError and existing entrypoints fail as LegacyFunctionsNewFileExistsError with a concrete suggestion (apps/cli/src/legacy/commands/functions/new/new.handler.ts:196-203,228-234). Neither tag is in this table or matched by the suffix inference, so common functions new input/remediation failures fall through to unknown instead of the invalid-input bucket.
Useful? React with 👍 / 👎.
| LegacyStorageInvalidUrlError: provideFlagsTemplate, | ||
| LegacyStorageUrlParseError: provideFlagsTemplate, | ||
| LegacyStorageMissingFlagError: provideFlagsTemplate, | ||
| LegacyStorageMutuallyExclusiveFlagsError: provideFlagsTemplate, |
There was a problem hiding this comment.
Map network access validators as input
Network access commands validate user-supplied addresses before making API calls: network-bans remove raises LegacyNetworkBansInvalidIpError, and network-restrictions update raises LegacyNetworkRestrictionsInvalidCidrError / LegacyNetworkRestrictionsPrivateIpError (apps/cli/src/legacy/commands/network-bans/remove/remove.handler.ts:40-45; apps/cli/src/legacy/commands/network-restrictions/update/update.handler.ts:53-59). These tags are absent here and do not match the suffix inference, so malformed or private IP/CIDR arguments are recorded as unknown rather than user-actionable invalid input.
Useful? React with 👍 / 👎.
| LegacyExperimentalRequiredError: provideFlagsTemplate, | ||
| LegacyDbQueryMutuallyExclusiveFlagsError: provideFlagsTemplate, | ||
| LegacyDbPullTargetFlagsError: provideFlagsTemplate, | ||
| LegacyDbPullEngineConflictError: provideFlagsTemplate, | ||
| LegacyDeclarativeNotEnabledError: provideFlagsTemplate, | ||
| LegacyInvalidGenTypesDurationError: provideFlagsTemplate, | ||
| LegacyInvalidGenTypesDatabaseUrlError: provideFlagsTemplate, |
There was a problem hiding this comment.
Classify SSL enforcement flag validation
ssl-enforcement update fails locally with LegacySslEnforcementMutuallyExclusiveFlagsError when both enable/disable flags are set and LegacySslEnforcementNoEnableDisableFlagError when neither is set (apps/cli/src/legacy/commands/ssl-enforcement/update/update.handler.ts:48-53). Because these command-local flag errors are not mapped and have no useful suffix, deterministic bad flag combinations fall through to unknown instead of the invalid_input / provide_flags bucket.
Useful? React with 👍 / 👎.
| NoBranchNameError: provideFlagsTemplate, | ||
| BranchAlreadyExistsError: provideFlagsTemplate, | ||
| BranchNotFoundError: provideFlagsTemplate, | ||
| PlatformInputError: provideFlagsTemplate, | ||
| PlatformRouteNotFoundError: provideFlagsTemplate, | ||
| PlatformMethodSelectionError: provideFlagsTemplate, | ||
| LegacyInvalidOutputFormatError: invalidInputTemplate, |
There was a problem hiding this comment.
Bucket project command argument failures
The legacy projects commands raise typed input failures before remote work: create can emit LegacyProjectsCreateMissingArgError or LegacyProjectsCreateNameEmptyError, and delete can emit LegacyProjectsDeleteRefRequiredError when a non-interactive ref is missing (apps/cli/src/legacy/commands/projects/create/create.handler.ts:40-46; apps/cli/src/legacy/commands/projects/projects.prompt.ts:55-58; apps/cli/src/legacy/commands/projects/delete/delete.handler.ts:56-61). None of these tags are in the taxonomy or suffix fallback, so project command argument mistakes are classified as unknown rather than invalid input.
Useful? React with 👍 / 👎.
| LegacyInvalidProjectRefError: invalidInputTemplate, | ||
| LegacyInvalidSecretPairError: invalidInputTemplate, |
There was a problem hiding this comment.
Classify secrets set local input failures
secrets set has local, user-remediable failures for missing values and --env-file problems: it raises LegacySecretsNoArgumentsError, LegacySecretsEnvFileOpenError, and LegacySecretsEnvFileParseError before uploading anything (apps/cli/src/legacy/commands/secrets/set/set.handler.ts:88-103,138-142). This table only maps malformed key/value pairs and config parsing, so those common secrets input/file failures fall through to unknown and lose the invalid-input recovery signal.
Useful? React with 👍 / 👎.
| LegacyDbConnectError: dbConnectionTemplate, | ||
| LegacyDbConfigConnectTempRoleError: dbConnectionTemplate, | ||
| LegacyDbConfigIpv6Error: dbConnectionTemplate, |
There was a problem hiding this comment.
Classify pooler login config mismatches
The DB config resolver has a distinct LegacyDbConfigPoolerLoginError for a configured pooler URL that does not match the linked project ref or active profile domain, and it can carry the same config-remediation suggestion shape as the adjacent DB config errors (apps/cli/src/legacy/shared/legacy-db-config.errors.ts:89-100). Because this table maps LegacyDbConfigConnectTempRoleError and LegacyDbConfigIpv6Error but not the pooler-login tag, those linked-database setup failures fall through to unknown instead of the db_connection / update-config bucket.
Useful? React with 👍 / 👎.
| LegacyExperimentalRequiredError: provideFlagsTemplate, | ||
| LegacyDbQueryMutuallyExclusiveFlagsError: provideFlagsTemplate, | ||
| LegacyDbPullTargetFlagsError: provideFlagsTemplate, | ||
| LegacyDbPullEngineConflictError: provideFlagsTemplate, | ||
| LegacyDeclarativeNotEnabledError: provideFlagsTemplate, | ||
| LegacyInvalidGenTypesDurationError: provideFlagsTemplate, | ||
| LegacyInvalidGenTypesDatabaseUrlError: provideFlagsTemplate, |
There was a problem hiding this comment.
Map postgres-config value parsing
postgres-config update rejects malformed --config entries locally with LegacyPostgresConfigInvalidConfigValueError before any API call when the value is not in key=value format (apps/cli/src/legacy/commands/postgres-config/update/update.handler.ts:33-37). That tag is absent from the invalid-input bucket and has no suffix fallback, so a deterministic flag-format error is reported as unknown rather than user-actionable input remediation.
Useful? React with 👍 / 👎.
| NoBranchNameError: provideFlagsTemplate, | ||
| BranchAlreadyExistsError: provideFlagsTemplate, | ||
| BranchNotFoundError: provideFlagsTemplate, | ||
| PlatformInputError: provideFlagsTemplate, | ||
| PlatformRouteNotFoundError: provideFlagsTemplate, | ||
| PlatformMethodSelectionError: provideFlagsTemplate, | ||
| LegacyInvalidOutputFormatError: invalidInputTemplate, |
There was a problem hiding this comment.
Bucket invalid snippet IDs as input
snippets download validates the positional snippet ID as a UUID before issuing the request and raises LegacySnippetsInvalidIdError for malformed values (apps/cli/src/legacy/commands/snippets/download/download.handler.ts:68-72). Since this tag is not mapped and does not match any suffix inference, bad snippet IDs are classified as unknown instead of invalid_input, losing telemetry for a fully local argument error.
Useful? React with 👍 / 👎.
| LegacyProjectPausedError: { | ||
| ...invalidConfigTemplate, | ||
| }, |
There was a problem hiding this comment.
Classify custom-domain CNAME setup failures
domains create performs a CNAME pre-check and raises LegacyDomainsCnameError when the user’s DNS record is missing or points at the wrong host, with the error text explaining the expected target (apps/cli/src/legacy/commands/domains/domains.cname.ts:72-83,87-91). This tag is neither mapped nor inferable by suffix, so a user-fixable DNS configuration problem is recorded as unknown instead of an invalid-config/update-config style bucket.
Useful? React with 👍 / 👎.
Defines the CLI error actionability taxonomy for KPI reporting and adds a sanitized classifier contract for future
cli_command_executedfailure metadata.This keeps the Q2 recovery and repeat definitions close to the telemetry catalog, while preserving the current behavior that command events only emit existing fields until the follow-up instrumentation issue wires classification into capture.