{ "task_id": "GEN2-COGNITIVE-003", "task_revision": 3, "architecture_revision": "ARCH-GEN2-000", "base_repo_revision": "gen2-integration", "risk_tier": "E", "intent": "Restore bounded OpenAI-compatible Local MEDIUM invocation without changing canonical ownership or Core semantics.", "requirement_ids": ["REQ-GEN2-EVOLVE-004-LOCAL-MEDIUM-INVOCATION"], "allowed_change_scope": { "modules": ["cognitive-worker provider invocation", "existing local OpenAI-compatible adapter", "targeted evidence"], "paths": [ "cmd/cognitive-worker/main.go", "cmd/cognitive-worker/advisory.go", "cmd/cognitive-worker/gateway_registry.go", "cmd/cognitive-worker/*_test.go", "adapters/models/openai_compatible_local.go", "adapters/models/openai_compatible_local_test.go", "cmd/core-runtime/learning_test.go", "dev/ACTIVE_TASK.json", "dev/tasks/GEN2-COGNITIVE-003-restore-local-medium-invocation.json", "docs/evidence/**" ] }, "forbidden_change_scope": { "paths": [ "cmd/core-runtime/capability_chat.go", "cmd/core-runtime/capability_chat_test.go", "cmd/core-runtime/chat_orchestrator.go", "cmd/core-runtime/chat_orchestrator_test.go", "cmd/core-runtime/cognitive_interpretation.go", "cmd/core-runtime/cognitive_interpretation_test.go", "cmd/core-runtime/development_gate.go", "cmd/core-runtime/development_gate_test.go", "cmd/core-runtime/household_scenario_test.go", "cmd/core-runtime/human_response_gate_test.go", "cmd/core-runtime/information_request_test.go", "cmd/core-runtime/learning.go", "cmd/core-runtime/main.go", "cmd/core-runtime/main_test.go", "cmd/core-runtime/research_client.go", "cmd/core-runtime/research_client_test.go", "adapters/postgres/**", "modules/**", "contracts/**", "architecture/**", "database/**", "security/**", "deploy/**", "go.mod", "go.sum", "UI", "V1 retirement", "GEN2-EVOLVE-005", "Gen3/**" ] }, "allowed_architecture_delta": { "new_cross_module_dependencies": 0, "new_canonical_owners": 0, "new_privileges": 0, "new_third_party_dependencies": 0, "new_database_owner_roles": 0 }, "contracts": { "consume": ["existing cognitive advisory contract", "existing capability binding/profile metadata", "existing OpenAI-compatible local adapter"], "may_change": ["provider request normalization and typed immediate failure mapping only"] }, "semantic_owner": "Cognitive gateway remains the sole owner of provider invocation and route selection.", "canonical_state": ["discovery is not invocation qualification", "optional provider parameters are capability-gated", "immediate provider rejection is not reported as timeout"], "state_transitions": ["binding selection -> normalized request -> provider invocation -> typed result"], "side_effects_and_privileges": ["no secrets or authorization headers in evidence", "no direct database access", "no provider calls outside the existing gateway boundary"], "persistence_and_migrations": ["no schema change"], "failure_retry_restart": ["bounded invocation; no timeout inflation; no infinite retry; preserve fail-closed/fallback semantics"], "assumptions": ["Local MEDIUM gateway remains the existing provider endpoint", "candidate slot B is available for isolated verification", "cmd/core-runtime/learning_test.go is a preserved carry-forward regression from the preceding runtime task"], "acceptance_scenarios": ["minimal invocation completes", "ordinary and bounded-context invocation complete", "immediate provider 4xx maps to typed rejection without timeout", "qualification requires bounded invocation evidence"], "required_tests": ["targeted go test", "targeted go vet", "preflight", "check-diff", "independent", "architecture checks", "git diff --check"], "terminal_gap_states": ["BLOCKED_BY_ARCHITECTURE_GAP", "BLOCKED_BY_SPEC_GAP", "BLOCKED_BY_MISSING_CAPABILITY", "REQUIRES_MIGRATION_DECISION", "BLOCKED_BY_DEPLOYMENT_CONTROL"] }