Skip to content

feat(headless): export AHE execution lineage - #967

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

likun666661 merged 1 commit into
apache:mainfrom
likun666661:feat/execution-evidence-spine-phase-4b

Conversation

@likun666661

Copy link
Copy Markdown
Member

Summary

Implements Phase 4B of #948: carry the shared Execution Identity & Evidence Spine into AHE exports.

Every newly versioned AHE run-result row now names the concrete TaskRun and a digest-bound lineage document that connects:

Target snapshot
  └── TaskRun + Task Event coverage
       └── Attempt
            └── AgentRun + Runtime Event coverage

What changed

  • add maka.ahe.execution_lineage.v1 and validation;
  • add maka.ahe.run_result.v1 with required taskRunId and executionLineageRef;
  • reuse the existing ExecutionEvidenceRef contract instead of introducing another identity model;
  • enrich exported execution refs with target identity and Task Event coverage;
  • export explicit gaps for missing attempts, AgentRun identity, Runtime coverage, inspect sources, raw sources, or coverage mismatches;
  • export payload-safe maka.agent_run_inspect.v1 documents by default;
  • export canonical immutable Runtime Events only with --include-events;
  • rename the AHE Task Event file to task-events.jsonl and stop emitting the misleading runtimeEventsJsonl field;
  • split trace-index refs into Task Events, AgentRun inspections, and Runtime Event sources;
  • attach SHA-256 digest and byte size to every local file ref materialized by the export;
  • ignore supplied AgentRun evidence that is not durably linked to the owning TaskRun;
  • preserve old unversioned result rows and legacy trace fields as readable compatibility shapes without retroactive lineage claims;
  • update the AHE protocol, evidence-spine guide, and bilingual architecture chapter.

Export layout

traces/<taskRunId>/
├── task-run.json
├── task-events.jsonl
├── execution-lineage.json
├── messages.json
└── agent-runs/<agentRunId>/
    ├── inspect.json
    └── runtime-events.jsonl  # only with --include-events

Raw Runtime Event policy is explicit: included, omitted_by_policy, or requested_with_gaps.

Scope

This PR does not change verifier behavior, scoring authority, patch execution, baseline/candidate comparison derivation, or the self-iteration controller. Comparison derivation remains Phase 4C.

Verification

  • npm --workspace @maka/headless test — 949 passed, 0 failed
  • targeted AHE protocol/export/CLI integration tests — 41 passed, 0 failed
  • npm --workspace @maka/runtime run typecheck — passed after building the latest Core subpath
  • npm --workspace @maka/headless run typecheck — passed

The current upstream Desktop workspace has an unrelated pre-existing onDeleteSkill props type error from the skills change; no Desktop files are changed here.

Advances #948 Phase 4; does not close the parent issue.

@likun666661
likun666661 merged commit e08742d 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