From a232d88bcff651d57bfb8f5add255855774594f0 Mon Sep 17 00:00:00 2001 From: Mikhail Date: Sat, 22 Aug 2026 16:15:03 +0300 Subject: [PATCH 1/2] fix: serialize dispatch intent for graph runtime --- contracts/work/dispatch_queue.go | 12 ++++++------ contracts/work/lease.go | 20 ++++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/contracts/work/dispatch_queue.go b/contracts/work/dispatch_queue.go index 563c2d0..2034f4f 100644 --- a/contracts/work/dispatch_queue.go +++ b/contracts/work/dispatch_queue.go @@ -10,10 +10,10 @@ const ( ) type AgentDispatchQueueItem struct { - DispatchID string - State AgentDispatchQueueState - AvailableAtUnixMillis int64 - Attempts int - ClaimedBy string - UpdatedAtUnixMillis int64 + DispatchID string `json:"dispatch_id"` + State AgentDispatchQueueState `json:"state"` + AvailableAtUnixMillis int64 `json:"available_at_unix_millis"` + Attempts int `json:"attempts"` + ClaimedBy string `json:"claimed_by"` + UpdatedAtUnixMillis int64 `json:"updated_at_unix_millis"` } diff --git a/contracts/work/lease.go b/contracts/work/lease.go index e515e9c..9193cf2 100644 --- a/contracts/work/lease.go +++ b/contracts/work/lease.go @@ -50,14 +50,14 @@ type IndependentVerification struct { } type AgentDispatchIntent struct { - DispatchID string - IdempotencyKey string - DelegationID DelegationID - RunID AgentRunID - ImplementationID string - ImplementationRevision int64 - SourceRevision string - WorktreeID string - VerificationPlanRef string - CreatedAtUnixMillis int64 + DispatchID string `json:"dispatch_id"` + IdempotencyKey string `json:"idempotency_key"` + DelegationID DelegationID `json:"delegation_id"` + RunID AgentRunID `json:"run_id"` + ImplementationID string `json:"implementation_id"` + ImplementationRevision int64 `json:"implementation_revision"` + SourceRevision string `json:"source_revision"` + WorktreeID string `json:"worktree_id"` + VerificationPlanRef string `json:"verification_plan_ref"` + CreatedAtUnixMillis int64 `json:"created_at_unix_millis"` } -- 2.54.0 From 7896404b6d5bd9ffa70c584df1271e52db0ecfa9 Mon Sep 17 00:00:00 2001 From: Mikhail Date: Sat, 22 Aug 2026 16:16:04 +0300 Subject: [PATCH 2/2] chore: declare graph contract serialization scope --- dev/tasks/DEV-000146-work-graph-runtime.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/tasks/DEV-000146-work-graph-runtime.json b/dev/tasks/DEV-000146-work-graph-runtime.json index 875e606..7137601 100644 --- a/dev/tasks/DEV-000146-work-graph-runtime.json +++ b/dev/tasks/DEV-000146-work-graph-runtime.json @@ -6,7 +6,7 @@ "risk_tier": "E", "intent": "Provide a durable work-graph runtime with bounded fan-out scheduling, dispatch queue binding, and revisioned fan-in completion.", "requirement_ids": ["WP-400", "Multi-Agent Work Graph"], - "allowed_change_scope": {"modules": ["work", "work-graph-runtime"], "paths": ["contracts/work/graph.go", "modules/work/application/**", "modules/work/ports/**", "adapters/postgres/work_repository.go", "database/migrations/035_work_graph_dispatch_binding.sql", "cmd/work-graph-runtime/**", "deploy/docker-compose.prod.yml", "tests/agent_execution/**", "dev/ACTIVE_TASK.json", "dev/tasks/DEV-000146-work-graph-runtime.json"]}, + "allowed_change_scope": {"modules": ["work", "work-graph-runtime"], "paths": ["contracts/work/graph.go", "contracts/work/lease.go", "contracts/work/dispatch_queue.go", "modules/work/application/**", "modules/work/ports/**", "adapters/postgres/work_repository.go", "database/migrations/035_work_graph_dispatch_binding.sql", "cmd/work-graph-runtime/**", "deploy/docker-compose.prod.yml", "tests/agent_execution/**", "dev/ACTIVE_TASK.json", "dev/tasks/DEV-000146-work-graph-runtime.json"]}, "forbidden_change_scope": {"paths": ["architecture/**", "security/**", ".gitea/**", "contracts/authority/**", "modules/identity/**"]}, "allowed_architecture_delta": {"new_cross_module_dependencies": 0, "new_canonical_owners": 0, "new_privileges": 1, "new_third_party_dependencies": 0, "new_database_owner_roles": 1}, "contracts": {"consume": ["WorkGraph", "AgentDispatchIntent", "AgentDispatchQueueItem"], "may_change": ["GraphNode dispatch binding serialization"]}, -- 2.54.0