Skip to content

feat(headless): link Phase 2A task evidence to Runtime facts - #953

Merged
likun666661 merged 1 commit into
apache:mainfrom
likun666661:feat/execution-evidence-spine-phase-2a
Jul 14, 2026
Merged

likun666661 merged 1 commit into
apache:mainfrom
likun666661:feat/execution-evidence-spine-phase-2a

Conversation

@likun666661

Copy link
Copy Markdown
Member

Summary

Refs #948.

Phase 2A gives durably recorded compact Task evidence a verifiable source in the canonical Runtime Event Log:

  • record the producing AgentRun on new tool-derived evidence while preserving legacy evidence reads
  • match each durable evidence toolCallId to immutable Runtime function_call and function_response rows after an invocation finishes
  • require the canonical function response before making any executor-result provenance claim
  • append heavy_task_evidence_provenance_linked with an ExecutionEvidenceRef and inclusive Runtime coverage
  • replay validated links onto TaskRun compact tool/artifact evidence without copying Runtime payloads
  • reject cross-task, cross-attempt, cross-AgentRun, duplicate, embedded, or otherwise invalid provenance

The Task Event ledger stores only the cross-ledger link. Runtime remains the authority for exact tool inputs and results. Evidence without a matching immutable result remains honestly unlinked.

Verification

  • npm run build
  • npm run typecheck
  • npm --workspace @maka/headless test — 917 passed, 1 skipped
  • focused controller/provenance/replay tests — 45 passed
  • git diff --check upstream/main...HEAD

Phase boundary

This PR intentionally links only first-class heavy_task_evidence_recorded facts. Replay-derived Self-check envelopes are not durable subjects and are not linked by derived ids.

The next Phase 2 slices remain:

  • stable Task Event cursors plus Self-check Runtime/Task high waters and workspace revision
  • deterministic Self-check staleness/invalidation after relevant mutations
  • Compaction source coverage mapped to the shared cursor contract

@likun666661
likun666661 merged commit 8d8489e into apache:main Jul 14, 2026
3 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.

1 participant