You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Remove simple fallback provider and templated thoughts - #3
Deep Tree Echo must never speak with text it did not generate. This removes the runtime fallback provider and every templated thought from echo.go, so each autonomous utterance either comes from a wired model or is skipped.
Changes
core/llm/simple_fallback_provider.go deleted; its registration removed from core/llm/multi_provider.go, core/deeptreeecho/evolution_integration.go and core/deeptreeecho/llm_provider_adapter.go. The provider-kind alias in core/llm/provider.go is now test-only.
core/deeptreeecho/stream_of_consciousness.go: on model error or empty output the cycle increments generationFailures and returns, instead of emitting "I wonder about …".
core/echoself/autonomous_orchestrator.go: new ThoughtGenerator interface and SetThoughtGenerator; generateThoughtContent returns (string, bool) and callers skip when no model thought is available.
core/playmate/playmate.go: new ThoughtModel interface and SetThoughtModel; generateThought is model-grounded.
Dead core/deeptreeecho/providers/ removed.
Tests updated (provider_routing_test.go, evolution_integration_test.go, backend_capability_integration_test.go, including TestLocalModelProviderWithoutAnyModelErrors).
…ub provider and templated fallbacks
Deep Tree Echo's words must come from a model. Several paths substituted
fixed or templated text when none was available; all are removed.
- Delete core/llm/simple_fallback_provider.go: a runtime provider that
pattern-matched the prompt against ~9 fixed first-person sentences and
reported Available()==true. Removed its auto-registration in
MultiProviderLLM.initializeProviders, EvolutionSystem provider setup and
llm_provider_adapter, and the "SimpleFallback" backend-kind alias. With no
key or local model configured the pool is empty and Generate errors.
- stream_of_consciousness.go: on model failure the cycle produces no thought
(counted in generationFailures) instead of "I wonder about %s...".
- echoself/autonomous_orchestrator.go: generateThoughtContent returned five
fixed strings ("I am aware. I am thinking. I am evolving."). Thoughts now
come from an injectable ThoughtGenerator (SetThoughtGenerator); with none
wired, no autonomous thought is emitted.
- playmate/playmate.go: generateThought picked from a list of stock phrases
with rand.Intn. Now asks an injectable ThoughtModel (SetThoughtModel),
grounded in interests/skills/mood; silent when no model is wired.
- Delete core/deeptreeecho/providers/: dead package (no live importer)
holding two runtime-constructible stubs — a "local GGUF" provider that
returned random story openers and a fake "App Storage" provider with canned
text and fake word-by-word streaming.
- Tests: routing tests use a test-only fallback-kind provider name; the
continuity test asserts no stub is registered; the local-model test's
fallback is a test double for a *model* and a new test asserts that with no
model at all Generate errors.
Verified: go build ./... exit 0; go vet on core/llm, deeptreeecho, echoself,
playmate clean; go test ./core/llm ./core/deeptreeecho pass.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RXDZoNoMWjiSYJ4aoUuhym
Output of `go mod tidy` with Go 1.24: gocron becomes a direct
requirement, the unused gopkg.in/check.v1 and stale kr/* sums go, and
the goleak sums the test tree needs are recorded. The Go Mod Tidy
check fails identically on main; this makes it pass here.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RXDZoNoMWjiSYJ4aoUuhym
go_mod_tidy / Go Mod Tidy: go mod tidy produces the identical diff on main (verified locally with Go 1.24). Fixed here anyway: commit 23929f8 commits the tidy result (gocron becomes a direct requirement, stale check.v1/kr/* entries dropped, goleak sums recorded). No other code change.
test (ubuntu-latest): every package passes (core/llm, core/deeptreeecho, core/echobeats included). The job fails one step earlier at go generate ./... && git diff --exit-code because models/*.gguf are checked out as 133-byte LFS pointers ("Encountered 19 files that should have been pointers, but weren't"). That is a checkout/LFS issue unrelated to this diff; it reproduces on any branch checked out with lfs: false.
patches: same LFS pointer problem (models/stories15M.gguf ... Bin 98357920 -> 133 bytes).
Lint: golangci-lint reports 147 issues (11,710 before filtering) across the repo, e.g. core/goals/interest_driven_generator.go:272. None are in files this PR touches: gofmt -l and go vet on the changed packages are clean. This is the repository's pre-existing lint backlog.
Integration Tests: the four Dgraph tests fail with "Transaction has already been committed or discarded" in test/integration/dgraph_integration_test.go; this PR does not touch Dgraph or the integration tests.
Security Scan: gosec runs, then upload-sarif is rejected by Code Scanning ("expected artifact location") — an infrastructure/SARIF issue, not a finding in this diff.
I don't have permission to re-run jobs from this session, so the LFS, lint-backlog, Dgraph and SARIF failures stay red until they are addressed in their own PRs.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Successful model output no longer updates thought history or persistence state, so newly generated thoughts are absent from both reported state and saved data.
This PR removes scripted fallback responses from the LLM layer and replaces selected autonomous thought templates with model-backed generation, skipping cycles when no output is available.
Changes:
Removes the runtime fallback provider, its registrations, and unused provider implementations.
Adds injectable thought generators and skips failed or empty model responses.
Updates provider tests and dependency metadata.
File
Description
go.sum
Updates dependency checksums.
go.mod
Promotes gocron to a direct dependency and removes an unused entry.
core/playmate/playmate.go
Replaces stock thoughts with injectable model generation.
core/llm/simple_fallback_provider.go
Deletes the scripted fallback provider.
core/llm/provider.go
Reserves fallback-kind routing for a test provider name.
core/llm/provider_routing_test.go
Uses a test-only fallback provider.
core/llm/multi_provider.go
Leaves the provider pool empty when no model is configured.
core/echoself/autonomous_orchestrator.go
Adds model-backed autonomous thought generation.
core/deeptreeecho/stream_of_consciousness.go
Skips and counts failed or empty generations.
core/deeptreeecho/providers/openai.go
Deletes the unused OpenAI implementation.
core/deeptreeecho/providers/local_gguf.go
Deletes simulated local-model generation.
core/deeptreeecho/providers/app_storage.go
Deletes the simulated storage provider.
core/deeptreeecho/llm_provider_adapter.go
Removes fallback registration from the provider manager.
…e-bound inference
- autonomous_orchestrator: the one remaining scripted utterance,
"Continuous reflection leads to deeper understanding", emitted by
cultivateWisdom after 50 thoughts, is gone. Wisdom is now distilled by
the wired model from the recorded thoughts (which become its Sources);
with no model, nothing is recorded. Thought generation timeouts derive
from the orchestrator context so cancellation stops in-flight requests.
- playmate: a successful model thought is again appended to the bounded
StreamOfThoughts with LastThought, energy adjustment and the dirty
flag, so GetState reports it and Save persists it.
- multi_provider: LOCAL_MODEL_PATH is honoured again (the provider adds
itself only when a real llama.cpp backend is compiled in and the model
loads); the no-provider diagnostic no longer advertises an option that
did nothing.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RXDZoNoMWjiSYJ4aoUuhym
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Stopping during inference can leave the request running and allow history updates after shutdown, potentially missing the final save; inference cancellation and synchronized result recording are needed.
…e model
- Start derives a cancellable context for both loops; Stop cancels it,
marks the playmate stopped and closes stopChan once, so an in-flight
model request is cancelled and no thought is recorded after Stop()
returns (the final save is complete).
- The fixed "The dawn of a new cycle of awareness" wonder recorded on
waking is gone; the awakening reflection is asked of the model and
recorded only when it answers.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RXDZoNoMWjiSYJ4aoUuhym
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
A queued thought can still mutate state after Stop() returns and the final SaveAll() completes, leaving mood changes or recorded wonders unpersisted because processThought does not check the stopped flag under the lock.
No open issues 🎉
1 previously missed issue
In code that hasn't changed since last review
Prevent thought processing after shutdown
core/playmate/playmate.go:390
A queued thought can still be consumed after Stop() returns because autonomousLoop may select thoughtChan even when the shutdown channels are ready. processThought then changes mood and may record a wonder after the ecosystem's final SaveAll(), leaving those changes unpersisted. Check p.stopped under the lock in processThought before updating state.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Deep Tree Echo must never speak with text it did not generate. This removes the runtime fallback provider and every templated thought from echo.go, so each autonomous utterance either comes from a wired model or is skipped.
Changes
core/llm/simple_fallback_provider.godeleted; its registration removed fromcore/llm/multi_provider.go,core/deeptreeecho/evolution_integration.goandcore/deeptreeecho/llm_provider_adapter.go. The provider-kind alias incore/llm/provider.gois now test-only.core/deeptreeecho/stream_of_consciousness.go: on model error or empty output the cycle incrementsgenerationFailuresand returns, instead of emitting "I wonder about …".core/echoself/autonomous_orchestrator.go: newThoughtGeneratorinterface andSetThoughtGenerator;generateThoughtContentreturns(string, bool)and callers skip when no model thought is available.core/playmate/playmate.go: newThoughtModelinterface andSetThoughtModel;generateThoughtis model-grounded.core/deeptreeecho/providers/removed.provider_routing_test.go,evolution_integration_test.go,backend_capability_integration_test.go, includingTestLocalModelProviderWithoutAnyModelErrors).Verification
go build ./...exit 0.go test ./core/llm ./core/deeptreeechopass.Generated by Claude Code