fix: bootstrap runtime catalog and migrate accounts in governance sync#335
Open
08mamba24 wants to merge 4 commits intozts212653:mainfrom
Open
fix: bootstrap runtime catalog and migrate accounts in governance sync#33508mamba24 wants to merge 4 commits intozts212653:mainfrom
08mamba24 wants to merge 4 commits intozts212653:mainfrom
Conversation
- Add VALID_EFFORT_BY_PROVIDER and DEFAULT_EFFORT_BY_PROVIDER constants - getCatEffort() now validates effort values against provider specs - Auto-maps invalid values (e.g., "max" for Codex → "xhigh") - Added 8 tests covering anthropic, openai, google providers Fixes bug where cli.effort="max" caused Codex CLI to crash on startup. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fix(zts212653#291): provider-aware effort normalization
…c [砚砚/GPT-5.3-codex🐾]
|
To use Codex here, create an environment for this repo. |
- Fixed import order in governance-bootstrap.ts - Fixed function parameter formatting - Fixed ternary expression formatting - Added trailing comma in cat-config-loader.ts Resolves CI Lint failures. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the issue where
@opencode/@dare/@geminimentions fail in external project threads with errorfailed to resolve bound account "my-glm".Root Cause
The new F136 account resolution chain (
account-resolver.ts) only reads project-local accounts fromcat-catalog.json. External projects after governance sync only have governance files (managed blocks, skills, report) but are missing.cat-cafe/cat-catalog.jsonandaccounts. This causesresolveForClient(projectRoot, ..., "my-glm")to returnnullfor external projects, while it works fine for the Cat Cafe runtime root.Solution
Extended the governance bootstrap to also bootstrap runtime catalog and migrate legacy provider profiles into target project accounts:
.cat-cafe/cat-catalog.jsonin external projects usingcat-template.jsonfrom Cat Cafe rootmigrateProviderProfilesToAccounts(targetProject)to migrate legacy profiles fromprovider-profiles.jsoninto the target project's catalog accounts, and credentials to global credentials storeThis ensures external projects have a complete runtime catalog with accounts after governance sync, satisfying the resolver's requirements.
Changes
packages/api/src/config/governance/governance-bootstrap.ts: AddedbootstrapRuntimeCatalogAndAccounts()method and integrated it into the bootstrap flowpackages/api/test/governance/governance-bootstrap.test.js: Added test coverage for legacy profile migration to project catalog accountsTesting
All governance-related tests pass (22/22):
test/governance/governance-bootstrap.test.jstest/governance/governance-confirm.test.jstest/governance/governance-integration.test.jsRelated
Based on diagnosis from @Sonnet and implementation by @codex.
Commit:
7ab7dc0