Skip to content

fix: reject endpoints missing their module - #11

Merged
sciabarracom merged 1 commit into
apache:mainfrom
Adkid-Zephyr:codex/action-new-validate-module
Aug 29, 2026
Merged

sciabarracom merged 1 commit into
apache:mainfrom
Adkid-Zephyr:codex/action-new-validate-module

Conversation

@Adkid-Zephyr

Copy link
Copy Markdown
Contributor

Summary

  • return an MCP error when action_new finds an existing endpoint whose generated Python module is missing
  • reuse the same module path when validating and creating endpoints
  • cover the incomplete generated endpoint with a regression test

Root cause

The idempotent existing-endpoint path checked the directory and __main__.py, but not the module imported by the generated wrapper. If that module had been removed or a previous creation was interrupted, action_new reported a successful no-op even though the endpoint could not run.

User impact

Agents now receive an immediate, actionable MCP error for this incomplete state instead of discovering the missing module during deployment or invocation.

Validation

  • npm test — 13 tests passed
  • npm run typecheck
  • git diff --check

AI assistance

This contribution was developed with OpenAI Codex assistance and reviewed against the repository's observable behavior. The commit includes a Generated-by: OpenAI Codex trailer.

@sciabarracom
sciabarracom merged commit 98bbf2f into apache:main Aug 29, 2026
1 check 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.

2 participants