Skip to content

fix(ci): repair the workflow that has failed every run since 2026-08-23 - #1

Merged
sscodeai merged 7 commits into
devfrom
fix/ci-oss-readiness
Sep 13, 2026
Merged

sscodeai merged 7 commits into
devfrom
fix/ci-oss-readiness

Conversation

@sscodeai

Copy link
Copy Markdown
Owner

Why

Every CI run of this repository has failed since 2026-08-23: 7 runs, all with zero jobs created (gh run list reports 0s for each, and the runs API returns total_count: 0 for jobs).

Root cause — the job-level condition below is not valid:

if: ${{ secrets.OPENCODE_GO_API_KEY != '' }}

GitHub only exposes github, needs, vars and inputs to jobs.<job_id>.if, so the whole workflow file failed schema validation before any job could be created.

What changed (7 commits)

  • test(console) — apps/console had no tests at all. 5 new tests boot the real HTTP server on an ephemeral port and exercise GET /health, GET /, an unknown route (404) and the POST /run SSE stream. No mocks.
  • fix(test) — scripts/run-node-tests.mjs reported a green run for a package with zero tests ("No compiled tests found; skipping." + exit 0), which contradicts the gate semantics this project documents ("the gate FAILS if zero tests run"). It now exits 1.
  • fix(ci) — make the workflow parse: gate the opt-in Pi job on the TAKUMI_PI_INTEGRATION repository variable and keep passing the secret through step env.
  • chore(ci) — drop the pi-integration job. runtimes/pi is deliberately not a pnpm workspace member (it depends on the unpublished @earendil-works/pi-coding-agent SDK), so pnpm install / pnpm build never produce runtimes/pi/dist and node scripts/pi-smoke.mjs fails with ERR_MODULE_NOT_FOUND on any clean checkout. How to run it locally is documented in the workflow file.
  • docs — LICENSE started with # Takumi, which broke GitHub's license detection (spdx_id: NOASSERTION — i.e. "no license") while the README badge claimed MIT; first line is now MIT License. Also added a CI status badge to both READMEs so a red build is visible from the front page.
  • docs(i18n) — the Japanese SI V-model workflow shipped Chinese prompts (7 of them, in both copies of jp-si-standard/workflow.yaml) plus a Chinese requirements list in the minimal-vmodel example. Prompt language drives the language of the generated requirements/design/test artifacts, so these are now Japanese.
  • chore — Chinese fragments in comments in packages/core (manager-loop.ts, acceptance-gates-core.test.ts) replaced with English.

Verification (clean checkout of this branch, Node 22.23.2 / pnpm 10.34.5)

pnpm install --frozen-lockfile   # lockfile up to date
pnpm build                       # ok
pnpm test                        # 92 tests, 89 pass, 3 skipped (no Docker daemon), 0 fail
pnpm typecheck                   # ok
act -l                           # workflow now passes schema validation
                                 #   before: "Actions YAML Schema Validation Error"

Test count went from 87 → 92 (apps/console from 0 → 5).

Notes

  • push: branches: [main, dev] still lists main, which does not exist in this repository — left as is; say the word and I will drop it.
  • Node 20 reaches end of life on 2026-04-30 and the matrix still tests [20, 22]; bumping to [22, 24] (plus engines/badge) is a separate follow-up.
  • Actions versions (checkout@v4, setup-node@v4, pnpm/action-setup@v4) and workflow hardening (permissions, concurrency, timeout-minutes) are intentionally out of scope for this PR.

apps/console had no tests at all. Its `test` script delegated to
scripts/run-node-tests.mjs, which printed "No compiled tests found; skipping."
and exited 0, so CI stayed green with zero coverage on the console app.

The new tests boot the real HTTP server on an ephemeral port and exercise the
public routes end to end, with no mocks: GET /health, GET /, an unknown route
(404) and the POST /run SSE stream. 5 new tests.

Verified: pnpm build && pnpm test && pnpm typecheck all green on Node 22.23.2.
The evidence-native quality gate only means something if "no tests" is a
failure. run-node-tests.mjs exited 0 whenever dist/test was missing or held no
*.test.js, which is how apps/console shipped with zero tests while CI looked
healthy — contradicting the gate semantics documented in the jp-si workflow
("the gate FAILS if zero tests run").

Now it exits 1 with an actionable message.

Verified: a directory without dist/test exits 1; every workspace package still
passes (packages/core 64, apps/cli 10, runtimes/cli 6, apps/console 5,
runtimes/fake 4, runtimes/deepseek 3 — 92 tests, 3 skipped without Docker).
`if: ${{ secrets.OPENCODE_GO_API_KEY != '' }}` is not valid in a job-level
condition: GitHub only exposes github/needs/vars/inputs to jobs.<job_id>.if.
The whole workflow file therefore failed schema validation, and all 7 runs of
this workflow failed before creating a single job (the Actions API reports
total_count 0 for each). CI has been dead since 2026-08-23.

Gate the opt-in Pi job on the repository variable TAKUMI_PI_INTEGRATION and keep
passing the secret to the step through env (env, not secrets, is what step-level
conditions may read).

Verified with act 0.2.89: `act -l` now lists the workflow jobs instead of
"Actions YAML Schema Validation Error".
…heckout

runtimes/pi is deliberately not a pnpm workspace member (it depends on the
unpublished @earendil-works/pi-coding-agent SDK), so `pnpm install` and
`pnpm build` at the repo root never produce runtimes/pi/dist. Even with the gate
fixed, `node scripts/pi-smoke.mjs` cannot resolve
../runtimes/pi/dist/index.js on a CI checkout:

    Error [ERR_MODULE_NOT_FOUND]: Cannot find module
    '/.../runtimes/pi/dist/index.js' imported from scripts/pi-smoke.mjs

Removing the job rather than leaving a permanently broken one, and documenting
how to run the Pi integration check locally in its place.
Two public-metadata fixes:

* LICENSE started with "# Takumi", which broke GitHub's license detection: the
  repository API reported `spdx_id: NOASSERTION` (i.e. no license) while the
  README badge claimed MIT. Licensee detects the file once the first line is
  "MIT License"; the rest of the text was already stock MIT.
* Neither README carried a CI badge, so seven consecutive red runs went
  unnoticed for three weeks. The badge now makes build status visible.
The Japanese SI V-model workflow shipped Chinese prompts mixed into otherwise
Japanese text, in both copies of jp-si-standard/workflow.yaml (steps
requirements, basic_design, detailed_design, unit_test, integration_test,
evidence, delivery), plus a fully Chinese requirements list in the
minimal-vmodel example.

For a Japanese SI deliverable flow this is not cosmetic: the prompt language
drives the language of the generated requirements/design/test artifacts. All
seven prompts and the requirements list are now Japanese, consistent with the
rest of the workflow.
manager-loop.ts and acceptance-gates-core.test.ts carried Chinese fragments in
otherwise English comments. Comments belong to the English-only policy for code.
@sscodeai
sscodeai merged commit a70fc38 into dev Sep 13, 2026
2 checks 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.

1 participant