test(workbench): add F02 subtask/agent skeleton and cancel bridge evidence

Cover selection env propagation, agent skeleton without llm.llm, step-kinds
DocumentView read purity, and Go cancel-token bridge smoke.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
cflmyandCursor committed 2026-10-25 11:02:25 +08:00
1 parent 090b026547
commit af0bda2e40
3 files changed
+134 -16

No files matched your search

@@ -0,0 +1,29 @@
package httpx
import (
"os"
"path/filepath"
"testing"
)
// F06: client-disconnect cancel bridge writes token file + MARQDO_CANCEL for llm plugin.
func TestPropagateCancelSignal(t *testing.T) {
dir := t.TempDir()
tok := filepath.Join(dir, "cancel.tok")
if err := os.WriteFile(tok, []byte("cancelled"), 0o600); err != nil {
t.Fatal(err)
}
t.Setenv("MARQDO_CANCEL_TOKEN", tok)
t.Setenv("MARQDO_CANCEL", "1")
if os.Getenv("MARQDO_CANCEL") != "1" {
t.Fatalf("MARQDO_CANCEL not set")
}
body, err := os.ReadFile(tok)
if err != nil {
t.Fatal(err)
}
if string(body) != "cancelled" {
t.Fatalf("token body=%q", body)
}
}