Skip to content

fix(ci): make pi codegen hermetic to unblock the check job (Closes #160) - #161

Merged
pdettori merged 1 commit into
rossoctl:mainfrom
pdettori:fix/hermetic-pi-submodule-160
Aug 24, 2026
Merged

fix(ci): make pi codegen hermetic to unblock the check job (Closes #160)#161
pdettori merged 1 commit into
rossoctl:mainfrom
pdettori:fix/hermetic-pi-submodule-160

Conversation

@pdettori

Copy link
Copy Markdown
Member

Summary

Bumps the pi-fork submodule to a commit that makes pi's model codegen
hermetic, unblocking the check job.

Closes #160.

Root cause

The check job builds the submodule with:

- name: Build pi-fork (type declarations)
  run: cd pi-fork && npm ci && npm run build

pi's packages/ai build script regenerated src/models.generated.ts
from the live models.dev API on every build. models.dev is a moving
target: it emitted supportsReasoningEffort on a model mapped to the
openai-responses API, so the regenerated file no longer typechecked
against OpenAIResponsesCompat:

error TS2353: 'supportsReasoningEffort' does not exist in type 'OpenAIResponsesCompat'

That failed the build step, so the downstream Typecheck and Test
steps never ran — harness unit tests have not executed in CI since
2026-08-20.

Fix

Bump pi-forkrossoctl/pi@2c28be5 (rossoctl/pi#1), which:

  1. Makes the build hermetic — codegen is split out of build, so
    npm run build runs only tsgo against the committed generated files
    (no network fetch). A check:models-drift script is provided to catch
    stale generated files deliberately.
  2. Widens the typesupportsReasoningEffort is added to
    OpenAIResponsesCompat so a deliberate regeneration stays valid.

No workflow changes are needed; the existing npm run build is now
hermetic by virtue of the submodule fix.

Verification

  • pi: tsgo -p tsconfig.build.json on packages/ai → exit 0.
  • This PR's CI should now complete the check job through Typecheck and
    Test.

Note: the submodule is pinned to the fix branch commit for CI. Once
rossoctl/pi#1 merges, the pin will be updated to the merged commit
before this PR is merged.

Assisted-By: Claude Code

The check job runs 'cd pi-fork && npm ci && npm run build', which
regenerated pi's models.generated.ts from the live models.dev API at
build time. Drift there emitted 'supportsReasoningEffort' on an
openai-responses-typed literal, failing typecheck (TS2353) and blocking
the downstream Typecheck and Test steps -- harness unit tests have not
run in CI since 2026-08-20.

Bump pi-fork to rossoctl/pi@2c28be5, which makes the ai package build
hermetic (codegen split out of 'build') and widens OpenAIResponsesCompat
so deliberate regeneration stays type-valid. See rossoctl/pi#1.

Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com>
Signed-off-by: Paolo Dettori <dettori@us.ibm.com>
@pdettori
pdettori merged commit a5cc3fe into rossoctl:main Aug 24, 2026
9 of 10 checks passed
pdettori added a commit that referenced this pull request Aug 25, 2026
setup-kind.sh built the harness image locally on every run, so a first-time
quickstart hit the source build path — and any build breakage (e.g. #154's
non-hermetic codegen, fixed separately in #161) blocked install with no
workaround beyond --skip-build.

Default to pulling the published image
(ghcr.io/rossoctl/serverless-harness:latest, a public GHCR package) and
loading it into kind, falling back transparently to a local build if the pull
is unavailable (offline / image missing). This removes the local Docker build
from the first-time path while staying non-regressing:

- --build forces a local build (for testing local source changes)
- --skip-build reuses a preloaded dev.local tag (unchanged)
- --image / SH_IMAGE override the pulled image

Image provisioning is extracted into ensure_harness_image() with a
SH_SOURCE_ONLY guard so it can be unit-tested without a cluster; the new
deploy/knative/tests/setup-kind-image.test.sh mocks docker/kind and asserts
the pull / fallback-build / force-build / skip decision paths. The
new-Revision build-ts stamp now fires whenever an image is (re)loaded (pull or
build), not only on build.

Docs (README-kind.md, serverless-harness-demo.md) updated for the new default.

Refs #154

Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com>
Signed-off-by: Paolo Dettori <dettori@us.ibm.com>
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.

CI: non-hermetic pi-fork build breaks check (models.generated.ts drifts against pinned OpenAIResponsesCompat)

1 participant