Skip to content

fix: rename opencode references to altimate-code in test files - #24

Merged
anandgupta42 merged 5 commits into
mainfrom
fix/ci-test-opencode-rename
Mar 3, 2026
Merged

fix: rename opencode references to altimate-code in test files#24
anandgupta42 merged 5 commits into
mainfrom
fix/ci-test-opencode-rename

Conversation

@anandgupta42

Copy link
Copy Markdown
Contributor

Summary

  • Update all 22 test files that still referenced opencode.json, .opencode/, .git/opencode, OPENCODE_* env vars, and opencode cache directories
  • These tests were failing because the config loader was renamed but the test fixtures/assertions still used the old names

Changes

Old New
opencode.json / opencode.jsonc altimate-code.json / altimate-code.jsonc
.opencode/ .altimate-code/
.git/opencode .git/altimate-code
OPENCODE_CALLER ALTIMATE_CLI_CALLER
OPENCODE_CONFIG_DIR ALTIMATE_CLI_CONFIG_DIR
OPENCODE_CONFIG_CONTENT ALTIMATE_CLI_CONFIG_CONTENT
OPENCODE_DISABLE_PROJECT_CONFIG ALTIMATE_CLI_DISABLE_PROJECT_CONFIG
OPENCODE_TEST_HOME ALTIMATE_CLI_TEST_HOME
OPENCODE_TEST_MANAGED_CONFIG_DIR ALTIMATE_CLI_TEST_MANAGED_CONFIG_DIR
OPENCODE_MODELS_PATH ALTIMATE_CLI_MODELS_PATH
opencode.ai/config.json altimate-code.dev/config.json
cache dir opencode altimate-code

Test plan

  • Locally: 1117 pass, 22 fail (all pre-existing — agent name buildbuilder mismatch, network-dependent test, timeout)
  • Previous CI run had 279 failures, this PR fixes ~257 of them

🤖 Generated with Claude Code

Update test files to use the correct names after the config loader
was renamed from opencode to altimate-code:

- `opencode.json` → `altimate-code.json`
- `.opencode/` → `.altimate-code/`
- `.git/opencode` → `.git/altimate-code`
- `OPENCODE_*` env vars → `ALTIMATE_CLI_*`
- Cache dir `opencode` → `altimate-code`
- Schema URL `opencode.ai` → `altimate-code.dev`

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Comment on lines 10 to +19
import { Filesystem } from "../../src/util/filesystem"

// Get managed config directory from environment (set in preload.ts)
const managedConfigDir = process.env.OPENCODE_TEST_MANAGED_CONFIG_DIR!
const managedConfigDir = process.env.ALTIMATE_CLI_TEST_MANAGED_CONFIG_DIR!

afterEach(async () => {
await fs.rm(managedConfigDir, { force: true, recursive: true }).catch(() => {})
})

async function writeManagedSettings(settings: object, filename = "opencode.json") {
async function writeManagedSettings(settings: object, filename = "altimate-code.json") {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: User-facing documentation and theme configuration files were not updated with the new altimate-code naming, retaining old opencode references, which will cause user confusion and misconfiguration.
Severity: MEDIUM

Suggested Fix

Update the documentation files packages/altimate-code/test/AGENTS.md and packages/altimate-code/src/acp/README.md to reflect the new altimate-code naming for configurations and environment variables. In all theme JSON files, change the $schema URL from https://opencode.ai/theme.json to https://altimate-code.dev/theme.json.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: packages/altimate-code/test/config/config.test.ts#L10-L19

Potential issue: The pull request, which intends to rename references from "opencode" to
"altimate-code", is incomplete. Several user-facing documentation and configuration
files still contain the old naming. Specifically,
`packages/altimate-code/test/AGENTS.md` and `packages/altimate-code/src/acp/README.md`
instruct users to use old configuration names and environment variables like
`OPENCODE_ENABLE_QUESTION_TOOL`. This will cause confusion and configuration failures.
Additionally, all 35 theme JSON files under
`packages/altimate-code/src/cli/cmd/tui/context/theme/` reference an outdated schema
URL, `https://opencode.ai/theme.json`, which may break IDE validation and indicates an
incomplete migration.

Did we get this right? 👍 / 👎 to inform future reviews.

anandgupta42 and others added 4 commits March 2, 2026 20:59
- Fix build.ts solid-plugin import to use bare specifier for monorepo hoisting
- Update agent tests: "build" → "builder", "plan" → "analyst" for disabled fallback
- Fix well-known config mock URL in config.test.ts
- Fix message-v2 test: "OpenCode" → "Altimate CLI"
- Fix retry.test.ts: replace unsupported test.concurrent with test
- Fix read.test.ts: update agent name to "builder"
- Fix agent-color.test.ts: update config keys to "builder"
- Fix registry.test.ts: remove unpublished plugin dep from test fixture
- Skip adding plugin dependency in local dev mode (installDependencies)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Update theme schema URL from opencode.ai to altimate-code.dev (33 files)
- Rename opencode references in ACP README.md and AGENTS.md docs
- Update test fixture tmp dir prefix to altimate-code-test-
- Install warehouse extras in Python CI for duckdb/boto3 test deps

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…tests/

- Allow SqlGuardResult.data to be None (fixes lineage.check Pydantic error)
- Set testpaths = ["tests"] in pyproject.toml to exclude src/test_local.py
  from pytest collection (it's a source module, not a test)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove unused imports in server.py (duplicate imports, unused models)
- Remove unused `json` import in schema/cache.py
- Remove unused `os` import in sql/feedback_store.py
- Add noqa for keyring availability check import

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@anandgupta42
anandgupta42 merged commit 6277f15 into main Mar 3, 2026
4 checks passed
@kulvirgit
kulvirgit deleted the fix/ci-test-opencode-rename branch March 10, 2026 21:07
anandgupta42 added a commit that referenced this pull request Mar 17, 2026
* fix: rename opencode references to altimate-code in all test files

Update test files to use the correct names after the config loader
was renamed from opencode to altimate-code:

- `opencode.json` → `altimate-code.json`
- `.opencode/` → `.altimate-code/`
- `.git/opencode` → `.git/altimate-code`
- `OPENCODE_*` env vars → `ALTIMATE_CLI_*`
- Cache dir `opencode` → `altimate-code`
- Schema URL `opencode.ai` → `altimate-code.dev`

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: resolve remaining test failures and build import issue

- Fix build.ts solid-plugin import to use bare specifier for monorepo hoisting
- Update agent tests: "build" → "builder", "plan" → "analyst" for disabled fallback
- Fix well-known config mock URL in config.test.ts
- Fix message-v2 test: "OpenCode" → "Altimate CLI"
- Fix retry.test.ts: replace unsupported test.concurrent with test
- Fix read.test.ts: update agent name to "builder"
- Fix agent-color.test.ts: update config keys to "builder"
- Fix registry.test.ts: remove unpublished plugin dep from test fixture
- Skip adding plugin dependency in local dev mode (installDependencies)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: address Sentry review comments and Python CI deps

- Update theme schema URL from opencode.ai to altimate-code.dev (33 files)
- Rename opencode references in ACP README.md and AGENTS.md docs
- Update test fixture tmp dir prefix to altimate-code-test-
- Install warehouse extras in Python CI for duckdb/boto3 test deps

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: Python CI — SqlGuardResult allows None data, restrict pytest to tests/

- Allow SqlGuardResult.data to be None (fixes lineage.check Pydantic error)
- Set testpaths = ["tests"] in pyproject.toml to exclude src/test_local.py
  from pytest collection (it's a source module, not a test)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: resolve ruff lint errors in Python engine

- Remove unused imports in server.py (duplicate imports, unused models)
- Remove unused `json` import in schema/cache.py
- Remove unused `os` import in sql/feedback_store.py
- Add noqa for keyring availability check import

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant