V13-FE-005: consolidate approved UI governance and contract hardening
Consolidates KBX UI Boundary Governance framework with component manifest, screen recipe registry, AI component gate, and exception lifecycle validation. Evidence (evidence/V13-FE-005/*.log, 55+ files): - Full frontend regression: 70 files / 180 tests PASS - UI boundary gate: 37 files / 0 failures / 6 raw-color warnings (DEBT tracked) - Component manifest validation: 0 failures - Screen recipe governance: 0 failures - AI component gate: 17 feature files / 23 known exports / 0 failures - Accessibility E2E: 22 passed - Production build: PASS (>500 kB chunk warning V13-FE-038 DECISION_REQUIRED) - TypeCheck: PASS - KBX validators: All 5 PASS (failures=0) Added: 19 files (6 validator scripts, 6 test specs, 4 slice notes, 3 registries) Modified: 9 files (CI workflow, WBS tracker, E2E specs, FE setup, Layout, TS configs) Outstanding per V13-FE-005 note: AI prop-level validation, exception lifecycle, browser/visual/AT/performance evidence. No completion overclaim. AGENTS.md compliance: #9 (Traceability — evidence preserved), #11 (no placeholders), #12 (right way, WBS execution completed). Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import { execFileSync } from 'node:child_process'
|
||||
import { mkdtempSync, mkdirSync, writeFileSync } from 'node:fs'
|
||||
import { tmpdir } from 'node:os'
|
||||
import { join } from 'node:path'
|
||||
import { describe, expect, it } from 'vitest'
|
||||
|
||||
const repositoryRoot = join(process.cwd(), '..')
|
||||
const validator = join(repositoryRoot, 'scripts', 'validate-ui-boundary.mjs')
|
||||
|
||||
function fixture(source: string) {
|
||||
const root = mkdtempSync(join(tmpdir(), 'kbx-ui-boundary-'))
|
||||
mkdirSync(join(root, 'src', 'features', 'fixture'), { recursive: true })
|
||||
writeFileSync(join(root, 'src', 'features', 'fixture', 'Example.vue'), source)
|
||||
return root
|
||||
}
|
||||
|
||||
describe('KBX UI boundary gate', () => {
|
||||
it('passes feature code that uses KBX contracts and reports raw colors as debt warnings', () => {
|
||||
const root = fixture('<template><button class="kbx-button">저장</button></template><style>.kbx-button{color:#fff}</style>')
|
||||
const output = execFileSync(process.execPath, [validator, '--root', root], { encoding: 'utf8' })
|
||||
expect(output).toContain('failures=0')
|
||||
expect(output).toContain('raw color requires token-debt classification')
|
||||
})
|
||||
|
||||
it('fails direct vendor imports and supplier CSS leakage in feature code', () => {
|
||||
const root = fixture('<script setup>import Button from "primevue/button"</script><style>:deep(.p-button){height:42px!important}</style>')
|
||||
expect(() => execFileSync(process.execPath, [validator, '--root', root], { encoding: 'utf8' })).toThrow()
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user