From 953e1ca54de7d963b10c88dbf969a7ad7c62520d Mon Sep 17 00:00:00 2001
From: DongHyeonka
Date: Fri, 20 Nov 2026 05:01:19 +0900
Subject: [PATCH 1/3] =?UTF-8?q?fix(a11y):=20=EA=B8=B4=20=EB=A6=B4=EB=A6=AC?=
=?UTF-8?q?=EC=8A=A4=20ID=EC=99=80=20=EC=A7=80=EC=9B=90=20=EC=B0=B8?=
=?UTF-8?q?=EC=A1=B0=EA=B0=80=20320px=20=ED=99=94=EB=A9=B4=EC=97=90?=
=?UTF-8?q?=EC=84=9C=20=EC=A4=84=EC=9D=84=20=EB=82=98=EB=88=88=EB=8B=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
문제: 배포가 정하는 RELEASE_ID·build id, 서버의 상관 ID
(x-correlation-id, 128자까지 받는다), item id(생성 계약 120자)는
끊을 곳 없는 긴 낱말일 수 있다. 320px 화면이 이렇게 넓어졌다.
- 홈 `.ui-runtime-summary`는 grid 항목이라 낱말 폭이 min-content가
되어 594~641px(세 엔진).
- 실패 화면과 결과 불명 상태의 지원 참조 문단 1164~1229px.
- 기본 규칙 `:lang(ko) { overflow-wrap: break-word }`는 줄은 나누지만
min-content를 줄이지 않고, 한국어가 아닌 문서에는 걸리지 않는다.
그래서 부팅 오류 화면은 `lang="en"` 문서에서 558~570px, 생성 기능
상세 화면은 en-US에서 1088~1111px.
WCAG 1.4.10(Reflow) 위반이다.
고친 것:
- 지원 참조를 새 컴포넌트 `SupportReference`
(`src/presentation/components/support-reference.tsx`) 하나가 그린다.
async-surface 셋, StatusPage, chunk 복구 화면이 손으로 그리던
문단을 이것으로 바꾼다. 문단은 `ui-support-reference`
(`overflow-wrap: anywhere`)다. StatusPage의 흐린 글자색은
`.status-page > .ui-support-reference`로 옮긴다.
- 부팅 오류 화면은 locale provider 없이 그려 자기 문단을 두고 같은
class를 준다. 그 화면의 값(`.boot-error-shell dd`)과 상세 화면
메타데이터의 값(`.detail-page__metadata dd`), 홈
`.ui-runtime-summary`에도 `anywhere`를 준다.
- `anywhere`는 min-content도 줄여, 조상 grid·flex가 ID 폭으로 늘지
않는다. 값을 자르지 않는다(`overflow: hidden`이 아니다).
- e2e가 긴 값을 직접 정한다.
- 홈: runtime config와 release manifest 응답을 가로채 RELEASE_ID를
72자로 바꾼다. 요약 문구로 찾고 부팅 오류가 없음을 함께 본다.
- 부팅 오류: config의 BUILD_ID를 어긋나게 해 CONFIG_BUILD_MISMATCH를
내고, ko·en 문서 둘에서 본다.
- 생성 기능: 429 저장 실패와 결과 불명 저장에 128자
x-correlation-id, en-US 상세 화면에 120자 item id.
- 판정 도우미 `tests/e2e/support/reflow.ts`는 문서의 가로 넘침과,
값이 자기 상자 안에 다 그려지는지를 함께 본다. 잘라서 가리는
고침은 통과하지 못한다.
버린 안:
- 기본 규칙을 `anywhere`로 바꾸기. base.css 08-06이 막은 이유대로,
눌린 flex 항목(header 버튼)의 낱말을 다시 쪼갠다.
- e2e 빌드의 env를 긴 값으로 고정하거나 긴 id의 fixture 빌드를 하나
더 만들기. 빌드가 한 번(약 1분) 늘고, CI의 빌드 식별값을 덮는다.
응답을 가로채면 같은 화면을 빌드 없이 그린다.
위험·한계:
- chunk 복구 화면, StatusPage, 부팅 오류 화면의 지원 참조는 build id가
빌드에 박혀 시험이 긴 값을 정할 수 없다. 앞의 둘은
`SupportReference`를 쓰므로 생성 기능 시험이 그 컴포넌트를 본다.
부팅 오류 화면의 지원 참조 문단은 같은 class만 공유한다.
- 부팅 오류 화면은 한국어 문서에서는 고치기 전에도 통과했다. RED는
영어 문서 경우다.
- 짧은 값의 줄바꿈은 그대로다.
검증(desktop, chromium·firefox·webkit):
- RED(고치기 전 트리 + 새 시험): 15개 실패(다섯 경우 × 세 엔진,
위 px), 부팅 오류 ko 세 개 통과.
- GREEN: `tests/e2e/responsive.spec.ts`와
`tests/e2e/generated-feature.spec.ts` 전체 87 passed.
---
.../boundaries/boot-error-shell.tsx | 4 +-
.../boundaries/chunk-recovery-boundary.tsx | 9 +-
src/presentation/components/async-surface.tsx | 21 +---
.../components/support-reference.tsx | 17 +++
src/presentation/styles/theme/pages.css | 8 ++
src/presentation/styles/theme/primitives.css | 9 ++
src/presentation/styles/theme/templates.css | 10 +-
src/presentation/templates/page-templates.tsx | 8 +-
tests/e2e/generated-feature.spec.ts | 68 +++++++++++
tests/e2e/responsive.spec.ts | 108 ++++++++++++++++++
tests/e2e/support/reflow.ts | 24 ++++
11 files changed, 253 insertions(+), 33 deletions(-)
create mode 100644 src/presentation/components/support-reference.tsx
create mode 100644 tests/e2e/support/reflow.ts
diff --git a/src/presentation/boundaries/boot-error-shell.tsx b/src/presentation/boundaries/boot-error-shell.tsx
index 97e90da5..84c4fff7 100644
--- a/src/presentation/boundaries/boot-error-shell.tsx
+++ b/src/presentation/boundaries/boot-error-shell.tsx
@@ -37,7 +37,7 @@ export function BootErrorShell({
}: BootErrorShellProps) {
const retry = onRetry !== undefined && RETRYABLE_CODES.has(code);
return (
-
+
{MESSAGES["boot.failure.title"]}
{MESSAGES["boot.field.error"]}
@@ -77,7 +77,7 @@ export function BootErrorShell({
>
)}
-
+
{MESSAGES["boot.supportReference"].replace(
"{reference}",
() => supportReference,
diff --git a/src/presentation/boundaries/chunk-recovery-boundary.tsx b/src/presentation/boundaries/chunk-recovery-boundary.tsx
index 8af8d5a9..43b42fc3 100644
--- a/src/presentation/boundaries/chunk-recovery-boundary.tsx
+++ b/src/presentation/boundaries/chunk-recovery-boundary.tsx
@@ -3,6 +3,7 @@ import {
type ErrorInfo,
type ReactNode,
} from "react";
+import { SupportReference } from "../components/support-reference.tsx";
import { Button, LoadingSurface } from "../design-system/index.ts";
import { useLocale } from "../i18n/index.ts";
import { newIncidentId } from "../../platform/errors/incident-id.ts";
@@ -138,13 +139,7 @@ function ChunkRecoverySurface({
- {supportReference ? (
-
+
) : null}
) : null}
diff --git a/src/presentation/components/support-reference.tsx b/src/presentation/components/support-reference.tsx
new file mode 100644
index 00000000..eaadd698
--- /dev/null
+++ b/src/presentation/components/support-reference.tsx
@@ -0,0 +1,17 @@
+import { useLocale } from "../i18n/index.ts";
+
+/**
+ * The support reference a failure shows: the build, the incident or the
+ * server's request id a user reads out to support. Every surface draws it
+ * here, so each breaks a long id the same way (`.ui-support-reference`). The
+ * boot error shell draws its own paragraph with that class: it renders
+ * without the locale provider.
+ */
+export function SupportReference({ reference }: Readonly<{ reference: string }>) {
+ const { message } = useLocale();
+ return (
+
+ );
+}
diff --git a/src/presentation/styles/theme/pages.css b/src/presentation/styles/theme/pages.css
index 0bdae05c..3cb5f475 100644
--- a/src/presentation/styles/theme/pages.css
+++ b/src/presentation/styles/theme/pages.css
@@ -6,6 +6,14 @@
gap: var(--space-6);
}
+ /* The deployment names the build and the release: a commit digest or a
+ long branch ref has no place to break. This paragraph is a grid item, so
+ the id set its min-content width and widened the page past 320 px.
+ `anywhere` breaks the id and shrinks that width. */
+ .ui-runtime-summary {
+ overflow-wrap: anywhere;
+ }
+
.readiness-grid {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
diff --git a/src/presentation/styles/theme/primitives.css b/src/presentation/styles/theme/primitives.css
index 8713f9e6..3a2689d6 100644
--- a/src/presentation/styles/theme/primitives.css
+++ b/src/presentation/styles/theme/primitives.css
@@ -5,6 +5,15 @@
box-sizing: border-box;
}
+ /* A support reference names a build, an incident or the server's request
+ id (up to 128 characters, src/adapters/http/backend-envelope.ts), often
+ with no place to break. `anywhere`, not the base `break-word`: it also
+ shrinks min-content, so a grid or flex ancestor does not size itself to
+ the whole id and push the page past 320 px. */
+ .ui-support-reference {
+ overflow-wrap: anywhere;
+ }
+
.ui-panel {
@apply rounded-surface p-6;
box-shadow: var(--elevation-panel);
diff --git a/src/presentation/styles/theme/templates.css b/src/presentation/styles/theme/templates.css
index d2d0f33a..7a59315d 100644
--- a/src/presentation/styles/theme/templates.css
+++ b/src/presentation/styles/theme/templates.css
@@ -163,7 +163,15 @@
justify-content: flex-start;
}
- .status-page__support {
+ .status-page > .ui-support-reference {
color: var(--color-content-muted);
}
+
+ /* The boot error shell's values and a detail page's metadata: a build or
+ release id, an item id, a list of keys. The base rule breaks a long word
+ only on a Korean page (`:lang(ko)`), and an en-US page has none. */
+ .boot-error-shell dd,
+ .detail-page__metadata dd {
+ overflow-wrap: anywhere;
+ }
}
diff --git a/src/presentation/templates/page-templates.tsx b/src/presentation/templates/page-templates.tsx
index 0488385d..515d5638 100644
--- a/src/presentation/templates/page-templates.tsx
+++ b/src/presentation/templates/page-templates.tsx
@@ -1,6 +1,7 @@
import type { ReactNode } from "react";
import { PageHeader } from "../components/page-header.tsx";
+import { SupportReference } from "../components/support-reference.tsx";
import { Button } from "../components/ui/button.ts";
import {
LinkButton,
@@ -241,7 +242,6 @@ export function StatusPage(
children?: ReactNode;
}>,
) {
- const { message } = useLocale();
return (
- {message("template.supportReference", {
- reference: props.supportReference,
- })}
-
+
) : null}
);
diff --git a/tests/e2e/generated-feature.spec.ts b/tests/e2e/generated-feature.spec.ts
index fd864fe3..39914bf9 100644
--- a/tests/e2e/generated-feature.spec.ts
+++ b/tests/e2e/generated-feature.spec.ts
@@ -16,6 +16,7 @@ import {
routePath,
type GeneratedFeature,
} from "../../scripts/lib/generated-feature.ts";
+import { expectReflowed } from "./support/reflow.ts";
import { startBuildServer } from "./support/service-worker-builds.ts";
/**
@@ -31,6 +32,13 @@ import { startBuildServer } from "./support/service-worker-builds.ts";
const META = Object.freeze({ requestId: "req-e2e", traceId: "0af7651916cd43dd8448eb211c80319c" });
const ITEM = Object.freeze({ id: "browser-order", name: "Browser order" });
const WCAG_TAGS = [...WCAG_AXE_TAGS];
+/**
+ * Server values with no place to break, as long as the client takes them: a
+ * correlation id up to 128 characters (src/adapters/http/http-execution-v3.ts),
+ * an item id up to 120 (the generated contract's id).
+ */
+const LONG_REQUEST_ID = "0123456789abcdef".repeat(8);
+const LONG_ITEM_ID = `${"0123456789abcdef".repeat(7)}01234567`;
let builds: FixtureBuilds<"a"> | undefined;
let server: Awaited> | undefined;
@@ -188,6 +196,18 @@ test.describe("the route", () => {
await expect(main.getByRole("button", { name: english[generatedMessageKey("form.save")]! })).toBeVisible();
await expect(main).not.toContainText(/[가-힣]/u);
});
+
+ // The detail page's metadata shows the server's item id. An en-US page has
+ // no `:lang(ko)` rule to break a long word.
+ test("wraps a long item id on its en-US detail page at 320px", async ({ page }) => {
+ await answerReads(page);
+ await signInAt(page, routePath(feature.detail, LONG_ITEM_ID), ITEM.name);
+ await page.getByRole("combobox", { name: "언어" }).first().selectOption("en-US");
+ await expect(page.locator("html")).toHaveAttribute("lang", "en-US");
+ await page.setViewportSize({ width: 320, height: 720 });
+
+ await expectReflowed(page, page.getByRole("main").getByText(LONG_ITEM_ID, { exact: true }));
+ });
});
test.describe("the form", () => {
@@ -295,6 +315,30 @@ test.describe("the save", () => {
await saveFromKeyboard(page, KO_MESSAGES["action.retry"]);
});
+
+ // A terminal failure's own support reference (the failure surface).
+ test("wraps a long request id within a 320px viewport", async ({ page }) => {
+ await page.setViewportSize({ width: 320, height: 720 });
+ await openForm(page);
+ await answerCreates(page, [
+ (route) =>
+ route.fulfill({
+ status: 429,
+ headers: {
+ "retry-after": "1",
+ "x-correlation-id": LONG_REQUEST_ID,
+ "access-control-expose-headers": "x-correlation-id",
+ },
+ json: failure("RATE_LIMIT_EXCEEDED", "RATE_LIMIT", true),
+ }),
+ ]);
+
+ await nameField(page).fill(ITEM.name);
+ await saveButton(page).click();
+
+ await expect(page.getByText(KO_MESSAGES["error.rate_limited"])).toBeVisible();
+ await expectReflowed(page, page.getByText(`지원 참조: ${LONG_REQUEST_ID}`));
+ });
});
test.describe("after a save whose result is unknown", () => {
@@ -324,6 +368,30 @@ test.describe("the save", () => {
await expect(page.getByText(/^지원 참조: /u)).toBeVisible();
});
+ // The unknown result's support reference, in the status row above the
+ // form.
+ test("wraps a long request id within a 320px viewport", async ({ page }) => {
+ await page.setViewportSize({ width: 320, height: 720 });
+ await openForm(page);
+ await answerCreates(page, [
+ (route) =>
+ route.fulfill({
+ status: 500,
+ headers: {
+ "x-correlation-id": LONG_REQUEST_ID,
+ "access-control-expose-headers": "x-correlation-id",
+ },
+ json: failure("INTERNAL_ERROR", "INTERNAL", false),
+ }),
+ ]);
+
+ await nameField(page).fill(ITEM.name);
+ await saveButton(page).click();
+
+ await expect(page.getByText(KO_MESSAGES["async.mutationEffectUnknown"])).toBeVisible();
+ await expectReflowed(page, page.getByText(`지원 참조: ${LONG_REQUEST_ID}`));
+ });
+
test("keeps keyboard focus in the unknown-result status", async ({ page }) => {
await openForm(page);
await answerCreates(page, [lost]);
diff --git a/tests/e2e/responsive.spec.ts b/tests/e2e/responsive.spec.ts
index 215322f4..4f72ea61 100644
--- a/tests/e2e/responsive.spec.ts
+++ b/tests/e2e/responsive.spec.ts
@@ -1,4 +1,48 @@
+import type { Page } from "@playwright/test";
+
import { expect, test } from "../support/browser/strict-browser-test.ts";
+import { expectReflowed } from "./support/reflow.ts";
+
+/**
+ * A release id is the deployment's value: a commit digest or a long branch
+ * ref, with no place to break. The build this spec serves takes its id from
+ * whatever environment built it (a CI run names its branch), so these tests
+ * answer the runtime config and the release manifest with a long one
+ * themselves.
+ */
+const LONG_RELEASE_ID = `release-${"0123456789abcdef".repeat(4)}`;
+
+/**
+ * Answers the build's own runtime config and release manifest with `config`
+ * and `manifest` merged in. `/release-manifest.json` is the config's
+ * `RELEASE_MANIFEST_URL` (`public/config.json`); a manifest this misses keeps
+ * the build's release id, and the boot fails on the mismatch.
+ */
+async function answerReleaseDocuments(
+ page: Page,
+ changes: Readonly<{
+ config: Readonly>;
+ manifest?: Readonly>;
+ }>,
+): Promise {
+ const answer = (pathname: string, fields: Readonly>) =>
+ page.route(
+ (url) => url.pathname === pathname,
+ async (route) => {
+ const response = await route.fetch();
+ const headers = { ...response.headers() };
+ delete headers["content-length"];
+ delete headers["content-encoding"];
+ await route.fulfill({
+ status: response.status(),
+ headers,
+ body: JSON.stringify({ ...((await response.json()) as object), ...fields }),
+ });
+ },
+ );
+ await answer("/config.json", changes.config);
+ if (changes.manifest) await answer("/release-manifest.json", changes.manifest);
+}
// The gallery's own 320px reflow is a workshop check
// (tests/storybook/galleries.spec.ts); this one is the shell around a page.
@@ -21,6 +65,70 @@ test("reflows the shell at the 320px minimum without horizontal overflow", async
expect(viewport.scrollWidth).toBeLessThanOrEqual(viewport.clientWidth);
});
+// The home page's runtime summary is a grid item: a long release id set its
+// min-content width and widened the page past 320px (to 371px in Firefox and
+// WebKit with a long branch ref).
+test("wraps a long release id on the home page at the 320px minimum", async ({
+ page,
+}) => {
+ await answerReleaseDocuments(page, {
+ config: { RELEASE_ID: LONG_RELEASE_ID },
+ manifest: { releaseId: LONG_RELEASE_ID },
+ });
+ await page.setViewportSize({ width: 320, height: 720 });
+ await page.goto("/");
+
+ // The summary's own words, not the boot error shell's `
`: a manifest
+ // this misses fails the boot, and the shell shows the same id.
+ await expectReflowed(page, page.getByText(`릴리스 ${LONG_RELEASE_ID}`));
+ await expect(page.getByRole("alert")).toHaveCount(0);
+});
+
+/** Serves the page's HTML with `lang` on its root element instead of `ko`. */
+async function answerDocumentLanguage(page: Page, lang: string): Promise {
+ await page.route(
+ (url) => url.pathname === "/",
+ async (route) => {
+ const response = await route.fetch();
+ const html = await response.text();
+ if (html.split('').length !== 2) {
+ throw new Error('Expected one in the served page.');
+ }
+ const headers = { ...response.headers() };
+ delete headers["content-length"];
+ delete headers["content-encoding"];
+ await route.fulfill({
+ status: response.status(),
+ headers,
+ body: html.replace('', ``),
+ });
+ },
+ );
+}
+
+// A config that names another build fails the boot closed after one reload
+// (CONFIG_BUILD_MISMATCH), and the boot error shell shows the config's
+// release id. The shell is plain block layout, which the base `:lang(ko)`
+// rule already wraps; a product whose page is not Korean (`lang="en"`) has
+// no such rule, so the shell must break the id itself.
+for (const lang of ["ko", "en"]) {
+ test(`wraps a long release id in the boot error shell of a lang=${lang} page at the 320px minimum`, async ({
+ page,
+ }) => {
+ if (lang !== "ko") await answerDocumentLanguage(page, lang);
+ await answerReleaseDocuments(page, {
+ config: { BUILD_ID: "another-build", RELEASE_ID: LONG_RELEASE_ID },
+ });
+ await page.setViewportSize({ width: 320, height: 720 });
+ await page.goto("/");
+
+ await expect(page.locator("html")).toHaveAttribute("lang", lang);
+ const shell = page.getByRole("alert");
+ await expect(shell).toContainText("CONFIG_BUILD_MISMATCH");
+ await expectReflowed(page, shell.getByText(LONG_RELEASE_ID));
+ });
+}
+
// 08-01. Below 48rem the header hides the theme selector, the session status
// and the brand. WCAG 1.4.10 allows moving them, not dropping them: the menu
// drawer carries them. 640px is a 1280px window at 200% zoom.
diff --git a/tests/e2e/support/reflow.ts b/tests/e2e/support/reflow.ts
new file mode 100644
index 00000000..76880c09
--- /dev/null
+++ b/tests/e2e/support/reflow.ts
@@ -0,0 +1,24 @@
+import type { Locator, Page } from "@playwright/test";
+
+import { expect } from "../../support/browser/strict-browser-test.ts";
+
+/**
+ * WCAG 1.4.10 at the viewport the test set: the page scrolls only vertically,
+ * and `text` is drawn whole inside its own box. The second check fails a fix
+ * that clips the value (`overflow: hidden`) instead of breaking it. `text` is
+ * a block (a `p`, a `dd`): an inline element has no client box to compare.
+ */
+export async function expectReflowed(page: Page, text: Locator): Promise {
+ await expect(text).toBeVisible();
+ const viewport = await page.evaluate(() => ({
+ clientWidth: document.documentElement.clientWidth,
+ scrollWidth: document.documentElement.scrollWidth,
+ }));
+ expect(viewport.scrollWidth).toBeLessThanOrEqual(viewport.clientWidth);
+ const box = await text.evaluate((element) => ({
+ clientWidth: element.clientWidth,
+ scrollWidth: element.scrollWidth,
+ }));
+ expect(box.clientWidth, "the value's element has a block box").toBeGreaterThan(0);
+ expect(box.scrollWidth).toBeLessThanOrEqual(box.clientWidth);
+}
--
2.54.0
From 4ab62f81e4a0a756b30e3fced26ba8b3e82af0b1 Mon Sep 17 00:00:00 2001
From: DongHyeonka
Date: Fri, 20 Nov 2026 05:01:19 +0900
Subject: [PATCH 2/3] =?UTF-8?q?fix(scripts):=20verify.sh=EA=B0=80=20RELEAS?=
=?UTF-8?q?E=5FID=EC=97=90=20checkout=20=EB=B8=8C=EB=9E=9C=EC=B9=98=20?=
=?UTF-8?q?=EC=9D=B4=EB=A6=84=EC=9D=84=20=EB=84=A3=EC=A7=80=20=EC=95=8A?=
=?UTF-8?q?=EB=8A=94=EB=8B=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
문제: `scripts/verify.sh`의 원격 실행은 checkout 브랜치 이름을
`VERIFY_REF`로 넘기고, `ci_env`가 그것으로
`RELEASE_ID=refs/heads/<브랜치>-1-1`을 만든다. 같은 트리가 detached
checkout에서는 `refs/heads/verify-1-1`을, 긴 브랜치에서는 긴 값을
받는다. 그래서 FE-GATE-008의 결과가 브랜치 이름 길이로 갈렸다(같은
트리에서 브랜치 checkout은 실패, detached는 통과).
고친 것: ref를 고정 값 `verify`로 둔다. 꼴은 CI와 같다
(`.gitea/workflows/quality-gates.yml`의
`${{ gitea.ref }}-${{ gitea.run_id }}-${{ gitea.run_attempt }}`).
쓰는 곳이 없어진 `VERIFY_REF`와 브랜치 이름 계산을 지운다.
버린 안:
- 브랜치 이름을 잘라 넣기. 값이 여전히 브랜치마다 달라진다.
- PR ref(`refs/pull/<번호>/head`)를 흉내 내기. 로컬에는 PR 번호가
없다.
시험: `scripts/tests/test_verify.py`의 ReleaseIdTest. 가짜 ssh와
가짜 corepack으로 긴 브랜치 checkout과 detached checkout에서 `gate`를
원격으로 돌리고, 둘 다 `refs/heads/verify-1-1`을 받는지 본다. 부르는
쪽의 `VERIFY_RUN`은 비워 바깥 env에 기대지 않는다. 원격 준비는
`remote_project`로 뽑아 RemoteTransportTest와 함께 쓴다.
위험·한계: 원격 실행의 env에 브랜치 이름이 더는 없다. 그 값을 쓰던
곳은 RELEASE_ID 하나였다.
검증(노트북, laptop 단계): 고치기 전 ReleaseIdTest 실패(긴 브랜치가
`refs/heads/fix-a-branch-name-…-on-1-1`), 고친 뒤
`python3 -m unittest discover -s scripts/tests` 79개 OK(`VERIFY_RUN=7`을
준 셸에서도 OK).
---
scripts/tests/test_verify.py | 75 +++++++++++++++++++++++++++---------
scripts/verify.sh | 8 ++--
2 files changed, 60 insertions(+), 23 deletions(-)
diff --git a/scripts/tests/test_verify.py b/scripts/tests/test_verify.py
index b0be140a..64a44ced 100644
--- a/scripts/tests/test_verify.py
+++ b/scripts/tests/test_verify.py
@@ -166,34 +166,71 @@ class CiEnvironmentTest(unittest.TestCase):
self.assertRegex(image, r"@sha256:[0-9a-f]{64}$")
+def remote_project(base: Path) -> tuple[Path, Path, Path, dict]:
+ """A project with an origin and a clone of it as the remote checkout, and the env that sends a run there."""
+ project, bare, remote, logs = (base / name for name in ("project", "origin.git", "remote", "logs"))
+ (project / "scripts").mkdir(parents=True)
+ (project / "config/ci").mkdir(parents=True)
+ shutil.copy(VERIFY, project / "scripts/verify.sh")
+ shutil.copy(REPO / "config/ci/gates.json", project / "config/ci/gates.json")
+ shutil.copy(REPO / ".nvmrc", project / ".nvmrc")
+ (project / "scripts/check-work-docs.py").write_text("print('docs checked')\n", encoding="utf-8")
+ sh(["git", "init", "-q", "-b", "main"], cwd=project)
+ sh(["git", "add", "-A"], cwd=project)
+ sh(["git", "commit", "-q", "-m", "init"], cwd=project)
+ sh(["git", "clone", "-q", "--bare", str(project), str(bare)], cwd=base)
+ sh(["git", "remote", "add", "origin", str(bare)], cwd=project)
+ sh(["git", "fetch", "-q", "origin"], cwd=project)
+ sh(["git", "clone", "-q", str(bare), str(remote)], cwd=base)
+ fake_ssh = base / "fake-ssh"
+ fake_ssh.write_text('#!/bin/sh\nshift\nexec bash -c "$*"\n', encoding="utf-8")
+ fake_ssh.chmod(0o755)
+ env = {"VERIFY_SSH": str(fake_ssh), "VERIFY_REMOTE_REPO": str(remote), "VERIFY_LOCK": str(base / "lock"),
+ "VERIFY_LOG_ROOT": str(logs), "VERIFY_NODE_BIN": "/nonexistent"}
+ return project, remote, logs, env
+
+
+class ReleaseIdTest(unittest.TestCase):
+ """The build a run makes is named as in CI, with a fixed ref: never after the branch the checkout is on.
+
+ The ref used to be the checkout's branch. A long branch name made a release id the home page could not wrap at
+ 320 px, so FE-GATE-008 passed detached and failed on the branch, on the same tree.
+ """
+
+ def test_a_long_branch_and_a_detached_checkout_build_the_same_release_id(self) -> None:
+ with tempfile.TemporaryDirectory() as folder:
+ base = Path(folder)
+ project, _, _, env = remote_project(base)
+ # Stands in for the remote's node bin: the gate's `corepack pnpm -s ci:gate` records what it was given.
+ tools, seen = base / "bin", base / "release-ids"
+ tools.mkdir()
+ (tools / "corepack").write_text('#!/bin/sh\nprintf "%s\\n" "$RELEASE_ID" >> "$SEEN_RELEASE_IDS"\n',
+ encoding="utf-8")
+ (tools / "corepack").chmod(0o755)
+ # VERIFY_RUN is cleared: a caller's own run number must not reach the expected value.
+ env = {**env, "VERIFY_NODE_BIN": str(tools), "VERIFY_INSTALL": "0", "SEEN_RELEASE_IDS": str(seen),
+ "VERIFY_RUN": ""}
+ gate = gates()["gates"][0]["id"]
+
+ sh(["git", "switch", "-q", "-c", "fix/" + "a-branch-name-that-keeps-going-" * 4 + "on"], cwd=project)
+ sh(["scripts/verify.sh", "gate", gate, "--on", "build-host"], cwd=project, env=env)
+ sh(["git", "switch", "-q", "--detach"], cwd=project)
+ sh(["scripts/verify.sh", "gate", gate, "--on", "build-host"], cwd=project, env=env)
+
+ # .gitea/workflows/quality-gates.yml: "${{ gitea.ref }}-${{ gitea.run_id }}-${{ gitea.run_attempt }}"
+ self.assertEqual(seen.read_text(encoding="utf-8").splitlines(), ["refs/heads/verify-1-1"] * 2)
+
+
class RemoteTransportTest(unittest.TestCase):
"""--on <호스트>: the patch lands in a fresh worktree, the tree matches, the run is logged, the worktree goes."""
def test_the_working_tree_is_run_remotely_on_the_same_tree_and_cleaned_up(self) -> None:
with tempfile.TemporaryDirectory() as folder:
base = Path(folder)
- project, bare, remote, logs = (base / name for name in ("project", "origin.git", "remote", "logs"))
- (project / "scripts").mkdir(parents=True)
- (project / "config/ci").mkdir(parents=True)
- shutil.copy(VERIFY, project / "scripts/verify.sh")
- shutil.copy(REPO / "config/ci/gates.json", project / "config/ci/gates.json")
- shutil.copy(REPO / ".nvmrc", project / ".nvmrc")
- (project / "scripts/check-work-docs.py").write_text("print('docs checked')\n", encoding="utf-8")
- sh(["git", "init", "-q", "-b", "main"], cwd=project)
- sh(["git", "add", "-A"], cwd=project)
- sh(["git", "commit", "-q", "-m", "init"], cwd=project)
- sh(["git", "clone", "-q", "--bare", str(project), str(bare)], cwd=base)
- sh(["git", "remote", "add", "origin", str(bare)], cwd=project)
- sh(["git", "fetch", "-q", "origin"], cwd=project)
- sh(["git", "clone", "-q", str(bare), str(remote)], cwd=base)
+ project, remote, logs, env = remote_project(base)
(project / "notes.md").write_text("커밋 안 한 새 파일\n", encoding="utf-8")
with (project / "scripts/check-work-docs.py").open("a", encoding="utf-8") as handle:
handle.write("print('changed here')\n")
- fake_ssh = base / "fake-ssh"
- fake_ssh.write_text('#!/bin/sh\nshift\nexec bash -c "$*"\n', encoding="utf-8")
- fake_ssh.chmod(0o755)
- env = {"VERIFY_SSH": str(fake_ssh), "VERIFY_REMOTE_REPO": str(remote), "VERIFY_LOCK": str(base / "lock"),
- "VERIFY_LOG_ROOT": str(logs), "VERIFY_NODE_BIN": "/nonexistent"}
temp_index = base / "index"
shutil.copy(project / ".git/index", temp_index)
sh(["git", "add", "-A"], cwd=project, env={"GIT_INDEX_FILE": str(temp_index)})
diff --git a/scripts/verify.sh b/scripts/verify.sh
index 3c57b403..324c05ec 100755
--- a/scripts/verify.sh
+++ b/scripts/verify.sh
@@ -97,11 +97,12 @@ for number, line in enumerate(open(sys.argv[1], encoding="utf-8"), 1):
run_hooks() { python3 -m unittest discover -s scripts/tests; }
# CI workflow의 전역 env(.gitea/workflows/quality-gates.yml)와 같은 꼴. CI=true가 있어야 빌드 식별값을 엄격하게 본다.
+# RELEASE_ID의 ref는 고정 값이다. checkout의 브랜치 이름을 넣으면 같은 트리의 결과가 브랜치 이름 길이에 따라 갈렸다.
ci_env() {
local sha
sha=$(git rev-parse HEAD)
export CI=true VITE_COMMIT_SHA="$sha" VITE_BUILD_ID="gitea-${VERIFY_RUN:-1}-1" \
- RELEASE_ID="refs/heads/${VERIFY_REF:-verify}-${VERIFY_RUN:-1}-1" \
+ RELEASE_ID="refs/heads/verify-${VERIFY_RUN:-1}-1" \
CI_RUNNER_IMAGE="local/runner@sha256:$(printf 'a%.0s' $(seq 64))" \
SOURCE_DATE_EPOCH="$(git log -1 --format=%ct)"
# ci:gate makes SOURCE_DATE_EPOCH from HEAD itself; parts and script call the commands directly.
@@ -255,14 +256,13 @@ run_here() {
run_remote() {
local host=$1 log=$2 ssh=${VERIFY_SSH:-ssh}
shift 2
- local name base tree tmp_index patch id remote_repo lock log_root node_bin args ref install=${VERIFY_INSTALL:-1} rc=0 back
+ local name base tree tmp_index patch id remote_repo lock log_root node_bin args install=${VERIFY_INSTALL:-1} rc=0 back
name=$(basename "$(dirname "$(git rev-parse --path-format=absolute --git-common-dir)")")
remote_repo=${VERIFY_REMOTE_REPO:-"workspace/$name"}
lock=${VERIFY_LOCK:-/tmp/claude-gates/heavy.lock}
log_root=${VERIFY_LOG_ROOT:-/tmp/claude-gates}
node_bin=${VERIFY_NODE_BIN:-"\$HOME/.nvm/versions/node/v$(tr -d '[:space:]' < .nvmrc)/bin"}
base=$(git merge-base HEAD "${VERIFY_BASE_REF:-origin/main}")
- ref=$(git branch --show-current | tr '/' '-')
laptop_stage "$1" && install=0
tmp_index=$(mktemp)
patch=$(mktemp)
@@ -314,7 +314,7 @@ if [ $install = 1 ]; then
|| CI=true corepack pnpm install --frozen-lockfile >> "\$logs/install.log" 2>&1 \
|| { echo "의존성 설치 실패: \$logs/install.log" >&2; exit 4; }
fi
-export VERIFY_SUMMARY="\$logs/summary.txt" VERIFY_STEP_LOGS="\$logs" VERIFY_REF="$ref" VERIFY_HOST_ENVIRONMENT="${VERIFY_HOST_ENVIRONMENT:-on}"
+export VERIFY_SUMMARY="\$logs/summary.txt" VERIFY_STEP_LOGS="\$logs" VERIFY_HOST_ENVIRONMENT="${VERIFY_HOST_ENVIRONMENT:-on}"
flock $lock ./scripts/verify.sh $args 2>&1 | tee "\$logs/run.log"
rc=\${PIPESTATUS[0]}
git status --porcelain > "\$logs/status-after.txt"
--
2.54.0
From 2d646b9bec361456f16a88f0e00bd601bbf63cb4 Mon Sep 17 00:00:00 2001
From: DongHyeonka
Date: Fri, 20 Nov 2026 05:01:19 +0900
Subject: [PATCH 3/3] =?UTF-8?q?docs(changelog):=20=EA=B8=B4=20ID=EC=9D=98?=
=?UTF-8?q?=20=EC=A4=84=20=EB=82=98=EB=88=94=EA=B3=BC=20verify.sh=EC=9D=98?=
=?UTF-8?q?=20=EA=B3=A0=EC=A0=95=20RELEASE=5FID=EB=A5=BC=20=EC=A0=81?=
=?UTF-8?q?=EB=8A=94=EB=8B=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
미출시 절의 「그 밖의 변경」에 두 행을 더한다. 절 소개의 「제품 코드는
바뀌지 않는다」는 이 절 범위에 제품 커밋이 이미 있어 맞지 않으므로
지우고, 이 화면 결함을 고친다는 문장을 둔다. 지원 참조를 직접 그리던
기능 화면은 디자인 시스템 배럴의 컴포넌트에 값을 넘기라고 적는다. 오류
화면은 TerminalErrorSurface·StatusPage에 넘기고, AsyncSurface의 값은
결과를 모르는 저장일 때만 그려진다고 적는다.
---
CHANGELOG.md | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e203972f..9a355b8b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -13,7 +13,7 @@
## 미출시 — `db6a6eb6` → CI를 runner에서 초록으로, merge 시간 줄이기
-Gitea runner에서 merge 단계를 초록으로 만들고, worker를 늘리지 않고 같은 시험을 두 번 도는 곳과 job마다 같은 것을 내려받는 곳을 없앤다. 제품 코드는 바뀌지 않는다.
+Gitea runner에서 merge 단계를 초록으로 만들고, worker를 늘리지 않고 같은 시험을 두 번 도는 곳과 job마다 같은 것을 내려받는 곳을 없앤다. 긴 릴리스 ID와 지원 참조가 320px 화면을 넘치던 결함도 고친다.
### 먼저 할 일
@@ -55,6 +55,8 @@ Gitea runner에서 merge 단계를 초록으로 만들고, worker를 늘리지
| FE-GATE-013의 시스템 컨테이너가 systemd 전에 root cgroup 제어기를 켠다. 부팅 중 `docker exec`가 root cgroup에 남으면 systemd가 user manager에 제어기를 넘기지 못해 provider 시험 18개가 exit 125로 떨어졌다(desktop 4회 중 1회). 사전 점검이 user manager의 cpu·memory·pids 제어기를 보고, provider 실패 메시지에 우리 단계가 쓴 고정 이유 줄을 남긴다 | `scripts/run-in-system-container.sh`, `scripts/check-system-test-prerequisites.ts`, `scripts/lib/provider-sandbox-diagnostics.ts`, `scripts/run-and-validate-provider.ts`, `scripts/lib/provider-scope-wrapper.ts` | `6d6fd61a`, `4e1a385f`, `13b40934` |
| `ci:gate`가 실패하면 job 로그의 끝 줄 앞에 실패한 명령의 첫 실패 블록을 「first failure in the log」로 싣는다. Playwright는 번호 붙은 실패 줄부터, vitest는 `Failed Suites`·`Failed Tests`·`Unhandled Errors` 줄부터 싣고, 길이 상한은 `FIRST_FAILURE_MAX_LINES`다. 끝 줄만 남던 때는 단언의 기대·받은 값이 밀려나 artifact를 받아야 원인이 보였다. 블록을 못 찾으면 지금처럼 끝 줄만 보인다 | `scripts/lib/ci-gate-failure.ts`, `tests/unit/ci-gate-failure.test.ts` | `829733cf` |
| 시험 증거 전체 검사(FE-GATE-008)가 checkout에 없는 Playwright 설정에서 ENOENT 스택으로 죽지 않고, 그 파일과 출처(`config/repository-layout.json`의 `playwright-configs` 항목, 또는 `--playwright-config`)를 대는 실패 줄을 보고서와 로그에 남긴다. 릴리스 증거 토큰을 읽는 `playwright.config.ts`가 없을 때도 같다. 게이트 판정은 그대로 실패다. capability를 지우며 설정 파일만 지우고 등록부 항목을 남기면 이 실패가 난다. 매뉴얼 03 E절이 루트 항목을 지울 때 등록부 항목과 secret-scan `trackedRoots`도 지우라고 적는다 | `scripts/check-test-evidence.ts`, `tests/unit/test-evidence-repository-configs.test.ts`, `docs/manual/03-outside-feature-folder.md` | `439d3271` |
+| 끊을 곳 없는 긴 RELEASE_ID·build id, 서버의 상관 ID(128자까지)와 item id가 320px 화면을 넘치지 않는다. 지원 참조는 새 `SupportReference` 하나가 그리고(`ui-support-reference`), 홈 런타임 요약·부팅 오류 화면의 값·상세 화면 메타데이터의 값은 `overflow-wrap: anywhere`를 쓴다. 홈은 grid 항목이라 고치기 전 세 엔진에서 594~641px로 넓어졌다. 기능 화면이 지원 참조를 직접 그렸으면 디자인 시스템 배럴의 컴포넌트에 넘긴다. 오류 화면은 `TerminalErrorSurface`·`StatusPage`의 `supportReference`로 넘긴다. `AsyncSurface`의 `supportReference`는 결과를 모르는 저장일 때만 그려지고(`useAppForm().supportReference`), 오류로 끝난 상태는 `failure.requestId`를 스스로 그린다. `SupportReference`는 배럴 밖이다 | `src/presentation/components/support-reference.tsx`, `src/presentation/components/async-surface.tsx`, `src/presentation/templates/page-templates.tsx`, `src/presentation/boundaries/`, `src/presentation/styles/theme/`, `tests/e2e/responsive.spec.ts`, `tests/e2e/generated-feature.spec.ts`, `tests/e2e/support/reflow.ts` | `953e1ca5` |
+| `scripts/verify.sh`가 RELEASE_ID에 checkout 브랜치 이름을 넣지 않고 CI와 같은 꼴의 고정 ref(`refs/heads/verify-1-1`)를 쓴다. 같은 트리의 FE-GATE-008 결과가 브랜치 이름 길이로 갈렸다 | `scripts/verify.sh`, `scripts/tests/test_verify.py` | `4ab62f81` |
## 미출시 — `8327e221` → 하네스와 작업 매뉴얼
--
2.54.0