ci: gate bundled-channel-config-metadata staleness in check-shard#80552
ci: gate bundled-channel-config-metadata staleness in check-shard#80552hclsys wants to merge 3 commits into
Conversation
|
Codex review: needs maintainer review before merge. Summary Reproducibility: yes. Source inspection shows current main consumes generated channel metadata at runtime, the existing checker detects stale generated output, and current main does not run that checker in the check-shard before this PR. Real behavior proof Next step before merge Security Review detailsBest possible solution: Land this narrow CI guard after normal maintainer approval, leaving broader build-time regeneration or live-schema policy changes to separate review. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection shows current main consumes generated channel metadata at runtime, the existing checker detects stale generated output, and current main does not run that checker in the check-shard before this PR. Is this the best way to solve the issue? Yes for this PR's scope. Running the existing read-only staleness check in CI is the narrowest maintainable guard; automatically regenerating during build would be a broader follow-up decision. What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 6066e878f690. |
Adds a check-shard matrix entry that runs `pnpm check:bundled-channel-config-metadata` (which already exists but was never wired into CI). The script exits 1 with a clear message when `src/config/bundled-channel-config-metadata.generated.ts` is stale relative to the per-extension zod schemas, so any PR that extends an extension's config-schema without regenerating the bundled file will now fail CI instead of silently shipping a half-broken validator. Fixes openclaw#80536 Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Fixes #80536
Problem
src/config/bundled-channel-config-metadata.generated.tsis a checked-in codegen output that is not regenerated bynpm run build. When a PR extends an extension'sconfig-schema.tswithout also hand-editing the bundled file, CI passes but the runtime validator rejects the new field at gateway startup withmust NOT have additional properties.The script to detect this already exists (
scripts/generate-bundled-channel-config-metadata.ts --check/pnpm check:bundled-channel-config-metadata) but was never wired into CI.Fix
Add a
check-bundled-channel-config-metadataentry to thecheck-shardmatrix and handle thebundled-channel-config-metadatatask in the runner's case statement.Changes
.github/workflows/ci.ymlPre-implement audit
pnpm check:bundled-channel-config-metadataalready exists inpackage.json— no new helper introduced.ci.ymlis changed; no shared TS helper is touched.Real behavior proof
src/config/bundled-channel-config-metadata.generated.tscan become stale when extensions add new config schema fields — PR CI passes but the gateway crashes at startup withmust NOT have additional properties. This PR wires the existing staleness-check script into the CI check-shard matrix so the stale-generated-file failure is caught in CI before runtime.openclaw/openclawmain branch, Ubuntu 22.04, Node v22.14.0, repo cloned locally.check-bundled-channel-config-metadataCI shard will run this check on every PR, catching the staleness class of failure described in Channel config-schema additions in downstream patches not picked up by runtime validator (codegen-bundled JSON schema is checked-in, not regenerated at build) #80536 before it reaches runtime.pnpm generate:bundled-channel-config-metadataregeneration workflow itself — this PR only wires the check, not the fix command.