Fold NFKC input and stop catalog metadata leaks
ci / vet-and-test (pull_request) Successful in 18s
ci / docker-checkout-hostgateway (pull_request) Successful in 1s

Why: fullwidth text missed case-folded terms, SpecByID shared maps, the catalog prompt printed handlers and private metadata, overlapping slots kept both values, and negation was easy to mistake for semantics.
Evidence: GOWORK=off go vet ./... && go test -count=1 -race ./... passed, including TestR2NFKCFoldsFullwidthButNotTraditional, TestR2SpecByIDDeepCopiesMetadata, TestR2CatalogHidesPrivateMetadataAndHandlerInMarkdown, TestR2EvalRulesDocumentsMaxSpecs, TestR2OverlappingSlotsAreAmbiguous, and TestR2NegationIsOnlyExcludesAny.
Impact: NFKC is opt-in and does not convert traditional Chinese; catalog markdown omits handlers and non-allowlisted metadata; overlapping slot spans are invalid.
Refs: I4, I7, I8, I10, I11, I12
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-03 12:56:55 +00:00
co-authored by Cursor
parent fef81c76b8
commit 05e74d8e32
8 changed files with 339 additions and 28 deletions
+2
View File
@@ -7,6 +7,8 @@ require (
logging-system v0.0.0
)
require golang.org/x/text v0.29.0 // indirect
replace error-code-system => ./deps/error-code-system
replace logging-system => ./deps/logging-system