🤖 refactor: canonicalize config schema ownership and boundaries#2649
🤖 refactor: canonicalize config schema ownership and boundaries#2649ethanndickson wants to merge 5 commits intomainfrom
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cb3ae2e8aa
ℹ️ 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".
cb3ae2e to
2d4e5a7
Compare
|
@codex review |
42e9e62 to
699ca46
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 699ca46b3c
ℹ️ 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".
|
@codex review |
190f862 to
623f33a
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 623f33aca2
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: be4c14836e
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 242bba4040
ℹ️ 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".
| if (workspaceGuard) return workspaceGuard; | ||
|
|
||
| const muxHome = getMuxHomeFromWorkspaceSessionDir(config, "mux_config_read"); | ||
| const rawDocument = await readConfigDocument(muxHome, args.file); |
There was a problem hiding this comment.
Allow reading invalid config documents for recovery
mux_config_read currently uses readConfigDocument, which validates the entire file before returning any data. In recovery scenarios this blocks the tool completely—for example, a config containing an out-of-range taskSettings.maxParallelAgentTasks (which mux_config_write is explicitly built to repair) will cause reads to fail with success: false, so the assistant cannot inspect current values before applying a fix. This makes malformed configs much harder to recover from in Chat with Mux.
Useful? React with 👍 / 👎.
Summary
This PR centralizes config and shared schema ownership so each schema/enum is defined once in a stable layer, then consumed via re-exports where needed. It removes config↔ORPC dependency inversions, breaks the task-settings circular dependency, and adds lint guardrails to prevent regressions.
Closes #2572.
Background
Recent schema work uncovered several duplication and dependency-boundary problems:
appConfigOnDiskandtypes/tasksThis refactor makes ownership explicit and aligns consumers around canonical schemas.
Implementation
src/common/schemas/ids.tssrc/common/schemas/project.tssrc/common/config/schemas/taskSettings.tssrc/common/config/schemas/providerModelEntry.tscacheTtl,serviceTier,codexOauthDefaultAuth) and reused across ORPC/config.ThinkingLevelSchemare-export fromappConfigOnDisk.ConfigMutationPathSchemawith.max(5).api.ts(background process status, log level).MCPTransportSchemain telemetry instead of a duplicate enum.Validation
make static-checkbun test src/common/config/schemas/appConfigOnDisk.test.tsbun test src/common/config/schemas/providersConfig.test.tsbun test src/common/orpc/schemas/api.test.tsbun test src/node/utils/providerRequirements.test.tsbun test src/node/services/tools/mux_config_write.test.tsRisks
Generated with
mux• Model:openai:gpt-5.3-codex• Thinking:xhigh• Cost:$53.42