Fold NFKC input and stop catalog metadata leaks #4

Merged
weichen merged 1 commits from feature/agent-stack-r2 into main 2026-10-03 13:22:54 +00:00
Owner

Why: catalog output leaked private metadata and fullwidth input missed ASCII terms.
Evidence: GOWORK=off go test -count=1 -race ./... passed on 05e74d8.
Impact: SpecByID deep-copies, Catalog markdown omits handler and private metadata, overlapping slots are ambiguous.
Refs: I4 I7 I8 I10 I11 I12

Why: catalog output leaked private metadata and fullwidth input missed ASCII terms. Evidence: GOWORK=off go test -count=1 -race ./... passed on 05e74d8. Impact: SpecByID deep-copies, Catalog markdown omits handler and private metadata, overlapping slots are ambiguous. Refs: I4 I7 I8 I10 I11 I12
weichen added 1 commit 2026-10-03 13:12:20 +00:00
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
05e74d8e32
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>
weichen merged commit 3bf228f4c0 into main 2026-10-03 13:22:54 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: weichen/Agent-Intent#4