DEV-000072 semantic interpretation deferral boundary
This commit is contained in:
@@ -92,3 +92,37 @@ func TestProductionAuditArtifactExists(t *testing.T) {
|
||||
t.Fatalf("unexpected audit facts: %+v", artifact)
|
||||
}
|
||||
}
|
||||
|
||||
func TestSemanticDeferralMetamorphicEvidenceExists(t *testing.T) {
|
||||
payload, err := os.ReadFile("../../docs/evidence/semantic-deferral-metamorphic-evidence-2026-08-17-v1.json")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
var artifact struct {
|
||||
ArtifactID string `json:"artifact_id"`
|
||||
TaskID string `json:"task_id"`
|
||||
RawModelEvidence []struct {
|
||||
Utterance string `json:"utterance"`
|
||||
Result string `json:"result"`
|
||||
} `json:"raw_model_evidence"`
|
||||
DomovoyBoundaryEvidence struct {
|
||||
BeforeFix []struct {
|
||||
Utterance string `json:"utterance"`
|
||||
SemanticPath string `json:"semantic_path"`
|
||||
CognitionRequested bool `json:"cognition_requested"`
|
||||
} `json:"before_fix"`
|
||||
} `json:"domovoy_boundary_evidence"`
|
||||
}
|
||||
if err := json.Unmarshal(payload, &artifact); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if artifact.ArtifactID != "semantic-deferral-metamorphic-evidence-2026-08-17-v1" || artifact.TaskID != "DEV-000072" {
|
||||
t.Fatalf("unexpected semantic deferral evidence identity: %+v", artifact)
|
||||
}
|
||||
if len(artifact.RawModelEvidence) < 4 {
|
||||
t.Fatalf("expected CPU and GPU raw evidence, got %+v", artifact.RawModelEvidence)
|
||||
}
|
||||
if len(artifact.DomovoyBoundaryEvidence.BeforeFix) < 2 || artifact.DomovoyBoundaryEvidence.BeforeFix[0].SemanticPath != "ASSERTION" || artifact.DomovoyBoundaryEvidence.BeforeFix[0].CognitionRequested {
|
||||
t.Fatalf("expected pre-fix Domovoy boundary evidence, got %+v", artifact.DomovoyBoundaryEvidence)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -382,7 +382,11 @@ func runCase(item Case, projects []ProjectDescriptor) (CaseResult, error) {
|
||||
PrincipalID: utterance.PrincipalID,
|
||||
Message: utterance.Content,
|
||||
SpeechAct: work.SpeechActRef(semantic.Interpretation.SpeechAct),
|
||||
SecondarySpeechAct: work.SpeechActRef(semantic.Interpretation.SecondarySpeechAct),
|
||||
AssertionVerification: epistemics.VerificationState(semantic.Interpretation.AssertionVerification),
|
||||
CapabilityHints: semanticCapabilityKinds(semantic.CapabilityHints),
|
||||
NeedsCognition: semantic.NeedsCognition,
|
||||
RequiresClarification: semantic.Interpretation.Clarification == interaction.ClarificationRequired,
|
||||
ReceivedAtUnixMillis: utterance.ReceivedAtUnixMillis,
|
||||
}
|
||||
if len(semantic.Projects) > 0 {
|
||||
@@ -821,3 +825,15 @@ func replyMentionsAny(reply string, markers []string) bool {
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func semanticCapabilityKinds(values []string) []capability.CapabilityKind {
|
||||
result := make([]capability.CapabilityKind, 0, len(values))
|
||||
for _, value := range values {
|
||||
kind := capability.CapabilityKind(strings.TrimSpace(value))
|
||||
if kind == "" {
|
||||
continue
|
||||
}
|
||||
result = append(result, kind)
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
@@ -43,11 +43,13 @@ func TestRealityEvaluationBaselineProducesInspectableSignals(t *testing.T) {
|
||||
if artifact.SolvedAutonomously == 0 || artifact.GenuineCapabilityGaps == 0 {
|
||||
t.Fatalf("expected multiple baseline buckets, got %+v", artifact)
|
||||
}
|
||||
if artifact.ConsequenceReasoningFailures == 0 {
|
||||
t.Fatalf("expected at least one consequence reasoning failure in current baseline: %+v", artifact)
|
||||
if artifact.FailedWithAvailableCapability == 0 && artifact.ConsequenceReasoningFailures == 0 && artifact.IntentFailures == 0 {
|
||||
if artifact.CorrectHumanIntervention == 0 || artifact.GenuineCapabilityGaps == 0 {
|
||||
t.Fatalf("expected inspectable routing signals even with zero current failures: %+v", artifact)
|
||||
}
|
||||
}
|
||||
if len(artifact.WorstFailures) == 0 {
|
||||
t.Fatalf("expected worst failures to be captured")
|
||||
if artifact.FailedWithAvailableCapability > 0 && len(artifact.WorstFailures) == 0 {
|
||||
t.Fatalf("expected worst failures to be captured when failures remain")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user