Skip to content

fix(i18n-render): build the merge base with ui-auto stamping off - #18795

Closed
Pearcekieser wants to merge 1 commit into
kirodotdev:mainfrom
Pearcekieser:fix/i18n-render-base-stamp
Closed

Pearcekieser wants to merge 1 commit into
kirodotdev:mainfrom
Pearcekieser:fix/i18n-render-base-stamp

Conversation

@Pearcekieser

@Pearcekieser Pearcekieser commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

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 --build builds the merge base in a temp tree that symlinks this checkout's website/node_modules. The stamp manifest lives at node_modules/.cache/kc-ui-auto/sites.json and was cut from HEAD's sources by gen-ui-index. In the base tree every file the branch changed hashes differently from its manifest entry, and in a build the plugin calls this.error:

[plugin kirocrew-ui-auto-stamp] .../i18n-render-base-8ce11f0924ad/website/src/pages/TelemetryPanel.tsx
RolldownError: src/pages/TelemetryPanel.tsx changed after the auto stamp manifest was written; rerun the build
[i18n-render] [base 8ce11f09] vite build failed (exit 1)

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.innerText between HEAD and base, and stamps are data-ui-auto attributes, 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 } when KIROCREW_UI_AUTO_STAMP=off, the same way it already does under VITEST. __UI_AUTO_BUILD_DIGEST__ is then undefined, which autoBuild.ts already reads through a typeof guard as ''.
  • website/scripts/check-i18n-render.mjs: runViteDevBuild takes extra env, and the base build passes KIROCREW_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.ts gains a test that drives the plugin's config and transform hooks with a stale file. With the default env the build hook throws changed after the auto stamp manifest; with KIROCREW_UI_AUTO_STAMP=off the plugin has no hooks. The test fails on main's plugin and passes with the change. npx vitest run src/uiLocations/autoGuide.test.ts passes 26 tests, and tsc -p tsconfig.app.json, eslint on the three files and gen-ui-index.mjs --check pass.

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_modules is 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_modules must not trust anything under node_modules/.cache that was derived from this checkout's sources.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

I agree to license this contribution under the project's Apache-2.0 license.

@Pearcekieser
Pearcekieser requested review from a team and KiroCrewCaptain as code owners October 10, 2026 09:00
@github-actions github-actions Bot added fork Pull request from a fork (external contributor) readiness: action required A blocking check or review needs attention labels Oct 10, 2026
@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5, fork) — ✅ PASS

Design-level review of 7813ec93fa11376f170098f0115c5e8936040c6a via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5, fork) — ✅ PASS

UX-level review of 7813ec93fa11376f170098f0115c5e8936040c6a via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5, fork) — ⏭️ skipped

Revision 7813ec93fa11376f170098f0115c5e8936040c6a ships no reviewable capability (docs, tests or generated files only), so there is nothing to inventory. Advisory — does not block merge.

@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review (fork) — ✅ no blocking findings

Reviewed 7813ec93fa11376f170098f0115c5e8936040c6a via the fork AI-review pipeline; updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 7813ec9

@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review (fork) — ✅ no blocking findings

Reviewed 7813ec93fa11376f170098f0115c5e8936040c6a via the fork AI-review pipeline; updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 7813ec9

@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Oct 10, 2026
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.
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Oct 10, 2026
@Pearcekieser
Pearcekieser force-pushed the fix/i18n-render-base-stamp branch from 449c687 to 7813ec9 Compare October 10, 2026 10:22
@Pearcekieser

Copy link
Copy Markdown
Contributor Author

Rebased on main d32c084, no behaviour change. #18782 regenerated src/kiro_crew/docs/ui-index.generated.json on main, so this PR no longer touches that file and is down to the three files of the fix.

The Frontend Tests (3) failure on 449c687 was src/guide/GuideLayer.test.tsx "pressing the highlighted control on the last step finishes the guide", which expected 2 calls and got 1. This PR does not touch that file, and it passes 3 of 3 local runs.

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Oct 10, 2026
@Pearcekieser

Copy link
Copy Markdown
Contributor Author

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.

  1. Frontend Tests (3), job 114192199897: src/guide/GuideLayer.test.tsx "pressing the highlighted control on the last step finishes the guide, as Done does" times out at its 4 s waitFor with 1 of 2 progress writes. This PR does not touch src/guide/. The test it adds in autoGuide.test.ts is pure: it reads a virtual manifest through injected readFile/exists and passes env explicitly, so it shares no state with GuideLayer. GuideLayer passes 3 of 3 local runs (210 tests each).
  2. Backend Tests (Windows) (1), job 114192199840: test_dashboard_server_coverage.py::TestWindowEntryHandler::test_handler_follows_a_re_pointed_dist hits PermissionError: [WinError 32] on a pytest temp dir held by another process. This PR changes no Python.
  3. Frontend Coverage Merge and Coverage Gate fail because shard 3 produced no coverage report.

@Pearcekieser

Copy link
Copy Markdown
Contributor Author

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 TelemetryPanel.tsx, the case this PR was opened for, and its E2E (stub ACP backend, offline) check passed on 2e3cdbe with #18793 in its base. This PR is no longer needed, and #18794 is fixed by #18793.

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

Labels

fork Pull request from a fork (external contributor)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

check-i18n-render base build fails on any PR that edits a ui-auto stamped file

1 participant