[AZ-511] classColors carve-out to src/class-colors/ (closes F3)

Move src/features/annotations/classColors.ts to its own component directory
src/class-colors/ with a proper barrel; update the 4 consumer imports to go
through the barrel; remove the F3-pending exemption from STC-ARCH-01 and from
the architecture test fixture; clean up the 5 coupled doc/script touchpoints.
Closes baseline finding F3 and retires the 5-coupled-places carry-over surface
logged in LESSONS.md 2026-05-12.

- Add `class-colors` to scripts/check-arch-imports.mjs COMPONENT_DIRS so deep
  imports past the new barrel are caught symmetric to every other component.
- Replace the architecture test "exemption WORKS" fixture with the stronger
  "deep import into class-colors NOW FAILS" assertion (Risk 4 mitigation).
- module-layout.md: Layout Rules + Per-Component Mapping (11_class-colors,
  06_annotations, 03_shared-ui) + Verification Needed #1 + shared/class-colors
  block all updated to reflect the new home.
- 11_class-colors/description.md: Caveats §7 + Module Inventory updated.
- architecture_compliance_baseline.md: F3 marked CLOSED with full pre-resolution
  context preserved (mirrors AZ-485/F4 + AZ-486/F7 pattern); F4 carry-forward
  exemption note retired.
- 04_verification_log.md: open questions #1 + #8 marked RESOLVED.
- Build passes with no circular-import warnings (AC-4); fast suite 231/13
  skipped green (AC-5); static profile green (AC-3 — zero exemptions remain).

Batch report: _docs/03_implementation/batch_14_cycle3_report.md

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Oleksandr Bezdieniezhnykh
2026-05-13 03:08:36 +03:00
parent 70fb452805
commit c368f60853
19 changed files with 228 additions and 69 deletions
+1 -4
View File
@@ -6,10 +6,7 @@ import { renderWithProviders, screen, fireEvent, waitFor, userEvent, act } from
import { seedBearer, clearBearer } from './helpers/auth'
import { seedClasses } from './fixtures/seed_classes'
import { DetectionClasses } from '../src/components'
// F3-pending exemption: classColors symbols live under 06_annotations until
// F3 moves the file. The 06_annotations barrel does not re-export them to
// avoid a circular import (see src/features/annotations/index.ts).
import { FALLBACK_CLASS_NAMES } from '../src/features/annotations/classColors'
import { FALLBACK_CLASS_NAMES } from '../src/class-colors'
import type { DetectionClass } from '../src/types'
// AZ-472 — DetectionClasses load + 1-9 hotkeys + click path + empty/5xx fallback.