refactor(instruction): remove governance instruction handling and update related tests

This commit is contained in:
mlogclub
2026-04-18 11:25:48 +08:00
parent 9756780aec
commit f166caa11c
11 changed files with 79 additions and 103 deletions
@@ -48,7 +48,6 @@ func (c *RuntimeTraceCollector) SetInstructionSummary(summary InstructionTraceSu
c.mu.Lock()
defer c.mu.Unlock()
c.Data.Instruction.SectionTitles = append([]string(nil), summary.SectionTitles...)
c.Data.Instruction.HasGovernanceRule = summary.HasGovernanceRule
c.Data.Instruction.HasAgentRule = summary.HasAgentRule
c.Data.Instruction.HasSkillRule = summary.HasSkillRule
c.Data.Instruction.HasToolRule = summary.HasToolRule
@@ -70,11 +70,10 @@ type RetrieverPolicyTraceItem struct {
}
type InstructionTraceSummary struct {
SectionTitles []string
HasGovernanceRule bool
HasAgentRule bool
HasSkillRule bool
HasToolRule bool
SectionTitles []string
HasAgentRule bool
HasSkillRule bool
HasToolRule bool
}
type RuntimeTraceData struct {
@@ -91,11 +90,10 @@ type RuntimeTraceData struct {
Name string `json:"name,omitempty"`
} `json:"model"`
Instruction struct {
SectionTitles []string `json:"sectionTitles,omitempty"`
HasGovernanceRule bool `json:"hasGovernanceRule,omitempty"`
HasAgentRule bool `json:"hasAgentRule,omitempty"`
HasSkillRule bool `json:"hasSkillRule,omitempty"`
HasToolRule bool `json:"hasToolRule,omitempty"`
SectionTitles []string `json:"sectionTitles,omitempty"`
HasAgentRule bool `json:"hasAgentRule,omitempty"`
HasSkillRule bool `json:"hasSkillRule,omitempty"`
HasToolRule bool `json:"hasToolRule,omitempty"`
} `json:"instruction"`
Input struct {
HistoryMessageCount int `json:"historyMessageCount,omitempty"`