Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
46b35161e9 | ||
|
|
bee238b61e | ||
|
|
ca9c4bede5 | ||
|
|
48d73c3a4b | ||
|
|
76c558ee1a | ||
|
|
e530058659 | ||
|
|
79feab8e41 | ||
|
|
03943f152d | ||
|
|
c8aa731eeb | ||
|
|
45435814ee | ||
|
|
c7170ee751 |
@@ -96,11 +96,15 @@ func (a *OpenAICompatibleLocalAdapter) Discover(ctx context.Context) ([]Discover
|
||||
}
|
||||
|
||||
type compatibleChatRequest struct {
|
||||
Model string `json:"model"`
|
||||
Messages []compatibleMessage `json:"messages"`
|
||||
Temperature int `json:"temperature"`
|
||||
Stream bool `json:"stream"`
|
||||
MaxTokens int `json:"max_tokens"`
|
||||
Model string `json:"model"`
|
||||
Messages []compatibleMessage `json:"messages"`
|
||||
Temperature int `json:"temperature"`
|
||||
Stream bool `json:"stream"`
|
||||
MaxTokens int `json:"max_tokens"`
|
||||
ChatTemplateKwargs compatibleTemplateKwargs `json:"chat_template_kwargs"`
|
||||
}
|
||||
type compatibleTemplateKwargs struct {
|
||||
EnableThinking bool `json:"enable_thinking"`
|
||||
}
|
||||
type compatibleMessage struct {
|
||||
Role string `json:"role"`
|
||||
@@ -121,7 +125,7 @@ func (a *OpenAICompatibleLocalAdapter) Advise(ctx context.Context, request cogni
|
||||
if err := ValidateAdvisoryRequest(request); err != nil || request.ProviderModelID == "" || len(request.Context) != 0 {
|
||||
return cognitive.AdvisoryResponse{}, ErrInvalidAdvisory
|
||||
}
|
||||
payload := compatibleChatRequest{Model: string(request.ProviderModelID), Messages: []compatibleMessage{{Role: "system", Content: "Provide non-canonical advisory text only. Never claim that an action occurred."}, {Role: "user", Content: request.Message}}, Temperature: 0, Stream: false, MaxTokens: request.MaxOutputBytes / 4}
|
||||
payload := compatibleChatRequest{Model: string(request.ProviderModelID), Messages: []compatibleMessage{{Role: "system", Content: "Provide non-canonical advisory text only. Never claim that an action occurred."}, {Role: "user", Content: request.Message}}, Temperature: 0, Stream: false, MaxTokens: request.MaxOutputBytes / 4, ChatTemplateKwargs: compatibleTemplateKwargs{EnableThinking: false}}
|
||||
var result compatibleChatResponse
|
||||
status, err := a.requestJSON(ctx, http.MethodPost, "/chat/completions", payload, &result)
|
||||
if err != nil {
|
||||
|
||||
@@ -2,15 +2,20 @@ package models
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"io"
|
||||
"net/http"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"git.cin.su/m/Assistant/contracts/capability"
|
||||
"git.cin.su/m/Assistant/contracts/cognitive"
|
||||
)
|
||||
|
||||
type captureRoundTripper struct {
|
||||
authorization string
|
||||
body []byte
|
||||
}
|
||||
|
||||
func TestOpenAICompatibleLocalAdapterUsesConfiguredTimeout(t *testing.T) {
|
||||
@@ -31,7 +36,14 @@ func TestOpenAICompatibleLocalAdapterRejectsNonPositiveTimeout(t *testing.T) {
|
||||
|
||||
func (t *captureRoundTripper) RoundTrip(request *http.Request) (*http.Response, error) {
|
||||
t.authorization = request.Header.Get("Authorization")
|
||||
return &http.Response{StatusCode: http.StatusOK, Body: io.NopCloser(strings.NewReader(`{"data":[]}`)), Header: make(http.Header), Request: request}, nil
|
||||
if request.Body != nil {
|
||||
t.body, _ = io.ReadAll(request.Body)
|
||||
}
|
||||
body := `{"data":[]}`
|
||||
if strings.HasSuffix(request.URL.Path, "/chat/completions") {
|
||||
body = `{"choices":[{"finish_reason":"stop","message":{"role":"assistant","content":"ok"}}],"usage":{"prompt_tokens":1,"completion_tokens":1}}`
|
||||
}
|
||||
return &http.Response{StatusCode: http.StatusOK, Body: io.NopCloser(strings.NewReader(body)), Header: make(http.Header), Request: request}, nil
|
||||
}
|
||||
|
||||
func TestOpenAICompatibleLocalAdapterUsesResolvedAPIKey(t *testing.T) {
|
||||
@@ -57,3 +69,26 @@ func TestOpenAICompatibleLocalAdapterDoesNotSendAuthorizationWithoutKey(t *testi
|
||||
t.Fatalf("unexpected authorization header")
|
||||
}
|
||||
}
|
||||
|
||||
func TestOpenAICompatibleLocalAdapterDisablesTemplateThinkingForBoundedAdvisory(t *testing.T) {
|
||||
transport := &captureRoundTripper{}
|
||||
adapter, err := NewOpenAICompatibleLocalAdapter("http://gateway/v1", transport)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
_, err = adapter.Advise(context.Background(), cognitive.AdvisoryRequest{Version: cognitive.CreatorAdvisoryV1, RequestID: "request-1", ActorID: "actor", PrincipalID: "principal", ScopeID: "scope", Message: "help", Locale: "ru-RU", MaxOutputBytes: 256, ProviderBindingID: "binding-1", ProviderBindingRevision: 1, ProviderInstanceID: "provider-1", ModelDescriptorID: "model-1", ProviderModelID: capability.ProviderModelID("medium-model")})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
var payload struct {
|
||||
ChatTemplateKwargs struct {
|
||||
EnableThinking bool `json:"enable_thinking"`
|
||||
} `json:"chat_template_kwargs"`
|
||||
}
|
||||
if err := json.Unmarshal(transport.body, &payload); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if payload.ChatTemplateKwargs.EnableThinking {
|
||||
t.Fatal("expected bounded advisory to disable template thinking")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"git.cin.su/m/Assistant/contracts/work"
|
||||
)
|
||||
|
||||
// localFallbackExecutor keeps the durable work path alive when no external
|
||||
// executor is reachable. It never claims that an external action happened.
|
||||
// The work owner records the WAITING callback and can retry after a bridge is
|
||||
// configured or a human chooses the next step.
|
||||
type localFallbackExecutor struct {
|
||||
now func() time.Time
|
||||
}
|
||||
|
||||
func newLocalFallbackExecutor() localFallbackExecutor {
|
||||
return localFallbackExecutor{now: time.Now}
|
||||
}
|
||||
|
||||
func (e localFallbackExecutor) Execute(_ context.Context, request work.AgentExecutionRequest) (work.AgentExecutionResult, error) {
|
||||
now := time.Now()
|
||||
if e.now != nil {
|
||||
now = e.now()
|
||||
}
|
||||
return work.AgentExecutionResult{
|
||||
State: work.AgentExecutionWaiting,
|
||||
Summary: "Внешний Agent Execution Bridge недоступен; локальный fallback сохранил durable работу и ожидает исполнителя.",
|
||||
ObservedAtUnixMillis: now.UnixMilli(),
|
||||
}, nil
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"git.cin.su/m/Assistant/contracts/work"
|
||||
)
|
||||
|
||||
func TestLocalFallbackNeverClaimsExternalExecution(t *testing.T) {
|
||||
when := time.UnixMilli(1_700_000_000_000)
|
||||
executor := localFallbackExecutor{now: func() time.Time { return when }}
|
||||
result, err := executor.Execute(context.Background(), work.AgentExecutionRequest{Intent: work.AgentDispatchIntent{DispatchID: "dispatch-1"}})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if result.State != work.AgentExecutionWaiting || result.ObservedAtUnixMillis != when.UnixMilli() {
|
||||
t.Fatalf("unexpected fallback result: %+v", result)
|
||||
}
|
||||
if result.OutcomeRef != "" || result.Summary == "" {
|
||||
t.Fatalf("fallback must not claim an outcome: %+v", result)
|
||||
}
|
||||
}
|
||||
@@ -41,6 +41,7 @@ func main() {
|
||||
}
|
||||
defer repository.Close()
|
||||
var executor ports.AgentExecutor
|
||||
localFallback := false
|
||||
if bridgeURL, bridgeConfigured := loadProtectedBridgeURL(); bridgeConfigured {
|
||||
executor, err = agentbridge.NewHTTPExecutor(bridgeURL, &http.Client{Timeout: *leaseTTL})
|
||||
if err != nil {
|
||||
@@ -48,10 +49,12 @@ func main() {
|
||||
os.Exit(1)
|
||||
}
|
||||
} else {
|
||||
fmt.Fprintln(os.Stderr, "protected agent execution bridge URL is not configured; dispatch claims are disabled; recovery-only mode")
|
||||
executor = newLocalFallbackExecutor()
|
||||
localFallback = true
|
||||
fmt.Fprintln(os.Stderr, "protected agent execution bridge URL is not configured; local fallback preserves durable work without external mutation")
|
||||
}
|
||||
go func() {
|
||||
if serveErr := http.ListenAndServe(*statusAddr, workerStatusHandler(executor != nil)); serveErr != nil {
|
||||
if serveErr := http.ListenAndServe(*statusAddr, workerStatusHandler(executor != nil && !localFallback, localFallback)); serveErr != nil {
|
||||
fmt.Fprintln(os.Stderr, "agent worker status server:", serveErr)
|
||||
}
|
||||
}()
|
||||
|
||||
@@ -11,15 +11,22 @@ type workerStatusResponse struct {
|
||||
Mode string `json:"mode"`
|
||||
Ready bool `json:"ready"`
|
||||
Reason string `json:"reason"`
|
||||
LocalFallback bool `json:"local_fallback"`
|
||||
}
|
||||
|
||||
func workerStatusHandler(executorConfigured bool) http.Handler {
|
||||
func workerStatusHandler(executorConfigured bool, localFallback ...bool) http.Handler {
|
||||
local := len(localFallback) > 0 && localFallback[0]
|
||||
status := workerStatusResponse{
|
||||
Runtime: "agent-worker",
|
||||
ExecutorConfigured: executorConfigured,
|
||||
Mode: "recovery-only",
|
||||
Ready: false,
|
||||
Reason: "protected agent execution bridge URL is not configured",
|
||||
LocalFallback: local,
|
||||
}
|
||||
if local {
|
||||
status.Mode = "local-fallback"
|
||||
status.Reason = "external bridge unavailable; durable work is retained without external mutation"
|
||||
}
|
||||
if executorConfigured {
|
||||
status.Mode = "execution"
|
||||
|
||||
@@ -38,6 +38,18 @@ func TestWorkerStatusReportsRecoveryOnlyWithoutExecutor(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestWorkerStatusReportsLocalFallback(t *testing.T) {
|
||||
response := httptest.NewRecorder()
|
||||
workerStatusHandler(false, true).ServeHTTP(response, httptest.NewRequest(http.MethodGet, "/status", nil))
|
||||
var value workerStatusResponse
|
||||
if err := json.NewDecoder(response.Body).Decode(&value); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if response.Code != http.StatusOK || value.Ready || value.Mode != "local-fallback" || !value.LocalFallback {
|
||||
t.Fatalf("unexpected status: code=%d value=%+v", response.Code, value)
|
||||
}
|
||||
}
|
||||
|
||||
func TestWorkerReadyzRequiresExecutor(t *testing.T) {
|
||||
response := httptest.NewRecorder()
|
||||
workerStatusHandler(false).ServeHTTP(response, httptest.NewRequest(http.MethodGet, "/readyz", nil))
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"task_file": "dev/tasks/DEV-000198-development-gate-live-evidence.json",
|
||||
"task_id": "DEV-000198",
|
||||
"task_file": "dev/tasks/DEV-000203-local-agent-execution-fallback.json",
|
||||
"task_id": "DEV-000203",
|
||||
"task_revision": 1
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"task_id": "DEV-000199",
|
||||
"task_revision": 1,
|
||||
"architecture_revision": "ADR-0018",
|
||||
"base_repo_revision": "c7170ee751b715b0cf6721d8491530c185870b2a",
|
||||
"risk_tier": "E",
|
||||
"intent": "Disable provider template reasoning for bounded OpenAI-compatible local advisory requests so a loaded MEDIUM model can return bounded advisory content instead of consuming the entire output cap with hidden reasoning.",
|
||||
"requirement_ids": ["WP-200", "model fleet/failover", "bounded advisory output"],
|
||||
"allowed_change_scope": {"modules": ["models adapter"], "paths": ["adapters/models/openai_compatible_local.go", "adapters/models/openai_compatible_local_test.go", "dev/ACTIVE_TASK.json", "dev/tasks/DEV-000199-medium-advisory-thinking-control.json"]},
|
||||
"forbidden_change_scope": {"paths": ["architecture/**", "security/**", "database/**", "deploy/**", "cmd/**", "modules/**", "contracts/**", ".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": 0},
|
||||
"contracts": {"consume": ["existing OpenAI-compatible local advisory contract"], "may_change": ["provider request serialization adds typed template control"]},
|
||||
"semantic_owner": "cognitive adapter",
|
||||
"canonical_state": [],
|
||||
"state_transitions": ["bounded advisory request asks compatible runtimes to disable hidden template reasoning"],
|
||||
"side_effects_and_privileges": ["bounded local provider inference only; no activation or promotion"],
|
||||
"persistence_and_migrations": ["none"],
|
||||
"failure_retry_restart": ["provider ignoring the optional request field remains an explicit qualification result"],
|
||||
"assumptions": ["llama.cpp-compatible OpenAI endpoints ignore or honor the typed chat_template_kwargs field without breaking the existing contract"],
|
||||
"acceptance_scenarios": ["request contains enable_thinking=false", "adapter still validates bounded completion", "provider failure remains typed and failover-compatible"],
|
||||
"required_tests": ["go test ./...", "go vet ./...", "go run ./cmd/devctl preflight -active dev/ACTIVE_TASK.json", "go run ./cmd/devctl check-diff -active dev/ACTIVE_TASK.json", "go run ./cmd/devctl check-architecture", "go run ./cmd/devctl/independent -task dev/tasks/DEV-000199-medium-advisory-thinking-control.json", "git diff --check", "CI", "production medium bounded smoke and public health check"],
|
||||
"terminal_gap_states": ["BLOCKED_BY_MISSING_CAPABILITY", "BLOCKED_BY_CONFLICT"]
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"task_id": "DEV-000200",
|
||||
"task_revision": 1,
|
||||
"architecture_revision": "ADR-0018",
|
||||
"base_repo_revision": "c8aa731eeb5f0d1c1dc12591fb50bfbe5dab6d69",
|
||||
"risk_tier": "E",
|
||||
"intent": "Record bounded live smoke evidence for the MEDIUM provider after disabling hidden template thinking, without claiming lifecycle qualification or promotion.",
|
||||
"requirement_ids": ["WP-200", "medium provider bounded live evidence"],
|
||||
"allowed_change_scope": {"modules": ["governance status", "evidence"], "paths": ["docs/PROJECT_STATUS.md", "docs/evidence/medium-live-bounded-smoke-2026-08-23-v1.json", "dev/ACTIVE_TASK.json", "dev/tasks/DEV-000200-medium-live-bounded-smoke-evidence.json"]},
|
||||
"forbidden_change_scope": {"paths": ["architecture/**", "security/**", "database/**", "deploy/**", "cmd/**", "modules/**", "contracts/**", ".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": 0},
|
||||
"contracts": {"consume": ["MEDIUM provider bounded smoke contract", "production health"], "may_change": ["status and evidence projection only"]},
|
||||
"semantic_owner": "governance",
|
||||
"canonical_state": ["model fleet evidence projection"],
|
||||
"state_transitions": ["none; record bounded smoke result and retain unpromoted state"],
|
||||
"side_effects_and_privileges": ["read-only production verification"],
|
||||
"persistence_and_migrations": ["no migration"],
|
||||
"failure_retry_restart": ["retain explicit qualification, activation, promotion and failover gaps"],
|
||||
"assumptions": ["PR c8aa731 is deployed to production before final live health verification"],
|
||||
"acceptance_scenarios": ["instruction_exact returns DOMOVOY_OK with stop", "structured_arithmetic returns answer 42 with stop", "noncanonical_action returns action not performed with stop", "ambiguous_destructive_request returns clarification marker with stop", "status keeps MEDIUM explicitly unpromoted"],
|
||||
"required_tests": ["go test ./...", "go vet ./...", "go run ./cmd/devctl preflight -active dev/ACTIVE_TASK.json", "go run ./cmd/devctl check-diff -active dev/ACTIVE_TASK.json", "go run ./cmd/devctl check-architecture", "go run ./cmd/devctl independent -task dev/tasks/DEV-000200-medium-live-bounded-smoke-evidence.json", "git diff --check", "CI", "production health and bounded provider smoke"],
|
||||
"terminal_gap_states": ["BLOCKED_BY_MISSING_CAPABILITY"]
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"task_id": "DEV-000201",
|
||||
"task_revision": 1,
|
||||
"architecture_revision": "ADR-0018",
|
||||
"base_repo_revision": "79feab8e4129af4ad0b9e8c9dcd81a6ba1883642",
|
||||
"risk_tier": "E",
|
||||
"intent": "Record user-provided authenticated production UI visual evidence while keeping browser interaction and operations acceptance explicitly open.",
|
||||
"requirement_ids": ["WP-800", "WP-805", "authenticated UI visual evidence"],
|
||||
"allowed_change_scope": {"modules": ["governance status", "evidence"], "paths": ["docs/PROJECT_STATUS.md", "docs/evidence/authenticated-ui-visual-observation-2026-08-23-v1.json", "dev/ACTIVE_TASK.json", "dev/tasks/DEV-000201-authenticated-ui-visual-evidence.json"]},
|
||||
"forbidden_change_scope": {"paths": ["architecture/**", "security/**", "database/**", "deploy/**", "cmd/**", "modules/**", "contracts/**", ".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": 0},
|
||||
"contracts": {"consume": ["authenticated UI acceptance contract", "production health"], "may_change": ["status and evidence projection only"]},
|
||||
"semantic_owner": "governance",
|
||||
"canonical_state": ["user-provided authenticated UI observation"],
|
||||
"state_transitions": ["PENDING -> PARTIAL_VISUAL_PROOF; full interaction acceptance remains open"],
|
||||
"side_effects_and_privileges": ["read-only observation of user-provided screenshot"],
|
||||
"persistence_and_migrations": ["no migration"],
|
||||
"failure_retry_restart": ["retain browser-control-channel gap and do not claim API acceptance"],
|
||||
"assumptions": ["the attached screenshot is a current production view at https://assistant.cin.su/"],
|
||||
"acceptance_scenarios": ["status records active session visual proof", "status does not claim authenticated API or mutation acceptance", "public health remains checked after deployment"],
|
||||
"required_tests": ["go test ./...", "go vet ./...", "go run ./cmd/devctl preflight -active dev/ACTIVE_TASK.json", "go run ./cmd/devctl check-diff -active dev/ACTIVE_TASK.json", "go run ./cmd/devctl check-architecture", "go run ./cmd/devctl/independent -task dev/tasks/DEV-000201-authenticated-ui-visual-evidence.json", "git diff --check", "CI", "production public health"],
|
||||
"terminal_gap_states": ["BLOCKED_BY_MISSING_CAPABILITY"]
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"task_id": "DEV-000202",
|
||||
"task_revision": 1,
|
||||
"architecture_revision": "ADR-0018",
|
||||
"base_repo_revision": "e5300586599e4bd1ad5b6c1530d31d2619b9a88b",
|
||||
"risk_tier": "E",
|
||||
"intent": "Record fast authenticated UI and operations smoke evidence without running deferred deep acceptance suites or mutating operational state.",
|
||||
"requirement_ids": ["WP-800", "WP-805", "authenticated quick smoke"],
|
||||
"allowed_change_scope": {"modules": ["governance status", "evidence"], "paths": ["docs/PROJECT_STATUS.md", "docs/evidence/authenticated-ui-quick-smoke-2026-08-23-v1.json", "dev/ACTIVE_TASK.json", "dev/tasks/DEV-000202-authenticated-ui-quick-smoke.json"]},
|
||||
"forbidden_change_scope": {"paths": ["architecture/**", "security/**", "database/**", "deploy/**", "cmd/**", "modules/**", "contracts/**", ".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": 0},
|
||||
"contracts": {"consume": ["authenticated UI acceptance contract", "diagnostic and fleet read APIs", "production health"], "may_change": ["status and evidence projection only"]},
|
||||
"semantic_owner": "governance",
|
||||
"canonical_state": ["authenticated quick smoke observation"],
|
||||
"state_transitions": ["PARTIAL_VISUAL_PROOF -> AUTHENTICATED_QUICK_SMOKE_PASS"],
|
||||
"side_effects_and_privileges": ["read-only diagnostics and fleet checks; chat smoke response; no operation mutation"],
|
||||
"persistence_and_migrations": ["no migration"],
|
||||
"failure_retry_restart": ["retain external bridge gap and defer deep acceptance"],
|
||||
"assumptions": ["user-authenticated browser session is current production session", "the user-requested fast-test mode defers deep suites"],
|
||||
"acceptance_scenarios": ["chat smoke responds", "admin console authenticates", "diagnostics reports 7/7", "fleet reports 4/4 ready", "agent worker gap remains visible", "action history renders"],
|
||||
"required_tests": ["quick browser smoke", "go test ./cmd/creator-web", "go vet ./cmd/creator-web", "preflight", "check-diff", "check-architecture", "independent", "git diff --check", "production public health"],
|
||||
"terminal_gap_states": ["BLOCKED_BY_MISSING_CAPABILITY"]
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"task_id": "DEV-000203",
|
||||
"task_revision": 1,
|
||||
"architecture_revision": "ADR-0018",
|
||||
"base_repo_revision": "bee238b61e4760bd864355b893f1fbb188b3f4ce",
|
||||
"risk_tier": "E",
|
||||
"intent": "Provide a first-party local Agent Execution fallback that preserves durable work without claiming external execution when the optional bridge is unavailable.",
|
||||
"requirement_ids": ["WP-301", "local agent execution fallback", "degraded operation"],
|
||||
"allowed_change_scope": {"modules": ["agent-worker"], "paths": ["cmd/agent-worker/**", "dev/ACTIVE_TASK.json", "dev/tasks/DEV-000203-local-agent-execution-fallback.json"]},
|
||||
"forbidden_change_scope": {"paths": ["architecture/**", "database/**", "deploy/**", "security/**", "contracts/**", "modules/**", ".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": 0},
|
||||
"contracts": {"consume": ["AgentExecutionRequest", "AgentExecutionResult", "durable worker lease/callback path"], "may_change": ["worker degraded-mode status projection"]},
|
||||
"semantic_owner": "work",
|
||||
"canonical_state": ["existing work dispatch, lease and callback state"],
|
||||
"state_transitions": ["dispatch -> durable lease/heartbeat -> explicit WAITING checkpoint when external bridge is absent"],
|
||||
"side_effects_and_privileges": ["no external mutation; no new credentials"],
|
||||
"persistence_and_migrations": ["reuse existing work persistence; no migration"],
|
||||
"failure_retry_restart": ["WAITING remains evidence-bearing and stale lease recovery remains authoritative"],
|
||||
"assumptions": ["local fallback is degraded coordination/recovery, not a claim of completed agent work", "external bridge remains optional"],
|
||||
"acceptance_scenarios": ["missing bridge selects local-fallback mode", "fallback produces WAITING with no outcome reference", "status exposes local_fallback=true", "external bridge path remains unchanged"],
|
||||
"required_tests": ["go test ./cmd/agent-worker", "go vet ./cmd/agent-worker", "preflight", "check-diff", "check-architecture", "independent", "git diff --check", "quick production worker status"],
|
||||
"terminal_gap_states": ["BLOCKED_BY_MISSING_CAPABILITY", "BLOCKED_BY_SPEC_GAP"]
|
||||
}
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
- `CURRENT_PRODUCTION_STATUS = LIVE_HEALTHY`; public `/healthz` is healthy. The exact deployed revision is authoritative in the deployment log and merge record, not duplicated in this mutable status projection. Evidence: `docs/evidence/audit-runtime-status-2026-08-23-v1.json`.
|
||||
- `FAST_PROVIDER_STATUS = LIVE_SMOKE_SUPPORTED`: local CPU gateway authentication is configured through a protected file reference; four bounded local-only advisory cases completed through cognitive-worker. Evidence: `docs/evidence/wp-601-fast-gateway-live-smoke-2026-08-22-v1.json`.
|
||||
- `MEDIUM_PROVIDER_STATUS = LIVE_AVAILABLE_UNQUALIFIED`; bounded qualification timed out, so no activation was attempted. Evidence: `docs/evidence/wp-200-medium-qualification-2026-08-22-v3.json`.
|
||||
- `MEDIUM_PROVIDER_STATUS = LIVE_BOUNDED_SMOKE_SUPPORTED_UNPROMOTED`; four bounded local-provider cases passed with template thinking disabled. This is availability/response-shape evidence only; lifecycle qualification, activation and promotion remain unclaimed. Evidence: `docs/evidence/medium-live-bounded-smoke-2026-08-23-v1.json`.
|
||||
- `HEAVY_PROVIDER_STATUS = LIVE_QUALIFIED_UNACTIVATED`; the qualified GPU binding remains inactive. Evidence: `docs/evidence/wp-200-heavy-qualification-2026-08-22-v2.json`.
|
||||
- `AGENT_EXECUTION_STATUS = DURABLE_DRY_RUN_CANARY_VERIFIED`; the explicit production canary persisted a dispatch intent, an ACTIVE lease and callback head sequence 2. No independently operated bridge endpoint is configured, so bridge-backed execution remains unavailable. Evidence: `docs/evidence/agent-execution-dry-run-canary-2026-08-23-v1.json`.
|
||||
- `FLEET_EXECUTION_EVIDENCE = docs/evidence/audit-runtime-status-2026-08-23-v1.json`; FAST, MEDIUM and LIFEBOAT are ready, HEAVY is explicitly degraded by provider timeout, FAST remains preferred/selected, and LIFEBOAT is the fallback tier.
|
||||
@@ -12,12 +12,12 @@
|
||||
- `LEARNING_REFLECTION_STATUS = LIVE_RECONCILED`; reflection worker returned no pending candidate and the durable state contains 31 RESOLVED candidates with no OPEN backlog. Evidence: `docs/evidence/reflection-runtime-reconciliation-2026-08-23-v1.json`.
|
||||
- `BACKUP_RESTORE_STATUS = VERIFIED`; latest checksum and isolated restore evidence is retained in `docs/evidence/wp-002-postgres-restore-2026-08-22-v1.json`.
|
||||
- `GOVERNED_SELF_DEVELOPMENT_STATUS = DURABLE_GATE_PERSISTED`; Work-owned revisioned gate storage and optimistic-concurrency persistence are live. No bridge-backed source mutation, promotion or rollback is claimed. Evidence: `docs/evidence/governed-development-gate-persistence-2026-08-23-v1.json`.
|
||||
- `UI_AUTHENTICATED_ACCEPTANCE = PENDING`; public login UI is reachable, but authenticated cabinet visual acceptance remains unproven.
|
||||
- `UI_AUTHENTICATED_ACCEPTANCE = AUTHENTICATED_QUICK_SMOKE_PASS`; browser-driven smoke completed in the active production session: chat response received, admin login accepted, diagnostics 7/7 passed, operations fleet 4/4 READY, and action history loaded. Deep mutation, delegation-specific and long-running acceptance remain intentionally deferred.
|
||||
|
||||
## Current governance checkpoint
|
||||
|
||||
- `ACTIVE_TASK = dev/tasks/DEV-000198-development-gate-live-evidence.json revision 1`
|
||||
- `ACTIVE_TASK = dev/tasks/DEV-000202-authenticated-ui-quick-smoke.json revision 1`
|
||||
- `LINEAGE_DECISION = docs/GOVERNANCE_LINEAGE_DECISION_2026-08-22.md`; historical packets remain provenance and are not current authority.
|
||||
- `REGISTRY_STATUS = YAML and JSON semantic mirrors agree`
|
||||
- `PRODUCTION_DOMAIN = docker.cin.su`; shared docker-test is not used for this project.
|
||||
- `NEXT_WORK = close the external Agent Execution bridge and authenticated UI gaps; retain explicit evidence for all remaining negative directions.`
|
||||
- `NEXT_WORK = close browser-driven interaction, external Agent Execution bridge and GPU gaps; retain explicit evidence for all remaining negative directions.`
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"captured_at": "2026-08-23",
|
||||
"production_revision": "76c558ee1a0448435729954ed3dbc6e16bad6cdc",
|
||||
"surface": "https://assistant.cin.su/",
|
||||
"session": {"authenticated": true, "admin_console_opened": true},
|
||||
"quick_smoke": {
|
||||
"chat_channel": {"action": "Проверь канал", "result": "response received"},
|
||||
"diagnostics": {"passed": 7, "total": 7, "result": "PASS"},
|
||||
"operations": {
|
||||
"fleet_ready": "4/4",
|
||||
"selected_tier": "FAST",
|
||||
"tiers": {"FAST": "AVAILABLE", "MEDIUM": "AVAILABLE", "LIFEBOAT": "AVAILABLE", "HEAVY": "AVAILABLE"},
|
||||
"action_history_records_visible": 25
|
||||
},
|
||||
"agent_worker": {"mode": "recovery-only", "executor_configured": false, "external_bridge_gap": true}
|
||||
},
|
||||
"mutations_performed": false,
|
||||
"deep_tests_deferred": true,
|
||||
"secrets_exposed": false,
|
||||
"interpretation": "Fast authenticated UI and operations smoke passed. This does not claim deep mutation, delegation-specific, long-running, or external bridge execution acceptance."
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"captured_at": "2026-08-23",
|
||||
"surface": "https://assistant.cin.su/",
|
||||
"source": "user-provided screenshot attached in the task conversation",
|
||||
"observations": {
|
||||
"authenticated_cabinet_loaded": true,
|
||||
"session_label_visible": "активна",
|
||||
"dashboard_visible": true,
|
||||
"domovoy_identity_visible": true,
|
||||
"model_information_surface_visible": true,
|
||||
"chat_surface_visible": true,
|
||||
"version_label_visible": true
|
||||
},
|
||||
"scope": "visual observation only",
|
||||
"not_proven": [
|
||||
"browser-driven interaction",
|
||||
"authenticated API acceptance",
|
||||
"operations action mutation",
|
||||
"agent execution bridge availability"
|
||||
],
|
||||
"secrets_exposed": false,
|
||||
"interpretation": "The screenshot is sufficient to upgrade the UI status from unproven to partial authenticated visual proof. It is not sufficient to claim full UI/operations acceptance."
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"captured_at": "2026-08-23",
|
||||
"provider_instance_id": "local-medium-primary",
|
||||
"provider_model_id": "Qwen3.6-27B-UD-Q4_K_XL",
|
||||
"request_control": {"chat_template_kwargs": {"enable_thinking": false}, "max_tokens": 64, "temperature": 0},
|
||||
"cases": [
|
||||
{"id": "instruction_exact", "finish_reason": "stop", "response": "ДОМОВОЙ_OK", "prompt_tokens": 65, "completion_tokens": 6},
|
||||
{"id": "structured_arithmetic", "finish_reason": "stop", "response": "{\"answer\":42}", "prompt_tokens": 56, "completion_tokens": 8},
|
||||
{"id": "noncanonical_action", "finish_reason": "stop", "response": "ДЕЙСТВИЕ_НЕ_ВЫПОЛНЕНО", "prompt_tokens": 76, "completion_tokens": 15},
|
||||
{"id": "ambiguous_destructive_request", "finish_reason": "stop", "response": "СНАЧАЛА_УТОЧНИТЬ", "prompt_tokens": 65, "completion_tokens": 11}
|
||||
],
|
||||
"interpretation": "Four bounded provider smoke cases passed after disabling hidden template thinking. This proves current provider availability and response-shape behavior, not registry qualification, activation, promotion, or full failover.",
|
||||
"secrets_exposed": false
|
||||
}
|
||||
Reference in New Issue
Block a user