Merge remote-tracking branch 'origin/main' into fix/r9-living-docs-sync
frontend-quality-gates / FE-GATE-022 / runbook-chunk-mismatch (pull_request) Canceled after 0s
frontend-quality-gates / FE-GATE-023 / runbook-api-degradation (pull_request) Canceled after 0s
frontend-quality-gates / FE-GATE-024 / runbook-telemetry (pull_request) Canceled after 0s
frontend-quality-gates / FE-GATE-025 / runbook-release-rollback (pull_request) Canceled after 0s
frontend-quality-gates / FE-GATE-018 / field-web-vitals (pull_request) Canceled after 0s
frontend-quality-gates / merge / static checks (pull_request) Canceled after 0s
frontend-quality-gates / merge / tests (pull_request) Canceled after 0s
frontend-quality-gates / merge / browser tests (pull_request) Canceled after 0s
frontend-quality-gates / FE-GATE-014 / config-compatibility (pull_request) Canceled after 0s
frontend-quality-gates / FE-GATE-026 / lab-performance (pull_request) Canceled after 0s
frontend-quality-gates / FE-GATE-028 / manual-accessibility-review (pull_request) Canceled after 0s
frontend-quality-gates / FE-GATE-015 / immutable-release-candidate (pull_request) Canceled after 0s
frontend-quality-gates / external-vulnerability-provider (pull_request) Canceled after 0s
frontend-quality-gates / external-provenance-provider (pull_request) Canceled after 0s
frontend-quality-gates / promote-verified-immutable-candidate (pull_request) Canceled after 0s
frontend-quality-gates / deploy-promoted-release (pull_request) Canceled after 0s
frontend-quality-gates / FE-GATE-019 / hosting-header (pull_request) Canceled after 0s
frontend-quality-gates / FE-GATE-021 / runbook-boot-config (pull_request) Canceled after 0s
frontend-quality-gates / FE-GATE-017 / diagram-review (pull_request) Canceled after 0s
frontend-quality-gates / main / self-tests and removal drills (pull_request) Canceled after 0s

# Conflicts:
#	AGENTS.md
#	docs/work/reference/decisions.md
This commit is contained in:
DongHyeonka
2026-11-13 04:30:07 +09:00
67 changed files with 1437 additions and 701 deletions
+41 -2
View File
@@ -45,12 +45,51 @@ class StagePlanTest(unittest.TestCase):
def test_parts_runs_each_command_of_the_gate(self) -> None:
contract = gates()
gate = next(g for g in contract["gates"] if g["id"] == "FE-GATE-013")
gate = next(g for g in contract["gates"] if g["id"] == "FE-GATE-005")
scripts = {c["id"]: c["script"] for c in contract["commands"]}
result = sh([str(VERIFY), "parts", "FE-GATE-013", "--dry-run"], cwd=REPO)
result = sh([str(VERIFY), "parts", "FE-GATE-005", "--dry-run"], cwd=REPO)
self.assertEqual([line.split(": ", 1)[1] for line in result.stdout.splitlines()],
[f"corepack pnpm -s {scripts[c]}" for c in gate["commandIds"]])
def test_a_gate_with_a_host_environment_runs_in_it_as_in_the_workflow(self) -> None:
# FE-GATE-013 needs systemd and bubblewrap; the workflow and verify.sh both run it through
# scripts/run-in-system-container.sh (config/ci/gates.json hostEnvironment).
contract = gates()
hosted = [g for g in contract["gates"] if g.get("hostEnvironment") == "system-container"]
self.assertEqual([g["id"] for g in hosted], ["FE-GATE-013"])
scripts = {c["id"]: c["script"] for c in contract["commands"]}
wrapper = "scripts/run-in-system-container.sh"
result = sh([str(VERIFY), "gate", "FE-GATE-013", "FE-GATE-005", "--dry-run"], cwd=REPO)
self.assertEqual(result.stdout.splitlines(), [f"FE-GATE-013: {wrapper} corepack pnpm -s ci:gate FE-GATE-013",
"FE-GATE-005: corepack pnpm -s ci:gate FE-GATE-005"])
result = sh([str(VERIFY), "parts", "FE-GATE-013", "--dry-run"], cwd=REPO)
self.assertEqual([line.split(": ", 1)[1] for line in result.stdout.splitlines()],
[f"{wrapper} corepack pnpm -s {scripts[c]}" for c in hosted[0]["commandIds"]])
workflow = (REPO / ".gitea/workflows/quality-gates.yml").read_text(encoding="utf-8")
self.assertIn(f"run: {wrapper} corepack pnpm ci:gate -- FE-GATE-013", workflow)
# A host that cannot start the container runs the gate here (gates.md 3절).
result = sh([str(VERIFY), "gate", "FE-GATE-013", "--dry-run"], cwd=REPO, env={"VERIFY_HOST_ENVIRONMENT": "off"})
self.assertEqual(result.stdout.splitlines(), ["FE-GATE-013: corepack pnpm -s ci:gate FE-GATE-013"])
def test_parts_passes_each_command_its_arguments_as_ci_gate_does(self) -> None:
# run-ci-gate.ts runs `pnpm <script> ...args`. Without the args FE-GATE-009's
# `review:a11y-manual -- --format-only` checked the release evidence instead and failed.
contract = gates()
commands = {c["id"]: c for c in contract["commands"]}
with_args = [g for g in contract["gates"]
if any(commands[c].get("args") for c in g["commandIds"])]
self.assertTrue(with_args, "the contract has no command with arguments to check")
for gate in with_args:
with self.subTest(gate=gate["id"]):
result = sh([str(VERIFY), "parts", gate["id"], "--dry-run"], cwd=REPO)
expected = []
prefix = ["scripts/run-in-system-container.sh"] if gate.get("hostEnvironment") else []
for command_id in gate["commandIds"]:
command = commands[command_id]
words = [*prefix, "corepack", "pnpm", "-s", command["script"], *command.get("args", [])]
expected.append(" ".join(words))
self.assertEqual([line.split(": ", 1)[1] for line in result.stdout.splitlines()], expected)
def test_arguments_after_the_separator_go_to_the_one_script_or_command_as_given(self) -> None:
result = sh([str(VERIFY), "script", "test:sample-removal", "--dry-run", "--", "--feature=invoice-feature"],
cwd=REPO)