Skip to content

[Feature] Refactor leap evolve - #48

Merged
wangxingjun778 merged 11 commits into
mainfrom
feat/demo_exp
Sep 20, 2026
Merged

wangxingjun778 merged 11 commits into
mainfrom
feat/demo_exp

Conversation

@wangxingjun778

@wangxingjun778 wangxingjun778 commented Sep 20, 2026 •

Copy link
Copy Markdown
Member

Feature

  • Added a durable, event-sourced self-evolution pipeline for governed capability learning, proposals, outcomes, and teacher jobs.
  • Added leap evolve to finalize a named session and queue retrospective evolution work.
  • Added live LeapBoard evolution, causal-trace, and capability views.
  • Expanded LeapSpace environment signals and host RPC integration.

Enhance

  • Added configurable evolution teacher, retry, autonomy, sandbox, and calibration controls.
  • Improved evolution telemetry, projections, and dashboard presentation.

Fix

  • Made Allow ALL for this session (bypass mode) apply to all approvable session actions while retaining hardline blocking.
  • Paused tool execution deadlines during human approval waits.
  • Unified workspace and shell approval/audit paths.
  • Refined sensitive shell-path detection to avoid text-only false positives.
  • Fixed LeapBoard layout and evolution-trigger behavior.

Refactor

  • Consolidated evolution persistence around event stores, projections, and outbox processing.
  • Retired legacy evolution trace/proposal storage paths.
  • Simplified LeapSpace state and harness boundaries.

Documentation

  • Added the world-model-driven harness evolution architecture guide and diagram.
  • Updated plugin lifecycle/development guidance and README evolution coverage.

Tests

  • Expanded coverage for evolution lifecycle, board views, environment signals, approval behavior, and journey fixtures.

wangxingjun778 and others added 11 commits September 16, 2026 16:25
…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>
@wangxingjun778 wangxingjun778 changed the title Feat/demo exp [Feature] Refactor leap evolve Sep 20, 2026
@wangxingjun778
wangxingjun778 merged commit be67a0d into main Sep 20, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants