Skip to content

fix(tests): repair 2 integration tests that surfaced post-#1257#1261

Merged
danielmeppiel merged 1 commit intomainfrom
fix/post-1257-integration-failures
May 11, 2026
Merged

fix(tests): repair 2 integration tests that surfaced post-#1257#1261
danielmeppiel merged 1 commit intomainfrom
fix/post-1257-integration-failures

Conversation

@danielmeppiel
Copy link
Copy Markdown
Collaborator

Summary

Two integration tests were green in the merge queue (because the suite was not yet wired in) and surfaced as failures only after #1257 enabled the runner -- see run #25640445147.

Test Root cause Fix
test_deployed_files_e2e::test_deployed_files_are_under_github_or_claude Stale assumption: lockfile correctly records .agents/skills/<name> for skill primitives (AGENTS.md is the cross-tool common skills format used by Codex / Cursor / OpenCode), but the assertion forbade .agents/. Renamed to ..._under_known_target_roots and widened the allowlist to ('.github/', '.claude/', '.agents/').
test_pack_unpack_e2e::test_full_round_trip apm unpack is deprecated (the CLI prints the migration to apm install <bundle-path>) and its bundle verification compares lockfile .github/... paths against on-disk plugin-bundle agents/ / commands/ / instructions/ paths -- always fails on the supported plugin format. Switched the round-trip to apm install <archive>, the documented replacement, and seeded a copilot signal in the consumer dir.

Validation

$ uv run --extra dev pytest tests/integration/test_deployed_files_e2e.py tests/integration/test_pack_unpack_e2e.py -q
................                                                         [100%]
16 passed in 41.40s

Both reproduced before the fix and verified green after. ruff check + ruff format --check are silent.

Two integration tests were green in the merge queue (because the
suite was not yet wired in) and surfaced as failures only after
#1257 enabled the runner.

1. test_deployed_files_are_under_github_or_claude
   The lockfile correctly records '.agents/skills/<name>' for skill
   primitives (AGENTS.md is the cross-tool common skills format used
   by Codex / Cursor / OpenCode). The assertion was stale: it
   forbade '.agents/' even though deployment there is by design when
   a plugin-style package contains skills. Renamed the test to
   ..._under_known_target_roots and widened the allowlist to
   ('.github/', '.claude/', '.agents/').

2. test_pack_unpack_e2e::test_full_round_trip
   'apm unpack' is deprecated (the CLI itself prints
   '"apm unpack" is deprecated and will be removed in v0.14.
   Use "apm install <bundle-path>" instead'). Its bundle
   verification compares lockfile '.github/...' paths against
   on-disk plugin-bundle 'agents/' / 'commands/' / 'instructions/'
   paths and always fails -- the round-trip is structurally broken
   on the supported plugin bundle format. Switched the test to use
   the supported 'apm install <archive>' migration path and seeded
   a copilot signal in the consumer dir for target detection.

Both failures verified locally before and after the fix.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 11, 2026 01:33
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR repairs two integration tests that started failing once the integration runner was enabled, updating expectations to match current install/pack behavior and deployed file roots.

Changes:

  • Updates the pack/unpack round-trip E2E test to use apm install <archive> instead of deprecated apm unpack, and seeds Copilot target detection in the consumer project.
  • Broadens the deployed-files root assertion to allow .agents/ in addition to .github/ and .claude/, and renames the test accordingly.
Show a summary per file
File Description
tests/integration/test_pack_unpack_e2e.py Switches the round-trip flow from unpack to install <archive> and adjusts setup/error reporting.
tests/integration/test_deployed_files_e2e.py Renames the deployed-files root test and expands the allowed root prefixes to include .agents/.

Copilot's findings

  • Files reviewed: 2/2 changed files
  • Comments generated: 2

Comment on lines 1 to +3
"""End-to-end integration tests for ``apm pack`` and ``apm unpack``.

Round-trip tests: install pack → unpack → verify files match.
Round-trip tests: install -> pack -> install bundle -> verify files match.
Comment on lines 97 to 99
# 4. Verify .github/ files are present
assert (consumer / ".github").exists(), ".github/ missing after unpack"
assert (consumer / ".github").exists(), ".github/ missing after bundle install"

@danielmeppiel danielmeppiel merged commit 144a5f5 into main May 11, 2026
21 checks passed
@danielmeppiel danielmeppiel deleted the fix/post-1257-integration-failures branch May 11, 2026 01:41
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.

2 participants