Repository navigation
fix(i18n-render): build the merge base with ui-auto stamping off - #18795
Pearcekieser wants to merge 1 commit into
Conversation
Design Review (Opus 5.5, fork) — ✅ PASSDesign-level review of Design-Verdict: PASS Confirm the E2E job goes green on a PR based on this commit that edits a stamped page. This PR's own run only exercises the HEAD build path. [DESIGN-REVIEWED] 7813ec9 Description read[DESCRIPTION-READ] 3e02efd629044b98a393bfe326c772a269100c5ee0ce85eea15fa0ac8c34e689 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
UX Review (Opus 5.5, fork) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing to check. [UX-REVIEWED] 7813ec9 Description read[DESCRIPTION-READ] e47993abfc08251c36d9226771048967d0a719e6bb158860ebaa52642e7d1edc That sha256 names everything this verdict read: the PR description, plus the 3 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5, fork) — ⏭️ skippedRevision |
Opus 5.5 Review (fork) — ✅ no blocking findingsReviewed |
GPT 6.1 Review (fork) — ✅ no blocking findingsReviewed Review detailsNo findings. |
check-i18n-render.mjs builds the merge base against this checkout's node_modules, which holds the stamp manifest gen-ui-index cut from HEAD's sources. Any branch that edits a stamped file then fails the base build with 'changed after the auto stamp manifest was written', and the E2E job goes red on code outside the diff. The base build now sets KIROCREW_UI_AUTO_STAMP=off, which the stamp plugin honours like VITEST. The gate compares rendered text, and stamps are data attributes, so the comparison is unchanged. Also regenerates ui-index.generated.json, whose input digest is stale on main.
449c687 to
7813ec9
Compare
|
Rebased on main d32c084, no behaviour change. #18782 regenerated The Frontend Tests (3) failure on 449c687 was |
|
CI on 7813ec9 (run 38044695797): E2E (stub ACP backend, offline) passes, which is the check this PR exists to fix. Four reds remain, none from this diff. A fork cannot rerun jobs, so a maintainer rerun of the two test jobs would clear them.
|
|
Closing as superseded by #18793, which merged on main as 5089b4e. It fixes the same failure a different way: the i18n-render base build now gets its own auto stamp manifest instead of reading HEAD's. #16031 edits |
Problem / Motivation
Goal: A PR that edits a ui-auto stamped page or component no longer fails the E2E job for code outside its diff.
The E2E (stub ACP backend, offline) job fails on any PR that edits a file the ui-auto stamp plugin stamps.
check-i18n-render.mjs --buildbuilds the merge base in a temp tree that symlinks this checkout'swebsite/node_modules. The stamp manifest lives atnode_modules/.cache/kc-ui-auto/sites.jsonand was cut from HEAD's sources bygen-ui-index. In the base tree every file the branch changed hashes differently from its manifest entry, and in a build the plugin callsthis.error:That run is #16031 at d46b75f (run 38030350025). The plugin arrived with #18443, so this started once that merged.
Why it matters
Every PR touching a stamped page or component goes red on E2E for code outside its diff, and a fork contributor cannot rerun the job.
Not a goal
Stamping the base bundle. The i18n-render gate compares
document.body.innerTextbetween HEAD and base, and stamps aredata-ui-autoattributes, so the comparison does not need them.What changed (motivation → approach → change)
website/scripts/lib/ui-auto-stamp.mjs: the plugin returns a bare{ name }whenKIROCREW_UI_AUTO_STAMP=off, the same way it already does underVITEST.__UI_AUTO_BUILD_DIGEST__is then undefined, whichautoBuild.tsalready reads through atypeofguard as''.website/scripts/check-i18n-render.mjs:runViteDevBuildtakes extra env, and the base build passesKIROCREW_UI_AUTO_STAMP=off. The HEAD build is unchanged and still stamps.The base tree uses the base commit's own plugin, so the fix covers branches cut after this merges.
Backwards compatibility
No change to any shipped build. The variable is read only by the stamp plugin, and nothing sets it except the i18n-render base build.
Tests
autoGuide.test.tsgains a test that drives the plugin'sconfigandtransformhooks with a stale file. With the default env the build hook throwschanged after the auto stamp manifest; withKIROCREW_UI_AUTO_STAMP=offthe plugin has no hooks. The test fails on main's plugin and passes with the change.npx vitest run src/uiLocations/autoGuide.test.tspasses 26 tests, andtsc -p tsconfig.app.json, eslint on the three files andgen-ui-index.mjs --checkpass.Manual verification
None beyond the above. The E2E job on this PR exercises the HEAD build path; the base path takes effect for branches based on this commit.
Screenshots / video
None, no UI change.
Related Issues
Fixes #18794
Pattern harvest
Pattern: a build-time artifact cached under a shared
node_modulesis read by a second build of a different source tree.Rule candidate: review-prompt. A gate that builds another tree against this checkout's
node_modulesmust not trust anything undernode_modules/.cachethat was derived from this checkout's sources.Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
I agree to license this contribution under the project's Apache-2.0 license.