Skip to content

fix(ci): pin settings-registry.generated.json to LF so the Windows build's byte-compare passes - #18751

Closed
CrysisDeu wants to merge 1 commit into
mainfrom
fix/pin-settings-registry-json-lf
Closed

CrysisDeu wants to merge 1 commit into
mainfrom
fix/pin-settings-registry-json-lf

Conversation

@CrysisDeu

@CrysisDeu CrysisDeu commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: The Nightly Build's Windows jobs build again, by checking out settings-registry.generated.json with LF on every platform.

Bug fix. The Nightly Build is red on Windows only: Build Windows Desktop / Build Windows Desktop and Pod Scenario E2E (windows-latest) fail in npm run build (website) with

gen-ui-index: 1 problem(s); the index was not written: settings-registry.generated.json does not match the live settings extraction; run npm run gen:settings

Failing run: https://github.com/kirodotdev/KiroCrew/actions/runs/38029978692 (head 8ce11f0). Linux and macOS jobs of the same run pass; the previous nightly (head b6ce813) had Windows green. The committed file is correct; npm run gen:settings on Linux is a no-op.

Why it matters

Every Windows build of the website fails: the nightly's Windows desktop and installer artifacts are not produced, the Windows E2E lane never runs, and every Windows contributor with the Git-for-Windows default core.autocrlf=true gets a red npm run build on an untouched checkout. Left alone, every PR's Windows build jobs are red too, which hides any real Windows regression behind this noise.

Not a goal

  • Changing checkSettingsExtraction() or gen-ui-index.mjs (normalizing line endings in the comparator); the byte-for-byte compare is the intended contract.
  • Regenerating ui-index.generated.json, which is stale on the current main tip for a different reason (see Manual verification).
  • Auditing other generated files for the same gap.

What changed (motivation → approach → change)

Symptom: Windows-only settings-registry.generated.json does not match the live settings extraction.

Root cause: #18443 added checkSettingsExtraction() (website/scripts/lib/ui-index.mjs), which byte-compares the live generateAgentRegistryJson(entries) output (LF) against the committed src/kiro_crew/docs/settings-registry.generated.json as read from disk by website/scripts/gen-ui-index.mjs. website/.gitattributes pins *.json text eol=lf, but only for files under website/. The agent JSON lives at src/kiro_crew/docs/, outside that scope, and the root .gitattributes did not cover it. Under core.autocrlf=true it is checked out as CRLF, so the compare fails on Windows and only there. The sibling settingsRegistry.gen.ts (under website/) is pinned and passes, which is why only one of the two possible errors appears.

Change: one new entry in the root .gitattributes, src/kiro_crew/docs/settings-registry.generated.json text eol=lf, next to the /config-baseline.json pin, with a comment in the file's existing style. The blob is already LF in the index (git ls-files --eol reports i/lf), so this changes only the Windows working-tree checkout; there is no content change.

Why .gitattributes and not the comparator: a byte-for-byte compare against LF output is the point of the check (a renamed Settings label must fail it). Normalizing inside checkSettingsExtraction would hide a real CRLF drift in the committed file and be a one-off for a class the repo already handles at checkout: the root .gitattributes pins /config-baseline.json, docs/decisions/*.md, the ACP frame corpus and the pi gate extension for exactly this reason, and website/.gitattributes says the same about its *.json pin. This entry follows that pattern.

Backwards compatibility

Compatible: a .gitattributes eol=lf pin on a file whose index blob is already LF changes nothing on Linux/macOS and only stops the CRLF rewrite on Windows checkouts; no code, config or data format changes.

Removes nothing: the diff adds one attribute line and a comment.

Tests

N/A — no code changes; the fix is a checkout attribute. The existing npm run build step (gen-ui-index.mjs --check → checkSettingsExtraction) on the Windows CI jobs is the regression test and is what this PR's CI exercises.

Manual verification

Static only:

  • git check-attr -a src/kiro_crew/docs/settings-registry.generated.json now reports text: set, eol: lf; git ls-files --eol shows i/lf w/lf, so the index blob is unchanged.
  • node scripts/gen-ui-index.mjs --check in website/ on the Nightly head 8ce11f0 exits 0 on Linux with this change.
  • Note: on the current main tip (5b2f8b1) the same --check reports src/kiro_crew/docs/ui-index.generated.json is stale (input_digest only), introduced by fix(sidebar): restore the folder geometry decided in #3905 #18362 (b16b26b). That is independent of this PR and of the Windows CRLF issue, and is why the Build / Wheel / E2E jobs on this PR are red on every platform until main regenerates the index.

Related Issues

Nightly run https://github.com/kirodotdev/KiroCrew/actions/runs/38029978692; introduced by #18443.

Pattern harvest

Rule candidate: lint
Pattern: a generated file that a script byte-compares against LF output is committed outside the .gitattributes scope that pins eol=lf for its siblings.

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

Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.

@CrysisDeu
CrysisDeu requested review from a team and KiroCrewCaptain as code owners October 10, 2026 06:41
@CrysisDeu
CrysisDeu requested a review from buluoray October 10, 2026 06:41
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Oct 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ⏭️ skipped

Revision f58fb8d72015acebb263d830f4ed2c49b33df69e touches no user-facing surface (no changes under website/ or committed screenshots), so the UX review was skipped. Advisory — does not block merge.

@github-actions

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ⏭️ skipped

Revision f58fb8d72015acebb263d830f4ed2c49b33df69e 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

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of f58fb8d72015acebb263d830f4ed2c49b33df69e and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] f58fb8d

False positive or not applicable? A repository writer can comment:
/ai-review override gpt f58fb8d72015acebb263d830f4ed2c49b33df69e: <one-sentence reason>

@github-actions

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed f58fb8d72015acebb263d830f4ed2c49b33df69e — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] f58fb8d

Verdict parsed from the review's SHA-scoped output markers for commit f58fb8d72015acebb263d830f4ed2c49b33df69e.

False positive or not applicable? A repository writer can comment:
/ai-review override fable f58fb8d72015acebb263d830f4ed2c49b33df69e: <one-sentence reason>

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Oct 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — 🟡 CONCERNS

Design-level review of f58fb8d72015acebb263d830f4ed2c49b33df69e — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: CONCERNS

The pin covers only the first of two unpinned byte-compares in the Windows build, so the Windows build will most likely still fail, just one check later.

Watch

  • The same CRLF failure is next in line. npm run build now runs gen-ui-index.mjs --check. After the settings check, that script compares src/kiro_crew/docs/ui-index.generated.json byte-for-byte (current !== want, gen-ui-index.mjs:441). That file has 5918 lines, sits in the same unpinned directory, and has no .gitattributes entry (attr/ is empty). The settings error exits at line 396, before line 441 runs, so it was hiding this compare. With the settings error gone, a Windows CRLF checkout reaches line 441 and fails with "ui-index.generated.json is stale". The stale-index problem on main that the description mentions will also hide it, so a red Windows run won't clearly show which cause it is.
    Clears when: ui-index.generated.json is pinned too, and a Windows Build job passes gen-ui-index --check on a main whose index is current.

Suggestions

  • Pin by pattern: src/kiro_crew/docs/*.generated.json text eol=lf. One rule then covers every generated artifact the build compares, including the next one someone adds.

[DESIGN-REVIEWED] f58fb8d

Description read

[DESCRIPTION-READ] 6d39ca5bea76635938256766de2a7af371267146c031895b3904b48f559f5d33

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.

@leonlaiyc leonlaiyc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codex Desktop independent review of f58fb8d. CrysisDeu remains the implementation owner; this is a comment review, not code-owner approval or an AI-review override.

The added settings pin works. I reproduced the Design Review's sibling concern on Windows rather than relying on the bot's prediction:

  • Created a detached worktree with git -c core.autocrlf=true worktree add --detach ... <head>; Node v22.23.2, npm ci --ignore-scripts --no-audit --no-fund succeeded.
  • git ls-files --eol reports settings JSON i/lf w/lf, but UI index JSON i/lf w/crlf; the latter has no text/eol attribute.
  • The exact checkout's node scripts/gen-ui-index.mjs --check passes the settings comparison, then fails with ui-index.generated.json is stale.
  • Generated a fresh UI index to scratch with --out, temporarily placed its LF bytes at the compared path, and --check exited 0.
  • Changed ONLY those fresh index bytes from LF to CRLF: --check exited 1 with the same stale-index error. This isolates the checkout defect from the separately stale committed digest.
  • A CRLF settings control reproduced the original settings error; restoring both files to LF passed again. All tracked files were restored after the experiment.

The remaining sibling is therefore a concrete incomplete-fix concern for the frozen goal of restoring Windows builds, not a request to audit unrelated generated files. Please also pin src/kiro_crew/docs/ui-index.generated.json to LF (an explicit sibling entry suffices). Keep the independent stale-digest regeneration in #18753.

Current CI is not green: Build Wheel's frontend log also names the stale UI index; E2E and two Linux desktop jobs are red, and readiness is pending. No full application build/test pass is claimed. Required upstream CI and code-owner review still apply.

@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Oct 11, 2026
@CrysisDeu

Copy link
Copy Markdown
Contributor Author

Superseded: #19148 landed the same src/kiro_crew/docs/settings-registry.generated.json text eol=lf pin in the root .gitattributes on main (line 60). Closing; branch kept.

@CrysisDeu CrysisDeu closed this Oct 12, 2026
@github-actions github-actions Bot removed the readiness: action required A blocking check or review needs attention label Oct 12, 2026
@bolichen97
bolichen97 deleted the fix/pin-settings-registry-json-lf branch November 6, 2026 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge conflict Branch has merge conflicts with its base — author must resolve before merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants