Repository navigation
feat(task-ledger): add durable lifecycle events - #567
Merged
likun666661 merged 1 commit intoJul 6, 2026
Merged
Conversation
likun666661
approved these changes
Jul 6, 2026
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
Implements the durable task lifecycle contract for #559 by hardening the existing session task ledger rather than introducing a second task system.
What changed
blocked,failed, plus evidence fields:blockedReasonfailureReasoncompletionEvidencetask-events.jsonlevent records and projection replay.tasks.jsonas a legacy/projection cache.tasks.jsontasks astask_importedevents before the first mutation.task_listandtask_getmodel tools.task_createtask_updatetask_listtask_getresumeTrustclassification while keeping it out of model-visible surfaces.resumeTrust: "untrusted"fallback tasks from turn-tail and model-facing task tools.docs/durable-task-lifecycle.md.Safety / migration behavior
tasks.jsonif no event log exists.task-events.jsonlexists, corrupt projection is authoritative corruption for writes.tasks.jsonas untrusted cache, but model-visible surfaces hide untrusted fallback tasks.Tests
npm --workspace @maka/core testnpm --workspace @maka/storage testnpm --workspace @maka/runtime run buildnpm --workspace @maka/desktop run build:mainnode --test packages/runtime/dist/__tests__/task-ledger-tools.test.jsnode --test apps/desktop/dist/main/__tests__/task-ledger-contract.test.js