Stu Mason
Stu Mason

Activity

Issue Resolved

Issue #205 closed: is_build_time typo bleed-in to v2.11.0 — test mock + CHANGELOG only, runtime code is correct

Summary

PR #174 (v2.9.0) renamed the env-var build-time flag from is_build_time to is_buildtime everywhere — Coolify's API rejects the underscored form with HTTP 422 on single endpoints and silently ignores it on bulk endpoints.

PR #172 (v2.11.0, feat: 7 new tools) was authored against pre-#174 main and, during the merge into post-#174 main, two is_build_time references slipped back into the codebase in non-runtime locations:

  1. Test mocksrc/__tests__/coolify-client.test.ts:4335, inside the new listDatabaseEnvVars test added for the database env_vars resource:

    const mockEnvs = [
      {
        id: 1,
        uuid: 'env-1',
        key: 'DB_HOST',
        value: 'localhost',
        is_build_time: false,   // ← should be `is_buildtime`
        ...
      },
    ];
    

    The mock just round-trips through expect(result).toEqual(mockEnvs), so the test passes despite the typo, but the mock no longer matches the EnvironmentVariable type definition in src/types/coolify.ts:442-489.

  2. CHANGELOG[2.11.0] section, env_vars expanded bullet:

    adds database resource, bulk_update action, plus is_build_time, is_preview, data[] params on the existing actions.

    The underscored name is incorrect; the actual field added on the schema is is_preview (and data[]), not is_build_time. is_buildtime has been the correct name since v2.9.0.

Verification that runtime code is unaffected

Audit on v2.11.0 source:

Surfaceis_buildtimeis_build_time
src/types/coolify.ts4 occurrences0
src/lib/coolify-client.ts3 occurrences0
src/lib/mcp-server.ts13 occurrences0
src/__tests__/coolify-client.test.ts(many)1 (this issue)
dist/ (excluding tests)65 occurrences0

So no functional regression — just doc and test-mock cleanup.

Proposed fix

  • src/__tests__/coolify-client.test.ts:4335 — change is_build_timeis_buildtime.
  • CHANGELOG.md [2.11.0] line — change is_build_timeis_buildtime (or drop the field name entirely; the new params on env_vars expansion are really is_preview and data[], since is_buildtime has been on the schema since v2.9.0).

Trivial. Happy to bundle into the PR for #203 / #204 since it's a one-line fix in two files and touches the same release.