Skip to content

add(ci): add tools listing reusable from extensions providing the tools - #8

Merged
Seiger merged 5 commits into
evolution-cms:mainfrom
elcreator:add-ci-list-tools
Nov 15, 2026
Merged

Seiger merged 5 commits into
evolution-cms:mainfrom
elcreator:add-ci-list-tools

Conversation

@elcreator

@elcreator elcreator commented Nov 15, 2026 •

Copy link
Copy Markdown
Collaborator

Adds .github/workflows/extra-integration.yml, a reusable workflow an Extra calls to prove it installs next to eMCP and that its tools reach MCP clients. The package name comes from the calling repository's composer.json, and the workflow tests the calling commit, not a Packagist release.

jobs:
  emcp:
    uses: evolution-cms/evo-mcp/.github/workflows/extra-integration.yml@main
    with:
      evo_ref: 3.5.x            # optional, default 3.5.x
      php_version: '8.4'        # optional
      server_handle: content    # optional
      expected_tools: >-        # optional: each must be listed by tools/list
        amount.mounts amount.browse

What the job does: it installs a clean Evolution CMS on SQLite, adds the Extra and eMCP as Composer path repositories, runs package:discover, publishes the eMCP config and runs the migrations. It fails if any migration is still pending. Then it shows both packages and the servers, and runs emcp:test. The run summary shows the emcp:test output with every listed tool name. Full reference: EXTRA_CI.md.

Changes to eMCP itself

  • emcp:test follows tools/list pagination. Laravel MCP returns 15 tools per page, so until now only the first page was checked: eMCP's own evo.write.* tools and every tool an Extra contributes were never seen.
  • emcp:test --expect-tool=<name> (repeatable) fails when a named tool is missing. The workflow's expected_tools input passes these names. Unit-tested in tests/Unit/eMcpTestCommandRequirementsTest.php.

Found by running it from a real Extra

  • Path repositories: Evolution merges core/custom/composer.json through composer-merge-plugin, which prefixes custom/ to path URLs. URLs are now relative to core/custom.
  • Migrations never ran, yet the step passed. With eMCP and sTask already in vendor, the CLI installer runs their migrations without recording them. The next migrate then stopped at table "evo_s_workers" already exists and still exited 0. The workflow now installs the CMS first and checks migrate:status. The installer behaviour itself is an upstream issue and is left as is here.

Validation

aMount calls the workflow from its CI (elcreator/aMount, branch ci-emcp-integration) with all 13 amount.* tools in expected_tools:
https://github.com/elcreator/aMount/actions/runs/43740796970

That run shows: aMount and eMCP installed from the checked-out commits; every migration applied, including sTask's, eMCP's and aMount's three, with none pending; emcp:test answering initialize: OK and listing 34 tools across pages; all 13 expected tools present. No step was skipped.

Not covered: the workflow lists tools but does not call them. Calling them needs a manager, data and often external stores that the Extra must set up, so tools/call coverage stays with each Extra's own tests.

🤖 Generated with Claude Code

@elcreator
elcreator requested review from Dmi3yy and Seiger November 15, 2026 12:28
@MiddleSokilAI

Copy link
Copy Markdown
Contributor

Thanks for adding a reusable integration workflow for Extras. Before merging, could we validate the new workflow end to end from a real Extra repository and link the run (or retain the logs)? The green checks on this PR currently exercise the existing ci.yml; the new .github/workflows/extra-integration.yml is workflow_call only and was not invoked by that run. The migration, runtime integration and demo runtime jobs were skipped, so that result does not yet demonstrate the new install/migrate/emcp:test path.

Please also update the example in the PR description: it refers to extra-ci.yml and a package input, but this change adds extra-integration.yml and obtains the package name from the checked-out composer.json. The example in EXTRA_CI.md reflects the implementation.

For readiness, a successful caller run should show the Extra and eMCP being installed, migrations completing and emcp:test passing; please identify any skipped checks. The current smoke test checks initialization and tool listing, not invocation of Extra-specific tools, as the documentation notes.

This review is based on static inspection and the available CI results; I have not run the workflow myself.

SokilAI

elcreator and others added 4 commits November 15, 2026 17:51
- Path repository URLs are written relative to core/custom: Evolution merges
  core/custom/composer.json through composer-merge-plugin, which prefixes
  "custom/" to every path URL, so absolute paths never resolved.
- emcp:test gains a repeatable --expect-tool and prints every listed tool, and
  the workflow passes them from a new expected_tools input.
- Authenticate Composer with the run token, keep emcp:test failures under tee
  (pipefail) and write the result to the run summary.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
emcp:test ran without a manager, so tools/list hid every tool that requires a
permission - all of aMount's thirteen tools in the first real caller run.
emcp:test gains --user (id or username), run through ManagerIdentity::runAs
like an API token owner, and the workflow lists as the throwaway install's
administrator by default (run_as input).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Laravel MCP pages tools/list (15 per page), so emcp:test only ever saw the
first page: aMount's thirteen tools and eMCP's own evo.write.* tools were
never checked. Follow nextCursor (bounded) and assert against every page.

Drops the --user option from the previous commit: in CLI Evolution's
isLoggedIn() is always true, so listing as a manager changed nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With eMCP and sTask already in vendor, the CLI installer runs their
migrations without recording them; the workflow's migrate then stopped at
"table evo_s_workers already exists" - and exited 0, so eMCP's and the
Extra's migrations silently never ran. Install a clean CMS first, then add
the packages, and fail when migrate:status still lists anything Pending.

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

Copy link
Copy Markdown
Collaborator Author

Thanks for the review. I ran it end to end from a real Extra: aMount calls extra-integration.yml from its CI (elcreator/aMount#2).

Green run: https://github.com/elcreator/aMount/actions/runs/43740796970. It shows aMount and eMCP installed from the checked-out commits, every migration applied with none pending, emcp:test passing, and all 13 amount.* tools asserted present. No step was skipped.

Running it for real found three bugs, now fixed on this branch:

  • absolute path-repository URLs never resolved, because composer-merge-plugin prefixes custom/;
  • emcp:test read only the first page of tools/list (15 tools), so contributed tools were never checked;
  • with eMCP/sTask in vendor before the CMS install, migrate failed on evo_s_workers already exists but exited 0, so the step looked green while eMCP's and the Extra's migrations never ran. The workflow now installs the CMS first and fails on anything pending.

Extra-specific tools can now be asserted with the new expected_tools input (emcp:test --expect-tool). Calling the tools (tools/call) is still not covered, as EXTRA_CI.md explains. The description and its example now match the implementation (extra-integration.yml, package name from composer.json).

@Seiger
Seiger merged commit 042dc11 into evolution-cms:main Nov 15, 2026
4 checks passed
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.

3 participants