镜像自 HugoXK/LaunchPad@5cfa983 · upstream · 在 GitHub 上编辑 docs/task-trace.md ↗

Task process queries (#155)

The existing tasks/task_records remain execution and completion authorities. task_runs identifies each common agent execution/acceptance; a task attempt can contain many model transport requests and multiple fresh evaluations. New executions record original input, contract/project facts, delivered context files and trusted model/tool/prompt/budget settings. Config includes the Git build reference when available, Node/platform and current environment generation; unknown build identifiers stay unknown. Host-user local execution is not a sandbox. Private model reasoning, known keys and credential fields are excluded. Captures are sanitized representations, not byte-identical wire payloads.

Run starts/ends and their events are savepoint-atomic. Engine startup marks open runs interrupted, retaining history and pending request identity. Original task claims and checkpoint revision/base/ownership fences still control recovery. Previous run is chronological lineage, not a claim of causation. Nested execution/acceptance keeps its own run identity. Post-run candidate/acceptance events attach to the relevant recorded run; legacy events without a run stay explicitly incomplete rather than fabricating attempts.

Task history is the process index. Detail polling exposes only the latest 50 event metadata rows and omits candidate artifact/evidence bodies. The console links to paginated events; event bodies are omitted by default, include_data=1 includes only small bodies, and source references expand originals on demand. Existing logs, project-computer receipts, model request ledger and GitHub reconciliation remain their original authorities. Since #436 their bodies are kept in per-run trajectory files and the rows hold refs; every source below reads the same content from a file as from a row not yet migrated. Operation/publication snapshots are recorded transactionally by SQLite triggers; request/response captures live beside the model ledger, with stable history references. Explicit report files are retained by fixed candidate blob and can be queried after execution-directory cleanup. Whole repository binaries and arbitrary intermediate files are not universally archived; references and boundedness must be inspected. A source hash alone does not imply the body is retained. Captures above 2 MiB carry a preview, digest and capture_limit_exceeded. Explicit delivery retention covers at most 16 advertised files, each 2 MiB; binary conversion and failed reads are marked. Existing project deletion intentionally removes task-owned archives; this is not perpetual storage.

Authenticated, existing project-scoped GET endpoints:

The existing detail API exposes history IDs and a history_page continuation hint. Private-model capture never enters executor recovery or fresh acceptance prompts automatically. Recording sources does not grant access to other projects or tools. User task operations produce actor-attributed audit events; operator scripts must use traceEvent with explicit actor/reason rather than secretly editing SQLite. Runtime upgrades are distinguishable through each new run's captured build/config; this does not infer an undocumented historical intervention.

Acceptance checks information availability and linkage, not causal conclusions. Tests cover close/reopen, changed inputs/configuration, interrupted run ancestry, original operation preservation, transactional rollback, stable pagination, access denial, multi-generation followups and bounded/redacted capture. Existing checkpoint/outage/claim/publication tests remain in force. OpenToday controlled and real-model probes are reported separately.

Review follow-up: final acceptance/staging records bind explicitly through the exact candidate/revision acceptance_evaluated event and its verification run, including deterministic policy failures. No latest-model-run guess is used for final decisions. UTF-8 delivery text is preserved literally, including JSON whitespace/ordinary keys; read_complete, complete, sanitized, captured_blob_sha and content_sha256 distinguish full original bytes from redacted/conversion representations. Source version remains the original blob identity, not a claim that sanitized bytes have the same hash.

Text-artifact limits count raw UTF-8 content (2 MiB); JSON envelopes may grow to 16 MiB to preserve escaped bytes. Oversize captures keep structured path/version/read_complete/sanitized/hash metadata and a body preview, rather than a clipped envelope string. Source retrieval returns a retained capture directly, so it cannot truncate an already retained text a second time. Canonical endpoint inventory is also in api.md.