{ "task_id": "DEV-000133", "task_revision": 1, "architecture_revision": "ADR-0018", "base_repo_revision": "4a800df", "risk_tier": "E", "intent": "Persist immutable Work Graph revisions with typed nodes and dependency edges for durable scheduler integration.", "requirement_ids": ["WP-401", "Durable graph revision", "Graph node dependencies"], "allowed_change_scope": {"modules": ["work-agent-execution", "work-storage"], "paths": ["database/migrations/031_work_graph_persistence.sql", "adapters/postgres/work_repository.go", "tests/agent_execution/graph_persistence_sql_test.go", "dev/ACTIVE_TASK.json", "dev/tasks/DEV-000133-work-graph-persistence.json"]}, "forbidden_change_scope": {"paths": ["architecture/**", "security/**", "deploy/**", "cmd/**", "runtime/**", ".gitea/**"]}, "allowed_architecture_delta": {"new_cross_module_dependencies": 0, "new_canonical_owners": 0, "new_privileges": 0, "new_third_party_dependencies": 0, "new_database_owner_roles": 1}, "contracts": {"consume": ["DEV-000131/132 graph contracts and scheduler"], "may_change": ["Work graph persistence schema and repository methods"]}, "semantic_owner": "work-agent-execution", "canonical_state": ["work.graphs", "work.graph_nodes", "work.graph_edges"], "state_transitions": ["graph revision persisted once; nodes and edges immutable within revision"], "side_effects_and_privileges": ["Work schema only; no cross-owner SQL"], "persistence_and_migrations": ["Append-only migration 031; production apply is later canary"], "failure_retry_restart": ["Idempotent inserts; load reconstructs deterministic node/edge order"], "assumptions": ["Durable scheduler and result/conflict persistence follow"], "acceptance_scenarios": ["Graph revision cannot collide into mutation", "Nodes/edges remain tied to revision", "Load reconstructs graph"], "required_tests": ["go test ./...", "go vet ./...", "preflight", "check-diff", "check-architecture", "independent", "git diff --check"], "terminal_gap_states": ["BLOCKED_BY_MIGRATION_DECISION", "BLOCKED_BY_SPEC_GAP", "BLOCKED_BY_CONFLICT"] }