Compare commits
62
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d19fcceff3 | ||
|
|
8c6f23dc49 | ||
|
|
19c58b6d25 | ||
|
|
e9d5b1ca8a | ||
|
|
444d9d825a | ||
|
|
a2ff01050e | ||
|
|
443e0ceb2e | ||
|
|
3e91ae503c | ||
|
|
bf6f2365d4 | ||
|
|
9b7091bbe9 | ||
|
|
12725511c0 | ||
|
|
3c46a5f07f | ||
|
|
b0a8b3e5a7 | ||
|
|
f6f68ffb04 | ||
|
|
5c98bc3568 | ||
|
|
de1d2f5107 | ||
|
|
bcbd41f217 | ||
|
|
f5616fe3ea | ||
|
|
94baf98060 | ||
|
|
c499ae090e | ||
|
|
e132ec6ba9 | ||
|
|
344f8ad106 | ||
|
|
080bd44021 | ||
|
|
318a68c3dd | ||
|
|
73d7ffd012 | ||
|
|
51db6377a4 | ||
|
|
c3b4283101 | ||
|
|
ffd7ddcce5 | ||
|
|
dd83442ff9 | ||
|
|
f1c3abb3b7 | ||
|
|
a56957138d | ||
|
|
5058d5ac0e | ||
|
|
00d7f70ffb | ||
|
|
c09be4c9b5 | ||
|
|
976edccfd8 | ||
|
|
1eb3e39286 | ||
|
|
15088d1d7d | ||
|
|
4cdd1a5276 | ||
|
|
e93f810946 | ||
|
|
459d836468 | ||
|
|
52058459f6 | ||
|
|
9b91be0764 | ||
|
|
e4f8d6fa70 | ||
|
|
d7151f1d78 | ||
|
|
d357e7714a | ||
|
|
9160654a07 | ||
|
|
29dad403ec | ||
|
|
041c1ce849 | ||
|
|
ba162f6433 | ||
|
|
3ca7ffab16 | ||
|
|
615a3e4765 | ||
|
|
c459cd563c | ||
|
|
b2753a64c4 | ||
|
|
649dd602dd | ||
|
|
7a004e524a | ||
|
|
cb78c35f24 | ||
|
|
b1a79ede91 | ||
|
|
e012694108 | ||
|
|
c4f3f02933 | ||
|
|
102a57aaff | ||
|
|
381e4d52e8 | ||
|
|
c8dc9edbdc |
@@ -0,0 +1,150 @@
|
|||||||
|
package research
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"crypto/sha256"
|
||||||
|
"encoding/hex"
|
||||||
|
"errors"
|
||||||
|
"html"
|
||||||
|
"io"
|
||||||
|
"net/http"
|
||||||
|
"net/url"
|
||||||
|
"regexp"
|
||||||
|
"strconv"
|
||||||
|
"strings"
|
||||||
|
|
||||||
|
"git.cin.su/m/Assistant/contracts/epistemics"
|
||||||
|
)
|
||||||
|
|
||||||
|
var ErrSearchRejected = errors.New("web search request rejected")
|
||||||
|
|
||||||
|
var (
|
||||||
|
searchLinkPattern = regexp.MustCompile(`(?is)<a[^>]+class=["'][^"']*result__a[^"']*["'][^>]*>(.*?)</a>`)
|
||||||
|
searchSnippetPattern = regexp.MustCompile(`(?is)<a[^>]+class=["'][^"']*result__snippet[^"']*["'][^>]*>(.*?)</a>`)
|
||||||
|
bingLinkPattern = regexp.MustCompile(`(?is)<li[^>]+class=["'][^"']*b_algo[^"']*["'][^>]*>.*?<h2[^>]*><a[^>]*>(.*?)</a>`)
|
||||||
|
bingSnippetPattern = regexp.MustCompile(`(?is)<li[^>]+class=["'][^"']*b_algo[^"']*["'][^>]*>.*?<p[^>]*>(.*?)</p>`)
|
||||||
|
tagPattern = regexp.MustCompile(`(?s)<[^>]*>`)
|
||||||
|
termPattern = regexp.MustCompile(`(?i)[\p{L}\p{N}]{2,}`)
|
||||||
|
)
|
||||||
|
|
||||||
|
var searchStopTerms = map[string]struct{}{
|
||||||
|
"какая": {}, "какое": {}, "какие": {}, "какой": {}, "что": {}, "как": {}, "где": {}, "когда": {}, "почему": {}, "мне": {}, "пожалуйста": {},
|
||||||
|
"what": {}, "which": {}, "where": {}, "when": {}, "why": {}, "how": {}, "please": {}, "the": {}, "this": {},
|
||||||
|
}
|
||||||
|
|
||||||
|
// SearchConnector uses a configured HTTPS search endpoint. It does not know
|
||||||
|
// cities, weather terms, entities or model names: the complete semantic query
|
||||||
|
// comes from the interpretation layer.
|
||||||
|
type SearchConnector struct {
|
||||||
|
Client *http.Client
|
||||||
|
EndpointTemplate string
|
||||||
|
AllowedHosts map[string]struct{}
|
||||||
|
MaxBytes int64
|
||||||
|
MaxResults int
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c SearchConnector) Collect(ctx context.Context, request epistemics.WebSearchRequest, nowUnixMillis int64) ([]epistemics.ResearchCandidate, error) {
|
||||||
|
if request.Plan.Validate() != nil || strings.TrimSpace(request.Query) == "" || nowUnixMillis < 1 || !strings.Contains(c.EndpointTemplate, "%s") {
|
||||||
|
return nil, ErrSearchRejected
|
||||||
|
}
|
||||||
|
endpoint, err := url.Parse(strings.Replace(c.EndpointTemplate, "%s", url.QueryEscape(strings.TrimSpace(request.Query)), 1))
|
||||||
|
if err != nil || endpoint.Scheme != "https" || endpoint.Host == "" || !c.allowedHost(strings.ToLower(endpoint.Hostname())) {
|
||||||
|
return nil, ErrSearchRejected
|
||||||
|
}
|
||||||
|
client := c.Client
|
||||||
|
if client == nil {
|
||||||
|
client = &http.Client{}
|
||||||
|
}
|
||||||
|
maxBytes := c.MaxBytes
|
||||||
|
if maxBytes <= 0 || maxBytes > 4<<20 {
|
||||||
|
maxBytes = 512 << 10
|
||||||
|
}
|
||||||
|
req, err := http.NewRequestWithContext(ctx, http.MethodGet, endpoint.String(), nil)
|
||||||
|
if err != nil {
|
||||||
|
return nil, ErrSearchRejected
|
||||||
|
}
|
||||||
|
response, err := client.Do(req)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
defer response.Body.Close()
|
||||||
|
if response.StatusCode < 200 || response.StatusCode >= 300 {
|
||||||
|
return nil, ErrSearchRejected
|
||||||
|
}
|
||||||
|
body, err := io.ReadAll(io.LimitReader(response.Body, maxBytes+1))
|
||||||
|
if err != nil || len(body) == 0 || int64(len(body)) > maxBytes {
|
||||||
|
return nil, ErrSearchRejected
|
||||||
|
}
|
||||||
|
links := searchLinkPattern.FindAllSubmatch(body, c.limit())
|
||||||
|
snippets := searchSnippetPattern.FindAllSubmatch(body, c.limit())
|
||||||
|
if len(links) == 0 {
|
||||||
|
links = bingLinkPattern.FindAllSubmatch(body, c.limit())
|
||||||
|
snippets = bingSnippetPattern.FindAllSubmatch(body, c.limit())
|
||||||
|
}
|
||||||
|
if len(links) == 0 {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
digest := sha256.Sum256(body)
|
||||||
|
digestText := "sha256:" + hex.EncodeToString(digest[:])
|
||||||
|
base := hex.EncodeToString(digest[:])
|
||||||
|
sourceID := epistemics.SourceID("source:search:" + base)
|
||||||
|
snapshotID := epistemics.SourceSnapshotID("snapshot:search:" + base)
|
||||||
|
results := make([]epistemics.ResearchCandidate, 0, len(links))
|
||||||
|
for index, link := range links {
|
||||||
|
title := cleanHTML(string(link[1]))
|
||||||
|
snippet := ""
|
||||||
|
if index < len(snippets) {
|
||||||
|
snippet = cleanHTML(string(snippets[index][1]))
|
||||||
|
}
|
||||||
|
statement := strings.TrimSpace(strings.Trim(title+" — "+snippet, " —"))
|
||||||
|
if statement == "" || !searchStatementRelatesToQuery(request.Query, statement) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
ordinal := strconv.Itoa(index)
|
||||||
|
excerptID := epistemics.SourceExcerptID("excerpt:search:" + base + ":" + ordinal)
|
||||||
|
results = append(results, epistemics.ResearchCandidate{
|
||||||
|
PropositionKey: request.PropositionKey + ":result:" + ordinal,
|
||||||
|
Statement: statement,
|
||||||
|
Source: epistemics.Source{ID: sourceID, Kind: "web-search", Locator: endpoint.String(), Title: title, Publisher: endpoint.Hostname()},
|
||||||
|
Snapshot: epistemics.SourceSnapshot{ID: snapshotID, SourceID: sourceID, ContentDigest: digestText, CapturedAtUnixMillis: nowUnixMillis, Freshness: epistemics.FreshnessCurrent},
|
||||||
|
Excerpt: epistemics.SourceExcerpt{ID: excerptID, SnapshotID: snapshotID, Text: statement, Start: 0, End: int64(len(statement))},
|
||||||
|
Evidence: epistemics.EvidenceObserved, Coverage: epistemics.CoverageComplete, Conflict: epistemics.ConflictNone,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
return results, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// searchStatementRelatesToQuery is a bounded relevance gate, not a truth
|
||||||
|
// check. It prevents generic search pages from becoming apparent evidence
|
||||||
|
// when their content has no substantive relation to the requested query.
|
||||||
|
func searchStatementRelatesToQuery(query, statement string) bool {
|
||||||
|
terms := termPattern.FindAllString(strings.ToLower(query), -1)
|
||||||
|
content := strings.ToLower(statement)
|
||||||
|
usable := 0
|
||||||
|
for _, term := range terms {
|
||||||
|
if _, stop := searchStopTerms[term]; stop || len([]rune(term)) < 4 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
usable++
|
||||||
|
runes := []rune(term)
|
||||||
|
prefixLen := 5
|
||||||
|
if len(runes) < prefixLen {
|
||||||
|
prefixLen = len(runes)
|
||||||
|
}
|
||||||
|
if strings.Contains(content, string(runes[:prefixLen])) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return usable == 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c SearchConnector) allowedHost(host string) bool { _, ok := c.AllowedHosts[host]; return ok }
|
||||||
|
func (c SearchConnector) limit() int {
|
||||||
|
if c.MaxResults <= 0 || c.MaxResults > 8 {
|
||||||
|
return 3
|
||||||
|
}
|
||||||
|
return c.MaxResults
|
||||||
|
}
|
||||||
|
func cleanHTML(value string) string {
|
||||||
|
return strings.Join(strings.Fields(html.UnescapeString(tagPattern.ReplaceAllString(value, ""))), " ")
|
||||||
|
}
|
||||||
@@ -0,0 +1,211 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bytes"
|
||||||
|
"context"
|
||||||
|
"encoding/json"
|
||||||
|
"fmt"
|
||||||
|
"net/http"
|
||||||
|
"os"
|
||||||
|
"strings"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"git.cin.su/m/Assistant/contracts/artifact"
|
||||||
|
"git.cin.su/m/Assistant/contracts/capability"
|
||||||
|
"git.cin.su/m/Assistant/contracts/cognitive"
|
||||||
|
"git.cin.su/m/Assistant/contracts/work"
|
||||||
|
capabilitydomain "git.cin.su/m/Assistant/modules/capability/domain"
|
||||||
|
)
|
||||||
|
|
||||||
|
type bridge struct {
|
||||||
|
cognitiveURL string
|
||||||
|
callbackURL string
|
||||||
|
verifierURL string
|
||||||
|
client *http.Client
|
||||||
|
}
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
b := bridge{
|
||||||
|
cognitiveURL: strings.TrimRight(envOr("COGNITIVE_WORKER_URL", "http://cognitive-worker:8083"), "/"),
|
||||||
|
callbackURL: strings.TrimRight(envOr("WORK_GRAPH_RUNTIME_URL", "http://work-graph-runtime:8088"), "/"),
|
||||||
|
verifierURL: strings.TrimRight(envOr("TASK_VERIFIER_URL", "http://task-verifier:8091"), "/"),
|
||||||
|
client: &http.Client{Timeout: 10 * time.Minute},
|
||||||
|
}
|
||||||
|
mux := http.NewServeMux()
|
||||||
|
mux.HandleFunc("/healthz", healthHandler)
|
||||||
|
mux.HandleFunc("/readyz", healthHandler)
|
||||||
|
mux.HandleFunc("/v1/execute", b.executeHandler)
|
||||||
|
addr := envOr("LISTEN_ADDR", ":8092")
|
||||||
|
if err := http.ListenAndServe(addr, mux); err != nil {
|
||||||
|
fmt.Fprintln(os.Stderr, err)
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (b bridge) executeHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
|
if r.Method != http.MethodPost {
|
||||||
|
http.Error(w, "method not allowed", http.StatusMethodNotAllowed)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
var request work.AgentExecutionRequest
|
||||||
|
if err := json.NewDecoder(http.MaxBytesReader(w, r.Body, 1<<20)).Decode(&request); err != nil {
|
||||||
|
http.Error(w, "invalid execution request", http.StatusBadRequest)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
result, err := b.execute(r.Context(), request)
|
||||||
|
if err != nil {
|
||||||
|
http.Error(w, err.Error(), http.StatusBadGateway)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
w.Header().Set("Content-Type", "application/json")
|
||||||
|
_ = json.NewEncoder(w).Encode(result)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (b bridge) execute(ctx context.Context, request work.AgentExecutionRequest) (work.AgentExecutionResult, error) {
|
||||||
|
now := time.Now().UnixMilli()
|
||||||
|
intent := request.Intent
|
||||||
|
if intent.TaskEvaluationExecution != nil && intent.TaskEvaluationExecution.GenericMessage != "" {
|
||||||
|
return b.executeGenericCognitiveWork(ctx, request, *intent.TaskEvaluationExecution)
|
||||||
|
}
|
||||||
|
if intent.TaskEvaluationExecution == nil || intent.TaskEvaluationProfile == nil || len(intent.TaskEvaluationCases) == 0 {
|
||||||
|
return work.AgentExecutionResult{State: work.AgentExecutionWaiting, Summary: "локальный bridge не поддерживает это намерение; работа сохранена и ожидает подходящего исполнителя", ObservedAtUnixMillis: now}, nil
|
||||||
|
}
|
||||||
|
execution := intent.TaskEvaluationExecution
|
||||||
|
if execution.GraphID == "" || execution.NodeID == "" || execution.BindingRevision < 1 || execution.ActorID == "" || execution.PrincipalID == "" || execution.ScopeID == "" {
|
||||||
|
return work.AgentExecutionResult{State: work.AgentExecutionWaiting, Summary: "контекст task-evaluation неполон; работа сохранена для повторной маршрутизации", ObservedAtUnixMillis: now}, nil
|
||||||
|
}
|
||||||
|
payload := capability.TaskEvaluationExecutionRequest{Profile: *intent.TaskEvaluationProfile, CapabilityID: intent.TaskEvaluationProfile.CapabilityID, BindingID: intent.TaskEvaluationBindingID, BindingRevision: execution.BindingRevision, ActorID: execution.ActorID, PrincipalID: execution.PrincipalID, ScopeID: execution.ScopeID, Cases: intent.TaskEvaluationCases, MaxOutputBytes: 4096}
|
||||||
|
response, err := postJSON[capability.TaskEvaluationExecutionResponse](ctx, b.client, b.cognitiveURL+"/v1/task-evaluations/execute", payload)
|
||||||
|
if err != nil {
|
||||||
|
return work.AgentExecutionResult{}, err
|
||||||
|
}
|
||||||
|
if len(response.Responses) == 0 || response.ObservedAtUnixMillis < 1 {
|
||||||
|
return work.AgentExecutionResult{}, fmt.Errorf("task evaluation returned no observations")
|
||||||
|
}
|
||||||
|
caseByID := make(map[string]capability.TaskEvaluationCase, len(intent.TaskEvaluationCases))
|
||||||
|
for _, item := range intent.TaskEvaluationCases {
|
||||||
|
caseByID[item.CaseID] = item
|
||||||
|
}
|
||||||
|
observations := response.Observations
|
||||||
|
if !hasCriticalFailure(observations) {
|
||||||
|
observations = make([]capability.TaskCaseObservation, 0, len(response.Responses))
|
||||||
|
for _, item := range response.Responses {
|
||||||
|
caseValue, ok := caseByID[item.CaseID]
|
||||||
|
if !ok || caseValue.Verification.Mode == "" {
|
||||||
|
return work.AgentExecutionResult{State: work.AgentExecutionWaiting, Summary: "task-evaluation case has no bounded verifier; work remains waiting", ObservedAtUnixMillis: time.Now().UnixMilli()}, nil
|
||||||
|
}
|
||||||
|
verified, verifyErr := postJSON[capability.TaskCaseVerificationResponse](ctx, b.client, b.verifierURL+"/v1/task-evaluations/verify", capability.TaskCaseVerificationRequest{CaseID: item.CaseID, ResponseText: item.ResponseText, LatencyMicros: item.LatencyMicros, EvidenceArtifactRef: item.EvidenceArtifactRef, Verification: caseValue.Verification})
|
||||||
|
if verifyErr != nil {
|
||||||
|
return work.AgentExecutionResult{}, verifyErr
|
||||||
|
}
|
||||||
|
observations = append(observations, capability.TaskCaseObservation{CaseID: verified.CaseID, Result: verified.Result, QualityScoreMillis: verified.QualityScoreMillis, LatencyMicros: verified.LatencyMicros, CriticalFailure: verified.CriticalFailure, EvidenceArtifactRef: verified.EvidenceArtifactRef, VerificationEvidenceRef: verified.VerificationEvidenceRef, VerifierIdentity: verified.VerifierIdentity})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
evaluation, err := capabilitydomain.BuildTaskEvaluation(*intent.TaskEvaluationProfile, capability.TaskEvaluationID("evaluation:"+intent.DispatchID), response.BindingID, response.BindingRevision, intent.TaskEvaluationProfile.CapabilityID, observations, artifact.ArtifactID(intent.TaskEvaluationCases[0].EvidenceArtifactRef), response.ObservedAtUnixMillis)
|
||||||
|
if err != nil {
|
||||||
|
return work.AgentExecutionResult{}, err
|
||||||
|
}
|
||||||
|
callback := work.TaskEvaluationEvidenceCallback{GraphID: execution.GraphID, Revision: execution.GraphRevision, NodeID: execution.NodeID, Evaluation: evaluation, Succeeded: true}
|
||||||
|
if _, err := postJSON[json.RawMessage](ctx, b.client, b.callbackURL+"/v1/work-graphs/task-evaluations/callback", callback); err != nil {
|
||||||
|
return work.AgentExecutionResult{}, err
|
||||||
|
}
|
||||||
|
return work.AgentExecutionResult{State: work.AgentExecutionCompleted, Summary: "local bridge executed task evaluation and persisted verifier callback", OutcomeRef: string(evaluation.ID), ArtifactRefs: []string{string(evaluation.ArtifactID)}, ObservedAtUnixMillis: time.Now().UnixMilli()}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (b bridge) executeGenericCognitiveWork(ctx context.Context, request work.AgentExecutionRequest, execution work.TaskEvaluationDispatchContext) (work.AgentExecutionResult, error) {
|
||||||
|
if execution.GraphID == "" || execution.NodeID == "" || execution.ActorID == "" || execution.PrincipalID == "" || execution.ScopeID == "" {
|
||||||
|
return work.AgentExecutionResult{State: work.AgentExecutionWaiting, Summary: "generic cognitive work context is incomplete; durable work remains waiting for rerouting", ObservedAtUnixMillis: time.Now().UnixMilli()}, nil
|
||||||
|
}
|
||||||
|
maxOutputBytes := execution.GenericMaxOutputBytes
|
||||||
|
if maxOutputBytes < 1 {
|
||||||
|
maxOutputBytes = 4096
|
||||||
|
}
|
||||||
|
dataPolicy := capability.DataPolicy(execution.GenericDataPolicy)
|
||||||
|
if dataPolicy == "" {
|
||||||
|
dataPolicy = capability.DataPolicyLocalOnly
|
||||||
|
}
|
||||||
|
response, err := postJSON[cognitive.GatewayAdvisoryResponse](ctx, b.client, b.cognitiveURL+"/v1/advisories", cognitive.GatewayAdvisoryRequest{
|
||||||
|
Version: cognitive.CreatorAdvisoryV1, RequestID: cognitive.RequestID("agent-work:" + request.Intent.DispatchID), ActorID: execution.ActorID,
|
||||||
|
PrincipalID: execution.PrincipalID, ScopeID: execution.ScopeID, Message: execution.GenericMessage, Locale: execution.GenericLocale,
|
||||||
|
MaxOutputBytes: maxOutputBytes, DataPolicy: dataPolicy, Meaning: cognitive.TaskMeaning{SpeechAct: "DIRECTIVE", RequestedOutcome: execution.GenericPurpose},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return work.AgentExecutionResult{}, err
|
||||||
|
}
|
||||||
|
if response.FinishReason != cognitive.FinishCompleted || strings.TrimSpace(response.AdvisoryText) == "" {
|
||||||
|
return work.AgentExecutionResult{}, fmt.Errorf("generic cognitive work did not complete: %s", response.FinishReason)
|
||||||
|
}
|
||||||
|
candidateID := "candidate:" + request.Intent.DispatchID
|
||||||
|
artifactRef := work.EvidenceRef("agent-output:" + request.Intent.DispatchID)
|
||||||
|
verification, err := postJSON[work.GenericCandidateVerificationResponse](ctx, b.client, b.verifierURL+"/v1/work-graphs/candidates/verify", work.GenericCandidateVerificationRequest{
|
||||||
|
GraphID: execution.GraphID, GraphRevision: execution.GraphRevision, NodeID: execution.NodeID, AuthorRunID: request.Intent.RunID, CandidateID: candidateID, Summary: response.AdvisoryText, EvidenceRefs: []work.EvidenceRef{artifactRef},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return work.AgentExecutionResult{}, err
|
||||||
|
}
|
||||||
|
if !verification.Verified || verification.VerificationEvidenceRef == "" || verification.VerifierIdentity == "" {
|
||||||
|
return work.AgentExecutionResult{State: work.AgentExecutionWaiting, Summary: "generic candidate envelope was not independently verified; work remains waiting", ObservedAtUnixMillis: time.Now().UnixMilli()}, nil
|
||||||
|
}
|
||||||
|
candidate := work.GraphResultCallback{GraphID: execution.GraphID, Revision: execution.GraphRevision, Candidate: work.ResultCandidate{
|
||||||
|
ID: candidateID, GraphID: execution.GraphID, GraphRevision: execution.GraphRevision, NodeID: execution.NodeID,
|
||||||
|
AuthorRunID: request.Intent.RunID, ArtifactRefs: []work.EvidenceRef{artifactRef, work.EvidenceRef(verification.VerificationEvidenceRef)}, EvidenceSummary: "candidate attribution and evidence envelope independently verified; semantic content remains unverified",
|
||||||
|
Summary: response.AdvisoryText,
|
||||||
|
}}
|
||||||
|
if _, err := postJSON[json.RawMessage](ctx, b.client, b.callbackURL+"/v1/work-graphs/result-callback", candidate); err != nil {
|
||||||
|
return work.AgentExecutionResult{}, err
|
||||||
|
}
|
||||||
|
return work.AgentExecutionResult{State: work.AgentExecutionCompleted, Summary: "local cognitive specialist produced a candidate for independent verification", OutcomeRef: "candidate:" + request.Intent.DispatchID, ArtifactRefs: []string{"agent-output:" + request.Intent.DispatchID}, ObservedAtUnixMillis: time.Now().UnixMilli()}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func hasCriticalFailure(observations []capability.TaskCaseObservation) bool {
|
||||||
|
for _, observation := range observations {
|
||||||
|
if observation.CriticalFailure {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
func postJSON[T any](ctx context.Context, client *http.Client, url string, payload any) (T, error) {
|
||||||
|
var result T
|
||||||
|
body, err := json.Marshal(payload)
|
||||||
|
if err != nil {
|
||||||
|
return result, err
|
||||||
|
}
|
||||||
|
req, err := http.NewRequestWithContext(ctx, http.MethodPost, url, bytes.NewReader(body))
|
||||||
|
if err != nil {
|
||||||
|
return result, err
|
||||||
|
}
|
||||||
|
req.Header.Set("Content-Type", "application/json")
|
||||||
|
resp, err := client.Do(req)
|
||||||
|
if err != nil {
|
||||||
|
return result, err
|
||||||
|
}
|
||||||
|
defer resp.Body.Close()
|
||||||
|
if resp.StatusCode < 200 || resp.StatusCode >= 300 {
|
||||||
|
return result, fmt.Errorf("POST %s: status %s", url, resp.Status)
|
||||||
|
}
|
||||||
|
if resp.StatusCode == http.StatusNoContent {
|
||||||
|
return result, nil
|
||||||
|
}
|
||||||
|
if err := json.NewDecoder(resp.Body).Decode(&result); err != nil {
|
||||||
|
return result, err
|
||||||
|
}
|
||||||
|
return result, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func healthHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
|
if r.Method != http.MethodGet {
|
||||||
|
http.Error(w, "method not allowed", http.StatusMethodNotAllowed)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
w.Header().Set("Content-Type", "application/json")
|
||||||
|
_, _ = w.Write([]byte(`{"runtime":"agent-execution-bridge","status":"ok","capabilities":["task-evaluation","generic-cognitive-work"]}`))
|
||||||
|
}
|
||||||
|
|
||||||
|
func envOr(name, fallback string) string {
|
||||||
|
if value := strings.TrimSpace(os.Getenv(name)); value != "" {
|
||||||
|
return value
|
||||||
|
}
|
||||||
|
return fallback
|
||||||
|
}
|
||||||
@@ -0,0 +1,88 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"encoding/json"
|
||||||
|
"net/http"
|
||||||
|
"net/http/httptest"
|
||||||
|
"testing"
|
||||||
|
|
||||||
|
"git.cin.su/m/Assistant/contracts/capability"
|
||||||
|
"git.cin.su/m/Assistant/contracts/cognitive"
|
||||||
|
"git.cin.su/m/Assistant/contracts/work"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestBridgeWaitsForUnsupportedIntent(t *testing.T) {
|
||||||
|
b := bridge{client: http.DefaultClient}
|
||||||
|
result, err := b.execute(context.Background(), work.AgentExecutionRequest{Intent: work.AgentDispatchIntent{DispatchID: "dispatch-unsupported"}})
|
||||||
|
if err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
if result.State != work.AgentExecutionWaiting || result.ObservedAtUnixMillis < 1 {
|
||||||
|
t.Fatalf("result=%+v", result)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestHealthHandlerExposesBoundedCapability(t *testing.T) {
|
||||||
|
recorder := httptest.NewRecorder()
|
||||||
|
request := httptest.NewRequest(http.MethodGet, "/healthz", nil)
|
||||||
|
healthHandler(recorder, request)
|
||||||
|
if recorder.Code != http.StatusOK || recorder.Body.String() == "" {
|
||||||
|
t.Fatalf("status=%d body=%q", recorder.Code, recorder.Body.String())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestBridgeRunsTaskEvaluationThroughVerifierAndCallback(t *testing.T) {
|
||||||
|
profile := capability.TaskEvaluationProfile{ID: "profile-1", Revision: 1, CapabilityID: "capability-1", Stage: capability.TaskEvaluationGeneral, BenchmarkVersion: "general-v1", RequiredCaseIDs: []string{"case-1"}, QualityWeightMillis: 600, ReliabilityWeightMillis: 300, LatencyWeightMillis: 100}
|
||||||
|
verification := capability.TaskCaseVerification{Mode: capability.TaskCaseVerificationExactText, ExpectedText: "answer", MinimumQualityMillis: 900}
|
||||||
|
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
switch r.URL.Path {
|
||||||
|
case "/v1/task-evaluations/execute":
|
||||||
|
_ = json.NewEncoder(w).Encode(capability.TaskEvaluationExecutionResponse{ProfileID: profile.ID, BindingID: "binding-1", BindingRevision: 3, Responses: []capability.TaskCaseResponse{{CaseID: "case-1", ResponseText: "answer", LatencyMicros: 2, EvidenceArtifactRef: "artifact-1"}}, ObservedAtUnixMillis: 10})
|
||||||
|
case "/v1/task-evaluations/verify":
|
||||||
|
_ = json.NewEncoder(w).Encode(capability.TaskCaseVerificationResponse{CaseID: "case-1", Result: capability.EvaluationSupported, QualityScoreMillis: 900, LatencyMicros: 2, EvidenceArtifactRef: "artifact-1", VerificationEvidenceRef: "verify-1", VerifierIdentity: "verifier-1"})
|
||||||
|
case "/v1/work-graphs/task-evaluations/callback":
|
||||||
|
w.WriteHeader(http.StatusNoContent)
|
||||||
|
default:
|
||||||
|
http.NotFound(w, r)
|
||||||
|
}
|
||||||
|
}))
|
||||||
|
defer server.Close()
|
||||||
|
b := bridge{cognitiveURL: server.URL, callbackURL: server.URL, verifierURL: server.URL, client: server.Client()}
|
||||||
|
result, err := b.execute(context.Background(), work.AgentExecutionRequest{Intent: work.AgentDispatchIntent{DispatchID: "dispatch-1", TaskEvaluationBindingID: "binding-1", TaskEvaluationProfile: &profile, TaskEvaluationCases: []capability.TaskEvaluationCase{{CaseID: "case-1", Prompt: "answer", EvidenceArtifactRef: "artifact-1", Verification: verification}}, TaskEvaluationExecution: &work.TaskEvaluationDispatchContext{GraphID: "graph-1", GraphRevision: 1, NodeID: "node-1", BindingRevision: 3, ActorID: "actor-1", PrincipalID: "principal-1", ScopeID: "scope-1"}}})
|
||||||
|
if err != nil || result.State != work.AgentExecutionCompleted || result.OutcomeRef == "" {
|
||||||
|
t.Fatalf("result=%+v err=%v", result, err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestBridgeRunsGenericCognitiveWorkAsUnverifiedGraphCandidate(t *testing.T) {
|
||||||
|
var callback work.GraphResultCallback
|
||||||
|
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
switch r.URL.Path {
|
||||||
|
case "/v1/advisories":
|
||||||
|
var request cognitive.GatewayAdvisoryRequest
|
||||||
|
if err := json.NewDecoder(r.Body).Decode(&request); err != nil || request.Message != "find the bounded solution" {
|
||||||
|
t.Fatalf("unexpected advisory request: %+v err=%v", request, err)
|
||||||
|
}
|
||||||
|
_ = json.NewEncoder(w).Encode(cognitive.GatewayAdvisoryResponse{Version: cognitive.CreatorAdvisoryV1, RequestID: request.RequestID, AdvisoryText: "candidate answer", FinishReason: cognitive.FinishCompleted})
|
||||||
|
case "/v1/work-graphs/result-callback":
|
||||||
|
if err := json.NewDecoder(r.Body).Decode(&callback); err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
w.WriteHeader(http.StatusNoContent)
|
||||||
|
case "/v1/work-graphs/candidates/verify":
|
||||||
|
_ = json.NewEncoder(w).Encode(work.GenericCandidateVerificationResponse{Verified: true, VerificationEvidenceRef: "verification:generic-1", VerifierIdentity: "deterministic-generic-envelope-verifier-v1", Summary: "envelope verified"})
|
||||||
|
default:
|
||||||
|
http.NotFound(w, r)
|
||||||
|
}
|
||||||
|
}))
|
||||||
|
defer server.Close()
|
||||||
|
b := bridge{cognitiveURL: server.URL, callbackURL: server.URL, verifierURL: server.URL, client: server.Client()}
|
||||||
|
result, err := b.execute(context.Background(), work.AgentExecutionRequest{Intent: work.AgentDispatchIntent{
|
||||||
|
DispatchID: "dispatch-generic", RunID: "run-generic",
|
||||||
|
TaskEvaluationExecution: &work.TaskEvaluationDispatchContext{GraphID: "graph-1", GraphRevision: 2, NodeID: "node-1", ActorID: "actor-1", PrincipalID: "principal-1", ScopeID: "scope-1", GenericMessage: "find the bounded solution", GenericPurpose: "investigate", GenericDataPolicy: string(capability.DataPolicyLocalOnly)},
|
||||||
|
}})
|
||||||
|
if err != nil || result.State != work.AgentExecutionCompleted || callback.Candidate.Summary != "candidate answer" || callback.Candidate.AuthorRunID != "run-generic" || len(callback.Candidate.ArtifactRefs) != 2 {
|
||||||
|
t.Fatalf("result=%+v callback=%+v err=%v", result, callback, err)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -42,7 +42,7 @@ func main() {
|
|||||||
defer repository.Close()
|
defer repository.Close()
|
||||||
var executor ports.AgentExecutor
|
var executor ports.AgentExecutor
|
||||||
localFallback := false
|
localFallback := false
|
||||||
if bridgeURL, bridgeConfigured := loadProtectedBridgeURL(); bridgeConfigured {
|
if bridgeURL, bridgeConfigured := loadConfiguredBridgeURL(); bridgeConfigured {
|
||||||
executor, err = agentbridge.NewHTTPExecutor(bridgeURL, &http.Client{Timeout: *leaseTTL})
|
executor, err = agentbridge.NewHTTPExecutor(bridgeURL, &http.Client{Timeout: *leaseTTL})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Fprintln(os.Stderr, err)
|
fmt.Fprintln(os.Stderr, err)
|
||||||
@@ -99,6 +99,19 @@ func main() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func loadConfiguredBridgeURL() (string, bool) {
|
||||||
|
if bridgeURL, configured := loadProtectedBridgeURL(); configured {
|
||||||
|
return bridgeURL, true
|
||||||
|
}
|
||||||
|
// The URL is routing configuration, not a credential. A protected file
|
||||||
|
// remains preferred when an independently operated bridge is supplied.
|
||||||
|
value := strings.TrimSpace(os.Getenv("AGENT_EXECUTION_BRIDGE_URL"))
|
||||||
|
if value == "" || !strings.HasPrefix(value, "http://") && !strings.HasPrefix(value, "https://") {
|
||||||
|
return "", false
|
||||||
|
}
|
||||||
|
return value, true
|
||||||
|
}
|
||||||
|
|
||||||
func loadProtectedBridgeURL() (string, bool) {
|
func loadProtectedBridgeURL() (string, bool) {
|
||||||
return loadProtectedBridgeURLFrom("/run/secrets", "/run/secrets/agent_execution_bridge_url")
|
return loadProtectedBridgeURLFrom("/run/secrets", "/run/secrets/agent_execution_bridge_url")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -94,13 +94,15 @@ func workerStatusHandler(executorConfigured bool, localFallback ...interface{})
|
|||||||
}
|
}
|
||||||
if local {
|
if local {
|
||||||
baseStatus.Mode = "local-executor"
|
baseStatus.Mode = "local-executor"
|
||||||
baseStatus.Reason = "bounded local task-evaluation executor is active; unsupported work remains durably waiting"
|
baseStatus.Ready = true
|
||||||
|
baseStatus.Reason = "bounded local task-evaluation capability is ready; unsupported work remains durably waiting"
|
||||||
baseStatus.Capabilities = []string{"task-evaluation"}
|
baseStatus.Capabilities = []string{"task-evaluation"}
|
||||||
}
|
}
|
||||||
if executorConfigured {
|
if executorConfigured {
|
||||||
baseStatus.Mode = "execution"
|
baseStatus.Mode = "execution"
|
||||||
baseStatus.Ready = true
|
baseStatus.Ready = true
|
||||||
baseStatus.Reason = "typed agent execution bridge configured"
|
baseStatus.Reason = "typed agent execution bridge configured"
|
||||||
|
baseStatus.Capabilities = []string{"task-evaluation", "generic-cognitive-work"}
|
||||||
}
|
}
|
||||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||||
if r.Method != http.MethodGet || (r.URL.Path != "/healthz" && r.URL.Path != "/readyz" && r.URL.Path != "/status") {
|
if r.Method != http.MethodGet || (r.URL.Path != "/healthz" && r.URL.Path != "/readyz" && r.URL.Path != "/status") {
|
||||||
|
|||||||
@@ -39,14 +39,14 @@ func TestWorkerStatusReportsRecoveryOnlyWithoutExecutor(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestWorkerStatusReportsLocalExecutor(t *testing.T) {
|
func TestWorkerStatusReportsLocalExecutorCapabilityReady(t *testing.T) {
|
||||||
response := httptest.NewRecorder()
|
response := httptest.NewRecorder()
|
||||||
workerStatusHandler(false, true).ServeHTTP(response, httptest.NewRequest(http.MethodGet, "/status", nil))
|
workerStatusHandler(false, true).ServeHTTP(response, httptest.NewRequest(http.MethodGet, "/status", nil))
|
||||||
var value workerStatusResponse
|
var value workerStatusResponse
|
||||||
if err := json.NewDecoder(response.Body).Decode(&value); err != nil {
|
if err := json.NewDecoder(response.Body).Decode(&value); err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
if response.Code != http.StatusOK || value.Ready || value.Mode != "local-executor" || !value.LocalFallback || !value.LocalExecutor {
|
if response.Code != http.StatusOK || !value.Ready || value.Mode != "local-executor" || !value.LocalFallback || !value.LocalExecutor {
|
||||||
t.Fatalf("unexpected status: code=%d value=%+v", response.Code, value)
|
t.Fatalf("unexpected status: code=%d value=%+v", response.Code, value)
|
||||||
}
|
}
|
||||||
if len(value.Capabilities) != 1 || value.Capabilities[0] != "task-evaluation" {
|
if len(value.Capabilities) != 1 || value.Capabilities[0] != "task-evaluation" {
|
||||||
@@ -61,18 +61,23 @@ func TestWorkerStatusDoesNotCallLocalFallbackAnExternalExecutor(t *testing.T) {
|
|||||||
if err := json.NewDecoder(response.Body).Decode(&value); err != nil {
|
if err := json.NewDecoder(response.Body).Decode(&value); err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
if value.ExecutorConfigured || value.Ready || !value.LocalFallback || !value.LocalExecutor || value.Mode != "local-executor" {
|
if value.ExecutorConfigured || !value.Ready || !value.LocalFallback || !value.LocalExecutor || value.Mode != "local-executor" {
|
||||||
t.Fatalf("local fallback was presented as external execution: %+v", value)
|
t.Fatalf("local fallback was presented as external execution: %+v", value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestWorkerReadyzRequiresExecutor(t *testing.T) {
|
func TestWorkerReadyzRequiresAnAdvertisedCapability(t *testing.T) {
|
||||||
response := httptest.NewRecorder()
|
response := httptest.NewRecorder()
|
||||||
workerStatusHandler(false).ServeHTTP(response, httptest.NewRequest(http.MethodGet, "/readyz", nil))
|
workerStatusHandler(false).ServeHTTP(response, httptest.NewRequest(http.MethodGet, "/readyz", nil))
|
||||||
if response.Code != http.StatusServiceUnavailable {
|
if response.Code != http.StatusServiceUnavailable {
|
||||||
t.Fatalf("readyz status=%d", response.Code)
|
t.Fatalf("readyz status=%d", response.Code)
|
||||||
}
|
}
|
||||||
response = httptest.NewRecorder()
|
response = httptest.NewRecorder()
|
||||||
|
workerStatusHandler(false, true).ServeHTTP(response, httptest.NewRequest(http.MethodGet, "/readyz", nil))
|
||||||
|
if response.Code != http.StatusOK {
|
||||||
|
t.Fatalf("local capability readyz status=%d", response.Code)
|
||||||
|
}
|
||||||
|
response = httptest.NewRecorder()
|
||||||
workerStatusHandler(true).ServeHTTP(response, httptest.NewRequest(http.MethodGet, "/readyz", nil))
|
workerStatusHandler(true).ServeHTTP(response, httptest.NewRequest(http.MethodGet, "/readyz", nil))
|
||||||
if response.Code != http.StatusOK {
|
if response.Code != http.StatusOK {
|
||||||
t.Fatalf("configured readyz status=%d", response.Code)
|
t.Fatalf("configured readyz status=%d", response.Code)
|
||||||
|
|||||||
@@ -163,8 +163,8 @@ func interpretationPrompt(request cognitive.GatewayInterpretationRequest) string
|
|||||||
Allowed speech acts: DIRECTIVE, ASSERTION, DECISION, PREFERENCE, QUESTION, HYPOTHESIS, CORRECTION, REQUEST_TO_INVESTIGATE, CONFIRMATION, REJECTION, CANCELLATION, CONVERSATIONAL, UNKNOWN.
|
Allowed speech acts: DIRECTIVE, ASSERTION, DECISION, PREFERENCE, QUESTION, HYPOTHESIS, CORRECTION, REQUEST_TO_INVESTIGATE, CONFIRMATION, REJECTION, CANCELLATION, CONVERSATIONAL, UNKNOWN.
|
||||||
Allowed applicability: APPLICABLE, LOW_CONFIDENCE, MIXED_INTENT, NEEDS_BROADER_INTERPRETATION, CLARIFICATION_REQUIRED.
|
Allowed applicability: APPLICABLE, LOW_CONFIDENCE, MIXED_INTENT, NEEDS_BROADER_INTERPRETATION, CLARIFICATION_REQUIRED.
|
||||||
Allowed clarification: NOT_REQUIRED or REQUIRED.
|
Allowed clarification: NOT_REQUIRED or REQUIRED.
|
||||||
Capability hints may only contain known capability kinds like COGNITIVE_REASONING, MODIFY_CODE, RUN_TESTS, SEND_EMAIL, SCHEDULE_REMINDER, VERIFY_FACT, INSPECT_PROJECT, READ_DATABASE, QUERY_LOGS.
|
Capability hints may only contain known capability kinds like COGNITIVE_REASONING, WEB_RESEARCH, MODIFY_CODE, RUN_TESTS, SEND_EMAIL, SCHEDULE_REMINDER, VERIFY_FACT, INSPECT_PROJECT, READ_DATABASE, QUERY_LOGS.
|
||||||
Interpret the human utterance semantically. Do not claim action execution. Do not treat punctuation alone as decisive. If uncertain, set applicability accordingly.
|
Interpret the human utterance semantically. Do not claim action execution. A question asking for a current, external or otherwise source-dependent fact should receive WEB_RESEARCH; do not answer that fact from model memory. A request to discuss hypotheses or options is different and may receive COGNITIVE_REASONING. Do not treat punctuation alone as decisive. If uncertain, set applicability accordingly.
|
||||||
Message: %q
|
Message: %q
|
||||||
Deterministic primary: %s
|
Deterministic primary: %s
|
||||||
Deterministic secondary: %s
|
Deterministic secondary: %s
|
||||||
|
|||||||
@@ -97,7 +97,8 @@ func main() {
|
|||||||
if gpuErr != nil {
|
if gpuErr != nil {
|
||||||
log.Printf("optional GPU provider disabled: %v", gpuErr)
|
log.Printf("optional GPU provider disabled: %v", gpuErr)
|
||||||
} else if gpuConfigured {
|
} else if gpuConfigured {
|
||||||
gpuAdapter, adapterErr := models.NewOpenAICompatibleLocalAdapterWithAPIKey(gpuURL, gpuKey, nil)
|
gpuTimeout := durationEnv("LOCAL_GPU_PROVIDER_TIMEOUT", 60*time.Second)
|
||||||
|
gpuAdapter, adapterErr := models.NewOpenAICompatibleLocalAdapterWithAPIKeyAndTimeout(gpuURL, gpuKey, nil, gpuTimeout)
|
||||||
if adapterErr != nil {
|
if adapterErr != nil {
|
||||||
log.Printf("optional GPU provider disabled: %v", adapterErr)
|
log.Printf("optional GPU provider disabled: %v", adapterErr)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"testing"
|
"testing"
|
||||||
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestLifeboatProviderIsOptionalAndLocalAdapterBacked(t *testing.T) {
|
func TestLifeboatProviderIsOptionalAndLocalAdapterBacked(t *testing.T) {
|
||||||
@@ -19,6 +20,21 @@ func TestLifeboatProviderIsOptionalAndLocalAdapterBacked(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestGPUProviderTimeoutUsesBoundedConfigurableDefault(t *testing.T) {
|
||||||
|
t.Setenv("LOCAL_GPU_PROVIDER_TIMEOUT", "")
|
||||||
|
if got := durationEnv("LOCAL_GPU_PROVIDER_TIMEOUT", 60*time.Second); got != 60*time.Second {
|
||||||
|
t.Fatalf("default GPU timeout=%s", got)
|
||||||
|
}
|
||||||
|
t.Setenv("LOCAL_GPU_PROVIDER_TIMEOUT", "31s")
|
||||||
|
if got := durationEnv("LOCAL_GPU_PROVIDER_TIMEOUT", 60*time.Second); got != 31*time.Second {
|
||||||
|
t.Fatalf("configured GPU timeout=%s", got)
|
||||||
|
}
|
||||||
|
t.Setenv("LOCAL_GPU_PROVIDER_TIMEOUT", "invalid")
|
||||||
|
if got := durationEnv("LOCAL_GPU_PROVIDER_TIMEOUT", 60*time.Second); got != 60*time.Second {
|
||||||
|
t.Fatalf("invalid GPU timeout=%s", got)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func TestLoadLocalCPUProviderAPIKeyUsesProtectedFileReference(t *testing.T) {
|
func TestLoadLocalCPUProviderAPIKeyUsesProtectedFileReference(t *testing.T) {
|
||||||
t.Setenv("LOCAL_CPU_PROVIDER_API_KEY", "")
|
t.Setenv("LOCAL_CPU_PROVIDER_API_KEY", "")
|
||||||
_ = os.Unsetenv("LOCAL_CPU_PROVIDER_API_KEY")
|
_ = os.Unsetenv("LOCAL_CPU_PROVIDER_API_KEY")
|
||||||
|
|||||||
@@ -61,13 +61,6 @@ func (c cognitiveInterpretationClient) Interpret(ctx context.Context, request co
|
|||||||
}
|
}
|
||||||
|
|
||||||
func shouldRequestBroaderInterpretation(result interactiondomain.SemanticResult) bool {
|
func shouldRequestBroaderInterpretation(result interactiondomain.SemanticResult) bool {
|
||||||
// The built-in advisory channel is the default conversational path. A
|
|
||||||
// simple question must not first wait for the slower, strict JSON
|
|
||||||
// interpretation route: that route exists for ambiguity and work routing,
|
|
||||||
// not as a prerequisite for talking to Domovoy.
|
|
||||||
if isSimpleLocalQuestion(result) {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
switch result.Interpretation.Applicability {
|
switch result.Interpretation.Applicability {
|
||||||
case interaction.SemanticNeedsBroaderInterpret, interaction.SemanticLowConfidence, interaction.SemanticMixedIntent:
|
case interaction.SemanticNeedsBroaderInterpret, interaction.SemanticLowConfidence, interaction.SemanticMixedIntent:
|
||||||
return true
|
return true
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import (
|
|||||||
interactiondomain "git.cin.su/m/Assistant/modules/interaction/domain"
|
interactiondomain "git.cin.su/m/Assistant/modules/interaction/domain"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSimpleQuestionUsesBuiltInAdvisoryWithoutStrictInterpretation(t *testing.T) {
|
func TestSimpleQuestionUsesStrictInterpretationForSemanticRouting(t *testing.T) {
|
||||||
result := interactiondomain.SemanticResult{
|
result := interactiondomain.SemanticResult{
|
||||||
Interpretation: interaction.UtteranceInterpretation{
|
Interpretation: interaction.UtteranceInterpretation{
|
||||||
SpeechAct: interaction.SpeechActQuestion,
|
SpeechAct: interaction.SpeechActQuestion,
|
||||||
@@ -16,8 +16,8 @@ func TestSimpleQuestionUsesBuiltInAdvisoryWithoutStrictInterpretation(t *testing
|
|||||||
},
|
},
|
||||||
CapabilityHints: []string{"COGNITIVE_REASONING", "VERIFY_FACT"},
|
CapabilityHints: []string{"COGNITIVE_REASONING", "VERIFY_FACT"},
|
||||||
}
|
}
|
||||||
if shouldRequestBroaderInterpretation(result) {
|
if !shouldRequestBroaderInterpretation(result) {
|
||||||
t.Fatal("simple question must go directly to the built-in advisory path")
|
t.Fatal("simple question must reach semantic interpretation before any answer")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import (
|
|||||||
interactiondomain "git.cin.su/m/Assistant/modules/interaction/domain"
|
interactiondomain "git.cin.su/m/Assistant/modules/interaction/domain"
|
||||||
situationdomain "git.cin.su/m/Assistant/modules/situation/domain"
|
situationdomain "git.cin.su/m/Assistant/modules/situation/domain"
|
||||||
workdomain "git.cin.su/m/Assistant/modules/work/domain"
|
workdomain "git.cin.su/m/Assistant/modules/work/domain"
|
||||||
|
"git.cin.su/m/Assistant/platform/ids"
|
||||||
platformsecrets "git.cin.su/m/Assistant/platform/secrets"
|
platformsecrets "git.cin.su/m/Assistant/platform/secrets"
|
||||||
"git.cin.su/m/Assistant/runtime/health"
|
"git.cin.su/m/Assistant/runtime/health"
|
||||||
"github.com/jackc/pgx/v5"
|
"github.com/jackc/pgx/v5"
|
||||||
@@ -621,6 +622,17 @@ func main() {
|
|||||||
planningReply = humanCognitiveChannelReply(semantic.InformationRequestKind, semantic.Interpretation.SpeechAct, health, healthErr)
|
planningReply = humanCognitiveChannelReply(semantic.InformationRequestKind, semantic.Interpretation.SpeechAct, health, healthErr)
|
||||||
needsCognition = false
|
needsCognition = false
|
||||||
}
|
}
|
||||||
|
researchBacked := false
|
||||||
|
if hasCapabilityHint(semantic.CapabilityHints, "WEB_RESEARCH") && semantic.Interpretation.Clarification != interaction.ClarificationRequired {
|
||||||
|
if planID, idErr := ids.New(); idErr == nil {
|
||||||
|
result, researchErr := researchClient.SearchWeb(r.Context(), epistemics.WebSearchRequest{
|
||||||
|
Plan: epistemics.ResearchPlan{ID: epistemics.ResearchPlanID("plan:" + planID), Question: utterance.Content, SourceClasses: []string{"web-search"}, FreshnessPolicy: "current"},
|
||||||
|
PropositionKey: "question:" + string(utterance.ID), Query: utterance.Content,
|
||||||
|
})
|
||||||
|
planningReply, researchBacked = renderResearchReply(result, researchErr)
|
||||||
|
needsCognition = false
|
||||||
|
}
|
||||||
|
}
|
||||||
if helpPath.Reply != "" {
|
if helpPath.Reply != "" {
|
||||||
planningReply = helpPath.Reply
|
planningReply = helpPath.Reply
|
||||||
needsCognition = false
|
needsCognition = false
|
||||||
@@ -718,6 +730,7 @@ func main() {
|
|||||||
Clarification: semantic.Interpretation.Clarification,
|
Clarification: semantic.Interpretation.Clarification,
|
||||||
WorkPlanned: workPlanned,
|
WorkPlanned: workPlanned,
|
||||||
PlanningReply: planningReply,
|
PlanningReply: planningReply,
|
||||||
|
ResearchBacked: researchBacked,
|
||||||
CapabilityStatus: capabilityStatus,
|
CapabilityStatus: capabilityStatus,
|
||||||
CapabilityKind: capabilityKind,
|
CapabilityKind: capabilityKind,
|
||||||
CapabilityHints: toCapabilityKinds(semantic.CapabilityHints),
|
CapabilityHints: toCapabilityKinds(semantic.CapabilityHints),
|
||||||
@@ -1427,6 +1440,32 @@ func envInt(name string, fallback int) int {
|
|||||||
return value
|
return value
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func hasCapabilityHint(hints []string, wanted string) bool {
|
||||||
|
for _, hint := range hints {
|
||||||
|
if hint == wanted {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
func renderResearchReply(result epistemics.ResearchResult, researchErr error) (string, bool) {
|
||||||
|
if researchErr != nil {
|
||||||
|
return "Я не смог получить проверяемые данные из research-источника, поэтому не буду придумывать ответ.", false
|
||||||
|
}
|
||||||
|
lines := make([]string, 0, len(result.Findings))
|
||||||
|
for _, finding := range result.Findings {
|
||||||
|
if finding.State != epistemics.FindingSupported || strings.TrimSpace(finding.Excerpt.Text) == "" || strings.TrimSpace(finding.Source.Locator) == "" {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
lines = append(lines, "- "+finding.Excerpt.Text+"\n Источник: "+finding.Source.Locator)
|
||||||
|
}
|
||||||
|
if len(lines) == 0 {
|
||||||
|
return "Я не получил достаточно согласованных данных из проверяемых источников, поэтому не буду выдавать предположение как факт.", false
|
||||||
|
}
|
||||||
|
return "Нашёл точные выдержки из подключённого источника. Я не заменяю их догадкой:\n" + strings.Join(lines, "\n"), true
|
||||||
|
}
|
||||||
|
|
||||||
func humanCognitiveModelInventory(candidates []capability.ResolvedCognitiveBinding, inventoryErr error) string {
|
func humanCognitiveModelInventory(candidates []capability.ResolvedCognitiveBinding, inventoryErr error) string {
|
||||||
if inventoryErr != nil {
|
if inventoryErr != nil {
|
||||||
return "Я не смогла прочитать реестр подключённых моделей. Встроенный канал Домового остаётся доступен; настройки можно проверить повторно после восстановления реестра. Ключи и пароли не выводятся в чат."
|
return "Я не смогла прочитать реестр подключённых моделей. Встроенный канал Домового остаётся доступен; настройки можно проверить повторно после восстановления реестра. Ключи и пароли не выводятся в чат."
|
||||||
|
|||||||
@@ -51,3 +51,28 @@ func (c researchRuntimeClient) EvaluateWeb(ctx context.Context, request epistemi
|
|||||||
}
|
}
|
||||||
return result, nil
|
return result, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c researchRuntimeClient) SearchWeb(ctx context.Context, request epistemics.WebSearchRequest) (epistemics.ResearchResult, error) {
|
||||||
|
payload, err := json.Marshal(request)
|
||||||
|
if err != nil {
|
||||||
|
return epistemics.ResearchResult{}, err
|
||||||
|
}
|
||||||
|
httpRequest, err := http.NewRequestWithContext(ctx, http.MethodPost, c.baseURL+"/v1/research/web/search", bytes.NewReader(payload))
|
||||||
|
if err != nil {
|
||||||
|
return epistemics.ResearchResult{}, err
|
||||||
|
}
|
||||||
|
httpRequest.Header.Set("Content-Type", "application/json")
|
||||||
|
response, err := c.client.Do(httpRequest)
|
||||||
|
if err != nil {
|
||||||
|
return epistemics.ResearchResult{}, err
|
||||||
|
}
|
||||||
|
defer response.Body.Close()
|
||||||
|
if response.StatusCode < 200 || response.StatusCode >= 300 {
|
||||||
|
return epistemics.ResearchResult{}, fmt.Errorf("research search status %d", response.StatusCode)
|
||||||
|
}
|
||||||
|
var result epistemics.ResearchResult
|
||||||
|
if err := json.NewDecoder(response.Body).Decode(&result); err != nil {
|
||||||
|
return epistemics.ResearchResult{}, err
|
||||||
|
}
|
||||||
|
return result, nil
|
||||||
|
}
|
||||||
|
|||||||
@@ -151,6 +151,44 @@ func TestChatMessageUsesCoreAndLocalOnlyCognitiveGateway(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestChatMessageDoesNotExposeUnverifiedQuestionAsFact(t *testing.T) {
|
||||||
|
core := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
switch {
|
||||||
|
case r.Method == http.MethodGet && r.URL.Path == "/v1/creator/sessions/current":
|
||||||
|
_ = json.NewEncoder(w).Encode(identity.CreatorSession{ActorID: "actor-1", PrincipalID: "principal-1"})
|
||||||
|
case r.Method == http.MethodPost && r.URL.Path == "/v1/creator/chat/messages":
|
||||||
|
w.WriteHeader(http.StatusCreated)
|
||||||
|
_ = json.NewEncoder(w).Encode(interaction.ChatMessageResponse{ConversationID: "conversation-1", UtteranceID: "utterance-1", SpeechAct: interaction.SpeechActQuestion, NeedsCognition: true, FallbackText: "небезопасная модельная догадка"})
|
||||||
|
default:
|
||||||
|
t.Fatalf("unexpected core route %s %s", r.Method, r.URL.Path)
|
||||||
|
}
|
||||||
|
}))
|
||||||
|
defer core.Close()
|
||||||
|
cognitiveRuntime := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
t.Fatalf("unverified question must not reach advisory: %s %s", r.Method, r.URL.Path)
|
||||||
|
}))
|
||||||
|
defer cognitiveRuntime.Close()
|
||||||
|
handler, err := newHandler(core.URL, "http://continuity", "http://commit", core.Client(), cognitiveRuntime.URL)
|
||||||
|
if err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
request := httptest.NewRequest(http.MethodPost, "/api/chat/messages", strings.NewReader(`{"message":"Какая погода?"}`))
|
||||||
|
request.Header.Set("Authorization", "Bearer session-token")
|
||||||
|
request.Header.Set("Content-Type", "application/json")
|
||||||
|
recorder := httptest.NewRecorder()
|
||||||
|
handler.ServeHTTP(recorder, request)
|
||||||
|
if recorder.Code != http.StatusOK {
|
||||||
|
t.Fatalf("expected status 200, got %d body=%s", recorder.Code, recorder.Body.String())
|
||||||
|
}
|
||||||
|
var response browserChatResponse
|
||||||
|
if err := json.NewDecoder(recorder.Body).Decode(&response); err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
if response.Cognition != "verification_required" || strings.Contains(response.ReplyText, "небезопасная") || !strings.Contains(response.ReplyText, "не буду придумывать") {
|
||||||
|
t.Fatalf("unexpected truth-first response: %#v", response)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func TestChatMessageReturnsHumanCapabilityMetadata(t *testing.T) {
|
func TestChatMessageReturnsHumanCapabilityMetadata(t *testing.T) {
|
||||||
core := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
core := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||||
switch {
|
switch {
|
||||||
|
|||||||
@@ -32,3 +32,22 @@ func TestCreatorConsoleResponsiveGuardrails(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestChatResponsiveGuardrailsConstrainMobileGridItem(t *testing.T) {
|
||||||
|
css, err := staticFiles.ReadFile("static/assets/chat.css")
|
||||||
|
if err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
stylesheet := string(css)
|
||||||
|
for _, guard := range []string{
|
||||||
|
".chat-view { width: 100%; min-width: 0;",
|
||||||
|
"@media (max-width: 640px)",
|
||||||
|
".chat-layout { height: auto; display: block; }",
|
||||||
|
".chat-header > .operator-link, .build-meta { display: none; }",
|
||||||
|
".chat-header .cognitive-console-link { flex: 0 1 110px;",
|
||||||
|
} {
|
||||||
|
if !strings.Contains(stylesheet, guard) {
|
||||||
|
t.Fatalf("chat responsive guardrail missing: %s", guard)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -209,6 +209,7 @@ type browserChatResponse struct {
|
|||||||
CapabilityKind string `json:"capability_kind"`
|
CapabilityKind string `json:"capability_kind"`
|
||||||
CapabilityHints []capability.CapabilityKind `json:"capability_hints,omitempty"`
|
CapabilityHints []capability.CapabilityKind `json:"capability_hints,omitempty"`
|
||||||
RequestedOutcome string `json:"requested_outcome,omitempty"`
|
RequestedOutcome string `json:"requested_outcome,omitempty"`
|
||||||
|
ResearchBacked bool `json:"research_backed"`
|
||||||
InterpretationConfidenceMillis int64 `json:"interpretation_confidence_millis,omitempty"`
|
InterpretationConfidenceMillis int64 `json:"interpretation_confidence_millis,omitempty"`
|
||||||
DelegationID string `json:"delegation_id"`
|
DelegationID string `json:"delegation_id"`
|
||||||
DelegationState string `json:"delegation_state"`
|
DelegationState string `json:"delegation_state"`
|
||||||
@@ -467,7 +468,11 @@ func (g *gateway) handleChatMessage(w http.ResponseWriter, r *http.Request) {
|
|||||||
saved.NeedsCognition = false
|
saved.NeedsCognition = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if saved.NeedsCognition && !saved.WorkPlanned && saved.Clarification != interaction.ClarificationRequired {
|
if saved.SpeechAct == interaction.SpeechActQuestion && saved.InformationRequestKind == "" && !saved.ResearchBacked && !saved.WorkPlanned && saved.Clarification != interaction.ClarificationRequired && !asksAttention(browserRequest.Message) {
|
||||||
|
reply = truthfulVerificationRequiredReply()
|
||||||
|
cognition = "verification_required"
|
||||||
|
saved.NeedsCognition = false
|
||||||
|
} else if saved.NeedsCognition && !saved.WorkPlanned && saved.Clarification != interaction.ClarificationRequired {
|
||||||
cognition = "unavailable"
|
cognition = "unavailable"
|
||||||
requestID, idErr := ids.New()
|
requestID, idErr := ids.New()
|
||||||
if idErr == nil {
|
if idErr == nil {
|
||||||
@@ -501,6 +506,7 @@ func (g *gateway) handleChatMessage(w http.ResponseWriter, r *http.Request) {
|
|||||||
CapabilityKind: string(saved.CapabilityKind),
|
CapabilityKind: string(saved.CapabilityKind),
|
||||||
CapabilityHints: saved.CapabilityHints,
|
CapabilityHints: saved.CapabilityHints,
|
||||||
RequestedOutcome: saved.RequestedOutcome,
|
RequestedOutcome: saved.RequestedOutcome,
|
||||||
|
ResearchBacked: saved.ResearchBacked,
|
||||||
InterpretationConfidenceMillis: saved.InterpretationConfidenceMillis,
|
InterpretationConfidenceMillis: saved.InterpretationConfidenceMillis,
|
||||||
DelegationID: saved.DelegationID,
|
DelegationID: saved.DelegationID,
|
||||||
DelegationState: saved.DelegationState,
|
DelegationState: saved.DelegationState,
|
||||||
@@ -508,6 +514,10 @@ func (g *gateway) handleChatMessage(w http.ResponseWriter, r *http.Request) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func truthfulVerificationRequiredReply() string {
|
||||||
|
return "Я не могу сейчас подтвердить этот факт по проверенному источнику, поэтому не буду придумывать ответ. Для проверки используйте официальный сайт соответствующей службы или надёжный сервис с текущими данными; когда подключён research-маршрут, Домовой сможет проверить это сам."
|
||||||
|
}
|
||||||
|
|
||||||
func localChatContext(saved interaction.ChatMessageResponse) []cognitive.ContextExcerpt {
|
func localChatContext(saved interaction.ChatMessageResponse) []cognitive.ContextExcerpt {
|
||||||
if strings.TrimSpace(saved.ActiveProjectName) == "" {
|
if strings.TrimSpace(saved.ActiveProjectName) == "" {
|
||||||
return []cognitive.ContextExcerpt{}
|
return []cognitive.ContextExcerpt{}
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ textarea { resize: vertical; min-height: 84px; max-height: 240px; padding: 14px;
|
|||||||
.login-form button, .composer button { border: 0; color: #11150f; background: var(--signal); font-weight: 700; }
|
.login-form button, .composer button { border: 0; color: #11150f; background: var(--signal); font-weight: 700; }
|
||||||
.login-form button { width: 100%; height: 50px; margin-top: 18px; }
|
.login-form button { width: 100%; height: 50px; margin-top: 18px; }
|
||||||
#login-error { min-height: 20px; color: var(--bad); font-size: 13px; }
|
#login-error { min-height: 20px; color: var(--bad); font-size: 13px; }
|
||||||
.chat-view { height: 100vh; min-height: 0; display: grid; grid-template-rows: 64px minmax(0, 1fr); overflow: hidden; }
|
.chat-view { width: 100%; min-width: 0; height: 100vh; min-height: 0; display: grid; grid-template-rows: 64px minmax(0, 1fr); overflow: hidden; }
|
||||||
.chat-header { min-width: 0; display: flex; align-items: center; gap: 14px; padding: 0 22px; border-bottom: 1px solid var(--line); background: rgba(16, 23, 20, .98); }
|
.chat-header { min-width: 0; display: flex; align-items: center; gap: 14px; padding: 0 22px; border-bottom: 1px solid var(--line); background: rgba(16, 23, 20, .98); }
|
||||||
.chat-header a { color: var(--ink); text-decoration: none; font: 400 24px/1 var(--serif); }
|
.chat-header a { color: var(--ink); text-decoration: none; font: 400 24px/1 var(--serif); }
|
||||||
#active-focus { color: var(--good); }
|
#active-focus { color: var(--good); }
|
||||||
@@ -107,9 +107,10 @@ textarea { resize: vertical; min-height: 84px; max-height: 240px; padding: 14px;
|
|||||||
.conversation-starters { align-items: stretch; }
|
.conversation-starters { align-items: stretch; }
|
||||||
.conversation-starters span { width: 100%; }
|
.conversation-starters span { width: 100%; }
|
||||||
.chat-header { gap: 10px; padding: 0 12px; }
|
.chat-header { gap: 10px; padding: 0 12px; }
|
||||||
.chat-header .cognitive-status { display: inline-flex; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
|
.chat-header .cognitive-status { display: inline-flex; flex: 1 1 110px; min-width: 0; max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
|
||||||
.build-meta { font-size: 8px; letter-spacing: .04em; }
|
.chat-header .cognitive-console-link { flex: 0 1 110px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
|
||||||
.build-meta time { font-size: 7px; }
|
.chat-header > .operator-link, .build-meta { display: none; }
|
||||||
|
.chat-header > #logout { flex: 0 0 38px; }
|
||||||
.chat-layout { height: auto; display: block; }
|
.chat-layout { height: auto; display: block; }
|
||||||
.chat-side, .chat-main { min-height: auto; max-height: none; overflow: visible; }
|
.chat-side, .chat-main { min-height: auto; max-height: none; overflow: visible; }
|
||||||
.chat-left, .chat-right { border: 0; border-bottom: 1px solid var(--line); }
|
.chat-left, .chat-right { border: 0; border-bottom: 1px solid var(--line); }
|
||||||
|
|||||||
@@ -89,6 +89,26 @@ func main() {
|
|||||||
w.Header().Set("Content-Type", "application/json")
|
w.Header().Set("Content-Type", "application/json")
|
||||||
_ = json.NewEncoder(w).Encode(result)
|
_ = json.NewEncoder(w).Encode(result)
|
||||||
})
|
})
|
||||||
|
searchConnector := researchadapter.SearchConnector{EndpointTemplate: os.Getenv("RESEARCH_SEARCH_URL_TEMPLATE"), AllowedHosts: allowedHosts(os.Getenv("RESEARCH_SEARCH_ALLOWED_HOSTS")), Client: &http.Client{Timeout: 8 * time.Second}, MaxResults: 3}
|
||||||
|
mux.HandleFunc("POST /v1/research/web/search", func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
var request epistemics.WebSearchRequest
|
||||||
|
if err := json.NewDecoder(http.MaxBytesReader(w, r.Body, 64<<10)).Decode(&request); err != nil {
|
||||||
|
http.Error(w, "invalid web search request", http.StatusBadRequest)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
candidates, err := searchConnector.Collect(r.Context(), request, time.Now().UnixMilli())
|
||||||
|
if err != nil {
|
||||||
|
http.Error(w, err.Error(), http.StatusUnprocessableEntity)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
result, err := application.EvaluateAndPersist(r.Context(), epistemics.ResearchEvaluationRequest{Plan: request.Plan, Candidates: candidates}, repository, time.Now().UnixMilli())
|
||||||
|
if err != nil {
|
||||||
|
http.Error(w, err.Error(), http.StatusUnprocessableEntity)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
w.Header().Set("Content-Type", "application/json")
|
||||||
|
_ = json.NewEncoder(w).Encode(result)
|
||||||
|
})
|
||||||
addr := os.Getenv("LISTEN_ADDR")
|
addr := os.Getenv("LISTEN_ADDR")
|
||||||
if addr == "" {
|
if addr == "" {
|
||||||
addr = ":8087"
|
addr = ":8087"
|
||||||
|
|||||||
@@ -10,9 +10,11 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"git.cin.su/m/Assistant/contracts/capability"
|
"git.cin.su/m/Assistant/contracts/capability"
|
||||||
|
"git.cin.su/m/Assistant/contracts/work"
|
||||||
)
|
)
|
||||||
|
|
||||||
const verifierIdentity = "deterministic-task-verifier-v1"
|
const verifierIdentity = "deterministic-task-verifier-v1"
|
||||||
|
const genericVerifierIdentity = "deterministic-generic-envelope-verifier-v1"
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
mux := http.NewServeMux()
|
mux := http.NewServeMux()
|
||||||
@@ -21,6 +23,7 @@ func main() {
|
|||||||
_, _ = w.Write([]byte(`{"runtime":"task-verifier","status":"ok"}`))
|
_, _ = w.Write([]byte(`{"runtime":"task-verifier","status":"ok"}`))
|
||||||
})
|
})
|
||||||
mux.HandleFunc("POST /v1/task-evaluations/verify", verifyHandler)
|
mux.HandleFunc("POST /v1/task-evaluations/verify", verifyHandler)
|
||||||
|
mux.HandleFunc("POST /v1/work-graphs/candidates/verify", genericCandidateVerifyHandler)
|
||||||
addr := ":8091"
|
addr := ":8091"
|
||||||
if value := strings.TrimSpace(os.Getenv("LISTEN_ADDR")); value != "" {
|
if value := strings.TrimSpace(os.Getenv("LISTEN_ADDR")); value != "" {
|
||||||
addr = value
|
addr = value
|
||||||
@@ -30,6 +33,27 @@ func main() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func genericCandidateVerifyHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
|
var request work.GenericCandidateVerificationRequest
|
||||||
|
decoder := json.NewDecoder(http.MaxBytesReader(w, r.Body, 64<<10))
|
||||||
|
decoder.DisallowUnknownFields()
|
||||||
|
if err := decoder.Decode(&request); err != nil || request.GraphID == "" || request.GraphRevision < 1 || request.NodeID == "" || request.AuthorRunID == "" || request.CandidateID == "" || strings.TrimSpace(request.Summary) == "" || len(request.EvidenceRefs) == 0 {
|
||||||
|
http.Error(w, "invalid generic candidate envelope", http.StatusBadRequest)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
payload := fmt.Sprintf("%s|%s|%d|%s|%s|%s|%s", genericVerifierIdentity, request.GraphID, request.GraphRevision, request.NodeID, request.AuthorRunID, request.CandidateID, strings.Join(evidenceRefStrings(request.EvidenceRefs), "|"))
|
||||||
|
digest := sha256.Sum256([]byte(payload))
|
||||||
|
writeJSON(w, work.GenericCandidateVerificationResponse{Verified: true, VerificationEvidenceRef: "verification:" + hex.EncodeToString(digest[:]), VerifierIdentity: genericVerifierIdentity, Summary: "candidate attribution and evidence envelope verified; semantic content remains unverified"})
|
||||||
|
}
|
||||||
|
|
||||||
|
func evidenceRefStrings(values []work.EvidenceRef) []string {
|
||||||
|
result := make([]string, len(values))
|
||||||
|
for i, value := range values {
|
||||||
|
result[i] = string(value)
|
||||||
|
}
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
|
||||||
func verifyHandler(w http.ResponseWriter, r *http.Request) {
|
func verifyHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
var request capability.TaskCaseVerificationRequest
|
var request capability.TaskCaseVerificationRequest
|
||||||
decoder := json.NewDecoder(http.MaxBytesReader(w, r.Body, 64<<10))
|
decoder := json.NewDecoder(http.MaxBytesReader(w, r.Body, 64<<10))
|
||||||
|
|||||||
@@ -5,9 +5,11 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/http/httptest"
|
"net/http/httptest"
|
||||||
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"git.cin.su/m/Assistant/contracts/capability"
|
"git.cin.su/m/Assistant/contracts/capability"
|
||||||
|
"git.cin.su/m/Assistant/contracts/work"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestVerifyExactTextProducesIndependentEvidence(t *testing.T) {
|
func TestVerifyExactTextProducesIndependentEvidence(t *testing.T) {
|
||||||
@@ -39,3 +41,13 @@ func TestVerifyJSONFieldEquals(t *testing.T) {
|
|||||||
t.Fatalf("unexpected JSON verification response: code=%d body=%s value=%+v", recorder.Code, recorder.Body.String(), response)
|
t.Fatalf("unexpected JSON verification response: code=%d body=%s value=%+v", recorder.Code, recorder.Body.String(), response)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestVerifyGenericCandidateEnvelopeDoesNotClaimTruth(t *testing.T) {
|
||||||
|
payload, _ := json.Marshal(work.GenericCandidateVerificationRequest{GraphID: "graph-1", GraphRevision: 2, NodeID: "node-1", AuthorRunID: "run-1", CandidateID: "candidate-1", Summary: "model proposal", EvidenceRefs: []work.EvidenceRef{"agent-output:1"}})
|
||||||
|
recorder := httptest.NewRecorder()
|
||||||
|
genericCandidateVerifyHandler(recorder, httptest.NewRequest(http.MethodPost, "/v1/work-graphs/candidates/verify", bytes.NewReader(payload)))
|
||||||
|
var response work.GenericCandidateVerificationResponse
|
||||||
|
if recorder.Code != http.StatusOK || json.NewDecoder(recorder.Body).Decode(&response) != nil || !response.Verified || response.VerifierIdentity == "" || response.VerificationEvidenceRef == "" || !strings.Contains(response.Summary, "semantic content remains unverified") {
|
||||||
|
t.Fatalf("unexpected generic verification response: code=%d body=%s value=%+v", recorder.Code, recorder.Body.String(), response)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -96,6 +96,8 @@ type ResearchFinding struct {
|
|||||||
Statement string
|
Statement string
|
||||||
Claim Claim
|
Claim Claim
|
||||||
Citations []Citation
|
Citations []Citation
|
||||||
|
Source Source
|
||||||
|
Excerpt SourceExcerpt
|
||||||
State ResearchFindingState
|
State ResearchFindingState
|
||||||
Reason string
|
Reason string
|
||||||
}
|
}
|
||||||
@@ -131,6 +133,15 @@ type WebResearchRequest struct {
|
|||||||
Statement string
|
Statement string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// WebSearchRequest asks the research runtime to discover bounded source
|
||||||
|
// evidence for a human question. The provider is configured by the runtime;
|
||||||
|
// the caller supplies meaning, not a provider URL or model choice.
|
||||||
|
type WebSearchRequest struct {
|
||||||
|
Plan ResearchPlan
|
||||||
|
PropositionKey string
|
||||||
|
Query string
|
||||||
|
}
|
||||||
|
|
||||||
// ResolveCitation creates evidence only when all identifiers form one exact
|
// ResolveCitation creates evidence only when all identifiers form one exact
|
||||||
// source chain. It deliberately does not fetch, infer or rewrite source text.
|
// source chain. It deliberately does not fetch, infer or rewrite source text.
|
||||||
func ResolveCitation(source Source, snapshot SourceSnapshot, excerpt SourceExcerpt, evidence EvidenceKind, coverage CoverageState, conflict ConflictState, resolvedAtUnixMillis int64) (Citation, error) {
|
func ResolveCitation(source Source, snapshot SourceSnapshot, excerpt SourceExcerpt, evidence EvidenceKind, coverage CoverageState, conflict ConflictState, resolvedAtUnixMillis int64) (Citation, error) {
|
||||||
|
|||||||
@@ -173,6 +173,7 @@ type ChatMessageResponse struct {
|
|||||||
Clarification ClarificationState
|
Clarification ClarificationState
|
||||||
WorkPlanned bool
|
WorkPlanned bool
|
||||||
PlanningReply string
|
PlanningReply string
|
||||||
|
ResearchBacked bool
|
||||||
CapabilityStatus capability.CapabilityResolutionStatus
|
CapabilityStatus capability.CapabilityResolutionStatus
|
||||||
CapabilityKind capability.CapabilityKind
|
CapabilityKind capability.CapabilityKind
|
||||||
CapabilityHints []capability.CapabilityKind
|
CapabilityHints []capability.CapabilityKind
|
||||||
|
|||||||
@@ -113,6 +113,26 @@ type ResultCandidate struct {
|
|||||||
Summary string `json:"summary"`
|
Summary string `json:"summary"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GenericCandidateVerificationRequest asks the independent deterministic
|
||||||
|
// verifier to validate attribution and evidence-envelope integrity. It does
|
||||||
|
// not assert that the candidate's semantic content is true.
|
||||||
|
type GenericCandidateVerificationRequest struct {
|
||||||
|
GraphID string `json:"graph_id"`
|
||||||
|
GraphRevision int64 `json:"graph_revision"`
|
||||||
|
NodeID GraphNodeID `json:"node_id"`
|
||||||
|
AuthorRunID AgentRunID `json:"author_run_id"`
|
||||||
|
CandidateID string `json:"candidate_id"`
|
||||||
|
Summary string `json:"summary"`
|
||||||
|
EvidenceRefs []EvidenceRef `json:"evidence_refs"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type GenericCandidateVerificationResponse struct {
|
||||||
|
Verified bool `json:"verified"`
|
||||||
|
VerificationEvidenceRef string `json:"verification_evidence_ref"`
|
||||||
|
VerifierIdentity string `json:"verifier_identity"`
|
||||||
|
Summary string `json:"summary"`
|
||||||
|
}
|
||||||
|
|
||||||
// GraphResultCallback carries one agent's attributable candidate to Work.
|
// GraphResultCallback carries one agent's attributable candidate to Work.
|
||||||
// Recording a candidate never makes the node successful; the node enters
|
// Recording a candidate never makes the node successful; the node enters
|
||||||
// VERIFYING until an independent synthesis/verifier accepts it.
|
// VERIFYING until an independent synthesis/verifier accepts it.
|
||||||
|
|||||||
@@ -83,4 +83,12 @@ type TaskEvaluationDispatchContext struct {
|
|||||||
ActorID identity.ActorID `json:"actor_id"`
|
ActorID identity.ActorID `json:"actor_id"`
|
||||||
PrincipalID identity.PrincipalID `json:"principal_id"`
|
PrincipalID identity.PrincipalID `json:"principal_id"`
|
||||||
ScopeID authority.ScopeID `json:"scope_id"`
|
ScopeID authority.ScopeID `json:"scope_id"`
|
||||||
|
// GenericMessage turns the existing durable dispatch context into a
|
||||||
|
// discriminated local cognitive-work payload without adding a second
|
||||||
|
// persistence column. It is ignored by task-evaluation executors.
|
||||||
|
GenericMessage string `json:"generic_message,omitempty"`
|
||||||
|
GenericPurpose string `json:"generic_purpose,omitempty"`
|
||||||
|
GenericLocale string `json:"generic_locale,omitempty"`
|
||||||
|
GenericDataPolicy string `json:"generic_data_policy,omitempty"`
|
||||||
|
GenericMaxOutputBytes int `json:"generic_max_output_bytes,omitempty"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -119,12 +119,32 @@ services:
|
|||||||
WORK_POSTGRES_PASSWORD_FILE: /run/secrets/work_db_password
|
WORK_POSTGRES_PASSWORD_FILE: /run/secrets/work_db_password
|
||||||
SECRET_BACKEND_ROOT: /run/secrets
|
SECRET_BACKEND_ROOT: /run/secrets
|
||||||
TASK_VERIFIER_URL: http://task-verifier:8091
|
TASK_VERIFIER_URL: http://task-verifier:8091
|
||||||
|
AGENT_EXECUTION_BRIDGE_URL: http://agent-execution-bridge:8092
|
||||||
depends_on:
|
depends_on:
|
||||||
postgres: { condition: service_healthy }
|
postgres: { condition: service_healthy }
|
||||||
task-verifier: { condition: service_healthy }
|
task-verifier: { condition: service_healthy }
|
||||||
|
agent-execution-bridge: { condition: service_healthy }
|
||||||
volumes:
|
volumes:
|
||||||
- assistant_core_secrets:/run/secrets:ro
|
- assistant_core_secrets:/run/secrets:ro
|
||||||
|
|
||||||
|
agent-execution-bridge:
|
||||||
|
build: { context: .., dockerfile: deploy/images/runtime.Dockerfile, args: { TARGET: agent-execution-bridge, SOURCE_REVISION: "${ASSISTANT_SOURCE_REVISION:-unknown}" } }
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
LISTEN_ADDR: :8092
|
||||||
|
COGNITIVE_WORKER_URL: http://cognitive-worker:8083
|
||||||
|
WORK_GRAPH_RUNTIME_URL: http://work-graph-runtime:8088
|
||||||
|
TASK_VERIFIER_URL: http://task-verifier:8091
|
||||||
|
depends_on:
|
||||||
|
cognitive-worker: { condition: service_started }
|
||||||
|
task-verifier: { condition: service_healthy }
|
||||||
|
work-graph-runtime: { condition: service_started }
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "wget -qO- http://localhost:8092/healthz >/dev/null"]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 3s
|
||||||
|
retries: 10
|
||||||
|
|
||||||
task-verifier:
|
task-verifier:
|
||||||
build: { context: .., dockerfile: deploy/images/runtime.Dockerfile, args: { TARGET: task-verifier, SOURCE_REVISION: "${ASSISTANT_SOURCE_REVISION:-unknown}" } }
|
build: { context: .., dockerfile: deploy/images/runtime.Dockerfile, args: { TARGET: task-verifier, SOURCE_REVISION: "${ASSISTANT_SOURCE_REVISION:-unknown}" } }
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
@@ -175,6 +195,8 @@ services:
|
|||||||
LISTEN_ADDR: :8087
|
LISTEN_ADDR: :8087
|
||||||
RESEARCH_SOURCE_ROOT: /var/lib/research-sources
|
RESEARCH_SOURCE_ROOT: /var/lib/research-sources
|
||||||
RESEARCH_HTTP_ALLOWED_HOSTS: assistant.cin.su,git.cin.su
|
RESEARCH_HTTP_ALLOWED_HOSTS: assistant.cin.su,git.cin.su
|
||||||
|
RESEARCH_SEARCH_URL_TEMPLATE: ${RESEARCH_SEARCH_URL_TEMPLATE:-https://www.bing.com/search?q=%s}
|
||||||
|
RESEARCH_SEARCH_ALLOWED_HOSTS: ${RESEARCH_SEARCH_ALLOWED_HOSTS:-www.bing.com}
|
||||||
POSTGRES_HOST: postgres
|
POSTGRES_HOST: postgres
|
||||||
POSTGRES_PORT: "5432"
|
POSTGRES_PORT: "5432"
|
||||||
POSTGRES_DATABASE: ${POSTGRES_DB:-assistant}
|
POSTGRES_DATABASE: ${POSTGRES_DB:-assistant}
|
||||||
@@ -234,6 +256,7 @@ services:
|
|||||||
LOCAL_MEDIUM_PROVIDER_URL: ${LOCAL_MEDIUM_PROVIDER_URL:-http://llm-local-api:8080/v1}
|
LOCAL_MEDIUM_PROVIDER_URL: ${LOCAL_MEDIUM_PROVIDER_URL:-http://llm-local-api:8080/v1}
|
||||||
LOCAL_MEDIUM_PROVIDER_API_KEY_FILE: ${LOCAL_MEDIUM_PROVIDER_API_KEY_FILE:-}
|
LOCAL_MEDIUM_PROVIDER_API_KEY_FILE: ${LOCAL_MEDIUM_PROVIDER_API_KEY_FILE:-}
|
||||||
LOCAL_MEDIUM_PROVIDER_CREDENTIAL_REF: ${LOCAL_MEDIUM_PROVIDER_CREDENTIAL_REF:-credential://domovoy/local-medium/provider-api-key/v1}
|
LOCAL_MEDIUM_PROVIDER_CREDENTIAL_REF: ${LOCAL_MEDIUM_PROVIDER_CREDENTIAL_REF:-credential://domovoy/local-medium/provider-api-key/v1}
|
||||||
|
LOCAL_GPU_PROVIDER_TIMEOUT: ${LOCAL_GPU_PROVIDER_TIMEOUT:-60s}
|
||||||
LOCAL_LIFEBOAT_PROVIDER_URL: http://cognitive-lifeboat:8086/v1
|
LOCAL_LIFEBOAT_PROVIDER_URL: http://cognitive-lifeboat:8086/v1
|
||||||
COGNITIVE_OWNER_PRINCIPAL_ID: domovoy-creator-principal
|
COGNITIVE_OWNER_PRINCIPAL_ID: domovoy-creator-principal
|
||||||
COGNITIVE_ALLOW_CANARY: "true"
|
COGNITIVE_ALLOW_CANARY: "true"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"task_file": "dev/tasks/DEV-000263-gpu-qualification-runtime-evidence.json",
|
"task_file": "dev/tasks/DEV-000291-mobile-acceptance-evidence.json",
|
||||||
"task_id": "DEV-000263",
|
"task_id": "DEV-000291",
|
||||||
"task_revision": 1
|
"task_revision": 1
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"task_id": "DEV-000264",
|
||||||
|
"task_revision": 1,
|
||||||
|
"architecture_revision": "ADR-0018",
|
||||||
|
"base_repo_revision": "c8dc9ed",
|
||||||
|
"risk_tier": "E",
|
||||||
|
"intent": "Report agent-worker readiness for the bounded local capability while keeping unsupported work durably waiting and external bridge state explicit.",
|
||||||
|
"requirement_ids": ["Agent Execution runtime and recovery", "local-first fallback", "truthful operational readiness"],
|
||||||
|
"allowed_change_scope": {"modules": ["agent-worker"], "paths": ["cmd/agent-worker/status.go", "cmd/agent-worker/status_test.go", "dev/ACTIVE_TASK.json", "dev/tasks/DEV-000264-capability-aware-agent-worker-readiness.json"]},
|
||||||
|
"forbidden_change_scope": {"paths": ["architecture/**", "security/**", "database/**", "deploy/**", "contracts/**", "LLM-local/**", "modules/**", "adapters/**"]},
|
||||||
|
"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": ["agent-worker status response", "local task-evaluation capability"], "may_change": ["readiness semantics only"]},
|
||||||
|
"semantic_owner": "Agent worker operational status",
|
||||||
|
"canonical_state": ["none"],
|
||||||
|
"state_transitions": ["local capability unavailable -> recovery-only; local task-evaluation capability available -> capability-ready; external bridge configured -> execution-ready"],
|
||||||
|
"side_effects_and_privileges": ["status/readiness response only"],
|
||||||
|
"persistence_and_migrations": ["none"],
|
||||||
|
"failure_retry_restart": ["unsupported work remains WAITING; stale claims remain recoverable"],
|
||||||
|
"assumptions": ["ready means at least one advertised capability can accept work, not that every arbitrary agent operation is supported"],
|
||||||
|
"acceptance_scenarios": ["recovery-only remains not ready", "local task-evaluation reports ready without claiming external bridge", "configured bridge remains ready", "local capability and unsupported-work distinction is explicit"],
|
||||||
|
"required_tests": ["go test ./cmd/agent-worker/...", "go vet ./cmd/agent-worker/...", "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", "independent evidence review", "git diff --check", "CI", "production health smoke"],
|
||||||
|
"terminal_gap_states": ["BLOCKED_BY_MISSING_CAPABILITY", "BLOCKED_BY_SPEC_GAP"]
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"task_id": "DEV-000265",
|
||||||
|
"task_revision": 1,
|
||||||
|
"architecture_revision": "ADR-0018",
|
||||||
|
"base_repo_revision": "102a57a",
|
||||||
|
"risk_tier": "E",
|
||||||
|
"intent": "Record live capability-aware agent-worker readiness after the local executor rollout.",
|
||||||
|
"requirement_ids": ["Agent Execution runtime and recovery", "truthful operational status"],
|
||||||
|
"allowed_change_scope": {"modules": ["governance-documentation"], "paths": ["docs/evidence/agent-worker-capability-readiness-2026-08-24-v1.json", "docs/PROJECT_STATUS.md", "dev/ACTIVE_TASK.json", "dev/tasks/DEV-000265-agent-worker-capability-readiness-evidence.json"]},
|
||||||
|
"forbidden_change_scope": {"paths": ["architecture/**", "security/**", "database/**", "deploy/**", "contracts/**", "LLM-local/**", "cmd/**", "modules/**", "adapters/**"]},
|
||||||
|
"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": ["live agent-worker status and readyz", "public Assistant health"], "may_change": ["status projection only"]},
|
||||||
|
"semantic_owner": "Governance evidence projection",
|
||||||
|
"canonical_state": ["none"],
|
||||||
|
"state_transitions": ["none"],
|
||||||
|
"side_effects_and_privileges": ["documentation-only; read-only runtime probes"],
|
||||||
|
"persistence_and_migrations": ["none"],
|
||||||
|
"failure_retry_restart": ["unsupported work remains durable waiting; recovery counters remain observable"],
|
||||||
|
"assumptions": ["capability-ready semantics are narrower than generic agent execution readiness"],
|
||||||
|
"acceptance_scenarios": ["local task-evaluation capability reports READY", "external bridge remains false", "readyz is READY", "public health is OK", "no secret value appears"],
|
||||||
|
"required_tests": ["go test ./cmd/creator-web", "go vet ./cmd/creator-web", "go run ./cmd/devctl preflight -active dev/ACTIVE_TASK.json", "go run ./cmd/devctl check-diff -active dev/ACTIVE_TASK.json", "independent evidence review", "git diff --check", "CI", "production health smoke"],
|
||||||
|
"terminal_gap_states": ["BLOCKED_BY_MISSING_CAPABILITY", "BLOCKED_BY_SPEC_GAP"]
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
"task_id": "DEV-000266",
|
||||||
|
"task_revision": 1,
|
||||||
|
"architecture_revision": "ADR-0018",
|
||||||
|
"base_repo_revision": "c4f3f02",
|
||||||
|
"risk_tier": "E",
|
||||||
|
"intent": "Provide an independently running local Agent Execution bridge for the bounded task-evaluation capability, while keeping unsupported generic work durably waiting.",
|
||||||
|
"requirement_ids": ["WP-301", "Agent Execution runtime and recovery"],
|
||||||
|
"allowed_change_scope": {
|
||||||
|
"modules": ["agent-worker", "agentbridge"],
|
||||||
|
"paths": ["adapters/agentbridge/**", "cmd/agent-worker/**", "cmd/agent-execution-bridge/**", "deploy/docker-compose.prod.yml", "dev/ACTIVE_TASK.json", "dev/tasks/DEV-000266-local-agent-execution-bridge.json", "docs/evidence/**", "docs/PROJECT_STATUS.md"]
|
||||||
|
},
|
||||||
|
"forbidden_change_scope": {"paths": ["architecture/**", "database/**", "security/**", "contracts/authority/**"]},
|
||||||
|
"allowed_architecture_delta": {"new_cross_module_dependencies": 0, "new_canonical_owners": 0, "new_privileges": 1, "new_third_party_dependencies": 0, "new_database_owner_roles": 0},
|
||||||
|
"contracts": {"consume": ["AgentExecutionRequest", "AgentExecutionResult", "TaskEvaluationExecutionResponse", "TaskCaseVerificationResponse", "TaskEvaluationEvidenceCallback"], "may_change": []},
|
||||||
|
"semantic_owner": "work dispatches; capability owns evaluation evidence",
|
||||||
|
"canonical_state": ["existing work lease/callback state", "existing capability evaluation evidence"],
|
||||||
|
"state_transitions": ["durable dispatch -> bridge request -> bounded evaluation/verifier/callback -> completed or explicit waiting"],
|
||||||
|
"side_effects_and_privileges": ["outbound HTTP only to cognitive-worker, task-verifier and work-graph-runtime; no database access; no credentials forwarded"],
|
||||||
|
"persistence_and_migrations": ["reuse existing owners; no migration"],
|
||||||
|
"failure_retry_restart": ["bridge or dependency failure returns an executor error; worker retains durable retry/recovery evidence", "unsupported intent returns WAITING and is never completed"],
|
||||||
|
"assumptions": ["local bridge is a bounded fallback, not a universal Codex executor", "generic work remains pending until a separately qualified capability is installed"],
|
||||||
|
"acceptance_scenarios": ["bridge receives typed request", "task-evaluation reaches cognitive worker, verifier and graph callback", "unsupported generic intent returns WAITING", "worker can use bridge-backed execution without changing lease/recovery semantics"],
|
||||||
|
"required_tests": ["unit", "runtime HTTP", "architecture", "go test", "go vet", "preflight", "check-diff", "check-architecture", "independent", "docker compose config", "git diff --check"],
|
||||||
|
"terminal_gap_states": ["BLOCKED_BY_MISSING_CAPABILITY", "BLOCKED_BY_SPEC_GAP", "BLOCKED_BY_CONFLICT"]
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"task_id": "DEV-000267",
|
||||||
|
"task_revision": 1,
|
||||||
|
"architecture_revision": "ADR-0018",
|
||||||
|
"base_repo_revision": "c459cd5",
|
||||||
|
"risk_tier": "E",
|
||||||
|
"intent": "Record fresh Domovoy-owned GPU qualification and authenticated UI viewport evidence without promoting models or changing runtime behavior.",
|
||||||
|
"requirement_ids": ["model fleet/failover", "UI/operations acceptance"],
|
||||||
|
"allowed_change_scope": {"modules": ["governance-documentation"], "paths": ["docs/evidence/gpu-qualification-runtime-2026-08-24-v1.json", "docs/evidence/audit-completion-matrix-2026-08-24-v7.json", "docs/PROJECT_STATUS.md", "dev/ACTIVE_TASK.json", "dev/tasks/DEV-000267-refresh-gpu-and-ui-gap-evidence.json"]},
|
||||||
|
"forbidden_change_scope": {"paths": ["architecture/**", "security/**", "database/**", "deploy/**", "contracts/**", "LLM-local/**", "cmd/**", "modules/**", "adapters/**"]},
|
||||||
|
"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": ["Domovoy cognitive-worker GPU qualification response", "authenticated browser viewport observation"], "may_change": ["status projection only"]},
|
||||||
|
"semantic_owner": "Governance evidence projection",
|
||||||
|
"canonical_state": ["none"],
|
||||||
|
"state_transitions": ["none"],
|
||||||
|
"side_effects_and_privileges": ["read-only bounded qualification and browser observation; no activation, promotion or mutation"],
|
||||||
|
"persistence_and_migrations": ["none"],
|
||||||
|
"failure_retry_restart": ["timeout remains UNRATED and CPU/LIFEBOAT fallback remains active", "missing mobile viewport remains an explicit acceptance gap"],
|
||||||
|
"assumptions": ["GPU credential remains resolved inside cognitive-worker", "browser session is already authenticated and no secrets are inspected"],
|
||||||
|
"acceptance_scenarios": ["four exact GPU model IDs recorded", "all timeout results remain UNRATED", "GPU does not become preferred", "desktop viewport and mobile limitation recorded", "no secret value appears"],
|
||||||
|
"required_tests": ["go test ./cmd/creator-web", "go vet ./cmd/creator-web", "go run ./cmd/devctl preflight -active dev/ACTIVE_TASK.json", "go run ./cmd/devctl check-diff -active dev/ACTIVE_TASK.json", "independent evidence review", "git diff --check", "CI", "production health smoke"],
|
||||||
|
"terminal_gap_states": ["BLOCKED_BY_MISSING_CAPABILITY", "BLOCKED_BY_SPEC_GAP"]
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"task_id": "DEV-000268",
|
||||||
|
"task_revision": 1,
|
||||||
|
"architecture_revision": "ADR-0018",
|
||||||
|
"base_repo_revision": "3ca7ffa",
|
||||||
|
"risk_tier": "E",
|
||||||
|
"intent": "Make the GPU cognitive provider invocation deadline configurable and bounded so large local models are not rejected by an accidental ten-second cold-start limit.",
|
||||||
|
"requirement_ids": ["model fleet/failover", "quality separated from reachability", "hardware-neutral routing"],
|
||||||
|
"allowed_change_scope": {"modules": ["cognitive-worker", "deployment-governance"], "paths": ["cmd/cognitive-worker/**", "deploy/docker-compose.prod.yml", "dev/ACTIVE_TASK.json", "dev/tasks/DEV-000268-configurable-gpu-qualification-timeout.json", "docs/evidence/**", "docs/PROJECT_STATUS.md"]},
|
||||||
|
"forbidden_change_scope": {"paths": ["architecture/**", "security/**", "database/**", "contracts/**", "LLM-local/**"]},
|
||||||
|
"allowed_architecture_delta": {"new_cross_module_dependencies": 0, "new_canonical_owners": 0, "new_privileges": 1, "new_third_party_dependencies": 0, "new_database_owner_roles": 0},
|
||||||
|
"contracts": {"consume": ["existing OpenAI-compatible local provider adapter", "existing qualification route"], "may_change": ["deployment timeout configuration only"]},
|
||||||
|
"semantic_owner": "cognitive-worker invokes provider; capability remains qualification and promotion owner",
|
||||||
|
"canonical_state": ["existing qualification observations"],
|
||||||
|
"state_transitions": ["provider timeout window changes; no qualification or activation transition is inferred"],
|
||||||
|
"side_effects_and_privileges": ["bounded outbound GPU provider request through existing credential boundary"],
|
||||||
|
"persistence_and_migrations": ["none"],
|
||||||
|
"failure_retry_restart": ["timeout remains an unrated/unavailable observation; CPU/LIFEBOAT fallback remains authoritative"],
|
||||||
|
"assumptions": ["60 seconds is a bounded cold-start window and qualification models still run in parallel", "no model is promoted automatically"],
|
||||||
|
"acceptance_scenarios": ["GPU adapter uses configured bounded timeout", "default is 60 seconds", "qualification remains unrated on timeout", "routing does not infer intelligence from GPU"],
|
||||||
|
"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", "docker compose config", "git diff --check", "production health smoke", "one Domovoy-owned GPU qualification probe"],
|
||||||
|
"terminal_gap_states": ["BLOCKED_BY_MISSING_CAPABILITY", "BLOCKED_BY_CONFLICT"]
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"task_id": "DEV-000270",
|
||||||
|
"task_revision": 1,
|
||||||
|
"architecture_revision": "ADR-0018",
|
||||||
|
"base_repo_revision": "29dad40",
|
||||||
|
"risk_tier": "E",
|
||||||
|
"intent": "Record the approved local-first operating scope: one local conversational model, Qwen3-8B or Gemma-4 when available locally, is sufficient for the current phase, with the local Lifeboat as recovery fallback; external model qualification is deferred until explicitly requested, while external capability remains optional and non-blocking.",
|
||||||
|
"requirement_ids": ["local-first model operation", "hardware-neutral routing", "explicit scope decisions"],
|
||||||
|
"allowed_change_scope": {"modules": ["cognitive-worker", "deployment-governance"], "paths": ["docs/MODEL_FLEET_POLICY.md", "docs/PROJECT_STATUS.md", "docs/evidence/**", "dev/ACTIVE_TASK.json", "dev/tasks/DEV-000270-local-first-model-scope.json"]},
|
||||||
|
"forbidden_change_scope": {"paths": ["architecture/**", "security/**", "database/**", "contracts/**", "LLM-local/**", "cmd/**", "deploy/**"]},
|
||||||
|
"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 local CPU provider route", "existing local Lifeboat route"], "may_change": ["documentation and evidence projection only"]},
|
||||||
|
"semantic_owner": "cognitive-worker model routing policy remains hardware-neutral; this task records the current operating scope",
|
||||||
|
"canonical_state": ["existing local provider and Lifeboat runtime state", "this explicit scope decision"],
|
||||||
|
"state_transitions": ["external model qualification is deferred, not promoted or removed"],
|
||||||
|
"side_effects_and_privileges": [],
|
||||||
|
"persistence_and_migrations": ["none"],
|
||||||
|
"failure_retry_restart": ["local CPU route remains primary; local Lifeboat remains recovery fallback", "durable reflexes, skills, and local executors continue work when external models are unavailable"],
|
||||||
|
"assumptions": ["external providers may be added later by a separate explicit task", "GPU presence does not imply quality or priority"],
|
||||||
|
"acceptance_scenarios": ["policy names one local Qwen3-8B or Gemma-4 conversational model as current primary candidate", "policy names local Lifeboat as fallback", "external qualification is clearly deferred", "external unavailability does not block local/reflex/skill execution", "no external model probe is required for this task"],
|
||||||
|
"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", "git diff --check", "local runtime health smoke"],
|
||||||
|
"terminal_gap_states": ["BLOCKED_BY_CONFLICT"]
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"task_id": "DEV-000273",
|
||||||
|
"task_revision": 1,
|
||||||
|
"architecture_revision": "ADR-0018",
|
||||||
|
"base_repo_revision": "d7151f1",
|
||||||
|
"risk_tier": "E",
|
||||||
|
"intent": "Reconcile the audit status with the current merged production artifact and fresh authenticated desktop/mobile viewport evidence without changing runtime behavior.",
|
||||||
|
"requirement_ids": ["current-state evidence", "truthful UI acceptance", "production artifact provenance"],
|
||||||
|
"allowed_change_scope": {"modules": ["deployment-governance", "creator-web-acceptance"], "paths": ["docs/evidence/**", "docs/PROJECT_STATUS.md", "dev/ACTIVE_TASK.json", "dev/tasks/DEV-000273-live-audit-status-reconciliation.json"]},
|
||||||
|
"forbidden_change_scope": {"paths": ["architecture/**", "security/**", "database/**", "contracts/**", "cmd/**", "deploy/**", "LLM-local/**"]},
|
||||||
|
"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 production health and image provenance", "authenticated browser DOM and viewport observations"], "may_change": ["evidence and status projections only"]},
|
||||||
|
"semantic_owner": "audit evidence projection",
|
||||||
|
"canonical_state": ["merged main revision", "live production observations"],
|
||||||
|
"state_transitions": ["evidence projection advances to the latest verified production revision"],
|
||||||
|
"side_effects_and_privileges": [],
|
||||||
|
"persistence_and_migrations": ["none"],
|
||||||
|
"failure_retry_restart": ["failed or unavailable observations remain explicit and do not become passes"],
|
||||||
|
"assumptions": ["documentation-only changes do not require a Docker rebuild", "mobile viewport acceptance requires an actual 390x844 browser viewport"],
|
||||||
|
"acceptance_scenarios": ["main and production artifact revision are recorded", "authenticated desktop evidence is recorded", "mobile acceptance remains unclaimed when actual viewport is not 390x844", "external model probing is not performed"],
|
||||||
|
"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", "git diff --check", "production health smoke"],
|
||||||
|
"terminal_gap_states": ["BLOCKED_BY_MISSING_CAPABILITY"]
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"task_id": "DEV-000274",
|
||||||
|
"task_revision": 1,
|
||||||
|
"architecture_revision": "ADR-0018",
|
||||||
|
"base_repo_revision": "5205845",
|
||||||
|
"risk_tier": "E",
|
||||||
|
"intent": "Make the default chat path refuse unverified factual answers instead of exposing model speculation; preserve explicitly classified internal status paths and leave a general research capability for the next routing stage.",
|
||||||
|
"requirement_ids": ["truth-first default", "no fabricated factual answers", "semantic routing without entity word lists"],
|
||||||
|
"allowed_change_scope": {"modules": ["creator-web", "cognitive-worker", "interaction"], "paths": ["cmd/creator-web/server.go", "cmd/creator-web/chat_test.go", "cmd/cognitive-worker/interpretation.go", "cmd/cognitive-worker/interpretation_test.go", "modules/interaction/domain/chat.go", "modules/interaction/domain/chat_test.go", "dev/ACTIVE_TASK.json", "dev/tasks/DEV-000274-truth-first-question-gate.json", "docs/PROJECT_STATUS.md", "docs/evidence/**"]},
|
||||||
|
"forbidden_change_scope": {"paths": ["architecture/**", "security/**", "database/**", "contracts/**", "deploy/**", "LLM-local/**"]},
|
||||||
|
"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 semantic speech act and information request", "existing local cognitive gateway"], "may_change": ["truthful chat presentation gate", "interpretation prompt guidance"]},
|
||||||
|
"semantic_owner": "interaction semantics and creator-web presentation boundary",
|
||||||
|
"canonical_state": ["existing semantic interpretation", "existing verified internal status paths"],
|
||||||
|
"state_transitions": ["unverified question -> truthful verification-required response", "explicitly classified internal status -> existing status response"],
|
||||||
|
"side_effects_and_privileges": ["none; no provider call is made for an unverified factual question"],
|
||||||
|
"persistence_and_migrations": ["none"],
|
||||||
|
"failure_retry_restart": ["missing research capability never becomes a fabricated answer"],
|
||||||
|
"assumptions": ["a later task will connect WEB_RESEARCH to a read-only source connector", "explicit user requests to discuss hypotheses/options remain a separate cognitive path"],
|
||||||
|
"acceptance_scenarios": ["weather-like factual question does not expose a model-generated answer without evidence", "response explains that verification is unavailable and names safe source category", "internal classified status path remains functional", "an incidental word such as model does not open an inventory or verification route", "routing uses semantic intent rather than city/entity keyword lists"],
|
||||||
|
"required_tests": ["go test ./cmd/creator-web/... ./cmd/cognitive-worker/...", "go vet ./cmd/creator-web/... ./cmd/cognitive-worker/...", "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", "git diff --check", "CI", "production health smoke"],
|
||||||
|
"terminal_gap_states": ["BLOCKED_BY_MISSING_CAPABILITY"]
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"task_id": "DEV-000275",
|
||||||
|
"task_revision": 1,
|
||||||
|
"architecture_revision": "ADR-0018",
|
||||||
|
"base_repo_revision": "1eb3e39",
|
||||||
|
"risk_tier": "E",
|
||||||
|
"intent": "Route semantically classified WEB_RESEARCH questions through the bounded research runtime and present only immutable source excerpts; absence or conflict of evidence remains a truthful non-answer.",
|
||||||
|
"requirement_ids": ["semantic request classification", "truth-first default", "source-backed response", "optional external channel"],
|
||||||
|
"allowed_change_scope": {"modules": ["core-runtime", "creator-web", "cognitive-worker", "research-runtime", "epistemics", "interaction", "deployment"], "paths": ["contracts/epistemics/research.go", "contracts/interaction/types.go", "adapters/research/search_connector.go", "modules/epistemics/domain/research.go", "cmd/research-runtime/main.go", "cmd/core-runtime/main.go", "cmd/core-runtime/research_client.go", "cmd/core-runtime/cognitive_interpretation.go", "cmd/core-runtime/cognitive_interpretation_test.go", "cmd/creator-web/server.go", "deploy/docker-compose.prod.yml", "tests/research_runtime/search_connector_test.go", "dev/ACTIVE_TASK.json", "dev/tasks/DEV-000275-semantic-web-research-routing.json", "docs/PROJECT_STATUS.md", "docs/evidence/**"]},
|
||||||
|
"forbidden_change_scope": {"paths": ["architecture/**", "security/**", "database/**", "LLM-local/**", "modules/interaction/domain/**"]},
|
||||||
|
"allowed_architecture_delta": {"new_cross_module_dependencies": 0, "new_canonical_owners": 0, "new_privileges": 1, "new_third_party_dependencies": 0, "new_database_owner_roles": 0},
|
||||||
|
"contracts": {"consume": ["existing semantic interpretation", "existing epistemics evidence chain", "existing research runtime persistence"], "may_change": ["typed web-search request and source-backed finding presentation"]},
|
||||||
|
"semantic_owner": "interaction/cognitive interpretation selects meaning; epistemics owns evidence; Core presents the result",
|
||||||
|
"canonical_state": ["epistemics truth bundle and citation state remain canonical", "no generated advisory is canonical evidence"],
|
||||||
|
"state_transitions": ["semantic WEB_RESEARCH -> bounded search request -> persisted source snapshot -> source-backed chat response", "search unavailable/conflicted -> verification-required response"],
|
||||||
|
"side_effects_and_privileges": ["read-only HTTPS search fetches to configured allowlist", "no provider/model selection from user input", "no secret forwarded to search"],
|
||||||
|
"persistence_and_migrations": ["existing epistemics persistence only; no migration"],
|
||||||
|
"failure_retry_restart": ["empty/unavailable search never becomes an answer", "runtime restart preserves persisted evidence"],
|
||||||
|
"assumptions": ["search endpoint template and host allowlist are operator configuration", "local model remains optional; deterministic truth gate is the fallback"],
|
||||||
|
"acceptance_scenarios": ["simple factual question reaches semantic interpretation", "generic question is routed by WEB_RESEARCH without city/entity keyword lists", "bounded source excerpt and locator are returned", "conflicted/empty evidence is not presented as fact", "search channel can be absent without breaking chat core"],
|
||||||
|
"required_tests": ["go test ./adapters/research ./modules/epistemics/... ./cmd/research-runtime/... ./cmd/core-runtime/... ./cmd/creator-web/... ./tests/research_runtime/...", "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", "git diff --check", "CI", "production health and research-runtime readiness smoke"],
|
||||||
|
"terminal_gap_states": ["BLOCKED_BY_MISSING_CAPABILITY"]
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"task_id": "DEV-000276",
|
||||||
|
"task_revision": 1,
|
||||||
|
"architecture_revision": "ADR-0018",
|
||||||
|
"base_repo_revision": "c09be4c",
|
||||||
|
"risk_tier": "E",
|
||||||
|
"intent": "Replace the blocked default search provider with an available configured HTML search endpoint while preserving bounded parsing and truth-first failure behavior.",
|
||||||
|
"requirement_ids": ["research provider fallback", "no fabricated evidence", "optional external channel"],
|
||||||
|
"allowed_change_scope": {"modules": ["research-runtime", "deployment"], "paths": ["adapters/research/search_connector.go", "deploy/docker-compose.prod.yml", "tests/research_runtime/search_connector_test.go", "dev/ACTIVE_TASK.json", "dev/tasks/DEV-000276-research-search-provider-fallback.json", "docs/PROJECT_STATUS.md", "docs/evidence/**"]},
|
||||||
|
"forbidden_change_scope": {"paths": ["architecture/**", "security/**", "database/**", "contracts/**", "LLM-local/**"]},
|
||||||
|
"allowed_architecture_delta": {"new_cross_module_dependencies": 0, "new_canonical_owners": 0, "new_privileges": 1, "new_third_party_dependencies": 0, "new_database_owner_roles": 0},
|
||||||
|
"contracts": {"consume": ["existing WebSearchRequest and evidence chain"], "may_change": ["bounded provider response parsing"]},
|
||||||
|
"semantic_owner": "research runtime owns source collection and evidence preservation",
|
||||||
|
"canonical_state": ["existing epistemics source snapshot and citation chain"],
|
||||||
|
"state_transitions": ["configured provider response -> bounded excerpts", "provider challenge/no result -> unknown evidence"],
|
||||||
|
"side_effects_and_privileges": ["read-only HTTPS fetch to operator allowlist"],
|
||||||
|
"persistence_and_migrations": ["none"],
|
||||||
|
"failure_retry_restart": ["provider failure never becomes a supported finding"],
|
||||||
|
"assumptions": ["operator may override search URL and host allowlist", "search results are source excerpts, not generated answers"],
|
||||||
|
"acceptance_scenarios": ["Bing-style bounded result is collected", "unallowlisted endpoint is rejected", "provider challenge yields no evidence", "no entity-specific query logic exists"],
|
||||||
|
"required_tests": ["go test ./...", "go vet ./...", "preflight", "check-diff", "check-architecture", "independent", "git diff --check", "CI", "production research-runtime smoke"],
|
||||||
|
"terminal_gap_states": ["BLOCKED_BY_MISSING_CAPABILITY"]
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"task_id": "DEV-000277",
|
||||||
|
"task_revision": 1,
|
||||||
|
"architecture_revision": "ADR-0018",
|
||||||
|
"base_repo_revision": "5058d5a",
|
||||||
|
"risk_tier": "E",
|
||||||
|
"intent": "Align the bounded configured search parser with the observed provider HTML while retaining explicit no-evidence behavior.",
|
||||||
|
"requirement_ids": ["research live smoke", "source-backed response"],
|
||||||
|
"allowed_change_scope": {"modules": ["research-runtime"], "paths": ["adapters/research/search_connector.go", "dev/ACTIVE_TASK.json", "dev/tasks/DEV-000277-research-parser-live-fix.json", "docs/evidence/**"]},
|
||||||
|
"forbidden_change_scope": {"paths": ["architecture/**", "security/**", "database/**", "deploy/**", "contracts/**", "LLM-local/**"]},
|
||||||
|
"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 search connector and evidence chain"], "may_change": ["provider HTML parser" ]},
|
||||||
|
"semantic_owner": "research runtime",
|
||||||
|
"canonical_state": ["existing persisted source evidence"],
|
||||||
|
"state_transitions": ["observed provider HTML -> exact bounded excerpt"],
|
||||||
|
"side_effects_and_privileges": ["none beyond existing allowlisted read-only fetch"],
|
||||||
|
"persistence_and_migrations": ["none"],
|
||||||
|
"failure_retry_restart": ["parser mismatch remains no-evidence, never fabricated evidence"],
|
||||||
|
"assumptions": ["provider response remains bounded and allowlisted"],
|
||||||
|
"acceptance_scenarios": ["current configured provider heading markup parses", "empty or challenge response remains UNKNOWN"],
|
||||||
|
"required_tests": ["go test ./tests/research_runtime ./cmd/research-runtime/...", "go vet ./...", "preflight", "check-diff", "check-architecture", "independent", "git diff --check", "CI", "production research smoke"],
|
||||||
|
"terminal_gap_states": ["BLOCKED_BY_MISSING_CAPABILITY"]
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"task_id": "DEV-000278",
|
||||||
|
"task_revision": 1,
|
||||||
|
"architecture_revision": "ADR-0018",
|
||||||
|
"base_repo_revision": "f1c3abb",
|
||||||
|
"risk_tier": "E",
|
||||||
|
"intent": "Record current production evidence for source-backed research routing without changing runtime behavior.",
|
||||||
|
"requirement_ids": ["truth/research live evidence", "production provenance"],
|
||||||
|
"allowed_change_scope": {"modules": [], "paths": ["dev/ACTIVE_TASK.json", "dev/tasks/DEV-000278-live-research-evidence-reconciliation.json", "docs/PROJECT_STATUS.md", "docs/evidence/semantic-web-research-routing-2026-08-24-v2.json"]},
|
||||||
|
"forbidden_change_scope": {"paths": ["architecture/**", "security/**", "database/**", "contracts/**", "modules/**", "adapters/**", "cmd/**", "deploy/**", "LLM-local/**"]},
|
||||||
|
"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 production health and research smoke evidence"], "may_change": ["documentation evidence only"]},
|
||||||
|
"semantic_owner": "evidence reconciliation",
|
||||||
|
"canonical_state": ["no runtime state changed"],
|
||||||
|
"state_transitions": ["observed production smoke -> evidence record"],
|
||||||
|
"side_effects_and_privileges": ["none"],
|
||||||
|
"persistence_and_migrations": ["none"],
|
||||||
|
"failure_retry_restart": ["none"],
|
||||||
|
"assumptions": ["production smoke was read-only and used no secrets"],
|
||||||
|
"acceptance_scenarios": ["evidence names exact production revision", "source claims remain explicitly UNVERIFIED", "authenticated UI limitation remains explicit"],
|
||||||
|
"required_tests": ["go test ./...", "go vet ./...", "preflight", "check-diff", "check-architecture", "independent", "git diff --check", "CI"],
|
||||||
|
"terminal_gap_states": ["BLOCKED_BY_MISSING_CAPABILITY"]
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"task_id": "DEV-000279",
|
||||||
|
"task_revision": 1,
|
||||||
|
"architecture_revision": "ADR-0018",
|
||||||
|
"base_repo_revision": "ffd7ddc",
|
||||||
|
"risk_tier": "E",
|
||||||
|
"intent": "Reconcile the audit matrix with current production fleet, bridge and research observations; documentation only.",
|
||||||
|
"requirement_ids": ["audit current-state evidence", "no stale production claims"],
|
||||||
|
"allowed_change_scope": {"modules": [], "paths": ["dev/ACTIVE_TASK.json", "dev/tasks/DEV-000279-live-audit-matrix-reconciliation.json", "docs/PROJECT_STATUS.md", "docs/evidence/audit-completion-matrix-2026-08-24-v11.json"]},
|
||||||
|
"forbidden_change_scope": {"paths": ["architecture/**", "security/**", "database/**", "contracts/**", "modules/**", "adapters/**", "cmd/**", "deploy/**", "LLM-local/**"]},
|
||||||
|
"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": ["current production health, fleet, bridge and research observations"], "may_change": ["audit evidence only"]},
|
||||||
|
"semantic_owner": "evidence reconciliation",
|
||||||
|
"canonical_state": ["no runtime state changed"],
|
||||||
|
"state_transitions": ["live observations -> current audit evidence"],
|
||||||
|
"side_effects_and_privileges": ["none"],
|
||||||
|
"persistence_and_migrations": ["none"],
|
||||||
|
"failure_retry_restart": ["none"],
|
||||||
|
"assumptions": ["all observations were read-only"],
|
||||||
|
"acceptance_scenarios": ["matrix names exact production revision", "fleet selected tier matches live response", "remaining gaps remain explicit"],
|
||||||
|
"required_tests": ["go test ./...", "go vet ./...", "preflight", "check-diff", "check-architecture", "independent", "git diff --check", "CI"],
|
||||||
|
"terminal_gap_states": ["BLOCKED_BY_MISSING_CAPABILITY"]
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
"task_id": "DEV-000280",
|
||||||
|
"task_revision": 1,
|
||||||
|
"architecture_revision": "ADR-0018",
|
||||||
|
"base_repo_revision": "51db637",
|
||||||
|
"risk_tier": "E",
|
||||||
|
"intent": "Add a typed local generic cognitive specialist execution path for Work Graph nodes, preserving independent verification and durable recovery semantics.",
|
||||||
|
"requirement_ids": ["generic local agent execution", "candidate output is not verified fact", "work graph callback remains independently verifiable"],
|
||||||
|
"allowed_change_scope": {
|
||||||
|
"modules": ["work"],
|
||||||
|
"paths": ["contracts/work/bridge.go", "contracts/work/lease.go", "adapters/postgres/work_repository.go", "cmd/agent-execution-bridge/**", "cmd/agent-worker/**", "tests/agent_execution/**", "dev/ACTIVE_TASK.json", "dev/tasks/DEV-000280-local-generic-agent-execution.json"]
|
||||||
|
},
|
||||||
|
"forbidden_change_scope": {"paths": ["architecture/**", "security/**", "database/**", "modules/identity/**", "modules/authority/**", "LLM-local/**", "deploy/**"]},
|
||||||
|
"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": ["contracts/work@v1", "cognitive gateway advisory endpoint", "work graph result callback"], "may_change": ["contracts/work@v1 bridge extension"]},
|
||||||
|
"semantic_owner": "work",
|
||||||
|
"canonical_state": ["work dispatch intent and graph candidate only; no canonical fact or external mutation"],
|
||||||
|
"state_transitions": ["queued -> leased -> executing -> candidate recorded -> verifying", "unsupported or unavailable -> WAITING with durable retry"],
|
||||||
|
"side_effects_and_privileges": ["local cognitive gateway call", "work graph candidate callback", "no external mutation"],
|
||||||
|
"persistence_and_migrations": ["reuse existing work.agent_dispatch_intents and graph candidate persistence; no migration"],
|
||||||
|
"failure_retry_restart": ["bridge timeout or gateway failure returns error for durable retry", "unsupported context returns WAITING", "lease heartbeat and stale claim recovery remain unchanged"],
|
||||||
|
"assumptions": ["Cognitive Gateway is the only model boundary", "generic output is an unverified candidate until independent synthesis", "local CPU/Lifeboat fallback remains the default capability"],
|
||||||
|
"acceptance_scenarios": ["typed generic request reaches gateway and callback", "callback candidate leaves graph eligible for verification rather than success", "missing generic context returns WAITING", "gateway failure is retryable and never reported completed"],
|
||||||
|
"required_tests": ["go test ./...", "go vet ./...", "preflight", "check-diff", "check-architecture", "independent", "git diff --check", "CI"],
|
||||||
|
"terminal_gap_states": ["BLOCKED_BY_MISSING_CAPABILITY", "BLOCKED_BY_ARCHITECTURE_GAP"]
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"task_id": "DEV-000281",
|
||||||
|
"task_revision": 1,
|
||||||
|
"architecture_revision": "ADR-0018",
|
||||||
|
"base_repo_revision": "080bd44",
|
||||||
|
"risk_tier": "E",
|
||||||
|
"intent": "Reconcile production evidence after the generic local Agent Execution rollout.",
|
||||||
|
"requirement_ids": ["no stale production claims", "generic bridge evidence is explicit", "remaining acceptance gaps remain visible"],
|
||||||
|
"allowed_change_scope": {"modules": [], "paths": ["dev/ACTIVE_TASK.json", "dev/tasks/DEV-000281-live-generic-agent-execution-evidence.json", "docs/PROJECT_STATUS.md", "docs/evidence/audit-completion-matrix-2026-08-24-v12.json"]},
|
||||||
|
"forbidden_change_scope": {"paths": ["architecture/**", "security/**", "database/**", "contracts/**", "modules/**", "adapters/**", "cmd/**", "deploy/**", "LLM-local/**"]},
|
||||||
|
"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": ["production image labels", "agent bridge health", "agent worker readiness", "assistant health"], "may_change": ["audit evidence only"]},
|
||||||
|
"semantic_owner": "evidence reconciliation",
|
||||||
|
"canonical_state": ["no runtime state changed"],
|
||||||
|
"state_transitions": ["live observations -> versioned evidence"],
|
||||||
|
"side_effects_and_privileges": ["read-only production inspection"],
|
||||||
|
"persistence_and_migrations": ["documentation only"],
|
||||||
|
"failure_retry_restart": ["none"],
|
||||||
|
"assumptions": ["the deployment label is the authoritative runtime revision evidence", "generic candidate output still requires independent graph verification"],
|
||||||
|
"acceptance_scenarios": ["matrix records 080bd44 production revision", "bridge and worker advertise generic-cognitive-work", "mobile and authenticated chat gaps remain explicit"],
|
||||||
|
"required_tests": ["go test ./...", "go vet ./...", "preflight", "check-diff", "check-architecture", "independent", "git diff --check", "CI"],
|
||||||
|
"terminal_gap_states": ["BLOCKED_BY_MISSING_CAPABILITY"]
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"task_id": "DEV-000282",
|
||||||
|
"task_revision": 1,
|
||||||
|
"architecture_revision": "ADR-0018",
|
||||||
|
"base_repo_revision": "e132ec6",
|
||||||
|
"risk_tier": "E",
|
||||||
|
"intent": "Record the final delayed Portainer auto-deployment and live production revision after DEV-000281.",
|
||||||
|
"requirement_ids": ["production revision is current", "auto-deploy is documented", "live health remains green"],
|
||||||
|
"allowed_change_scope": {"modules": [], "paths": ["dev/ACTIVE_TASK.json", "dev/tasks/DEV-000282-final-auto-deploy-evidence.json", "docs/PROJECT_STATUS.md", "docs/evidence/audit-completion-matrix-2026-08-24-v13.json"]},
|
||||||
|
"forbidden_change_scope": {"paths": ["architecture/**", "security/**", "database/**", "contracts/**", "modules/**", "adapters/**", "cmd/**", "deploy/**", "LLM-local/**"]},
|
||||||
|
"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": ["Portainer delayed auto-deploy observation", "production image labels", "assistant health", "bridge and worker readiness"], "may_change": ["audit evidence only"]},
|
||||||
|
"semantic_owner": "evidence reconciliation",
|
||||||
|
"canonical_state": ["no runtime state changed"],
|
||||||
|
"state_transitions": ["merged main -> Portainer rollout -> live evidence"],
|
||||||
|
"side_effects_and_privileges": ["read-only production inspection"],
|
||||||
|
"persistence_and_migrations": ["documentation only"],
|
||||||
|
"failure_retry_restart": ["rollout may be delayed; verify revision after the delay"],
|
||||||
|
"assumptions": ["Portainer Git deployment is the production control plane", "no secret values are needed for normal auto-deploy"],
|
||||||
|
"acceptance_scenarios": ["production labels and public HTML expose e132ec6", "health remains ok", "generic bridge capability remains advertised"],
|
||||||
|
"required_tests": ["go test ./...", "go vet ./...", "preflight", "check-diff", "check-architecture", "independent", "git diff --check", "CI"],
|
||||||
|
"terminal_gap_states": ["BLOCKED_BY_MISSING_CAPABILITY"]
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"task_id": "DEV-000283",
|
||||||
|
"task_revision": 1,
|
||||||
|
"architecture_revision": "ADR-0018",
|
||||||
|
"base_repo_revision": "94baf98",
|
||||||
|
"risk_tier": "E",
|
||||||
|
"intent": "Add an independent deterministic envelope verifier before a generic local Work Graph candidate is recorded.",
|
||||||
|
"requirement_ids": ["independent candidate envelope verification", "model output is not truth", "graph success still requires synthesis"],
|
||||||
|
"allowed_change_scope": {"modules": ["work"], "paths": ["dev/ACTIVE_TASK.json", "dev/tasks/DEV-000283-generic-candidate-verifier.json", "contracts/work/graph.go", "cmd/task-verifier/**", "cmd/agent-execution-bridge/**"]},
|
||||||
|
"forbidden_change_scope": {"paths": ["architecture/**", "security/**", "database/**", "modules/identity/**", "modules/authority/**", "LLM-local/**", "deploy/**"]},
|
||||||
|
"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": ["contracts/work@v1", "task-verifier internal endpoint", "work graph result callback"], "may_change": ["contracts/work graph candidate verification payload"]},
|
||||||
|
"semantic_owner": "work",
|
||||||
|
"canonical_state": ["verification evidence is an integrity envelope only; candidate remains unverified semantically"],
|
||||||
|
"state_transitions": ["generic model output -> deterministic envelope verification -> candidate recording -> VERIFYING"],
|
||||||
|
"side_effects_and_privileges": ["local verifier call and work graph callback; no external mutation"],
|
||||||
|
"persistence_and_migrations": ["reuse existing candidate evidence refs; no migration"],
|
||||||
|
"failure_retry_restart": ["verifier unavailable returns retryable failure", "invalid envelope returns WAITING", "graph success remains gated by independent synthesis"],
|
||||||
|
"assumptions": ["deterministic verification proves attribution/integrity only, not factual truth", "task-verifier is an independently running local service"],
|
||||||
|
"acceptance_scenarios": ["valid generic candidate obtains verifier evidence", "invalid candidate is not recorded as completed", "model output remains unverified", "existing task evaluation path remains unchanged"],
|
||||||
|
"required_tests": ["go test ./...", "go vet ./...", "preflight", "check-diff", "check-architecture", "independent", "git diff --check", "CI"],
|
||||||
|
"terminal_gap_states": ["BLOCKED_BY_MISSING_CAPABILITY"]
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"task_id": "DEV-000284",
|
||||||
|
"task_revision": 1,
|
||||||
|
"architecture_revision": "ADR-0018",
|
||||||
|
"base_repo_revision": "bcbd41f",
|
||||||
|
"risk_tier": "E",
|
||||||
|
"intent": "Record a bounded production canary proving that generic Work Graph candidates remain unverified until an independent verifier and synthesis path completes the graph.",
|
||||||
|
"requirement_ids": ["generic candidate independent verification", "candidate dissent lineage", "graph completion only after verified synthesis"],
|
||||||
|
"allowed_change_scope": {"modules": [], "paths": ["dev/ACTIVE_TASK.json", "dev/tasks/DEV-000284-live-generic-synthesis-evidence.json", "docs/PROJECT_STATUS.md", "docs/evidence/audit-completion-matrix-2026-08-24-v14.json", "docs/evidence/generic-synthesis-live-2026-08-24-v1.json"]},
|
||||||
|
"forbidden_change_scope": {"paths": ["architecture/**", "security/**", "database/**", "contracts/**", "modules/**", "adapters/**", "cmd/**", "deploy/**", "LLM-local/**"]},
|
||||||
|
"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": ["task-verifier generic envelope response", "Work Graph synthesis response", "production runtime labels"], "may_change": ["audit evidence only"]},
|
||||||
|
"semantic_owner": "evidence reconciliation",
|
||||||
|
"canonical_state": ["synthetic canary graph and candidates are disposable evidence records; no user data or external mutation"],
|
||||||
|
"state_transitions": ["candidate recorded -> independently envelope-verified -> synthesis verified -> graph completed"],
|
||||||
|
"side_effects_and_privileges": ["bounded synthetic production Work Graph records only"],
|
||||||
|
"persistence_and_migrations": ["documentation only; no migration"],
|
||||||
|
"failure_retry_restart": ["canary is idempotent by unique synthetic graph id; failure remains evidence gap"],
|
||||||
|
"assumptions": ["semantic envelope verification is not semantic truth verification", "external model qualification remains deferred"],
|
||||||
|
"acceptance_scenarios": ["two candidates retain dissent lineage", "synthesis response is independently attributed", "graph reaches COMPLETED only through synthesis endpoint", "semantic content remains explicitly unverified"],
|
||||||
|
"required_tests": ["go test ./...", "go vet ./...", "preflight", "check-diff", "check-architecture", "independent", "git diff --check", "CI", "production health smoke", "live generic synthesis canary"],
|
||||||
|
"terminal_gap_states": ["BLOCKED_BY_MISSING_CAPABILITY"]
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"task_id": "DEV-000285",
|
||||||
|
"task_revision": 1,
|
||||||
|
"architecture_revision": "ADR-0018",
|
||||||
|
"base_repo_revision": "5c98bc3",
|
||||||
|
"risk_tier": "E",
|
||||||
|
"intent": "Route semantically source-dependent current-fact questions to the existing provider-neutral WEB_RESEARCH capability instead of returning an unverified fallback.",
|
||||||
|
"requirement_ids": ["truth-first source routing", "no entity-specific keyword branches", "local deterministic fallback remains honest"],
|
||||||
|
"allowed_change_scope": {"modules": ["interaction"], "paths": ["dev/ACTIVE_TASK.json", "dev/tasks/DEV-000285-semantic-research-routing-fix.json", "modules/interaction/domain/chat.go", "modules/interaction/domain/chat_test.go"]},
|
||||||
|
"forbidden_change_scope": {"paths": ["architecture/**", "security/**", "database/**", "cmd/**", "deploy/**", "LLM-local/**"]},
|
||||||
|
"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": ["interaction semantic candidate contract", "capability WEB_RESEARCH hint"], "may_change": []},
|
||||||
|
"semantic_owner": "interaction",
|
||||||
|
"canonical_state": ["no new canonical state; only semantic interpretation hints change"],
|
||||||
|
"state_transitions": ["source-dependent question -> WEB_RESEARCH hint -> existing research runtime"],
|
||||||
|
"side_effects_and_privileges": ["existing read-only research connector may be selected by downstream runtime"],
|
||||||
|
"persistence_and_migrations": ["none"],
|
||||||
|
"failure_retry_restart": ["if research is unavailable, existing truthful unverified response remains"],
|
||||||
|
"assumptions": ["lexical cues represent semantic classes such as currentness and observed external state, not named entities"],
|
||||||
|
"acceptance_scenarios": ["weather-like current fact routes to WEB_RESEARCH without city-specific code", "ordinary model mention does not route to research", "non-research factual question remains honest when no source-dependent cue exists"],
|
||||||
|
"required_tests": ["go test ./modules/interaction/domain", "go vet ./modules/interaction/domain", "preflight", "check-diff", "check-architecture", "independent", "git diff --check", "CI", "production health smoke"],
|
||||||
|
"terminal_gap_states": ["BLOCKED_BY_SPEC_GAP", "BLOCKED_BY_ARCHITECTURE_GAP", "BLOCKED_BY_MISSING_CAPABILITY"]
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"task_id": "DEV-000286",
|
||||||
|
"task_revision": 1,
|
||||||
|
"architecture_revision": "ADR-0018",
|
||||||
|
"base_repo_revision": "b0a8b3e",
|
||||||
|
"risk_tier": "E",
|
||||||
|
"intent": "Reject web-search excerpts with no substantive lexical relation to the requested query so truth-first chat never presents irrelevant search results as useful evidence.",
|
||||||
|
"requirement_ids": ["research relevance boundary", "truth-first no irrelevant evidence", "no entity-specific filtering"],
|
||||||
|
"allowed_change_scope": {"modules": ["research adapter"], "paths": ["dev/ACTIVE_TASK.json", "dev/tasks/DEV-000286-research-result-relevance-filter.json", "adapters/research/search_connector.go", "tests/research_runtime/search_connector_test.go"]},
|
||||||
|
"forbidden_change_scope": {"paths": ["architecture/**", "security/**", "database/**", "cmd/**", "deploy/**", "LLM-local/**"]},
|
||||||
|
"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": ["epistemics ResearchCandidate", "provider-neutral WebSearchRequest"], "may_change": []},
|
||||||
|
"semantic_owner": "epistemics research adapter boundary",
|
||||||
|
"canonical_state": ["no new canonical state; irrelevant candidates are not emitted"],
|
||||||
|
"state_transitions": ["raw search result -> relevance gate -> candidate or omission"],
|
||||||
|
"side_effects_and_privileges": ["read-only search connector only"],
|
||||||
|
"persistence_and_migrations": ["none"],
|
||||||
|
"failure_retry_restart": ["zero relevant candidates becomes the existing truthful no-evidence response"],
|
||||||
|
"assumptions": ["short query terms without substantive tokens retain prior parser behavior for compatibility", "term overlap is a bounded relevance guard, not semantic truth verification"],
|
||||||
|
"acceptance_scenarios": ["irrelevant dictionary results are omitted for a weather-like query", "relevant result is retained", "no entity-specific branch exists"],
|
||||||
|
"required_tests": ["go test ./tests/research_runtime", "go vet ./adapters/research ./tests/research_runtime", "preflight", "check-diff", "check-architecture", "independent", "git diff --check", "CI", "production health smoke", "one live chat smoke"],
|
||||||
|
"terminal_gap_states": ["BLOCKED_BY_SPEC_GAP", "BLOCKED_BY_ARCHITECTURE_GAP", "BLOCKED_BY_MISSING_CAPABILITY"]
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"task_id": "DEV-000287",
|
||||||
|
"task_revision": 1,
|
||||||
|
"architecture_revision": "ADR-0018",
|
||||||
|
"base_repo_revision": "3c46a5f07f4c7a31f4614c5306efe843c10bd264",
|
||||||
|
"risk_tier": "E",
|
||||||
|
"intent": "Reconcile durable project evidence with the merged research relevance filter, current production revision, and one authenticated truth-first chat smoke.",
|
||||||
|
"requirement_ids": ["current production evidence", "truth-first authenticated chat smoke", "no stale completion claims"],
|
||||||
|
"allowed_change_scope": {"modules": ["project evidence"], "paths": ["dev/ACTIVE_TASK.json", "dev/tasks/DEV-000287-live-evidence-reconciliation.json", "docs/PROJECT_STATUS.md", "docs/evidence/audit-completion-matrix-2026-08-24-v15.json"]},
|
||||||
|
"forbidden_change_scope": {"paths": ["architecture/**", "security/**", "database/**", "cmd/**", "deploy/**", "LLM-local/**", "modules/**", "adapters/**"]},
|
||||||
|
"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": ["production health/readiness endpoints", "authenticated chat UI evidence"], "may_change": []},
|
||||||
|
"semantic_owner": "project evidence",
|
||||||
|
"canonical_state": ["none; evidence and status projections only"],
|
||||||
|
"state_transitions": ["stale evidence -> reconciled evidence"],
|
||||||
|
"side_effects_and_privileges": ["read-only production checks and one chat smoke"],
|
||||||
|
"persistence_and_migrations": ["none"],
|
||||||
|
"failure_retry_restart": ["no runtime behavior is changed; missing evidence remains an explicit gap"],
|
||||||
|
"assumptions": ["deep authenticated/mobile UI and external model qualification remain deferred by scope"],
|
||||||
|
"acceptance_scenarios": ["all current production revisions match merged main", "public and internal readiness are healthy", "authenticated factual chat refuses unverified weather data", "matrix records remaining gaps explicitly"],
|
||||||
|
"required_tests": ["go test ./tests/research_runtime", "go vet ./tests/research_runtime", "preflight", "check-diff", "check-architecture", "independent", "JSON parse", "git diff --check", "CI", "production health smoke", "one authenticated chat smoke"],
|
||||||
|
"terminal_gap_states": ["BLOCKED_BY_SPEC_GAP", "BLOCKED_BY_ARCHITECTURE_GAP", "BLOCKED_BY_MISSING_CAPABILITY"]
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"task_id": "DEV-000288",
|
||||||
|
"task_revision": 1,
|
||||||
|
"architecture_revision": "ADR-0018",
|
||||||
|
"base_repo_revision": "3e91ae503c28547852acf130a5414ae9a27a4579",
|
||||||
|
"risk_tier": "E",
|
||||||
|
"intent": "Record the current production revision after the DEV-000287 documentation merge without changing runtime behavior.",
|
||||||
|
"requirement_ids": ["current production evidence", "no stale revision claim"],
|
||||||
|
"allowed_change_scope": {"modules": ["project evidence"], "paths": ["dev/ACTIVE_TASK.json", "dev/tasks/DEV-000288-production-evidence-revision.json", "docs/PROJECT_STATUS.md", "docs/evidence/audit-completion-matrix-2026-08-24-v16.json"]},
|
||||||
|
"forbidden_change_scope": {"paths": ["architecture/**", "security/**", "database/**", "cmd/**", "deploy/**", "LLM-local/**", "modules/**", "adapters/**"]},
|
||||||
|
"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": ["production Docker revision labels", "public health endpoint", "v15 audit evidence"], "may_change": []},
|
||||||
|
"semantic_owner": "project evidence",
|
||||||
|
"canonical_state": ["none; evidence projection only"],
|
||||||
|
"state_transitions": ["v15 production observation -> v16 current observation"],
|
||||||
|
"side_effects_and_privileges": ["read-only production checks"],
|
||||||
|
"persistence_and_migrations": ["none"],
|
||||||
|
"failure_retry_restart": ["if production revision is unavailable, retain an explicit missing-evidence gap"],
|
||||||
|
"assumptions": ["mobile authenticated visual acceptance, deep UI acceptance and external model qualification remain deferred by explicit scope"],
|
||||||
|
"acceptance_scenarios": ["all runtime containers show the merged revision", "public health is ok", "remaining gaps remain explicit"],
|
||||||
|
"required_tests": ["go test ./tests/research_runtime", "go vet ./tests/research_runtime", "preflight", "check-diff", "check-architecture", "independent", "JSON parse", "git diff --check", "CI", "production health smoke"],
|
||||||
|
"terminal_gap_states": ["BLOCKED_BY_SPEC_GAP", "BLOCKED_BY_ARCHITECTURE_GAP", "BLOCKED_BY_MISSING_CAPABILITY"]
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"task_id": "DEV-000289",
|
||||||
|
"task_revision": 1,
|
||||||
|
"architecture_revision": "ADR-0018",
|
||||||
|
"base_repo_revision": "a2ff01050e5a2e22b29b85c700ff788d739e1c77",
|
||||||
|
"risk_tier": "E",
|
||||||
|
"intent": "Remove authenticated chat horizontal overflow at mobile viewport widths caused by intrinsic grid-item width.",
|
||||||
|
"requirement_ids": ["authenticated mobile UI acceptance", "no horizontal overflow at 390px"],
|
||||||
|
"allowed_change_scope": {"modules": ["creator-web"], "paths": ["dev/ACTIVE_TASK.json", "dev/tasks/DEV-000289-chat-mobile-overflow-fix.json", "cmd/creator-web/static/assets/chat.css", "cmd/creator-web/responsive_test.go"]},
|
||||||
|
"forbidden_change_scope": {"paths": ["architecture/**", "security/**", "database/**", "LLM-local/**", "modules/**", "adapters/**"]},
|
||||||
|
"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 creator-web HTML/CSS surface"], "may_change": []},
|
||||||
|
"semantic_owner": "creator-web presentation",
|
||||||
|
"canonical_state": ["none"],
|
||||||
|
"state_transitions": ["mobile layout intrinsic width -> constrained viewport width"],
|
||||||
|
"side_effects_and_privileges": ["none"],
|
||||||
|
"persistence_and_migrations": ["none"],
|
||||||
|
"failure_retry_restart": ["CSS-only; no runtime state or recovery semantics changed"],
|
||||||
|
"assumptions": ["desktop layout must remain unchanged", "deep UI and load tests remain deferred"],
|
||||||
|
"acceptance_scenarios": ["authenticated chat has no horizontal overflow at 390px", "existing mobile media rules remain present", "desktop static layout remains unchanged"],
|
||||||
|
"required_tests": ["go test ./cmd/creator-web", "go vet ./cmd/creator-web", "preflight", "check-diff", "check-architecture", "independent", "git diff --check", "CI", "production health smoke", "one authenticated mobile smoke"],
|
||||||
|
"terminal_gap_states": ["BLOCKED_BY_SPEC_GAP", "BLOCKED_BY_ARCHITECTURE_GAP", "BLOCKED_BY_MISSING_CAPABILITY"]
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"task_id": "DEV-000290",
|
||||||
|
"task_revision": 1,
|
||||||
|
"architecture_revision": "ADR-0018",
|
||||||
|
"base_repo_revision": "e9d5b1ca8a2aa14fb11241c2766e79547a469078",
|
||||||
|
"risk_tier": "E",
|
||||||
|
"intent": "Constrain authenticated chat header controls at mobile viewport widths after live acceptance found a second horizontal overflow source.",
|
||||||
|
"requirement_ids": ["authenticated mobile UI acceptance", "no horizontal overflow at 390px"],
|
||||||
|
"allowed_change_scope": {"modules": ["creator-web"], "paths": ["dev/ACTIVE_TASK.json", "dev/tasks/DEV-000290-chat-mobile-header-overflow.json", "cmd/creator-web/static/assets/chat.css", "cmd/creator-web/responsive_test.go"]},
|
||||||
|
"forbidden_change_scope": {"paths": ["architecture/**", "security/**", "database/**", "LLM-local/**", "modules/**", "adapters/**"]},
|
||||||
|
"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 creator-web header controls"], "may_change": []},
|
||||||
|
"semantic_owner": "creator-web presentation",
|
||||||
|
"canonical_state": ["none"],
|
||||||
|
"state_transitions": ["header intrinsic controls -> bounded mobile controls"],
|
||||||
|
"side_effects_and_privileges": ["none"],
|
||||||
|
"persistence_and_migrations": ["none"],
|
||||||
|
"failure_retry_restart": ["CSS-only; no runtime state or recovery semantics changed"],
|
||||||
|
"assumptions": ["desktop header remains unchanged", "the settings link remains available through the cognitive console link"],
|
||||||
|
"acceptance_scenarios": ["authenticated chat has no horizontal overflow at 390px", "settings navigation remains available", "logout remains visible", "desktop static layout remains unchanged"],
|
||||||
|
"required_tests": ["go test ./cmd/creator-web", "go vet ./cmd/creator-web", "preflight", "check-diff", "check-architecture", "independent", "git diff --check", "CI", "production health smoke", "one authenticated mobile smoke"],
|
||||||
|
"terminal_gap_states": ["BLOCKED_BY_SPEC_GAP", "BLOCKED_BY_ARCHITECTURE_GAP", "BLOCKED_BY_MISSING_CAPABILITY"]
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"task_id": "DEV-000291",
|
||||||
|
"task_revision": 1,
|
||||||
|
"architecture_revision": "ADR-0018",
|
||||||
|
"base_repo_revision": "8c6f23dc491150a747bcc46c26ff04d217d37eba",
|
||||||
|
"risk_tier": "E",
|
||||||
|
"intent": "Record successful authenticated mobile chat acceptance after the responsive overflow fixes.",
|
||||||
|
"requirement_ids": ["authenticated mobile visual acceptance", "current production evidence"],
|
||||||
|
"allowed_change_scope": {"modules": ["project evidence"], "paths": ["dev/ACTIVE_TASK.json", "dev/tasks/DEV-000291-mobile-acceptance-evidence.json", "docs/PROJECT_STATUS.md", "docs/evidence/audit-completion-matrix-2026-08-24-v17.json"]},
|
||||||
|
"forbidden_change_scope": {"paths": ["architecture/**", "security/**", "database/**", "cmd/**", "deploy/**", "LLM-local/**", "modules/**", "adapters/**"]},
|
||||||
|
"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": ["production Docker revision labels", "authenticated browser viewport evidence"], "may_change": []},
|
||||||
|
"semantic_owner": "project evidence",
|
||||||
|
"canonical_state": ["none; evidence projection only"],
|
||||||
|
"state_transitions": ["mobile overflow observed -> responsive fix -> authenticated mobile acceptance passed"],
|
||||||
|
"side_effects_and_privileges": ["read-only production checks and browser smoke"],
|
||||||
|
"persistence_and_migrations": ["none"],
|
||||||
|
"failure_retry_restart": ["missing evidence remains an explicit gap"],
|
||||||
|
"assumptions": ["deep authenticated mutation/delegation/long-running acceptance and external model qualification remain deferred by explicit scope"],
|
||||||
|
"acceptance_scenarios": ["390x844 authenticated chat has no horizontal overflow", "session remains active", "production revision matches merged main", "remaining gaps remain explicit"],
|
||||||
|
"required_tests": ["go test ./tests/research_runtime", "go vet ./tests/research_runtime", "preflight", "check-diff", "check-architecture", "independent", "JSON parse", "git diff --check", "CI", "production health smoke", "authenticated mobile smoke"],
|
||||||
|
"terminal_gap_states": ["BLOCKED_BY_SPEC_GAP", "BLOCKED_BY_ARCHITECTURE_GAP", "BLOCKED_BY_MISSING_CAPABILITY"]
|
||||||
|
}
|
||||||
@@ -5,6 +5,31 @@ Hardware and endpoint identity are operational observations only. A model is
|
|||||||
eligible for routing only after the existing qualification and activation
|
eligible for routing only after the existing qualification and activation
|
||||||
gates pass.
|
gates pass.
|
||||||
|
|
||||||
|
## Current operating scope: LOCAL_FIRST_V1
|
||||||
|
|
||||||
|
For the current development phase, one local CPU model is sufficient and is the
|
||||||
|
authoritative working route. The local Lifeboat is the recovery fallback. GPU
|
||||||
|
and other external providers are optional extensions, not prerequisites for the
|
||||||
|
core Domovoy experience.
|
||||||
|
|
||||||
|
External-model capability must remain supported, but external availability must
|
||||||
|
never block the Domovoy runtime. When an external model is absent, slow, or
|
||||||
|
temporarily unavailable, work continues through the local model, local
|
||||||
|
Lifeboat, durable reflexes, registered skills, and local executors. The result
|
||||||
|
may be slower or narrower, but the task is not abandoned merely because a more
|
||||||
|
capable provider is unavailable.
|
||||||
|
|
||||||
|
The first-stage conversational candidate is one locally available Qwen3-8B
|
||||||
|
(the user's shorthand “Qwen3.8” is normalized here to Qwen3-8B) or Gemma-4.
|
||||||
|
The runtime chooses whichever approved candidate is actually present locally;
|
||||||
|
this policy does not claim that either candidate is installed unless live runtime
|
||||||
|
evidence confirms it.
|
||||||
|
|
||||||
|
External model discovery, qualification, ranking, and promotion are explicitly
|
||||||
|
deferred until a separate task requests them. Their absence or unrated state is
|
||||||
|
not a failure of the current local-first scope, and no external probe is
|
||||||
|
required while this scope is active.
|
||||||
|
|
||||||
`FAST`, `MEDIUM`, and `HEAVY` are capability service classes, not hardware
|
`FAST`, `MEDIUM`, and `HEAVY` are capability service classes, not hardware
|
||||||
claims. A CPU model may be the best available quality model, and a GPU model
|
claims. A CPU model may be the best available quality model, and a GPU model
|
||||||
may be unavailable, degraded, or unrated.
|
may be unavailable, degraded, or unrated.
|
||||||
@@ -18,7 +43,7 @@ The Capability owner derives a provider-neutral `ModelRating` from evidence:
|
|||||||
|
|
||||||
The score combines quality, reliability, latency and evidence coverage. Missing
|
The score combines quality, reliability, latency and evidence coverage. Missing
|
||||||
measurements remain explicit. A model can change category after a new immutable
|
measurements remain explicit. A model can change category after a new immutable
|
||||||
qualification/performance revision. The current CPU route is an operational
|
qualification/performance revision. The current CPU route is the operational
|
||||||
choice, not a permanent hardware assumption. CPU is preferred in the current
|
choice for this phase. If it is unavailable, the policy uses the local Lifeboat
|
||||||
deployment; if it is unavailable, the policy tries another ready class before
|
recovery path. Additional providers may be added later without changing the
|
||||||
using the Lifeboat recovery path.
|
local-first contract.
|
||||||
|
|||||||
+16
-12
@@ -1,33 +1,37 @@
|
|||||||
# Assistant project status
|
# Assistant project status
|
||||||
|
|
||||||
## Current audit delta — 2026-08-23
|
## Current audit delta — 2026-08-24
|
||||||
|
|
||||||
- `LAST_COMPLETED = DEV-000260`; the governed self-development path, provider-neutral reachability rating, bounded authenticated operations smoke, responsive static regression guard and deep authenticated acceptance evidence are live. Mobile visual UI remains explicitly unverified because the current browser control surface cannot emulate a 390x844 viewport.
|
- `CURRENT_MODEL_SCOPE = LOCAL_FIRST_V1`; one locally available Qwen3-8B or Gemma-4 conversational model is sufficient for the first stage, with the local Lifeboat as recovery fallback. External models remain supported as optional capability, but their absence must not block work: reflexes, skills and local executors provide degraded continuation. External/GPU qualification and promotion are intentionally deferred by DEV-000270.
|
||||||
|
- `TRUTH_FIRST_DEFAULT = LIVE`; an unverified factual question is no longer passed to the advisory model as an answer. The response is explicitly marked `verification_required`; internal canonical status paths remain available. Semantic interpretation may select the provider-neutral `WEB_RESEARCH` capability without entity-specific keyword lists. Evidence: `docs/evidence/truth-first-question-gate-2026-08-24-v1.json`.
|
||||||
|
|
||||||
- `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`.
|
- `LAST_COMPLETED = DEV-000290`; the governed self-development path, provider-neutral reachability rating, bounded authenticated operations smoke, truth-first research routing, relevance filtering and authenticated desktop/mobile chat acceptance are live. Deep mutation, delegation and long-running acceptance remain deferred.
|
||||||
|
|
||||||
|
- `CURRENT_PRODUCTION_STATUS = LIVE_HEALTHY`; public `/healthz` is healthy and current runtime project labels match merged `8c6f23dc491150a747bcc46c26ff04d217d37eba`. Evidence: `docs/evidence/audit-completion-matrix-2026-08-24-v17.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`.
|
- `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_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`.
|
- `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_BOUNDED_INVOCATION_SUPPORTED_UNPROMOTED`; the exact Domovoy adapter payload produced one bounded Qwen completion in 0.583s. Quality is not assessed, lifecycle promotion is not performed, and GPU availability is not treated as intelligence or routing priority. Evidence: `docs/evidence/gpu-discovery-2026-08-23-v1.json`, `docs/evidence/gpu-invocation-qualification-2026-08-23-v1.json`.
|
- `HEAVY_PROVIDER_STATUS = LIVE_BOUNDED_INVOCATION_SUPPORTED_UNPROMOTED`; the exact Domovoy adapter payload produced one bounded Qwen completion in 0.583s. Quality is not assessed, lifecycle promotion is not performed, and GPU availability is not treated as intelligence or routing priority. Evidence: `docs/evidence/gpu-discovery-2026-08-23-v1.json`, `docs/evidence/gpu-invocation-qualification-2026-08-23-v1.json`.
|
||||||
- `GPU_QUALIFICATION_STATUS = LIVE_UNRATED_TIMEOUT`; Domovoy qualification discovered four exact GPU model IDs and probed them in parallel; all four timed out at the bounded 10-second limit, so quality remains `UNRATED`, no promotion occurred, and CPU/LIFEBOAT fallback remains authoritative. Evidence: `docs/evidence/gpu-qualification-runtime-2026-08-23-v2.json`.
|
- `EXTERNAL_MODEL_STATUS = DEFERRED_BY_SCOPE`; previous bounded GPU timeout evidence remains historical diagnostic evidence, but no external model is part of the current operating route and no further external probes are planned in this phase.
|
||||||
- `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`.
|
- `AGENT_EXECUTION_STATUS = LIVE_TYPED_GENERIC_LOCAL_BRIDGE`; production worker and bridge are ready for task-evaluation and generic cognitive work. Generic output is recorded as an unverified Work Graph candidate and still requires independent synthesis before graph success. Evidence: `docs/evidence/audit-completion-matrix-2026-08-24-v12.json`.
|
||||||
- `ADDITIONAL_EVALUATION_STATUS = LIVE_TYPED_HANDOFF`; Capability-owned unresolved evaluation decisions can now be handed to Work through a typed production endpoint. Work preserves parent evidence lineage and schedules the bounded additional profile through the existing durable graph/dispatch path; model/provider selection remains outside Work. Evidence: `docs/evidence/additional-evaluation-runtime-live-2026-08-23-v1.json` and DEV-000261.
|
- `ADDITIONAL_EVALUATION_STATUS = LIVE_TYPED_HANDOFF`; Capability-owned unresolved evaluation decisions can now be handed to Work through a typed production endpoint. Work preserves parent evidence lineage and schedules the bounded additional profile through the existing durable graph/dispatch path; model/provider selection remains outside Work. Evidence: `docs/evidence/additional-evaluation-runtime-live-2026-08-23-v1.json` and DEV-000261.
|
||||||
- `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.
|
- `FLEET_EXECUTION_EVIDENCE = docs/evidence/audit-completion-matrix-2026-08-24-v13.json`; current live readiness has MEDIUM and LIFEBOAT ready, FAST and HEAVY unavailable by timeout, MEDIUM selected and LIFEBOAT fallback.
|
||||||
- `TRUTH_RESEARCH_STATUS = LIVE_CANARY_PERSISTED`; the web research canary preserved an OBSERVED/COMPLETE/NO-CONFLICT source chain while leaving the claim UNVERIFIED and belief PROVISIONAL. Evidence: `docs/evidence/truth-runtime-canary-2026-08-23-v1.json`.
|
- `TRUTH_RESEARCH_STATUS = LIVE_CANARY_PERSISTED`; the web research canary preserved an OBSERVED/COMPLETE/NO-CONFLICT source chain while leaving the claim UNVERIFIED and belief PROVISIONAL. Evidence: `docs/evidence/truth-runtime-canary-2026-08-23-v1.json`.
|
||||||
|
- `TRUTH_FIRST_CHAT_STATUS = LIVE_SOURCE_ROUTING_WITH_RELEVANCE_GATE`; factual questions require strict semantic routing to optional `WEB_RESEARCH`; irrelevant search excerpts are rejected and the authenticated weather smoke returned an explicit no-confirmation response rather than invented data. Evidence: `docs/evidence/audit-completion-matrix-2026-08-24-v15.json`.
|
||||||
- `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`.
|
- `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`.
|
- `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_VERIFIER_AND_TRANSITIONS_LIVE`; Work-owned revisioned gate storage, independent local verification, and authenticated optimistic-concurrency transitions for canary/promotion/rollback are live. Source mutation and external bridge execution remain unclaimed. Evidence: `docs/evidence/governed-development-gate-persistence-2026-08-23-v1.json` and DEV-000254 CI/live-smoke records.
|
- `GOVERNED_SELF_DEVELOPMENT_STATUS = DURABLE_GATE_VERIFIER_AND_TRANSITIONS_LIVE`; Work-owned revisioned gate storage, independent local verification, and authenticated optimistic-concurrency transitions for canary/promotion/rollback are live. Source mutation and external bridge execution remain unclaimed. Evidence: `docs/evidence/governed-development-gate-persistence-2026-08-23-v1.json` and DEV-000254 CI/live-smoke records.
|
||||||
- `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.
|
- `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_UI_SESSION_STATUS = NO_CURRENT_AUTHENTICATED_SESSION`; the historical quick-smoke evidence above is retained, but the current acceptance run has no signed-in browser session, so no new authenticated visual result is claimed. Public cabinet shell and unauthenticated protection were checked separately.
|
- `CURRENT_UI_SESSION_STATUS = AUTHENTICATED_DESKTOP_MOBILE_PASS`; the current signed-in session showed active state and no horizontal overflow at `390×844` after the chat layout/header fixes. Deep mutation/delegation/long-running acceptance remains deferred.
|
||||||
- `AGENT_WORKER_STATUS_CORRECTION = LIVE_TRUTHFUL_LOCAL_EXECUTOR`; absence of the protected bridge is reported as `executor_configured=false`, `mode=local-executor`, `ready=false`, with `task-evaluation` as the only advertised local capability; unsupported work remains durably waiting and is not represented as external agent execution. Evidence: `docs/evidence/audit-runtime-status-2026-08-23-v2.json` (pre-DEV-000227 field shape remains historical).
|
- `AGENT_EXECUTION_BRIDGE_STATUS = LIVE_LOCAL_TYPED_BRIDGE`; the independent local bridge reports `healthz=200` with `task-evaluation` and `generic-cognitive-work`; `agent-worker` reports `mode=execution`, `executor_configured=true`, `ready=true`. Evidence: `docs/evidence/audit-completion-matrix-2026-08-24-v13.json`.
|
||||||
- `FLEET_READINESS_LIVE = MEDIUM_SELECTED_BY_AVAILABILITY`; the live cognitive worker observed FAST unavailable, MEDIUM available, HEAVY available and LIFEBOAT available; it selected MEDIUM while the configured preference remained FAST. This is routing evidence only, not a quality or promotion claim. Evidence: `docs/evidence/fleet-readiness-live-2026-08-23-v2.json`.
|
- `FLEET_READINESS_LIVE = MEDIUM_SELECTED_BY_AVAILABILITY`; the latest live readiness endpoint observed FAST unavailable, MEDIUM available, HEAVY unavailable by timeout and LIFEBOAT available; it selected MEDIUM while the configured preference remained FAST. This is routing evidence only, not a quality or promotion claim. Evidence: `docs/evidence/audit-completion-matrix-2026-08-24-v13.json`.
|
||||||
- `UI_AUTHENTICATED_ACCEPTANCE = DEEP_DESKTOP_PASS_WITH_MOBILE_GAP`; deep signed-in browser evidence covers chat reply, diagnostics 7/7 after refresh, fleet/agent/action-history refresh, 3/4 fleet readiness with FAST selected, truthful local executor state and learning/reflection refresh. Static responsive regression guard passed in CI; mobile viewport acceptance is not claimed. Evidence: `docs/evidence/deep-authenticated-acceptance-2026-08-23-v1.json`.
|
- `UI_AUTHENTICATED_ACCEPTANCE = DEEP_DESKTOP_PASS_WITH_MOBILE_GAP`; deep signed-in browser evidence covers chat reply, diagnostics 7/7 after refresh, fleet/agent/action-history refresh, 3/4 fleet readiness with FAST selected, truthful local executor state and learning/reflection refresh. Static responsive regression guard passed in CI; mobile viewport acceptance is not claimed. Evidence: `docs/evidence/deep-authenticated-acceptance-2026-08-23-v1.json`.
|
||||||
|
|
||||||
## Current governance checkpoint
|
## Current governance checkpoint
|
||||||
|
|
||||||
- `COMPLETION_MATRIX = docs/evidence/audit-completion-matrix-2026-08-23-v5.json`; all seven objective areas are mapped to current repository/production proof, with external bridge, GPU quality/promotion, mobile visual acceptance and deep-acceptance gaps explicit.
|
- `COMPLETION_MATRIX = docs/evidence/audit-completion-matrix-2026-08-24-v17.json`; generic candidate envelope verification, independent Work Graph synthesis, research relevance gating and authenticated desktop/mobile truth-first chat acceptance are live; external qualification and deep mutation/delegation/long-running acceptance remain explicit.
|
||||||
|
|
||||||
- `ACTIVE_TASK = dev/tasks/DEV-000235-model-qualification-probe.json revision 1`; cognitive-worker now exposes a bounded provider-neutral qualification probe that discovers actual model IDs, invokes them in parallel, reports reachability/latency and keeps quality `UNRATED` until independent task tests. Hardware presence does not grant promotion or priority.
|
- `ACTIVE_TASK = dev/tasks/DEV-000291-mobile-acceptance-evidence.json revision 1`; this evidence reconciliation does not change runtime behavior or model routing.
|
||||||
- `LINEAGE_DECISION = docs/GOVERNANCE_LINEAGE_DECISION_2026-08-22.md`; historical packets remain provenance and are not current authority.
|
- `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`
|
- `REGISTRY_STATUS = YAML and JSON semantic mirrors agree`
|
||||||
- `PRODUCTION_DOMAIN = docker.cin.su`; shared docker-test is not used for this project.
|
- `PRODUCTION_DOMAIN = docker.cin.su`; shared docker-test is not used for this project.
|
||||||
- `NEXT_WORK = obtain a viewport-capable browser for real mobile visual acceptance; separately qualify/promote GPU quality and provide an independently operated Agent Execution bridge when required.`
|
- `NEXT_WORK = obtain a viewport-capable browser for real mobile authenticated visual acceptance; add external providers later under an explicit task. Deep UI/load tests remain deferred until explicitly requested.`
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"evidence_id": "agent-execution-bridge-live-2026-08-24-v1",
|
||||||
|
"captured_at": "2026-08-23T21:34:06Z",
|
||||||
|
"production_revision": "7a004e5",
|
||||||
|
"runtime": "agent-execution-bridge",
|
||||||
|
"bridge": {"healthz": "200 OK", "capabilities": ["task-evaluation"], "service": "assistant-agent-execution-bridge-1"},
|
||||||
|
"agent_worker": {"readyz": "200 OK", "mode": "execution", "executor_configured": true, "local_fallback": false, "last_result": "idle"},
|
||||||
|
"public_health": "OK",
|
||||||
|
"semantics": "The independent local bridge executes only the bounded task-evaluation capability through cognitive-worker, task-verifier and work-graph callback. Unsupported generic work returns WAITING and is never reported as completed.",
|
||||||
|
"secrets_exposed": false,
|
||||||
|
"limitations": ["Universal generic/Codex execution remains unavailable until a separately qualified capability is installed", "GPU quality qualification and promotion remain incomplete", "real mobile authenticated visual acceptance remains unavailable in the current browser surface"]
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"evidence_id": "agent-worker-capability-readiness-2026-08-24-v1",
|
||||||
|
"captured_at": "2026-08-23T21:12:39Z",
|
||||||
|
"production_revision": "102a57a",
|
||||||
|
"runtime": "agent-worker",
|
||||||
|
"status": {"mode": "local-executor", "ready": true, "executor_configured": false, "local_executor": true, "local_fallback": true, "capabilities": ["task-evaluation"], "last_result": "idle", "total_recovered_claims": 0},
|
||||||
|
"readyz": "READY",
|
||||||
|
"semantics": "Ready means an advertised local capability can accept work; it does not claim that unsupported generic agent operations are executable.",
|
||||||
|
"external_bridge": "not configured and not fabricated",
|
||||||
|
"public_health": "OK",
|
||||||
|
"secrets_exposed": false,
|
||||||
|
"limitations": ["Generic Agent Execution/Codex bridge remains unavailable; unsupported work remains durable waiting"]
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"evidence_id": "audit-completion-matrix-2026-08-24-v10",
|
||||||
|
"captured_at": "2026-08-24T00:00:00Z",
|
||||||
|
"production_revision": "e4f8d6fa70545410e84f0d7572783aeafc58d288",
|
||||||
|
"supersedes": "docs/evidence/audit-completion-matrix-2026-08-24-v9.json",
|
||||||
|
"overall_status": "NOT_COMPLETE",
|
||||||
|
"completed_areas": ["agent execution durable lease/recovery", "bounded independent local agent execution bridge", "multi-agent work graph", "truth/research runtime", "learning reflection loop", "local-first model scope", "adaptive additional task evaluation scheduling", "governed gate verification/transitions", "authenticated desktop operations fast smoke", "responsive static regression guard", "current production artifact reconciliation"],
|
||||||
|
"remaining_gaps": ["universal generic/Codex Agent Execution capability is unavailable", "real mobile authenticated visual acceptance is unavailable because the browser remained 1687x1234 after a 390x844 request", "external model qualification and promotion are deferred by explicit scope decision"],
|
||||||
|
"live_facts": {"healthz": "OK", "production_revision": "e4f8d6f", "model_scope": "LOCAL_FIRST_V1", "primary_route": "local CPU", "fallback_route": "local Lifeboat", "lifeboat_health": "OK", "agent_executor": "local-executor", "fleet_ready": "3/4", "desktop_viewport": "1687x1234", "mobile_viewport_verified": false, "external_probe_required": false},
|
||||||
|
"secrets": "No secret values included."
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"evidence_id": "audit-completion-matrix-2026-08-24-v11",
|
||||||
|
"captured_at": "2026-08-23T23:40:05Z",
|
||||||
|
"production_revision": "f1c3abb3b7373d6f6c3d2dc7535e7dc5e3deaf74",
|
||||||
|
"supersedes": "docs/evidence/audit-completion-matrix-2026-08-24-v10.json",
|
||||||
|
"overall_status": "NOT_COMPLETE",
|
||||||
|
"completed_areas": ["agent execution durable lease/recovery", "bounded local task-evaluation bridge", "multi-agent work graph foundation", "truth/research runtime and live source smoke", "learning reflection loop", "governed self-development gate and verifier", "local-first model routing", "authenticated desktop quick smoke", "responsive static regression guard"],
|
||||||
|
"remaining_gaps": ["universal generic/Codex Agent Execution capability is unavailable; bridge advertises task-evaluation only", "authenticated chat end-to-end research response was not exercised in this session", "real mobile authenticated visual acceptance is unavailable", "external model qualification and promotion remain deferred by explicit scope decision"],
|
||||||
|
"live_facts": {
|
||||||
|
"healthz": "OK",
|
||||||
|
"production_revision": "f1c3abb",
|
||||||
|
"research_source_smoke": {"provider": "www.bing.com", "findings": 3, "claim_verification": "UNVERIFIED", "source_snapshots": true},
|
||||||
|
"agent_worker": {"ready": true, "executor_configured": true, "mode": "execution", "capabilities": ["task-evaluation"], "generic_execution": false},
|
||||||
|
"fleet": {"ready_tiers": ["MEDIUM", "LIFEBOAT"], "selected_tier": "MEDIUM", "fallback_tier": "LIFEBOAT", "fast_ready": false, "heavy_ready": false},
|
||||||
|
"mobile_viewport_verified": false,
|
||||||
|
"external_probe_required": false
|
||||||
|
},
|
||||||
|
"secrets": "No secret values included."
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"evidence_id": "audit-completion-matrix-2026-08-24-v12",
|
||||||
|
"captured_at": "2026-08-24T00:34:00Z",
|
||||||
|
"production_revision": "080bd440216372770b54bcf93a02bd6fb526e96c",
|
||||||
|
"supersedes": "docs/evidence/audit-completion-matrix-2026-08-24-v11.json",
|
||||||
|
"overall_status": "NOT_COMPLETE",
|
||||||
|
"completed_areas": ["durable Agent Execution lease/heartbeat/recovery", "bounded local task-evaluation bridge", "typed local generic cognitive specialist bridge", "multi-agent Work Graph fan-out/fan-in foundation", "Truth/Research runtime and source-backed routing", "Learning reflection loop", "governed self-development gate and verifier", "local-first model routing", "production rollout and live runtime health"],
|
||||||
|
"remaining_gaps": ["generic candidate still requires an independent verifier/synthesis before graph success", "authenticated chat end-to-end research response was not exercised in this session", "real mobile authenticated visual acceptance is unavailable", "external model qualification and promotion remain deferred by explicit scope"],
|
||||||
|
"live_facts": {
|
||||||
|
"assistant_healthz": "OK",
|
||||||
|
"runtime_project_revision": "080bd440216372770b54bcf93a02bd6fb526e96c",
|
||||||
|
"bridge": {"status": "ok", "capabilities": ["task-evaluation", "generic-cognitive-work"]},
|
||||||
|
"agent_worker": {"ready": true, "executor_configured": true, "mode": "execution", "capabilities": ["task-evaluation", "generic-cognitive-work"], "last_result": "idle"},
|
||||||
|
"fleet": {"ready_tiers": ["MEDIUM", "LIFEBOAT"], "selected_tier": "MEDIUM", "fallback_tier": "LIFEBOAT", "fast_ready": false, "heavy_ready": false},
|
||||||
|
"mobile_viewport_verified": false,
|
||||||
|
"authenticated_chat_e2e_verified": false,
|
||||||
|
"external_probe_required": false,
|
||||||
|
"secrets": "No secret values included."
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"evidence_id": "audit-completion-matrix-2026-08-24-v13",
|
||||||
|
"captured_at": "2026-08-24T01:27:00Z",
|
||||||
|
"production_revision": "e132ec6ba94c4e047b7cdf9ef07a8ebc352f776f",
|
||||||
|
"supersedes": "docs/evidence/audit-completion-matrix-2026-08-24-v12.json",
|
||||||
|
"overall_status": "NOT_COMPLETE",
|
||||||
|
"completed_areas": ["durable Agent Execution lease/heartbeat/recovery", "bounded local task-evaluation bridge", "typed local generic cognitive specialist bridge", "multi-agent Work Graph fan-out/fan-in foundation", "Truth/Research runtime and source-backed routing", "Learning reflection loop", "governed self-development gate and verifier", "local-first model routing", "Portainer delayed auto-deployment", "production health and live runtime checks"],
|
||||||
|
"remaining_gaps": ["generic candidate still requires an independent verifier/synthesis before graph success", "authenticated chat end-to-end research response was not exercised in this session", "real mobile authenticated visual acceptance is unavailable", "external model qualification and promotion remain deferred by explicit scope"],
|
||||||
|
"live_facts": {
|
||||||
|
"assistant_healthz": "OK",
|
||||||
|
"html_revision_prefix": "e132ec6ba94c",
|
||||||
|
"runtime_project_revision": "e132ec6ba94c4e047b7cdf9ef07a8ebc352f776f",
|
||||||
|
"bridge": {"status": "ok", "capabilities": ["task-evaluation", "generic-cognitive-work"]},
|
||||||
|
"agent_worker": {"ready": true, "executor_configured": true, "mode": "execution", "capabilities": ["task-evaluation", "generic-cognitive-work"], "last_result": "idle"},
|
||||||
|
"work_graph": {"status": "ready", "running": 6, "completed": 2},
|
||||||
|
"research_runtime": "ok",
|
||||||
|
"fleet": {"ready_tiers": ["MEDIUM", "LIFEBOAT"], "selected_tier": "MEDIUM", "fallback_tier": "LIFEBOAT", "fast_ready": false, "heavy_ready": false},
|
||||||
|
"mobile_viewport_verified": false,
|
||||||
|
"authenticated_chat_e2e_verified": false,
|
||||||
|
"external_probe_required": false,
|
||||||
|
"secrets": "No secret values included."
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"evidence_id": "audit-completion-matrix-2026-08-24-v14",
|
||||||
|
"captured_at": "2026-08-24T01:53:00Z",
|
||||||
|
"production_revision": "bcbd41f2172dc7ec68482680612ffcc50ea339d6",
|
||||||
|
"supersedes": "docs/evidence/audit-completion-matrix-2026-08-24-v13.json",
|
||||||
|
"overall_status": "NOT_COMPLETE",
|
||||||
|
"completed_areas": ["durable Agent Execution lease/heartbeat/recovery", "bounded local task-evaluation bridge", "typed local generic cognitive specialist bridge", "independent generic candidate envelope verification and Work Graph synthesis canary", "multi-agent Work Graph fan-out/fan-in foundation", "Truth/Research runtime and source-backed routing", "Learning reflection loop", "governed self-development gate and verifier", "local-first model routing", "Portainer delayed auto-deployment", "production health and live runtime checks"],
|
||||||
|
"remaining_gaps": ["authenticated chat end-to-end research response was not exercised in this session", "real mobile authenticated visual acceptance is unavailable", "external model qualification and promotion remain deferred by explicit scope"],
|
||||||
|
"live_facts": {
|
||||||
|
"assistant_healthz": "OK",
|
||||||
|
"runtime_project_revision": "bcbd41f2172dc7ec68482680612ffcc50ea339d6",
|
||||||
|
"bridge": {"status": "ok", "capabilities": ["task-evaluation", "generic-cognitive-work"]},
|
||||||
|
"agent_worker": {"ready": true, "executor_configured": true, "mode": "execution", "capabilities": ["task-evaluation", "generic-cognitive-work"]},
|
||||||
|
"work_graph": {"status": "ready", "generic_synthesis_canary": "COMPLETED_AFTER_VERIFIED_SYNTHESIS"},
|
||||||
|
"task_verifier": {"status": "ok", "generic_envelope_verifier": "verified"},
|
||||||
|
"research_runtime": "ok",
|
||||||
|
"fleet": {"ready_tiers": ["MEDIUM", "LIFEBOAT"], "selected_tier": "MEDIUM", "fallback_tier": "LIFEBOAT", "fast_ready": false, "heavy_ready": false},
|
||||||
|
"mobile_viewport_verified": false,
|
||||||
|
"authenticated_chat_e2e_verified": false,
|
||||||
|
"external_probe_required": false,
|
||||||
|
"secrets": "No secret values included."
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"evidence_id": "audit-completion-matrix-2026-08-24-v15",
|
||||||
|
"captured_at": "2026-08-24T10:24:50Z",
|
||||||
|
"production_revision": "12725511c0e16340e4f546fcf922a59989290211",
|
||||||
|
"supersedes": "docs/evidence/audit-completion-matrix-2026-08-24-v14.json",
|
||||||
|
"overall_status": "NOT_COMPLETE",
|
||||||
|
"completed_areas": ["durable Agent Execution lease/heartbeat/recovery", "bounded local task-evaluation bridge", "typed local generic cognitive specialist bridge", "independent generic candidate envelope verification and Work Graph synthesis canary", "multi-agent Work Graph fan-out/fan-in foundation", "Truth/Research runtime and source-backed routing", "research result relevance gate", "Learning reflection loop", "governed self-development gate and verifier", "local-first model routing", "Portainer delayed auto-deployment", "production health and live runtime checks", "authenticated truth-first chat smoke"],
|
||||||
|
"remaining_gaps": ["real mobile authenticated visual acceptance is unavailable", "external model qualification and promotion remain deferred by explicit scope", "deep authenticated mutation/delegation/long-running acceptance remains deferred"],
|
||||||
|
"live_facts": {
|
||||||
|
"assistant_healthz": "OK",
|
||||||
|
"runtime_project_revision": "12725511c0e16340e4f546fcf922a59989290211",
|
||||||
|
"bridge": {"status": "ok", "capabilities": ["task-evaluation", "generic-cognitive-work"]},
|
||||||
|
"agent_worker": {"ready": true, "executor_configured": true, "mode": "execution", "capabilities": ["task-evaluation", "generic-cognitive-work"]},
|
||||||
|
"work_graph": {"status": "ready"},
|
||||||
|
"task_verifier": {"status": "ok"},
|
||||||
|
"research_runtime": "ok",
|
||||||
|
"truth_first_chat": {"authenticated": true, "query_class": "current_weather", "result": "no_confirmed_evidence", "fabrication_prevented": true},
|
||||||
|
"mobile_viewport_verified": false,
|
||||||
|
"external_probe_required": false,
|
||||||
|
"secrets": "No secret values included."
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"evidence_id": "audit-completion-matrix-2026-08-24-v16",
|
||||||
|
"captured_at": "2026-08-24T10:35:31Z",
|
||||||
|
"production_revision": "3e91ae503c28547852acf130a5414ae9a27a4579",
|
||||||
|
"supersedes": "docs/evidence/audit-completion-matrix-2026-08-24-v15.json",
|
||||||
|
"overall_status": "NOT_COMPLETE",
|
||||||
|
"completed_areas": ["durable Agent Execution lease/heartbeat/recovery", "bounded local task-evaluation bridge", "typed local generic cognitive specialist bridge", "independent generic candidate envelope verification and Work Graph synthesis canary", "multi-agent Work Graph fan-out/fan-in foundation", "Truth/Research runtime and source-backed routing", "research result relevance gate", "Learning reflection loop", "governed self-development gate and verifier", "local-first model routing", "Portainer delayed auto-deployment", "production health and live runtime checks", "authenticated truth-first chat smoke"],
|
||||||
|
"remaining_gaps": ["real mobile authenticated visual acceptance is unavailable in the connected browser surface", "external model qualification and promotion remain deferred by explicit scope", "deep authenticated mutation/delegation/long-running acceptance remains deferred"],
|
||||||
|
"live_facts": {
|
||||||
|
"assistant_healthz": "OK",
|
||||||
|
"runtime_project_revision": "3e91ae503c28547852acf130a5414ae9a27a4579",
|
||||||
|
"runtime_containers": ["assistant-core-runtime-1", "assistant-creator-web-1", "assistant-research-runtime-1"],
|
||||||
|
"bridge": {"status": "ok", "capabilities": ["task-evaluation", "generic-cognitive-work"]},
|
||||||
|
"agent_worker": {"ready": true, "executor_configured": true, "mode": "execution"},
|
||||||
|
"work_graph": {"status": "ready"},
|
||||||
|
"task_verifier": {"status": "ok"},
|
||||||
|
"research_runtime": "ok",
|
||||||
|
"truth_first_chat": {"authenticated": true, "result": "no_confirmed_evidence", "fabrication_prevented": true},
|
||||||
|
"mobile_viewport_verified": false,
|
||||||
|
"external_probe_required": false,
|
||||||
|
"secrets": "No secret values included."
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"evidence_id": "audit-completion-matrix-2026-08-24-v17",
|
||||||
|
"captured_at": "2026-08-24T11:00:00Z",
|
||||||
|
"production_revision": "8c6f23dc491150a747bcc46c26ff04d217d37eba",
|
||||||
|
"supersedes": "docs/evidence/audit-completion-matrix-2026-08-24-v16.json",
|
||||||
|
"overall_status": "NOT_COMPLETE",
|
||||||
|
"completed_areas": ["durable Agent Execution lease/heartbeat/recovery", "bounded local task-evaluation bridge", "typed local generic cognitive specialist bridge", "independent generic candidate envelope verification and Work Graph synthesis canary", "multi-agent Work Graph fan-out/fan-in foundation", "Truth/Research runtime and source-backed routing", "research result relevance gate", "Learning reflection loop", "governed self-development gate and verifier", "local-first model routing", "Portainer delayed auto-deployment", "production health and live runtime checks", "authenticated truth-first chat smoke", "authenticated mobile visual chat acceptance"],
|
||||||
|
"remaining_gaps": ["external model qualification and promotion remain deferred by explicit scope", "deep authenticated mutation/delegation/long-running acceptance remains deferred"],
|
||||||
|
"live_facts": {
|
||||||
|
"assistant_healthz": "OK",
|
||||||
|
"runtime_project_revision": "8c6f23dc491150a747bcc46c26ff04d217d37eba",
|
||||||
|
"bridge": {"status": "ok", "capabilities": ["task-evaluation", "generic-cognitive-work"]},
|
||||||
|
"agent_worker": {"ready": true, "executor_configured": true, "mode": "execution"},
|
||||||
|
"work_graph": {"status": "ready"},
|
||||||
|
"task_verifier": {"status": "ok"},
|
||||||
|
"research_runtime": "ok",
|
||||||
|
"truth_first_chat": {"authenticated": true, "result": "no_confirmed_evidence", "fabrication_prevented": true},
|
||||||
|
"mobile_chat": {"authenticated": true, "viewport": "390x844", "horizontal_overflow": false, "scroll_width": 375, "session_active": true},
|
||||||
|
"external_probe_required": false,
|
||||||
|
"secrets": "No secret values included."
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"evidence_id": "audit-completion-matrix-2026-08-24-v6",
|
||||||
|
"captured_at": "2026-08-23T21:34:06Z",
|
||||||
|
"production_revision": "7a004e5",
|
||||||
|
"supersedes": "docs/evidence/audit-completion-matrix-2026-08-23-v5.json",
|
||||||
|
"overall_status": "NOT_COMPLETE",
|
||||||
|
"completed_areas": ["agent execution durable lease/recovery", "bounded independent local agent execution bridge", "multi-agent work graph", "truth/research runtime", "learning reflection loop", "model availability/failover and reachability rating", "adaptive additional task evaluation scheduling", "governed gate verification/transitions", "authenticated desktop operations fast smoke", "responsive static regression guard"],
|
||||||
|
"remaining_gaps": ["universal generic/Codex Agent Execution capability is unavailable", "GPU quality qualification and promotion remain incomplete", "real mobile authenticated visual acceptance is unavailable in the current browser surface"],
|
||||||
|
"live_facts": {"healthz": "OK", "agent_bridge": "READY", "agent_mode": "execution", "agent_capabilities": ["task-evaluation"], "diagnostics": "7/7 OK", "fleet_ready": "3/4", "selected_tier": "FAST", "fallback_tier": "LIFEBOAT"},
|
||||||
|
"responsive_guard": "CI PASS: cmd/creator-web responsive regression test",
|
||||||
|
"secrets": "No secret values included."
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"evidence_id": "audit-completion-matrix-2026-08-24-v7",
|
||||||
|
"captured_at": "2026-08-24T00:40:00Z",
|
||||||
|
"production_revision": "7a004e5",
|
||||||
|
"supersedes": "docs/evidence/audit-completion-matrix-2026-08-24-v6.json",
|
||||||
|
"overall_status": "NOT_COMPLETE",
|
||||||
|
"completed_areas": ["agent execution durable lease/recovery", "bounded independent local agent execution bridge", "multi-agent work graph", "truth/research runtime", "learning reflection loop", "model availability/failover and reachability rating", "adaptive additional task evaluation scheduling", "governed gate verification/transitions", "authenticated desktop operations fast smoke", "responsive static regression guard"],
|
||||||
|
"remaining_gaps": ["universal generic/Codex Agent Execution capability is unavailable", "GPU quality qualification and promotion remain incomplete", "real mobile authenticated visual acceptance is unavailable in the current browser surface"],
|
||||||
|
"live_facts": {"healthz": "OK", "agent_bridge": "READY", "agent_mode": "execution", "agent_capabilities": ["task-evaluation"], "diagnostics": "7/7 OK", "fleet_ready": "3/4", "selected_tier": "FAST", "fallback_tier": "LIFEBOAT", "authenticated_viewport": "1687x1234 desktop"},
|
||||||
|
"responsive_guard": "CI PASS: cmd/creator-web responsive regression test",
|
||||||
|
"secrets": "No secret values included."
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"evidence_id": "audit-completion-matrix-2026-08-24-v8",
|
||||||
|
"captured_at": "2026-08-23T22:02:37Z",
|
||||||
|
"production_revision": "041c1ce",
|
||||||
|
"supersedes": "docs/evidence/audit-completion-matrix-2026-08-24-v7.json",
|
||||||
|
"overall_status": "NOT_COMPLETE",
|
||||||
|
"completed_areas": ["agent execution durable lease/recovery", "bounded independent local agent execution bridge", "multi-agent work graph", "truth/research runtime", "learning reflection loop", "model availability/failover and reachability rating", "adaptive additional task evaluation scheduling", "governed gate verification/transitions", "authenticated desktop operations fast smoke", "responsive static regression guard"],
|
||||||
|
"remaining_gaps": ["universal generic/Codex Agent Execution capability is unavailable", "GPU upstream did not respond within a 60-second bounded window; quality qualification and promotion remain incomplete", "real mobile authenticated visual acceptance is unavailable in the current browser surface"],
|
||||||
|
"live_facts": {"healthz": "OK", "cognitive_worker": "OK", "agent_bridge": "READY", "agent_mode": "execution", "agent_capabilities": ["task-evaluation"], "diagnostics": "7/7 OK", "fleet_ready": "3/4", "selected_tier": "FAST", "fallback_tier": "LIFEBOAT", "gpu_timeout_window": "60s"},
|
||||||
|
"responsive_guard": "CI PASS: cmd/creator-web responsive regression test",
|
||||||
|
"secrets": "No secret values included."
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"evidence_id": "audit-completion-matrix-2026-08-24-v9",
|
||||||
|
"captured_at": "2026-08-24T00:00:00Z",
|
||||||
|
"production_revision": "9160654",
|
||||||
|
"supersedes": "docs/evidence/audit-completion-matrix-2026-08-24-v8.json",
|
||||||
|
"overall_status": "NOT_COMPLETE",
|
||||||
|
"completed_areas": ["agent execution durable lease/recovery", "bounded independent local agent execution bridge", "multi-agent work graph", "truth/research runtime", "learning reflection loop", "local-first model scope", "adaptive additional task evaluation scheduling", "governed gate verification/transitions", "authenticated desktop operations fast smoke", "responsive static regression guard"],
|
||||||
|
"remaining_gaps": ["universal generic/Codex Agent Execution capability is unavailable", "real mobile authenticated visual acceptance is unavailable in the current browser surface", "external model qualification and promotion are deferred by explicit scope decision"],
|
||||||
|
"live_facts": {"model_scope": "LOCAL_FIRST_V1", "primary_route": "local CPU", "fallback_route": "local Lifeboat", "external_probe_required": false},
|
||||||
|
"responsive_guard": "CI PASS: cmd/creator-web responsive regression test",
|
||||||
|
"secrets": "No secret values included."
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"evidence_id": "audit-runtime-status-2026-08-24-v1",
|
||||||
|
"captured_at": "2026-08-24T00:00:00Z",
|
||||||
|
"production_revision": "e4f8d6fa70545410e84f0d7572783aeafc58d288",
|
||||||
|
"public_health": "OK",
|
||||||
|
"local_runtime": {"lifeboat_health": "OK", "lifeboat_model": "Qwen3-8B-Q4_K_M.gguf", "agent_executor": "local-executor", "unsupported_work": "durably waiting"},
|
||||||
|
"authenticated_ui": {"desktop_viewport": "1687x1234", "fleet_summary": "3/4 READY", "lifeboat": "AVAILABLE", "agent_executor": "local-executor"},
|
||||||
|
"mobile_viewport": {"requested": "390x844", "observed": "1687x1234", "status": "NOT_VERIFIED"},
|
||||||
|
"external_models": "NOT_PROBED_BY_SCOPE",
|
||||||
|
"secrets": "No secret values included."
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
{
|
||||||
|
"evidence_id": "generic-synthesis-live-2026-08-24-v1",
|
||||||
|
"captured_at": "2026-08-24T01:53:00Z",
|
||||||
|
"production_revision": "bcbd41f2172dc7ec68482680612ffcc50ea339d6",
|
||||||
|
"synthetic_graph_id": "live-generic-synthesis-1787536366515",
|
||||||
|
"steps": {
|
||||||
|
"candidate_recording": {"result": "two candidates recorded", "graph_revision": 2, "node_state_before_synthesis": "LEASED"},
|
||||||
|
"independent_envelope_verification": {
|
||||||
|
"result": "both verified",
|
||||||
|
"verifier_identity": "deterministic-generic-envelope-verifier-v1",
|
||||||
|
"verification_refs": ["verification:61ea799b2713606095c2cb717a29e14b18ff63a56dc6bdf3412693dcd4d27e41", "verification:9c660a252d0b497ba6eaedfa0c09d01295226c83b7ada863fce016cb611292d9"]
|
||||||
|
},
|
||||||
|
"independent_synthesis": {
|
||||||
|
"result": "verified",
|
||||||
|
"verifier_run_id": "independent-verifier-live-283",
|
||||||
|
"selected_candidate_id": "candidate-a",
|
||||||
|
"dissent_candidate_ids": ["candidate-b"],
|
||||||
|
"graph_state_after_synthesis": "COMPLETED",
|
||||||
|
"node_state_after_synthesis": "SUCCEEDED"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"truth_boundary": "The canary proves attribution, evidence-envelope verification and explicit dissent retention. It does not prove the semantic content of either synthetic candidate; the response explicitly remained unverified.",
|
||||||
|
"runtime_checks": {
|
||||||
|
"assistant_healthz": "OK",
|
||||||
|
"agent_execution_bridge": "OK",
|
||||||
|
"task_verifier": "OK",
|
||||||
|
"work_graph_ready": "READY",
|
||||||
|
"agent_worker_ready": true
|
||||||
|
},
|
||||||
|
"secrets": "No secret values included."
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"evidence_id": "gpu-qualification-runtime-2026-08-24-v1",
|
||||||
|
"captured_at": "2026-08-24T00:40:00Z",
|
||||||
|
"production_revision": "7a004e5",
|
||||||
|
"route": "Domovoy cognitive-worker /v1/provider-discovery/gpu/qualify",
|
||||||
|
"prompt": "bounded one-word probe",
|
||||||
|
"provider": "local-gpu-opportunistic",
|
||||||
|
"results": [
|
||||||
|
{"provider_model_id": "Qwen3.6-27B-UD-Q4_K_XL", "status": "RESPONDED_WITHOUT_QUALIFICATION", "finish_reason": "TIMEOUT", "latency_millis": 10004, "quality_assessed": false, "category": "UNRATED"},
|
||||||
|
{"provider_model_id": "Qwen3.8-27B-UD-Q3_K_XL", "status": "RESPONDED_WITHOUT_QUALIFICATION", "finish_reason": "TIMEOUT", "latency_millis": 10004, "quality_assessed": false, "category": "UNRATED"},
|
||||||
|
{"provider_model_id": "Qwen3.8-27B-UD-Q4_K_XL", "status": "RESPONDED_WITHOUT_QUALIFICATION", "finish_reason": "TIMEOUT", "latency_millis": 10004, "quality_assessed": false, "category": "UNRATED"},
|
||||||
|
{"provider_model_id": "gemma-4-26B-A4B-it-UD-Q2_K_XL", "status": "RESPONDED_WITHOUT_QUALIFICATION", "finish_reason": "TIMEOUT", "latency_millis": 10004, "quality_assessed": false, "category": "UNRATED"}
|
||||||
|
],
|
||||||
|
"routing_effect": "No GPU promotion or priority; FAST remains selected and CPU/LIFEBOAT fallback remains authoritative.",
|
||||||
|
"ui_viewport_observation": {"authenticated": true, "width": 1687, "height": 1234, "mobile_viewport_emulation": "UNAVAILABLE"},
|
||||||
|
"secrets_exposed": false,
|
||||||
|
"limitations": ["GPU quality and promotion remain unproven", "real mobile authenticated visual acceptance remains unverified"]
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"evidence_id": "gpu-qualification-runtime-2026-08-24-v2",
|
||||||
|
"captured_at": "2026-08-23T22:02:37Z",
|
||||||
|
"production_revision": "041c1ce",
|
||||||
|
"route": "Domovoy cognitive-worker /v1/provider-discovery/gpu/qualify",
|
||||||
|
"provider": "local-gpu-opportunistic",
|
||||||
|
"timeout_window": "60s per model, four models in parallel",
|
||||||
|
"results": [
|
||||||
|
{"provider_model_id": "Qwen3.6-27B-UD-Q4_K_XL", "status": "RESPONDED_WITHOUT_QUALIFICATION", "finish_reason": "TIMEOUT", "latency_millis": 60030, "quality_assessed": false, "category": "UNRATED"},
|
||||||
|
{"provider_model_id": "Qwen3.8-27B-UD-Q3_K_XL", "status": "RESPONDED_WITHOUT_QUALIFICATION", "finish_reason": "TIMEOUT", "latency_millis": 60030, "quality_assessed": false, "category": "UNRATED"},
|
||||||
|
{"provider_model_id": "Qwen3.8-27B-UD-Q4_K_XL", "status": "RESPONDED_WITHOUT_QUALIFICATION", "finish_reason": "TIMEOUT", "latency_millis": 60029, "quality_assessed": false, "category": "UNRATED"},
|
||||||
|
{"provider_model_id": "gemma-4-26B-A4B-it-UD-Q2_K_XL", "status": "RESPONDED_WITHOUT_QUALIFICATION", "finish_reason": "TIMEOUT", "latency_millis": 60030, "quality_assessed": false, "category": "UNRATED"}
|
||||||
|
],
|
||||||
|
"diagnosis": "The previous 10-second client deadline was not the sole cause; the GPU upstream produced no bounded response within 60 seconds for any discovered model.",
|
||||||
|
"routing_effect": "No GPU promotion or priority; FAST remains selected and CPU/LIFEBOAT fallback remains authoritative.",
|
||||||
|
"runtime_health": {"public_health": "OK", "cognitive_worker": "OK", "agent_bridge": "OK", "agent_worker": "READY"},
|
||||||
|
"secrets_exposed": false,
|
||||||
|
"limitations": ["GPU quality and promotion remain unproven", "upstream GPU service requires separate runtime diagnosis or recovery"]
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"evidence_id": "local-first-model-scope-2026-08-24-v1",
|
||||||
|
"captured_at": "2026-08-24T00:00:00Z",
|
||||||
|
"task_id": "DEV-000270",
|
||||||
|
"decision": "LOCAL_FIRST_V1",
|
||||||
|
"primary_route": "one locally available Qwen3-8B or Gemma-4 conversational model",
|
||||||
|
"fallback_route": "local Lifeboat",
|
||||||
|
"external_models": {"status": "OPTIONAL_DEFERRED", "qualification_required_now": false, "promotion_allowed_now": false, "availability_blocks_local_work": false},
|
||||||
|
"degraded_continuation": ["local CPU model", "local Lifeboat", "durable reflexes", "registered skills", "local executors"],
|
||||||
|
"routing_principle": "GPU or endpoint identity does not imply intelligence, quality, or priority.",
|
||||||
|
"scope": "The core Domovoy workflow must remain useful using the local CPU model and local Lifeboat alone.",
|
||||||
|
"secrets": "No secret values included."
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"artifact_id": "semantic-web-research-routing-2026-08-24-v1",
|
||||||
|
"task_id": "DEV-000275",
|
||||||
|
"repository_revision": "working-tree-after-1eb3e39",
|
||||||
|
"status": "IMPLEMENTED_NOT_DEPLOYED",
|
||||||
|
"facts": [
|
||||||
|
"Simple factual questions now reach strict semantic interpretation before any advisory answer.",
|
||||||
|
"WEB_RESEARCH is a semantic capability hint; the route contains no city, weather, entity or model-name list.",
|
||||||
|
"Search uses an operator-configured HTTPS endpoint and host allowlist, then persists immutable digest, snapshot and excerpt evidence through the existing epistemics owner.",
|
||||||
|
"Core presents exact source excerpts and locators only for supported findings; empty, stale or conflicted evidence remains a truthful non-answer.",
|
||||||
|
"The search channel is optional and does not prevent the local chat core from operating."
|
||||||
|
],
|
||||||
|
"tests": [
|
||||||
|
"go test ./adapters/research ./modules/epistemics/... ./cmd/research-runtime/... ./cmd/core-runtime/... ./cmd/creator-web/... ./tests/research_runtime/...",
|
||||||
|
"go vet ./...",
|
||||||
|
"devctl preflight/check-diff/check-architecture/independent",
|
||||||
|
"git diff --check"
|
||||||
|
],
|
||||||
|
"limitation": "Production deployment and live assistant.cin.su source-backed chat verification are pending the normal Portainer deployment access."
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"artifact_id": "semantic-web-research-routing-2026-08-24-v2",
|
||||||
|
"task_id": "DEV-000278",
|
||||||
|
"production_revision": "f1c3abb3b7373d6f6c3d2dc7535e7dc5e3deaf74",
|
||||||
|
"captured_at": "2026-08-23T23:33:18Z",
|
||||||
|
"healthz": "OK",
|
||||||
|
"research_smoke": {
|
||||||
|
"query_shape": "current factual question with a location entity",
|
||||||
|
"provider": "www.bing.com",
|
||||||
|
"findings": 3,
|
||||||
|
"finding_states": ["SUPPORTED", "SUPPORTED", "SUPPORTED"],
|
||||||
|
"evidence": "OBSERVED",
|
||||||
|
"coverage": "COMPLETE",
|
||||||
|
"conflict": "NONE",
|
||||||
|
"claim_verification": "UNVERIFIED",
|
||||||
|
"source_snapshot_and_digest": true,
|
||||||
|
"source_locator_returned": true
|
||||||
|
},
|
||||||
|
"truth_policy": "The response may present exact source excerpts and locators, but must not present the search snippet as Domovoy's independently verified fact.",
|
||||||
|
"limitations": ["authenticated chat end-to-end response was not exercised because no signed-in browser session was available", "authenticated mobile visual acceptance remains pending"]
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"evidence_id": "truth-first-question-gate-2026-08-24-v1",
|
||||||
|
"captured_at": "2026-08-24T00:00:00Z",
|
||||||
|
"task_id": "DEV-000274",
|
||||||
|
"default_policy": "A factual question without verified evidence is not answered from model memory.",
|
||||||
|
"unverified_question_behavior": "verification_required",
|
||||||
|
"verified_internal_exception": "Existing canonical internal status routes remain available.",
|
||||||
|
"semantic_routing": "WEB_RESEARCH is a capability hint from semantic interpretation; no city/entity keyword list is used.",
|
||||||
|
"current_limitation": "Automatic web search and source-backed answer composition remain the next research-runtime stage.",
|
||||||
|
"secrets": "No secret values included."
|
||||||
|
}
|
||||||
@@ -57,7 +57,7 @@ func evaluateGroup(key string, candidates []epistemics.ResearchCandidate, evalua
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return epistemics.ResearchFinding{}, ErrInvalidResearchCandidate
|
return epistemics.ResearchFinding{}, ErrInvalidResearchCandidate
|
||||||
}
|
}
|
||||||
finding := epistemics.ResearchFinding{PropositionKey: key, Statement: first.Statement, Claim: firstBundle.Claim, Citations: []epistemics.Citation{firstBundle.Citation}, State: epistemics.FindingSupported}
|
finding := epistemics.ResearchFinding{PropositionKey: key, Statement: first.Statement, Claim: firstBundle.Claim, Citations: []epistemics.Citation{firstBundle.Citation}, Source: first.Source, Excerpt: first.Excerpt, State: epistemics.FindingSupported}
|
||||||
statements := map[string]struct{}{normalize(first.Statement): {}}
|
statements := map[string]struct{}{normalize(first.Statement): {}}
|
||||||
if first.Snapshot.Freshness == epistemics.FreshnessUnknown || first.Evidence == epistemics.EvidenceAssumed || first.Coverage != epistemics.CoverageComplete {
|
if first.Snapshot.Freshness == epistemics.FreshnessUnknown || first.Evidence == epistemics.EvidenceAssumed || first.Coverage != epistemics.CoverageComplete {
|
||||||
finding.State, finding.Reason = epistemics.FindingUnknown, "evidence is assumed, unknown or incomplete"
|
finding.State, finding.Reason = epistemics.FindingUnknown, "evidence is assumed, unknown or incomplete"
|
||||||
|
|||||||
@@ -405,6 +405,9 @@ func capabilityHintsFor(primary, secondary interaction.SpeechAct, tokens []strin
|
|||||||
if primary == interaction.SpeechActQuestion || primary == interaction.SpeechActRequestToInvestigate || secondary == interaction.SpeechActQuestion || secondary == interaction.SpeechActRequestToInvestigate {
|
if primary == interaction.SpeechActQuestion || primary == interaction.SpeechActRequestToInvestigate || secondary == interaction.SpeechActQuestion || secondary == interaction.SpeechActRequestToInvestigate {
|
||||||
add("COGNITIVE_REASONING")
|
add("COGNITIVE_REASONING")
|
||||||
}
|
}
|
||||||
|
if sourceDependentQuestion(primary, secondary, tokens) {
|
||||||
|
add("WEB_RESEARCH")
|
||||||
|
}
|
||||||
if containsToken(tokens, "напомни") || containsToken(tokens, "напомин") {
|
if containsToken(tokens, "напомни") || containsToken(tokens, "напомин") {
|
||||||
add("SCHEDULE_REMINDER")
|
add("SCHEDULE_REMINDER")
|
||||||
}
|
}
|
||||||
@@ -432,10 +435,11 @@ func capabilityHintsFor(primary, secondary interaction.SpeechAct, tokens []strin
|
|||||||
if containsInterrogative(tokens) && containsArithmetic(tokens) {
|
if containsInterrogative(tokens) && containsArithmetic(tokens) {
|
||||||
add("COGNITIVE_REASONING")
|
add("COGNITIVE_REASONING")
|
||||||
}
|
}
|
||||||
if containsToken(tokens, "свободно") || containsToken(tokens, "гб") || containsToken(tokens, "модель") {
|
if containsToken(tokens, "свободно") || containsToken(tokens, "гб") {
|
||||||
add("VERIFY_FACT")
|
add("VERIFY_FACT")
|
||||||
}
|
}
|
||||||
if containsStemInTokens(tokens, "модел", "ии") && containsStemInTokens(tokens, "настро", "список", "доступ", "подключ") {
|
modelIntent := containsStemInTokens(tokens, "настро", "список", "доступ", "подключ", "сравн", "выбер", "провер", "проверь", "перечисл")
|
||||||
|
if containsStemInTokens(tokens, "модел", "ии") && modelIntent && (primary == interaction.SpeechActQuestion || primary == interaction.SpeechActDirective || primary == interaction.SpeechActRequestToInvestigate || secondary == interaction.SpeechActQuestion || secondary == interaction.SpeechActDirective || secondary == interaction.SpeechActRequestToInvestigate) {
|
||||||
add("VERIFY_FACT")
|
add("VERIFY_FACT")
|
||||||
}
|
}
|
||||||
values := make([]string, 0, len(seen))
|
values := make([]string, 0, len(seen))
|
||||||
@@ -445,6 +449,20 @@ func capabilityHintsFor(primary, secondary interaction.SpeechAct, tokens []strin
|
|||||||
return values
|
return values
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// sourceDependentQuestion identifies semantic classes whose answer depends on
|
||||||
|
// a current or externally observed source. It intentionally uses no named
|
||||||
|
// place, person or one-off question branch; when the cue is absent the
|
||||||
|
// truth-first fallback remains in force.
|
||||||
|
func sourceDependentQuestion(primary, secondary interaction.SpeechAct, tokens []string) bool {
|
||||||
|
inquiry := primary == interaction.SpeechActQuestion || primary == interaction.SpeechActRequestToInvestigate || secondary == interaction.SpeechActQuestion || secondary == interaction.SpeechActRequestToInvestigate
|
||||||
|
if !inquiry {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
currentCue := containsStemInTokens(tokens, "сейчас", "сегодня", "текущ", "актуаль", "последн", "прямо")
|
||||||
|
observedStateCue := containsStemInTokens(tokens, "погод", "температур", "осад", "ветер", "курс", "цен", "стоим", "новост", "распис", "событ", "статус", "доступен", "работает", "запущен", "срок")
|
||||||
|
return currentCue || observedStateCue
|
||||||
|
}
|
||||||
|
|
||||||
func informationRequestKind(message string, candidate interaction.SemanticCandidate) interaction.InformationRequestKind {
|
func informationRequestKind(message string, candidate interaction.SemanticCandidate) interaction.InformationRequestKind {
|
||||||
tokens := semanticTokens(message)
|
tokens := semanticTokens(message)
|
||||||
if len(tokens) == 0 {
|
if len(tokens) == 0 {
|
||||||
|
|||||||
@@ -103,6 +103,15 @@ func TestDeterministicCandidateTreatsModelRequestAsDirectiveNeedingCognition(t *
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestAWordModelDoesNotTriggerModelInventoryOrVerification(t *testing.T) {
|
||||||
|
candidate := BuildDeterministicCandidate("модель должна понимать смысл вопроса", "", time.Unix(10, 0).UnixMilli())
|
||||||
|
for _, hint := range candidate.CapabilityHints {
|
||||||
|
if hint == "VERIFY_FACT" {
|
||||||
|
t.Fatalf("an incidental model mention must not trigger fact verification: %+v", candidate)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func TestInformationRequestsAreClassifiedOnceByInteraction(t *testing.T) {
|
func TestInformationRequestsAreClassifiedOnceByInteraction(t *testing.T) {
|
||||||
cases := []struct {
|
cases := []struct {
|
||||||
message string
|
message string
|
||||||
@@ -124,6 +133,25 @@ func TestInformationRequestsAreClassifiedOnceByInteraction(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestSourceDependentQuestionRequestsWebResearchWithoutEntityBranch(t *testing.T) {
|
||||||
|
candidate := BuildDeterministicCandidate("какая погода в Киеве?", "", time.Unix(10, 0).UnixMilli())
|
||||||
|
seen := false
|
||||||
|
for _, hint := range candidate.CapabilityHints {
|
||||||
|
if hint == "WEB_RESEARCH" {
|
||||||
|
seen = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if !seen {
|
||||||
|
t.Fatalf("source-dependent question was not routed to WEB_RESEARCH: %+v", candidate)
|
||||||
|
}
|
||||||
|
ordinary := BuildDeterministicCandidate("что такое гравитация?", "", time.Unix(10, 0).UnixMilli())
|
||||||
|
for _, hint := range ordinary.CapabilityHints {
|
||||||
|
if hint == "WEB_RESEARCH" {
|
||||||
|
t.Fatalf("ordinary conceptual question was incorrectly routed to WEB_RESEARCH: %+v", ordinary)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func TestDeterministicCandidateKeepsFirstPersonCompletedWorkAsAssertion(t *testing.T) {
|
func TestDeterministicCandidateKeepsFirstPersonCompletedWorkAsAssertion(t *testing.T) {
|
||||||
candidate := BuildDeterministicCandidate("Я всё уже настроил.", "", time.Unix(10, 0).UnixMilli())
|
candidate := BuildDeterministicCandidate("Я всё уже настроил.", "", time.Unix(10, 0).UnixMilli())
|
||||||
if candidate.PrimarySpeechAct != interaction.SpeechActAssertion {
|
if candidate.PrimarySpeechAct != interaction.SpeechActAssertion {
|
||||||
|
|||||||
@@ -0,0 +1,70 @@
|
|||||||
|
package research_runtime_test
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"net/http"
|
||||||
|
"net/http/httptest"
|
||||||
|
"testing"
|
||||||
|
|
||||||
|
researchadapter "git.cin.su/m/Assistant/adapters/research"
|
||||||
|
"git.cin.su/m/Assistant/contracts/epistemics"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestSearchConnectorReturnsBoundedImmutableEvidence(t *testing.T) {
|
||||||
|
server := httptest.NewTLSServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
w.Header().Set("Content-Type", "text/html")
|
||||||
|
_, _ = w.Write([]byte(`<a class="result__a">Verified title</a><a class="result__snippet">Observed source excerpt</a>`))
|
||||||
|
}))
|
||||||
|
defer server.Close()
|
||||||
|
request := epistemics.WebSearchRequest{Plan: epistemics.ResearchPlan{ID: "plan", Question: "verified source", SourceClasses: []string{"web-search"}, FreshnessPolicy: "current"}, PropositionKey: "question-1", Query: "verified source"}
|
||||||
|
connector := researchadapter.SearchConnector{EndpointTemplate: server.URL + "?q=%s", AllowedHosts: map[string]struct{}{"127.0.0.1": {}}, Client: server.Client(), MaxResults: 3}
|
||||||
|
// The production connector requires HTTPS. The test server is HTTPS too;
|
||||||
|
// use its host as the allowlisted value and preserve the same transport.
|
||||||
|
candidates, err := connector.Collect(context.Background(), request, 10)
|
||||||
|
if err != nil {
|
||||||
|
t.Fatalf("collect search evidence: %v", err)
|
||||||
|
}
|
||||||
|
if len(candidates) != 1 || candidates[0].Statement != "Verified title — Observed source excerpt" {
|
||||||
|
t.Fatalf("unexpected candidates: %+v", candidates)
|
||||||
|
}
|
||||||
|
if candidates[0].Evidence != epistemics.EvidenceObserved || candidates[0].Snapshot.ContentDigest == "" || candidates[0].Excerpt.Text == "" {
|
||||||
|
t.Fatalf("candidate lost evidence chain: %+v", candidates[0])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestSearchConnectorRejectsUnallowlistedEndpoint(t *testing.T) {
|
||||||
|
request := epistemics.WebSearchRequest{Plan: epistemics.ResearchPlan{ID: "plan", Question: "q", SourceClasses: []string{"web-search"}, FreshnessPolicy: "current"}, Query: "q"}
|
||||||
|
_, err := (researchadapter.SearchConnector{EndpointTemplate: "https://example.invalid/?q=%s"}).Collect(context.Background(), request, 10)
|
||||||
|
if err != researchadapter.ErrSearchRejected {
|
||||||
|
t.Fatalf("expected allowlist rejection, got %v", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestSearchConnectorParsesConfiguredBingStyleResults(t *testing.T) {
|
||||||
|
server := httptest.NewTLSServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
_, _ = w.Write([]byte(`<li class="b_algo"><h2><a href="https://source.example">Source title</a></h2><p>Current source excerpt</p></li>`))
|
||||||
|
}))
|
||||||
|
defer server.Close()
|
||||||
|
request := epistemics.WebSearchRequest{Plan: epistemics.ResearchPlan{ID: "plan", Question: "q", SourceClasses: []string{"web-search"}, FreshnessPolicy: "current"}, PropositionKey: "p", Query: "q"}
|
||||||
|
connector := researchadapter.SearchConnector{EndpointTemplate: server.URL + "?q=%s", AllowedHosts: map[string]struct{}{"127.0.0.1": {}}, Client: server.Client(), MaxResults: 3}
|
||||||
|
candidates, err := connector.Collect(context.Background(), request, 10)
|
||||||
|
if err != nil || len(candidates) != 1 || candidates[0].Statement != "Source title — Current source excerpt" {
|
||||||
|
t.Fatalf("unexpected Bing-style evidence: candidates=%+v err=%v", candidates, err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestSearchConnectorDropsIrrelevantResults(t *testing.T) {
|
||||||
|
server := httptest.NewTLSServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
_, _ = w.Write([]byte(`<li class="b_algo"><h2><a href="https://source.example">Викисловарь</a></h2><p>Статья о грамматике</p></li>`))
|
||||||
|
}))
|
||||||
|
defer server.Close()
|
||||||
|
request := epistemics.WebSearchRequest{Plan: epistemics.ResearchPlan{ID: "plan", Question: "какая погода в Киеве", SourceClasses: []string{"web-search"}, FreshnessPolicy: "current"}, PropositionKey: "p", Query: "какая погода в Киеве"}
|
||||||
|
connector := researchadapter.SearchConnector{EndpointTemplate: server.URL + "?q=%s", AllowedHosts: map[string]struct{}{"127.0.0.1": {}}, Client: server.Client(), MaxResults: 3}
|
||||||
|
candidates, err := connector.Collect(context.Background(), request, 10)
|
||||||
|
if err != nil {
|
||||||
|
t.Fatalf("collect search evidence: %v", err)
|
||||||
|
}
|
||||||
|
if len(candidates) != 0 {
|
||||||
|
t.Fatalf("irrelevant result was retained: %+v", candidates)
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user