Skip to content

fix: CI test failures for TypeScript and Python jobs#23

Merged
anandgupta42 merged 1 commit intomainfrom
fix/ci-test-failures
Mar 3, 2026
Merged

fix: CI test failures for TypeScript and Python jobs#23
anandgupta42 merged 1 commit intomainfrom
fix/ci-test-failures

Conversation

@anandgupta42
Copy link
Contributor

Summary

  • TypeScript tests: Test fixture was writing config to opencode.json but the config loader (after the rename) only looks for altimate-code.json. Updated the fixture to write to the correct filename.
  • Python tests: pytest: command not found because pyproject.toml had no dev optional dependency group. Added dev = ["pytest>=7.0", "ruff>=0.1"] so pip install -e ".[dev]" works.

Test plan

  • bun test test/permission-task.test.ts — all 21 tests pass locally
  • CI should pass after merge

🤖 Generated with Claude Code

Two issues:
1. TypeScript permission-task tests: test fixture wrote config to
   `opencode.json` but the config loader only looks for
   `altimate-code.json`. Updated fixture to use correct filename.

2. Python tests: `pytest: command not found` because pyproject.toml
   had no `dev` optional dependency group. Added `dev` extras with
   pytest and ruff.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@anandgupta42 anandgupta42 merged commit d77777c into main Mar 3, 2026
0 of 4 checks passed
Comment on lines +27 to 32
path.join(dirpath, "altimate-code.json"),
JSON.stringify({
$schema: "https://opencode.ai/config.json",
$schema: "https://altimate-code.dev/config.json",
...options.config,
}),
)
Copy link

Choose a reason for hiding this comment

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

Bug: The writeConfig() test helper defaults to the old opencode.json filename, causing tests to run with an empty configuration instead of the intended one.
Severity: MEDIUM

Suggested Fix

Update the default name parameter in the writeConfig() helper function located in packages/altimate-code/test/config/config.test.ts from "opencode.json" to "altimate-code.json". Review call sites of this helper to ensure they use the correct configuration file.

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/fixture/fixture.ts#L27-L32

Potential issue: The configuration filename was updated from `opencode.json` to
`altimate-code.json`. However, a test helper function, `writeConfig()` in
`config.test.ts`, still defaults to writing to the old `opencode.json` filename. The
configuration loader no longer searches for this old filename and will silently return
an empty configuration object when it's not found. Consequently, tests that rely on this
helper function without specifying the new filename will run with an empty
configuration, potentially masking bugs in configuration-dependent logic and allowing
tests to pass when they should be failing.

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

@kulvirgit kulvirgit deleted the fix/ci-test-failures branch March 10, 2026 21:07
anandgupta42 added a commit that referenced this pull request Mar 17, 2026
Two issues:
1. TypeScript permission-task tests: test fixture wrote config to
   `opencode.json` but the config loader only looks for
   `altimate-code.json`. Updated fixture to use correct filename.

2. Python tests: `pytest: command not found` because pyproject.toml
   had no `dev` optional dependency group. Added `dev` extras with
   pytest and ruff.

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