feat(dream): add reviewed Memory-to-Experience-to-Skill workflows - #1510
Conversation
|
P2: The lineage resolver stops at any artifact that is not an Experience, marking it unresolved and returning no children. This makes downstream Skill lineage opaque to Review: for a Skill derived from an Experience that carries Memory citations, the approval-time evidence check never reaches the upstream Memory entries. I reproduced this by deriving a Skill, retiring its original Memory entry, then creating a Skill replacement candidate; the candidate still approved successfully. Please keep Dream input restrictions separate from Review lineage validation, or traverse the stored Skill lineage so approval rechecks transitive Memory validity and authorization. The relevant code is in |
|
@Zxf-xufeng Fixed the Skill lineage issue from your comment in ec9036f. Review now follows stored local Artifact lineage through Skill revisions, Experience, and Memory, independently of Dream's supported input families. Propose, revise, and approve recheck upstream Memory availability and current read authorization. A failed check leaves the candidate state unchanged. Ordinary Review also retains its separate reference budgets. Added six regression cases covering those three operations with either a retired Memory entry or revoked read access. They pass on SQLite and OceanBase, alongside the existing transitive-lineage and reference-budget regressions. The fixes remain covered after the latest master merge, and the real SQLite/OceanBase + LLM Dream workflows pass. |

Which issue or RFC does this PR close?
Closes #1509.
RFC: English · 中文.
Rationale for this change
Related task evidence can be repeated across Memory entries and Experience revisions without a reliable way to revisit the exact inputs, deduplicate their underlying observations, and propose a reviewed improvement. Artifact Dreaming adds an asynchronous workflow for turning selected Memory evidence into Experience and approved Experience into a managed Skill.
What changes are included in this PR?
refine_experienceandderive_skillwith durable runs, immutable input manifests, idempotency, leases, bounded generation, recovery fencing, and atomic Candidate/run commits.Are there any user-facing changes?
POSTandGET /v1/scopes/{scope_id}/dream, plusGET /v1/scopes/{scope_id}/dream/{run_id}. New work returns202; replaying a terminal idempotent request returns200.pc_dream_runsand nullablememory_citationscolumns onpc_artifactsandpc_artifact_candidate_versions, with additive initialization/migration for SQLite and OceanBase. Existing data remains readable. Explicit MySQL transactions preserve atomicity even with session autocommit enabled.allprocess role; splitapi/backgroundroles do not accept new Dream work. Dream and Topic Memory currently enforce separate execution concurrency limits.How was this change tested?
make check: passed, including dependency lock consistency, pre-commit hooks, and type checks.make contract-test: 46 passed; generated Python and JavaScript contracts match OpenAPI.make docs-test: passed; 770 static pages and their internal links verified.git diff --check: passed.AI usage statement
OpenAI Codex assisted with research, RFC writing, implementation, review fixes, merge integration, test execution, and PR preparation. Validation results and limitations are recorded above; no credentials or local environment files are included.