Compare commits

...
Author SHA1 Message Date
hanzo-dev 842e42c95d build: tests is a string, because a boolean input arrives as false here
format('{0}', inputs.tests) still evaluated to 'false' on a caller that passed a
literal true (hanzoai/openapi run 26662, resolved against this branch — 23 steps,
the step count only this branch has, so it is not a stale reusable). That rules
out the default and the caller both: git.hanzo.ai substitutes a workflow_call
input's declared TYPE ZERO VALUE, and for boolean that is false, always.

So no expression over a boolean input can ever be true on this forge, and the
previous commit's format() normalisation could not have worked. A string's zero
value is '', which is not 'false' — the tests run when the value is absent, run
when it is 'true', and skip only when a caller says the word.

Co-authored-by: Hanzo Dev <dev@hanzo.ai>
2026-08-04 14:53:14 -07:00
hanzo-dev 2145366f95 build: an input the forge does not deliver must not read as "run no tests"
The test step is guarded by `inputs.mode != 'delegate' && inputs.tests`, and
`tests` is `type: boolean, default: true`. On github.com the default fills in.
On git.hanzo.ai it does not arrive at all, so the expression is falsy, the step
is SKIPPED, and the job reports SUCCESS.

Measured on the forge — every repo with a cicd run, five of five:

  hanzoai/cloud     run 26628  success   Test (per hanzo.yml) = skipped
  hanzoai/ci        run 24352  success   Test (per hanzo.yml) = skipped
  hanzoai/openapi   run 26630  success   Test (per hanzo.yml) = skipped
  hanzoai/gateway   run 25591  success   Test (per hanzo.yml) = skipped
  hanzoai/commerce  run 26590  success   Test (per hanzo.yml) = skipped

Not a caller mistake, and not fixable from one: hanzoai/ci imports itself with
the bare 7-line caller, hanzoai/cloud passes `tests:` outright, and
hanzoai/openapi passed a literal `true` — all three skipped. The step directly
above this one exists to refuse a gate that reports success having run zero
tests. It cannot refuse anything, because it is the step that does not run.

An absent value is a caller who said NOTHING, and a caller who says nothing is
asking for the default, which is true. Bare `inputs.tests` reads that silence as
"skip" — the one meaning it cannot have. Comparing the FORMATTED value to
'false' says it the other way round: only an explicit false skips; absent, true,
or a value this forge mangles all run. `tests: false` keeps working for the one
caller that legitimately uses it (cloud's tag build, already proven on main).
The failure direction becomes "tested when it need not have" rather than
"shipped untested", which is the right way round for a fleet that publishes
container images off these runs.

Also reconciles the two published copies, which had ALREADY diverged on main by
17 lines of KMS commentary. `build-yml-is-one-file` is a `test:` entry, so the
one check written to catch that drift was itself skipped by the defect it now
sits behind — which is the whole argument for this commit in one artifact.

Co-authored-by: Hanzo Dev <dev@hanzo.ai>
2026-08-04 14:43:16 -07:00
2 changed files with 81 additions and 11 deletions
+49 -8
View File
@@ -49,8 +49,18 @@ on:
tag build would re-test a commit already proven, at the cost of a
3108-package link storm. Passing false there runs the gate once instead
of twice; passing it anywhere else runs it zero times.
type: boolean
default: true
# `string`, NOT `boolean`, and that is the fix. git.hanzo.ai's runner
# substitutes a workflow_call input's declared TYPE ZERO VALUE, so a
# boolean arrives as `false` whatever the caller passed — measured:
# hanzoai/openapi passed a literal `true` and the run still evaluated
# `format('{0}', inputs.tests)` to 'false' and skipped the step. NO
# expression over a boolean input can be true on that forge. A string's
# zero value is '', which is not 'false', so the test step below runs;
# github.com fills in 'true' and it runs there too. Only a caller that
# says the word false gets the skip, which is the one behaviour that
# ever needed to be expressible.
type: string
default: 'true'
submodules:
description: >-
Passed straight to actions/checkout. Default '' is checkout's own
@@ -336,11 +346,23 @@ jobs:
fi
echo "::warning::KMS login failed (org=$ORG client=$KMS_CLIENT_ID) — cross-org private deps & deploy unavailable"; exit 0
fi
# Embedded KMS (HIP-0106): org from the token, flat {"value"}. The old
# /v1/kms/orgs/<org>/... + .secret.value pair 404s and `curl -sf` turns
# that into "" — which every caller reads as "not in KMS". The standalone
# host also holds a STALE key cloud 403s, so reading it ships a dead one.
# Embedded first, standalone as fallback.
# KMS is embedded in hanzoai/cloud now (HIP-0106, cloud/apps/kms), and its
# contract differs from the standalone service in two ways that BOTH fail
# silently — you get an empty string, which every caller below already
# treats as "not in KMS":
#
# url /v1/kms/secrets/<path>/<name> — the org comes from the TOKEN,
# not the url. The old /v1/kms/orgs/<org>/... form 404s, and -sf
# turns that into empty output.
# body {"name","env","value"} — flat. `.secret.value` selects nothing.
#
# Reading the OLD host is worse than reading nothing: the two instances
# hold DIFFERENT values under the same name, and the standalone copy of
# deploy/EVENT_INGEST_KEY is stale — cloud rejects it at ingest with 403,
# so a build that "found" a key still ships one that cannot write.
#
# Try the embedded shape first and fall back to the standalone one, so a
# repo still pointed at the old host keeps working while the fleet moves.
get() {
v=$(curl -sf "$KMS_ENDPOINT/v1/kms/secrets/$PATHQ/$1?env=$ENV" -H "Authorization: Bearer $TOKEN" | jq -r '.value // empty')
if [ -z "$v" ]; then
@@ -982,7 +1004,26 @@ jobs:
# it ran nothing AND nothing shows as having run. A gate that is not a test
# gate — vet, lint, a build, a codegen-freshness check — says neither and is
# untouched. To silence it legitimately, make the gate run a test.
if: inputs.mode != 'delegate' && inputs.tests
#
# AN INPUT THIS FORGE DOES NOT DELIVER MUST NOT READ AS "RUN NOTHING".
# `tests` is declared `type: boolean, default: true`, and on github.com it
# arrives that way. On git.hanzo.ai it does not arrive at all, so bare
# `inputs.tests` is falsy and this step is skipped — in a job that then
# reports SUCCESS. Measured on the forge, five of five repos with a cicd
# run: hanzoai/cloud (passes `tests:` outright), hanzoai/ci (its own bare
# 7-line caller), hanzoai/openapi (passed a literal `true`), gateway and
# commerce. All green, all with this step skipped, none having run one
# test. The step above exists to refuse a gate that runs no tests; it
# cannot, because it is the step not running.
#
# An absent value is a caller who said NOTHING, and a caller who says
# nothing is asking for the default — which is true. Only an explicit
# `false` means skip, so compare the FORMATTED value to it: absent, true,
# or anything this forge mangles all run; `false` still skips, which is
# the one shape that legitimately uses it (hanzoai/cloud's tag build,
# already gated on main). The failure direction becomes "tested when it
# need not have" instead of "shipped untested".
if: inputs.mode != 'delegate' && inputs.tests != 'false'
run: |
set -euo pipefail
NOTHING='\[no test files\]|\[no tests to run\]|no tests ran|collected 0 items|No tests found|no test specified|running 0 tests|Tests:[[:space:]]+0 total|(^|[^0-9])0 (passing|passed)'
+32 -3
View File
@@ -49,8 +49,18 @@ on:
tag build would re-test a commit already proven, at the cost of a
3108-package link storm. Passing false there runs the gate once instead
of twice; passing it anywhere else runs it zero times.
type: boolean
default: true
# `string`, NOT `boolean`, and that is the fix. git.hanzo.ai's runner
# substitutes a workflow_call input's declared TYPE ZERO VALUE, so a
# boolean arrives as `false` whatever the caller passed — measured:
# hanzoai/openapi passed a literal `true` and the run still evaluated
# `format('{0}', inputs.tests)` to 'false' and skipped the step. NO
# expression over a boolean input can be true on that forge. A string's
# zero value is '', which is not 'false', so the test step below runs;
# github.com fills in 'true' and it runs there too. Only a caller that
# says the word false gets the skip, which is the one behaviour that
# ever needed to be expressible.
type: string
default: 'true'
submodules:
description: >-
Passed straight to actions/checkout. Default '' is checkout's own
@@ -994,7 +1004,26 @@ jobs:
# it ran nothing AND nothing shows as having run. A gate that is not a test
# gate — vet, lint, a build, a codegen-freshness check — says neither and is
# untouched. To silence it legitimately, make the gate run a test.
if: inputs.mode != 'delegate' && inputs.tests
#
# AN INPUT THIS FORGE DOES NOT DELIVER MUST NOT READ AS "RUN NOTHING".
# `tests` is declared `type: boolean, default: true`, and on github.com it
# arrives that way. On git.hanzo.ai it does not arrive at all, so bare
# `inputs.tests` is falsy and this step is skipped — in a job that then
# reports SUCCESS. Measured on the forge, five of five repos with a cicd
# run: hanzoai/cloud (passes `tests:` outright), hanzoai/ci (its own bare
# 7-line caller), hanzoai/openapi (passed a literal `true`), gateway and
# commerce. All green, all with this step skipped, none having run one
# test. The step above exists to refuse a gate that runs no tests; it
# cannot, because it is the step not running.
#
# An absent value is a caller who said NOTHING, and a caller who says
# nothing is asking for the default — which is true. Only an explicit
# `false` means skip, so compare the FORMATTED value to it: absent, true,
# or anything this forge mangles all run; `false` still skips, which is
# the one shape that legitimately uses it (hanzoai/cloud's tag build,
# already gated on main). The failure direction becomes "tested when it
# need not have" instead of "shipped untested".
if: inputs.mode != 'delegate' && inputs.tests != 'false'
run: |
set -euo pipefail
NOTHING='\[no test files\]|\[no tests to run\]|no tests ran|collected 0 items|No tests found|no test specified|running 0 tests|Tests:[[:space:]]+0 total|(^|[^0-9])0 (passing|passed)'