fix(evolution): pipeline bugs - JUDGE_API_KEY, dedup, routing, procedures, backup, observability#46
Open
electronicBlacksmith wants to merge 2 commits intoghostwright:mainfrom
Conversation
… onboarding Fix 1: Use JUDGE_API_KEY for dedicated judge client cost isolation. Fix 2: applyDelta() now filters duplicate lines on append instead of blindly appending. Returns null for no-op appends so version is not bumped. compressUserProfile() added to consolidation with size gate. Fix 3: buildCritiqueFromObservations() now routes domain_fact, error, tool_pattern, and success observations to their respective config files instead of silently dropping them. affected_files from judge output is preserved through the pipeline with path traversal validation. Fix 4: markOnboardingComplete() called after evolution version >= 2, clearing the onboarding prompt that was re-injecting every restart.
- Fix procedural memory bug: consolidateSessionWithLLM() counted detected procedures but never stored them. Add storage loop after facts extraction. - Add post-evolution config backup to data/config-backups/vN with 5-version retention. - Surface model mismatch: warn when env overrides yaml model, add model + model_source to /health endpoint and phantom status. - Add evolution observability: session_count, sessions_since_consolidation, session_log_depth in health/status. Add Evolution Pipeline doctor check. - Fix default model to claude-opus-4-6 across config, schema, and init.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Fixes 8 issues discovered during a config audit of the evolution pipeline:
High-priority (commit 1):
applyDelta()filters duplicate lines on append instead of blindly appending. Returns null for no-ops so version is not bumped spuriouslybuildCritiqueFromObservations()now routesdomain_fact,error,tool_pattern, andsuccessobservations to their config files instead of silently dropping themmarkOnboardingComplete()called after evolution version >= 2Medium-priority (commit 2):
consolidateSessionWithLLM()counted detected procedures but never calledstoreProcedure()- the full storage layer existed but was never invokedbackupConfig()copiesphantom-config/todata/config-backups/vNafter successful evolution, retaining last 5 versions/healthendpoint andphantom statussession_count,sessions_since_consolidation,session_log_depthto health endpoint. AddedEvolution Pipelinedoctor checkTest plan
bun run typecheckcleanbun run lintclean