Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/altimate-code/test/fixture/fixture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ export async function tmpdir<T>(options?: TmpDirOptions<T>) {
}
if (options?.config) {
await Bun.write(
path.join(dirpath, "opencode.json"),
path.join(dirpath, "altimate-code.json"),
JSON.stringify({
$schema: "https://opencode.ai/config.json",
$schema: "https://altimate-code.dev/config.json",
...options.config,
}),
)
Comment on lines +27 to 32
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.

Expand Down
1 change: 1 addition & 0 deletions packages/altimate-engine/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ warehouses = [
security = ["keyring>=24.0"]
docker = ["docker>=7.0"]
tunneling = ["sshtunnel>=0.4", "paramiko>=3.0"]
dev = ["pytest>=7.0", "ruff>=0.1"]

[tool.hatch.build.targets.wheel]
packages = ["src/altimate_engine"]
Loading