fix: add dispatch_context to schema docs and test buildDispatchMetadata
- Add dispatch_context column to requirements.md task schema section - Export buildDispatchMetadata for test coverage - Add tests: context forwarding, task_uuid overwrite protection, empty context Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -196,6 +196,11 @@ func (d *Dispatcher) buildHistory(threadID string) ([]historyEntry, error) {
|
||||
return history, nil
|
||||
}
|
||||
|
||||
// ExportBuildDispatchMetadata exports buildDispatchMetadata for testing.
|
||||
func ExportBuildDispatchMetadata(task *database.Task) map[string]string {
|
||||
return buildDispatchMetadata(task)
|
||||
}
|
||||
|
||||
// buildDispatchMetadata constructs the metadata map for OpenClaw dispatch,
|
||||
// merging the task UUID with any DispatchContext from the rules pipeline.
|
||||
func buildDispatchMetadata(task *database.Task) map[string]string {
|
||||
|
||||
Reference in New Issue
Block a user