Skip to content

docs: correct CLAUDE.md's CI section, which now points the wrong way - #121

Merged
wormeyman merged 1 commit into
mainfrom
docs/ci-sharding-and-types-check
Aug 3, 2026
Merged

docs: correct CLAUDE.md's CI section, which now points the wrong way#121
wormeyman merged 1 commit into
mainfrom
docs/ci-sharding-and-types-check

Conversation

@wormeyman

Copy link
Copy Markdown
Owner

Today's changes left CLAUDE.md describing a repo that no longer exists. One of those notes doesn't just go stale - it instructs the reader to undo #118.

Closes #117.

The actively misleading one

CLAUDE.md said of verify.yml:

It invokes the script verbatim rather than re-listing its phases as separate steps... If you change what verify means, CI follows automatically - do not mirror the change into the YAML.

Since #118 that file runs a static job + a 3-way sharded tests matrix + a verify gate. Someone following the old note would fold it back into one job and hand back the 9m03s → 4m36s. The section now leads with what changed and why, and says explicitly: if you're here because the YAML doesn't match, the instruction is what changed.

The anti-drift rule it protected is restated, not dropped. The workflow names only package.json scripts, never commands, and verify / verify:static / verify:shard all compose the same verify:lint - so there is still exactly one definition of each phase.

Two lockout traps, both of which look like tidying

  • The job named verify does no work - it only asserts needs.*.result. But the ruleset matches required checks by name, so renaming or deleting it makes the required check never appear and blocks every PR permanently.
  • It asserts those results explicitly rather than relying on needs:, because a job whose dependency failed is skipped, and a skipped required check does not block a merge. Removing the assertions would make a red suite mergeable.

Neither was written down anywhere but a YAML comment.

Also stale

  • "~4 minutes on a CI runner" was really 9m03s. It's ~4m36s now, so the number is roughly right again for a completely different reason.
  • verify:lint, verify:static, verify:shard, require:docker were undocumented, as was preview:dev / preview:deploy now being gated on a Docker preflight - and that preview:test deliberately is not, which is what lets CI run it.

Closes #117's two items - one fixed, not just described

wrangler types --check compares the workerd version too, not only the config hash. Both halves observed directly: editing wrangler.jsonc's containers block left the hash identical with --check passing, while #97's wrangler bump failed on the workerd line alone with the hash unchanged. The old wording would rule out the actual cause - which is exactly what happened.

The Renovate prBodyNotes ordering is fixed in .github/renovate.json5, not merely documented. It said regenerate types after merging; types:check runs inside the required verify check, so it's a precondition - which is why #97 sat red. Re-validated with renovate-config-validator, since a config that fails to parse makes Renovate silently do nothing.

Dead ends recorded so they aren't retried

From the sharding work: isolate: false fails 66 of 171 files (cross-file module-state pollution - those files pass individually - and only 7.6% anyway), --merge-reports re-runs rather than merges, and the wall clock is set by the slowest file (67s of 68s) rather than total CPU.

Preview container sizing

Documented as the measured cost decision it is (#116): why basic, why sleepAfter is fragile, and that wrangler containers instances reports running while billing shows zero - it describes the placement, not whether you're paying. Read the metrics, and use the disk-to-memory ratio (2.0 = standard-1, 4.0 = basic) to tell which type is live.

Verification

pnpm run verify green - 1,439 app + 13 worker + 3 container tests, 0 warnings. Docs-only apart from the one-line renovate.json5 fix; the formatter pass was needed and applied.

🤖 Generated with Claude Code

https://claude.ai/code/session_018AB7J1qK6kSBnJJmgDqMst

Three of today's changes left CLAUDE.md describing a repo that no longer
exists, and one of those notes actively instructs the reader to undo #118.

  - The CI section said verify.yml "invokes the script VERBATIM rather than
    re-listing its phases" and "do not mirror the change into the YAML".
    Since #118 it runs a `static` job plus a 3-way sharded `tests` matrix
    plus a `verify` gate. Anyone following the old note would fold it back
    into one job and give back the 9m03s -> 4m36s.
  - "~4 minutes on a CI runner" was really 9m03s. It is ~4m36s now, so the
    figure is roughly right again for an entirely different reason.
  - verify:lint, verify:static, verify:shard and require:docker were
    undocumented, as was the fact that preview:dev and preview:deploy are
    now gated on a Docker preflight.

The anti-drift rule the old wording protected is restated rather than
dropped: the workflow names only package.json SCRIPTS, and verify,
verify:static and verify:shard all compose the same verify:lint, so there is
still one definition of each phase.

Two lockout traps are now written down, because both look like tidying. The
job named `verify` does no work - it only asserts needs.*.result - but the
ruleset matches required checks by NAME, so renaming it blocks every PR
permanently. And it asserts those results explicitly because a `needs:` job
whose dependency FAILED is skipped, and a skipped required check does not
block a merge.

Also closes #117's two items:

  - `wrangler types --check` compares the workerd version as well as the
    config hash. Both halves were observed: editing wrangler.jsonc's
    containers block left the hash identical and --check passing, while
    #97's wrangler bump failed on the workerd line alone with the hash
    unchanged. The old note would rule out the actual cause.
  - The Renovate prBodyNotes for the worker-toolchain group said to
    regenerate types AFTER merging. types:check runs inside the required
    verify check, so it is a precondition - which is why #97 sat red. Fixed
    in .github/renovate.json5, not merely described, and re-validated with
    renovate-config-validator.

Records the dead ends from the sharding work so they are not retried:
isolate:false fails 66 of 171 files (cross-file module-state pollution, and
only 7.6% anyway), --merge-reports re-runs rather than merges, and the wall
clock is set by the slowest FILE not total CPU.

Finally, the preview container's sizing is now documented as the measured
cost decision it is (#116), including that `wrangler containers instances`
reports `running` while billing shows zero - read the metrics, not the CLI.

Closes #117

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018AB7J1qK6kSBnJJmgDqMst
@wormeyman
wormeyman merged commit 6b299eb into main Aug 3, 2026
6 checks passed
@wormeyman
wormeyman deleted the docs/ci-sharding-and-types-check branch August 3, 2026 23:05
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.

docs: two wrong/incomplete notes about wrangler types --check and the Renovate regen ordering

1 participant