Skip to content

3 tests pass locally but fail on clean CI (bundled-CLI preemption + filesystem deps) — blocks 0.8.0 plugin release #74

Description

@itlackey

Summary

Three tests in the tier-2 test gate pass on developer machines but fail on clean CI, blocking the akm-plugin 0.8.0 release. They are pre-existing (red since ~2026-06-02, introduced by the 0.8.0 CLI-surface alignment commits dea0ed5 / 3dbb514), not caused by the PR #73 fixes (which repaired the other 2 integration tests + the entire tier-2 eval system).

The 3 failing tests

  1. tests/claude-plugin.test.ts"session-start injects hints and curated context before the first user message"
  2. tests/opencode-plugin.test.ts"akm CLI availability > falls back to ~/.local/bin/akm when PATH lookup fails"
  3. tests/opencode-plugin.test.ts"akm CLI availability > prefers ~/.config/opencode/node_modules/.bin/akm before user-local fallbacks"

Root cause

  • Bundled-CLI preemption: 0.8.0 added bundled-akm-cli resolution that is tried before PATH. These tests install a fake akm on PATH (or at a fallback path) and assume it is used. On CI the real bundled opencode/node_modules/akm-cli/dist/cli.js is probed/selected differently than locally, preempting or shadowing the fake — so the fake's invocation log stays empty and assertions fail.
  • Hidden filesystem dependency: probeCommand() does a real existsSync() on absolute candidate paths. Test feat: add dynamic agent dispatch and command execution to Claude Code plugin #2 mocks ~/.local/bin/akm --version but never creates the file and does not sandbox HOME, so it only passes on machines where akm happens to be installed there. On clean CI the existsSync fails → candidate skipped → no valid CLI → assertion fails. (Also unsafe: writes/probes under the real $HOME.)

Why local passes: dev boxes have akm at ~/.local/bin/akm and the bundled probe resolves to a valid version locally; CI is clean and the bundled probe yields no_semver_in_output.

Proposed fix (all hermetic; validate via CI since not locally reproducible)

Status

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions