Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ jobs:
./progress/... \
./cmd/... \
./core/coreself/... \
./core/metacognition/... \
./core/memory/... \
./core/echobeats/... \
./core/persistence/... \
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ jobs:
./core/lampstack/... \
./progress/... \
./cmd/... \
./core/metacognition/... \
./core/memory/... \
./core/echobeats/... \
./core/consciousness/... \
Expand Down
79 changes: 44 additions & 35 deletions cmd/autonomous/main_production.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,41 +232,43 @@ func newProductionHandler(orchestrator *deeptreeecho.UnifiedAutonomousOrchestrat
mux.HandleFunc("/status", func(w http.ResponseWriter, _ *http.Request) {
status := orchestrator.GetStatus()
writeJSON(w, http.StatusOK, map[string]interface{}{
"identity": "Deep Tree Echo",
"iteration": productionIteration,
"running": status.Running,
"awake": status.IsAwake,
"autonomous": status.IsAutonomous,
"session_id": status.SessionID,
"uptime": status.Uptime.String(),
"provider": status.Provider,
"provider_available": status.ProviderAvailable,
"backend": publicBackendState(status.Backend),
"wake_rest_state": status.WakeRestState,
"dream_phase": status.DreamPhase,
"pending_experiences": status.PendingExperiences,
"experience_ledger_size": status.ExperienceLedgerSize,
"cognitive_load": status.CognitiveLoad,
"wisdom_depth": status.WisdomDepth,
"cycles": status.TotalCycles,
"thoughts": status.TotalThoughts,
"goals": status.TotalGoals,
"wisdom": status.TotalWisdom,
"dream_wisdom": status.DreamWisdom,
"last_state_sync": status.LastStateSync.UTC().Format(time.RFC3339),
"persistence_enabled": status.StateDirectory != "",
"enaction_enabled": status.EnactionEnabled,
"enaction_mode": status.EnactionMode,
"enaction_paused": status.EnactionPaused,
"event_ledger_ready": status.EventLedgerReady,
"cognitive_events": status.EventCount,
"cognitive_core_enabled": status.CognitiveCoreEnabled,
"cognitive_core": status.CognitiveCore,
"outcome_learning": status.OutcomeLearning,
"wisdom_metric_status": "legacy counters; generated hypotheses do not prove wisdom",
"core_self_enabled": status.CoreSelfEnabled,
"core_self_ready": status.CoreSelfReady,
"core_self": status.CoreSelf,
"identity": "Deep Tree Echo",
"iteration": productionIteration,
"running": status.Running,
"awake": status.IsAwake,
"autonomous": status.IsAutonomous,
"session_id": status.SessionID,
"uptime": status.Uptime.String(),
"provider": status.Provider,
"provider_available": status.ProviderAvailable,
"backend": publicBackendState(status.Backend),
"wake_rest_state": status.WakeRestState,
"dream_phase": status.DreamPhase,
"pending_experiences": status.PendingExperiences,
"experience_ledger_size": status.ExperienceLedgerSize,
"cognitive_load": status.CognitiveLoad,
"wisdom_depth": status.WisdomDepth,
"cycles": status.TotalCycles,
"thoughts": status.TotalThoughts,
"goals": status.TotalGoals,
"wisdom": status.TotalWisdom,
"dream_wisdom": status.DreamWisdom,
"last_state_sync": status.LastStateSync.UTC().Format(time.RFC3339),
"persistence_enabled": status.StateDirectory != "",
"enaction_enabled": status.EnactionEnabled,
"enaction_mode": status.EnactionMode,
"enaction_paused": status.EnactionPaused,
"event_ledger_ready": status.EventLedgerReady,
"cognitive_events": status.EventCount,
"cognitive_core_enabled": status.CognitiveCoreEnabled,
"cognitive_core": status.CognitiveCore,
"outcome_learning": status.OutcomeLearning,
"wisdom_metric_status": "legacy counters; generated hypotheses do not prove wisdom",
"core_self_enabled": status.CoreSelfEnabled,
"core_self_ready": status.CoreSelfReady,
"core_self": status.CoreSelf,
"evidence_reflection": status.Reflection,
"wisdom_epistemic_status": "legacy_unvalidated; new insights are hypotheses, not wisdom awards",
})
})

Expand Down Expand Up @@ -295,6 +297,13 @@ func newProductionHandler(orchestrator *deeptreeecho.UnifiedAutonomousOrchestrat
fmt.Fprintf(w, "# TYPE echo_core_self_ready gauge\necho_core_self_ready %d\n", boolMetric(status.CoreSelfReady))
fmt.Fprintf(w, "# TYPE echo_core_self_events_total counter\necho_core_self_events_total %d\n", status.CoreSelf.EventCount)
fmt.Fprintf(w, "# TYPE echo_core_self_pending_proposals gauge\necho_core_self_pending_proposals %d\n", status.CoreSelf.ProposalCount)
fmt.Fprintf(w, "# TYPE echo_reflection_evaluations gauge\necho_reflection_evaluations %d\n", status.Reflection.Evaluated)
fmt.Fprintf(w, "# TYPE echo_reflection_calibration_samples gauge\necho_reflection_calibration_samples %d\n", status.Reflection.CalibrationSamples)
fmt.Fprintf(w, "# TYPE echo_reflection_proposed_total counter\necho_reflection_proposed_total %d\n", status.Reflection.Proposed)
fmt.Fprintf(w, "# TYPE echo_reflection_errors_total counter\necho_reflection_errors_total %d\n", status.Reflection.Errors)
if status.Reflection.BrierScore != nil {
fmt.Fprintf(w, "# TYPE echo_artifact_brier_score gauge\necho_artifact_brier_score %.8f\n", *status.Reflection.BrierScore)
}
})

mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
Expand Down
14 changes: 14 additions & 0 deletions cmd/autonomous/main_production_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,18 @@ func TestProductionHealthAndStatusReflectLifecycle(t *testing.T) {
if statusPayload["iteration"] != productionIteration {
t.Fatalf("status endpoint reported wrong iteration: %#v", statusPayload)
}
reflectionStatus, ok := statusPayload["evidence_reflection"].(map[string]interface{})
if !ok || reflectionStatus["version"] != "evidence-metacognition-v1" {
t.Fatalf("status omitted metacognition contract: %#v", reflectionStatus)
}
for _, private := range []string{"evidence", "lesson", "source_event_ids", "artifact_brier_score"} {
if _, exposed := reflectionStatus[private]; exposed {
t.Fatalf("empty reflection status exposed/invented %q: %#v", private, reflectionStatus)
}
}
if !strings.Contains(statusPayload["wisdom_epistemic_status"].(string), "hypotheses") {
t.Fatal("legacy wisdom status lacks epistemic qualification")
}
coreStatus, ok := statusPayload["cognitive_core"].(map[string]interface{})
if !ok || coreStatus["started"] != true {
t.Fatalf("status endpoint omitted active cognitive core: %#v", statusPayload)
Expand Down Expand Up @@ -283,6 +295,8 @@ func TestProductionStatusScrubsBackendPathsAndExportsMetrics(t *testing.T) {
"echo_cognitive_core_ready 0",
"echo_core_self_ready 1",
"echo_core_self_events_total 1",
"echo_reflection_evaluations 0",
"echo_reflection_calibration_samples 0",
} {
if !strings.Contains(metrics, expected) {
t.Fatalf("metrics missing %q:\n%s", expected, metrics)
Expand Down
4 changes: 2 additions & 2 deletions cognitive-core/ecco9/go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module github.com/EchoCog/echollama

go 1.25.0
go 1.26.0

toolchain go1.25.13
toolchain go1.26.11
Loading
Loading