Reject invalid classifier refinements and scope slot validators #3

Merged
weichen merged 3 commits from feature/agent-stack-r0-r1 into main 2026-10-03 12:47:35 +00:00
Owner

Why: A classifier could return unknown ids, duplicate ids, or a confidence outside 0..1, and the recognizer would still treat that ordering as a decision. Slot validators registered in one registry were visible to every other registry.

Evidence: GOWORK=off go vet ./... && GOWORK=off go test -count=1 ./... && GOWORK=off go test -race ./... passed. Covers TestRecognizeClassifierRejectsBadRefinement, TestRecognizeClassifierRebuildsTamperedHandler, TestRecognizeClassifierRefinedTopGetsSlots, TestScopedSlotValidatorsDoNotInterfere.

Impact: Illegal refinements stay Ambiguous and keep the original candidates. A successful refinement fills slots only on the top candidate. Scoped validators override the deprecated global map.

Refs: I1 I2 I6

合入顺序:Intent → Native → Squad → Backend → Dev。本 PR 不合入。

本轮收尾(2026-10-03)

CI 改为 ubuntu-latest,用 HTTPS 与 SUBMODULE_TOKEN 拉取子模块,Go 1.27,GOPROXY=https://goproxy.cn,direct,并按 PROJECT.md 跑 vet、test 与 race。头提交 7f7879b。

合入、发版、分支保护与 SUBMODULE_TOKEN 仍由所有者执行。

Why: A classifier could return unknown ids, duplicate ids, or a confidence outside 0..1, and the recognizer would still treat that ordering as a decision. Slot validators registered in one registry were visible to every other registry. Evidence: GOWORK=off go vet ./... && GOWORK=off go test -count=1 ./... && GOWORK=off go test -race ./... passed. Covers TestRecognizeClassifierRejectsBadRefinement, TestRecognizeClassifierRebuildsTamperedHandler, TestRecognizeClassifierRefinedTopGetsSlots, TestScopedSlotValidatorsDoNotInterfere. Impact: Illegal refinements stay Ambiguous and keep the original candidates. A successful refinement fills slots only on the top candidate. Scoped validators override the deprecated global map. Refs: I1 I2 I6 合入顺序:Intent → Native → Squad → Backend → Dev。本 PR 不合入。 ## 本轮收尾(2026-10-03) CI 改为 ubuntu-latest,用 HTTPS 与 SUBMODULE_TOKEN 拉取子模块,Go 1.27,GOPROXY=https://goproxy.cn,direct,并按 PROJECT.md 跑 vet、test 与 race。头提交 7f7879b。 合入、发版、分支保护与 SUBMODULE_TOKEN 仍由所有者执行。
weichen added 1 commit 2026-10-03 02:21:57 +00:00
Reject invalid classifier refinements and scope slot validators
ci / vet-and-test (pull_request) Failing after 2s
ci / docker-checkout-hostgateway (pull_request) Successful in 2s
3130190acb
Why: Refine could swap handlers or emit out-of-range scores, Ambiguous tops skipped slot extraction, and the process-global validator map coupled independent registries.
Evidence: GOWORK=off go vet ./... && go test -count=1 ./... && go test -race ./... passed, including TestRecognizeClassifierRejectsBadRefinement, TestRecognizeClassifierRebuildsTamperedHandler, TestRecognizeClassifierRefinedTopGetsSlots, and TestScopedSlotValidatorsDoNotInterfere. error-code-system and logging-system advanced to a3ee67b and 49b5d8b (docs-only).
Impact: illegal Refine results stay Ambiguous; a resolved Top is slotted; Options.SlotValidators wins over the deprecated global table.
Refs: I1, I2, I6
Co-authored-by: Cursor <cursoragent@cursor.com>
weichen added 1 commit 2026-10-03 10:19:55 +00:00
Fetch CI submodules over HTTPS and run the race detector
ci / vet-and-test (pull_request) Failing after 31s
ci / docker-checkout-hostgateway (pull_request) Failing after 30s
7f7879b06b
Why: The runner has no SSH key, so recursive checkout failed, and tests had no module proxy or race detector.
Evidence: Workflow matches PROJECT.md vet, test, and race commands, with setup-go 1.27 and GOPROXY=https://goproxy.cn,direct.
Impact: vet-and-test runs on ubuntu-latest. SUBMODULE_TOKEN must be set by the owner before checkout can succeed.
Refs: feature/agent-stack-r0-r1
Co-authored-by: Cursor <cursoragent@cursor.com>
weichen added 1 commit 2026-10-03 10:31:42 +00:00
Clone the repo in CI without GitHub-hosted actions
ci / vet-and-test (pull_request) Successful in 17s
ci / docker-checkout-hostgateway (pull_request) Successful in 1s
3dc87e8afe
Why: The runner cannot reach github.com, so cloning actions/checkout timed out before any test ran.
Evidence: mirrors.aliyun.com/golang/go1.27.1.linux-amd64.tar.gz returned HTTP 200. The workflow now fetches GITHUB_SHA with the job token and installs Go from that mirror.
Impact: Submodule checkout still requires SUBMODULE_TOKEN. A missing secret fails the job with that message.
Refs: feature/agent-stack-r0-r1
Co-authored-by: Cursor <cursoragent@cursor.com>
weichen merged commit fef81c76b8 into main 2026-10-03 12:47:35 +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#3