* test(#4658): add failing-first coverage for native frontend evidence hasStaticFrontendEvidence recognised only JS-ecosystem evidence, so computeUiPlanGate could never block for a SwiftUI/Compose/Flutter/XAML project. Adds evidence-level fixtures for the four suggested markers (import-matched for .swift/.kt/.dart, extension-alone for .xaml), the reporter's non-UI Swift control case, marker-exactness and SKIP_DIRS and I/O-degrade negatives, gate-level block assertions through makeProject's new native frontendEvidence modes, and a pinned-seed fast-check property. All new assertions are RED until src/ui-frontend-evidence.cts grows the native branch. * fix(#4658): give the ui plan gate's evidence check a native branch hasStaticFrontendEvidence recognised only JS-ecosystem evidence (a root package.json UI-framework dep, or a .tsx/.jsx/.vue/.svelte file), so computeUiPlanGate could never block for a SwiftUI, Jetpack Compose, Flutter, or .NET MAUI project — the #3312 gate was structurally unreachable for them. Adds a native BFS over the same bounds and skip rules: .xaml is evidence by extension alone (the .tsx analogue), while .swift/.kt/.dart count only when their content carries the ecosystem's UI import marker (import SwiftUI / import UIKit, androidx.compose, package:flutter) — matched on the import, not the extension, so a non-UI Swift package stays silent exactly as the issue's 37-file control case requires. Marker reads are bounded to a 64 KiB prefix; any I/O failure degrades to false per the module contract. The #3718 vocabulary filter, the JS evidence rules, and the weaker-extension exclusion are untouched. * chore(#4658): regenerate the macos conformance tier list The native-evidence additions to tests/check-ui-plan-gate.test.cjs move the file into the macOS conformance tier per the classifier; the committed generated list is a derived artifact and must match the live tests/ tree (the same sync the fragment-single-edit-propagation install test enforces). * fix(#4658): accept both Dart quote styles and extract the shared bounded walk The isolated reviews' remaining findings: the Dart marker carried only the single-quote anchor, missing legal double-quoted imports (a spec-narrowing deviation); the two evidence walks duplicated the subtle MAX_WALK_ENTRIES cap semantics verbatim, so they are extracted into one walkProjectFiles BFS with a visit callback; tests now use the createTempDir helper, shared fixture literals that cannot drift from NATIVE_UI_CONTENT_MARKERS, a double-quoted Flutter import case, and drop a vacuous assertion and a mid-body re-require alias. * docs(#4658): backfill changeset PR number --------- Co-authored-by: sim <sim@local>
This commit is contained in:
@@ -569,8 +569,10 @@ function findUiSpecInDir(phaseDir: string): string {
|
||||
* matches the token `dashboard` exactly like the real compound `micro-frontend`
|
||||
* (the boundary rule of #3718 is intentional and untouched). The gate therefore
|
||||
* blocks only when the token match is corroborated by static frontend evidence
|
||||
* in the repo tree (hasStaticFrontendEvidence: package.json UI-framework dep or
|
||||
* a component-framework file). This mirrors the sibling post-wave gate
|
||||
* in the repo tree (hasStaticFrontendEvidence: package.json UI-framework dep, a
|
||||
* component-framework file, or native UI evidence — a `.xaml` file or a
|
||||
* `.swift`/`.kt`/`.dart` file carrying its ecosystem's UI import marker,
|
||||
* #4658). This mirrors the sibling post-wave gate
|
||||
* computeUiSafetyGate, which requires `hasUiFiles` (git diff) before blocking.
|
||||
* matchedToken/matchedLine surface what tripped the sniffer so an operator can
|
||||
* judge the flag in one second instead of reaching for --skip-ui.
|
||||
|
||||
Reference in New Issue
Block a user