Skip to content

test(codex): add a real first-session plugin lifecycle smoke test #252

Description

@corylanou

Problem

The installer test suite stubs the codex command. That verifies our orchestration, but it cannot detect incompatibilities with Codex's real cache naming, config activation order, hook resolution, or startup reconciliation.

This allowed the installer to pass while a newly installed go-workflow plugin produced:

  • SessionStart hook (failed): hook exited with code 127
  • Stop hook (failed): hook exited with code 127

A second session worked, which is characteristic of a first-session lifecycle race.

Proposed coverage

Add an integration smoke test using a real supported Codex CLI:

  1. Create an isolated Codex test home/config.
  2. Register a local gopher-ai marketplace fixture.
  3. Install go-workflow through the public plugin CLI.
  4. Start a fresh Codex session and complete a minimal turn.
  5. Assert the SessionStart and Stop hooks launch successfully and no exit-127 event is emitted.
  6. Repeat after upgrading the marketplace to a new plugin version.
  7. Verify the old root remains usable by a session started before the update.

If authentication or PTY constraints make this unsuitable for every PR, run it in a dedicated integration job or scheduled workflow with a pinned/current Codex matrix.

Acceptance criteria

  • The test exercises the real Codex plugin installer and hook runtime rather than only a stub.
  • First-install and update scenarios are both covered.
  • Hook stderr/exit codes are captured with actionable diagnostics.
  • A missing or prematurely removed hook path fails the job.
  • The supported Codex version or version range is explicit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions