[Feature] Refactor leap evolve - #48
Merged
Merged
Conversation
…volution trigger LeapBoard / evolution observability - Markdown node now parses blockquote/strong/inline-code (escape-then-whitelist, no third-party parser) instead of printing raw markup - evolution_live metrics split into live vs snapshot provenance with a drift note, so figures that cannot refresh no longer freeze while looking current - co-evolution governance sweep runs on an empty trajectory too (moved out of the `if trajectory:` branch); effect-verification/quarantine/reclamation segments become observable - page-level provenance bar: observed_at vs checked_at, stale verdict at 2x cadence, and a Refresh now affordance that closes the prescribe->confirm loop - lifecycle segment judged by state transition, not row count (all-PENDING queue reads no_evidence); empty live lanes carry guidance and equal height; removed the duplicate evolution_live KPI grid - evolution axis (Pipeline evidence over time); sparkline draws a single sample Evolution trigger - run_learning_boundary() + evolution.run RPC + `leap evolve` CLI so the boundary is callable on demand, not only at process shutdown - bounded trajectory buffer; manual watch refresh records run bookkeeping; WatchView exposes interval_seconds for freshness judging Tests: +49 dashboard/provenance/trigger regressions; full i18n coverage in 6 locales Also folds in pending feat/demo_exp work (leapspace app_space refactor, AAAI-27 demo scaffolding, and related tests).
…egacy cleanup Land the full evolution closed loop on the append-only DuckDB evolution event stream as the single source of truth, and remove the superseded in-process driver/JSON paths. Core - Unified ActionExecutor/ActionRecorder record real executions as session-scoped facts; SessionFinalizer seals sessions by generation/cursor and enqueues durable teacher jobs; shutdown only drains unfinished sessions. - DurableTeacherWorker (lease/heartbeat/retry) grades hindsight once, resolves each acquire verdict against the live registry BEFORE proposal creation, and commits requirement.resolved + proposal.created atomically with job completion; satisfied/ unauthorised/disabled/no-resolver cases become durable no-ops. - EvolutionDistilledKnowledgeStore projects TEACHER_VERDICT_RECORDED into an in-memory read model (all four actions); the D1 feedback edge (prior verdict shown to the teacher) is preserved in the worker via the knowledge projection. - LeapBoard projection adds resolution/no-op/knowledge-retraction; governance sweep is driven from run_learning_boundary so quiet boundaries still leave evidence. Cleanup (no back-compat; single source of truth) - Delete WorldModelEvolutionDriver, build_proposal_sink, build_alternatives_provider, JsonDistilledKnowledgeStore and the shutdown-only _on_session_end_learning / _drive_world_model_evolution paths; migrate their tests to the durable worker, event-sourced knowledge store, and proposal queue. Verification: ruff clean; full suite 3862 passed, 7 skipped, 1 xfailed; journeys replay green.
…lution section Evolution pipeline gap closure (5 phases): - Proposal expiration/supersession sweep with TTL and CoevolutionSweep stage - Quarantine recovery path (QUARANTINED->PROBATION, trust unfreeze, plugin_unquarantine tool) - DSH bundle rollback via directory-level tar.gz snapshots with SHA-256 verification - Trust change time series in DuckDB (cold-path writes on level transition) - E2E evolution lifecycle integration test covering full 7-phase pipeline LeapBoard: - Rename trust level to maturity across all locales - Fix bar-chart label overlap (max-content label column, nowrap) Documentation: - Add World-Model-Driven Self-Evolution section to README - Add docs/world_model_plugin_harness_evolution.md reference Signed-off-by: 班扬 <xingjun.wxj@alibaba-inc.com>
The .learnings/ directory was created by an external AI skill (self-improving-agent), not part of the LeapFlow project structure. Its content is already captured in the Memory system (common_pitfalls_experience) and git history. Signed-off-by: 班扬 <xingjun.wxj@alibaba-inc.com>
Signed-off-by: 班扬 <xingjun.wxj@alibaba-inc.com>
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.
Feature
leap evolveto finalize a named session and queue retrospective evolution work.Enhance
Fix
Refactor
Documentation
Tests