Skip to content

BUG-41: the local CI service job cannot start while cmapi-test-pg holds port 55432 #170

Open

Description

@ephico2real2

Part of #85

What is wrong: The local CI job service cannot start on this Mac while the service tests' database runs. The job's PostgreSQL service publishes host port 55432, and the container cmapi-test-pg, which CLAUDE.md names as the database of the service suite, already holds that port. act fails in "Set up job".

Where: .github/workflows/ci.yml, job service, services.postgres.ports: ['55432:5432'], run through act-ci.sh. The other holder is the container cmapi-test-pg (0.0.0.0:55432->5432/tcp).

How to prove it: With cmapi-test-pg up, run act-ci.sh ... -j service. The log ends with failed to start container: ... "proxy already running".

Measured or inferred: Measured on 2026-11-13 on this Mac, run r261113152209p54750: service exit=1 after 2 seconds, with that error. It has the symptom of gotchas G8 and G11 of /setup-local-ci, and another cause: the port is held by a container that is not an act-* container, so the script's cleanup does not and must not remove it.

Severity: Low. The job fails closed. The suite itself passes when it runs on the Mac against cmapi-test-pg.

What must hold after the fix: The local service job runs while cmapi-test-pg is up, or the local CI guide says to stop that container first and to start it again after. The choice is recorded.

Research: Whether act can leave a service port unpublished, since the job container reaches the service by its name on act's network. The workflow uses 127.0.0.1:55432, so GitHub needs the published port.

Solution (inline, not applied): Not chosen. Options: stop cmapi-test-pg around the job; or a port for the local database that differs from the workflow's.

Class: INV. The defect is in the new local CI gate.

Activity

  1. added
    bug
    class:INV
    status:open
    sev:low
    Backlog
    on Nov 13, 2026
  2. ephico2real2 commented on Nov 13, 2026

    @ephico2real2
    OwnerAuthor

    Decision for now, from the coordinator on 2026-11-13: stop cmapi-test-pg before the local service job and start it again right after, only when no native service suite uses it. OB1 does that from the run of 15:31 UTC on.

    The fix to choose for the long term, not chosen yet:

    1. Keep the workflow's port, and give the local test database another host port (for example 55433), with CMAPI_TEST_DATABASE_URL in CLAUDE.md's test table. The local job and the native suite then run at the same time. This changes no CI file.
    2. Keep both on 55432, and let act-ci.sh stop and start a named container around a job. This puts a cmapi name into a kit script.
    3. Change the workflow's host port. Not recommended: ci.yml's port has no fault on GitHub.

    Option 1 is the smallest change.

  3. added a commit that references this issue on Nov 13, 2026
  4. ephico2real2 commented on Nov 13, 2026

    @ephico2real2
    OwnerAuthor

    Fix on PR #165, commit 3020a9c: the service job's host port is ${{ vars.CMAPI_CI_PG_PORT || '55432' }}, and act-ci.sh gives each vars.<NAME>_PORT a free port from 12026 up (the owner's suggestion). Probe under act 0.2.89, 15:43Z: with 12026 held by a listener, act-ci chose 12027; the job read [12027] and OPEN 127.0.0.1:12027. Not yet proven: the cmapi service job itself under act, held back because keycloak-0 restarted at 15:38:00Z (#157). GitHub's run on the PR head proves the default 55432 path.

  5. ephico2real2 commented on Nov 13, 2026

    @ephico2real2
    OwnerAuthor

    diagram-kit PR 63 is merged as 548d42f (G15, a stand-in test that fails on the old script and passes now). cmapi's ci/local/act-ci.sh on PR #165 is byte-identical to the kit. #170 closes with PR #165 once cmapi's service job runs under act, which waits on #157.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Backlogbugclass:INVsev:lowstatus:open

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions