♻️ refactor(vscode): 对齐 state schema 与 knownStateFields 漂移
This commit is contained in:
@@ -70,14 +70,18 @@ func TestValidateAcceptsFullState(t *testing.T) {
|
||||
"sessionId":"abc",
|
||||
"implementSessionId":"impl-1",
|
||||
"reviewSessionId":"rev-1",
|
||||
"testSessionId":"test-1",
|
||||
"profilePath":"/home/x/.claude/settings.json",
|
||||
"brainstormProfilePath":"/home/x/.claude/profiles/brainstorm.json",
|
||||
"testProfilePath":"/home/x/.claude/profiles/test.json",
|
||||
"specFile":"docs/superpowers/specs/foo.md",
|
||||
"planFile":"docs/superpowers/plans/foo.md",
|
||||
"prDiffFile":"docs/pr-diff/pr-42-issue-7.md",
|
||||
"pr":"42",
|
||||
"prMerged":true,
|
||||
"prMergedAt":"2026-07-16T01:00:00Z",
|
||||
"branch":"feature/abc",
|
||||
"worktreePath":".worktrees/foo",
|
||||
"worktreePath":"/home/x/Sources/worktree/proj/slug",
|
||||
"implementStatus":"done",
|
||||
"color":"terminal.ansiBlue",
|
||||
"autoReview":true
|
||||
@@ -86,3 +90,9 @@ func TestValidateAcceptsFullState(t *testing.T) {
|
||||
t.Fatalf("完整合法 state 应当通过校验,得到: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestValidateAcceptsBrainstormProfilePathOnly(t *testing.T) {
|
||||
if err := Validate([]byte(`{"brainstormProfilePath":"/home/x/.claude/profiles/brainstorm.json"}`)); err != nil {
|
||||
t.Fatalf("仅含 brainstormProfilePath 应当通过校验,得到: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user