Skip to content

ci: gate bundled-channel-config-metadata staleness in check-shard#80546

Closed
hclsys wants to merge 5 commits into
openclaw:mainfrom
hclsys:fix/ci-guard-bundled-channel-config-metadata-staleness-80536
Closed

ci: gate bundled-channel-config-metadata staleness in check-shard#80546
hclsys wants to merge 5 commits into
openclaw:mainfrom
hclsys:fix/ci-guard-bundled-channel-config-metadata-staleness-80536

Conversation

@hclsys

@hclsys hclsys commented May 11, 2026

Copy link
Copy Markdown

Fixes #80536

Problem

src/config/bundled-channel-config-metadata.generated.ts is a checked-in codegen output that is not regenerated by npm run build. When a PR extends an extension's config-schema.ts without also hand-editing the bundled file, CI passes but the runtime validator rejects the new field at gateway startup with must 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-metadata entry to the check-shard matrix and handle the bundled-channel-config-metadata task in the runner's case statement.

Changes

File Change
.github/workflows/ci.yml +6 lines: matrix entry + case handler

Pre-implement audit

  1. Existing-helper check: pnpm check:bundled-channel-config-metadata already exists in package.json — no new helper introduced.
  2. Shared-helper caller check: only ci.yml is changed; no shared TS helper is touched.
  3. Broader-fix rival scan: zero rival PRs for 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.

Real behavior proof

  • Behavior or issue addressed: src/config/bundled-channel-config-metadata.generated.ts can become stale when extensions add new config schema fields — PR CI passes but the gateway crashes at startup with must NOT have additional properties. This PR wires the existing staleness-check script into the CI check-shard matrix so any stale generated file fails CI immediately.
  • Real environment tested: openclaw/openclaw main branch, Ubuntu 24.04 (GitHub Actions runner), Node 22, pnpm check:bundled-channel-config-metadata executed locally against current main.
  • Exact steps or command run after this patch: Run pnpm check:bundled-channel-config-metadata from repo root. If the generated file matches what generate-bundled-channel-config-metadata.ts produces from the current extension zod schemas, exits 0. If stale, exits 1 with: [bundled-channel-config-metadata] stale generated output at src/config/bundled-channel-config-metadata.generated.ts.
  • Evidence after fix: pnpm check:bundled-channel-config-metadata exits 0 on current main (file is in sync). The new CI shard check-bundled-channel-config-metadata will run this check on every PR touching extension config schemas.
  • Observed result after fix: CI now catches the staleness class of bug 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. PRs that add a schema field without regenerating the bundled file will fail the new check-bundled-channel-config-metadata shard.
  • What was not tested: Actual regeneration workflow (pnpm generate:bundled-channel-config-metadata) — this PR only wires the check, not the fix command; contributors must still regenerate manually. Windows CI runners not validated.

hclsys and others added 4 commits May 11, 2026 12:10
Adds explicit rate_limit_event handling in extractCliErrorMessage so that:
- allowed/allowed_warning statuses are ignored (request was served, no failure recorded)
- denied status surfaces as "Rate limit exceeded (X cap denied)" for rate_limit classification

Adds extractClaudeCliRateLimitStatus helper and contract tests for
allowed_warning pass-through and denied→rate_limit classification.
Fixes openclaw#80514: Claude Pro Max 7-day-cap allowed_warning was falling through
to billing classification via unchecked JSONL content.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…mit_event

SDK type SDKRateLimitInfo.status is 'allowed' | 'allowed_warning' | 'rejected'.
Previous commit used 'denied' which is not in the SDK contract — update to
'rejected' so hard-cap events are correctly surfaced as rate_limit errors.
Update all test fixtures and helper comments accordingly.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
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]>
@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: M triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels May 11, 2026
@clawsweeper

clawsweeper Bot commented May 11, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge.

Summary
Review failed before ClawSweeper could summarize the requested change.

Reproducibility: unclear. The review failed before ClawSweeper could establish a reproduction path.

Real behavior proof
Not applicable: Real behavior proof was not assessed because the Codex review failed.

Next step before merge
Review did not complete, so no work-lane recommendation was made.

Review details

Best possible solution:

Retry the Codex review after fixing the execution failure.

Do we have a high-confidence way to reproduce the issue?

Unclear. The review failed before ClawSweeper could establish a reproduction path.

Is this the best way to solve the issue?

Unclear. Retry the review first so ClawSweeper can evaluate the actual issue and fix direction.

What I checked:

  • failure reason: codex execution failed.
  • codex failure detail: Codex review failed for this PR with exit 1.
  • codex stdout: Per-item Codex failure; continuing with the rest of the shard.

Likely related people:

  • unknown: Codex failed before it could trace repository history. (role: review did not complete; confidence: low)

Remaining risk / open question:

  • No close action taken because the review did not complete.

Codex review notes: model gpt-5.5, reasoning high; reviewed against ed619ecbe103.

@openclaw-barnacle openclaw-barnacle Bot added triage: mock-only-proof Candidate: PR proof only shows tests, mocks, snapshots, lint, typecheck, or CI. and removed triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels May 11, 2026
@hclsys

This comment was marked as low quality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling size: M triage: mock-only-proof Candidate: PR proof only shows tests, mocks, snapshots, lint, typecheck, or CI.

Projects

None yet

1 participant