diff --git a/research/2026-07-production-log-mission/IMPLEMENTATION_BACKLOG.md b/research/2026-07-production-log-mission/IMPLEMENTATION_BACKLOG.md new file mode 100644 index 0000000..09a6751 --- /dev/null +++ b/research/2026-07-production-log-mission/IMPLEMENTATION_BACKLOG.md @@ -0,0 +1,165 @@ +# Branch-Ready Zenith Improvement Backlog + +This backlog maps the research recommendations to current source surfaces. It is intentionally implementation-ready without pre-committing to an API that tests may disprove. + +## P0 — truthful closure + +### Declared terminal-review deliverables + +Current surfaces: + +- `zenith/src/zenith_harness/bundled/prompts/terminal-reviewer/system_prompt.md` +- terminal-review launcher/provider code +- mission/project persistence schemas +- terminal-review tests + +Proposal: + +- persist an explicit list of canonical read-only `deliverable_roots` in the mission charter/runtime; +- pass only those roots plus the original workspace to terminal review; +- continue forbidding decisions, attempts, validator reports and closeout history; +- require each root to be inside an allowed workspace/project boundary and resolve symlinks before spawn; +- record the resolved root list in the terminal-review record. + +Tests: + +1. report only under mission evidence can pass; +2. missing report fails; +3. tampered report fails a real behavior/provenance probe; +4. a deliverable root that traverses to forbidden history is rejected; +5. earlier validator prose remains inaccessible. + +### Terminal-gap fingerprint + +Current surfaces: + +- `zenith/src/zenith_harness/coordinator.py::_enter_terminal_review` +- terminal-review persistence and attention schemas + +Proposal: + +- hash normalized gap IDs/text, original request hash, workspace/deliverable roots and relevant content manifests; +- when the same fingerprint recurs without input change, raise `terminal_review_configuration_conflict`; +- disallow an unchanged retry until the orchestrator patches visibility, artifacts or scope. + +The detector must not collapse genuinely new evidence or changed gaps. + +## P0 — native execution telemetry + +Persist per attempt: + +- runtime/harness commit and dirty-state marker; +- provider and model; +- provider session/thread ID; +- queued, dispatched, started and completed timestamps; +- terminal reason and retry/patch parent; +- input, cached-input, output and reasoning tokens where available; +- artifact logical/allocated byte delta and file count; +- contract/task graph version. + +Emit a native ledger equivalent to `generated/execution_ledger.csv`. Schema fields must be optional for providers that do not expose usage; unknown is better than inferred zero. + +## P0 — research mission policy and budgets + +Current surface: bundled orchestrator prompt and mission playbooks. + +Proposal: + +- select a research policy when the outcome is knowledge/artifacts rather than durable product behavior; +- begin with source feasibility and targetless discovery tasks; +- promote stable report claims into acceptance contracts after feasibility; +- record separate outcome, correctness oracle, and scoring reference; +- add soft budgets for wall time, attempts, task/contract growth, report-family versions and artifact bytes; +- budget crossing raises a value-of-information attention item containing critical path, sunk cost and alternatives. + +Do not implement budgets as silent hard caps. That would trade visible slowness for invisible incompleteness. + +## P1 — current evidence epochs + +Current surfaces: + +- `zenith/src/zenith_harness/coordinator.py::_evaluate_gate` +- `zenith/src/zenith_harness/coordinator.py::_upstream_validators` +- task supersession and contract-state persistence + +Proposal: + +- assign an immutable evidence epoch to each assertion ownership/method/input tuple; +- gates enumerate validators explicitly for the active epoch instead of walking arbitrary transitive history; +- supersession closes an epoch and preserves its verdicts as history; +- a new epoch cannot reuse a verdict unless contract text, validation method and relevant inputs hash-identically match. + +Property-test DAGs containing chained supersession, shared prerequisites, partial target overlap, stale dissent, omitted verdicts and rollback. The principal failure risk is a false pass caused by losing a relevant historical prerequisite. + +## P1 — incremental validation cache + +Cache key: + +`contract_hash + validator_method_hash + environment_identity + ordered_input_manifest_hash` + +Cache entries contain per-assertion verdicts and raw evidence pointers. Any changed contract, method, environment requirement or relevant input invalidates the entry. Mutation tests must cover report text, cited table, raw source manifest, code, configuration and validation procedure. + +Start in observe-only mode: compute “would reuse” decisions while still running validators, then compare verdicts before enabling reuse. + +## P1 — sealed packet preflight + +Before dispatch, statically verify: + +- allowlisted files exist and hashes match; +- packet is self-contained under the declared startup rule; +- forbidden paths cannot be reached through symlinks or parent discovery; +- output root is writable and outside the sealed inputs; +- coder identity/assignment is not embedded in a blinded packet; +- independent assignments do not share generated labels or another coder's output. + +Each July-run packet/startup failure should become a fixture. This is a compiler problem disguised as an agent retry. + +## P1 — first-class non-estimability + +Add a contract disposition distinct from pass/fail/accepted-risk: + +- `not_estimable` requires an oracle explaining which identification prerequisite failed; +- it may retain descriptive artifacts; +- it forbids downstream numeric/causal claims that require the failed prerequisite; +- it satisfies closure only when the original request permits explicit limitations. + +Validators must test the absence of prohibited estimates, not merely the presence of limitation prose. + +## P1 — immutable evidence storage + +Separate source corpora from mission/report packages: + +- content-address raw and compact source objects; +- use immutable manifests for task inputs; +- materialize with reflinks/hardlinks only where safe; +- version derived outputs as deltas; +- garbage-collect only objects unreachable from sealed manifests, never during an active mission. + +Replay the report v2–v9 lineage and require identical content hashes and validator results while measuring logical bytes, allocated bytes, file operations and session read tokens. + +## P1/P2 — scoped attention and scheduling + +Current surface: `coordinator.py::_apply_gate_event` and scheduler readiness logic. + +Proposal: + +- auto-continue a cleared gate unless it is marked as a semantic checkpoint; +- attach failed attention to its affected task subgraph; +- continue dispatching independent ready nodes when no shared resource or global scope decision is involved; +- after telemetry is available, prioritize nodes by estimated remaining critical-path length and failure probability. + +Validate with deterministic simulations before live use. Compare makespan, maximum concurrency, number of orchestration turns, and—most importantly—whether any worker ran on invalidated global assumptions. + +## Suggested pull-request slicing + +1. Runtime version + attempt telemetry schema and ledger. +2. Terminal deliverable roots + security tests. +3. Terminal-gap fingerprint. +4. Research policy + shadow budgets. +5. Packet preflight linter. +6. Evidence epochs behind a feature flag. +7. Observe-only validation reuse. +8. Content-addressed evidence prototype. +9. Scoped attention and critical-path scheduler experiment. + +Each slice should be independently reversible. Do not combine closure visibility and validator-cache semantics in one change: their risk profiles and oracles are different. diff --git a/research/2026-07-production-log-mission/README.md b/research/2026-07-production-log-mission/README.md new file mode 100644 index 0000000..9af8dcc --- /dev/null +++ b/research/2026-07-production-log-mission/README.md @@ -0,0 +1,291 @@ +# Zenith Run-Efficiency Research: July 17–19 Production-Log Mission + +Status: trace reconstruction complete; proposals are research recommendations, not yet implemented. + +Analyzed mission: `mission-001` in project `20260717T130345Z-read-only-all-around-production-log-research-for-agent-builder-p` + +Observed interval: 2026-07-17 13:03:45Z through 2026-07-19 15:36:09Z + +Current upstream source inspected: commit `feb1d62` + +Analysis outputs: [metrics.json](generated/metrics.json), [execution_ledger.csv](generated/execution_ledger.csv), [idle_gaps.csv](generated/idle_gaps.csv) + +Evidence locations and method boundary: [SOURCES.md](SOURCES.md) + +## Executive finding + +The 50.54-hour wall time was not one slow operation. It was a useful core audit wrapped in an expanding assurance system. + +The original request legitimately grew from a two-project tool audit into a week-scale, 2,000-plus-session, stratified, request/response and semantic-integrity study. That explains much of the acquisition and analysis work. Zenith then amplified the cost through four mechanisms: + +1. it applied an engineering-style atomic-contract and dual-validator topology to exploratory research; +2. an invalid “independent manual coding” method triggered a 24-shard semantic-reliability repair chain; +3. validation fixes accumulated as new versioned task chains and copied evidence packages rather than as bounded deltas; +4. the final reviewer could not see the declared deliverable location, making successful closure impossible. + +The run grew from an inferred 24 tasks and 17 contracts to 168 tasks and 44 contracts. It made 142 attempts, 41 attention decisions, and 16 validator attempts against the fail-closed report lineage. The mission evidence tree reached 30,878 files and 42.05 GB of logical data with only two hard-link aliases. Three terminal reviews all returned `done=false`; the runtime remained `mission_running` even though the final v9 gate had cleared. + +Unique-only correlation selected 70 of the 145 attempt/reviewer events and classified the other 75 as ambiguous; none were unmatched. Ambiguous events contribute no duration or usage. Zero unmatched events is not evidence that attribution is complete or correct—the ambiguity count is the relevant warning here. + +A lean counterfactual keeps the defensible findings and uncertainty boundaries, but treats exploration, statistical estimability, and final acceptance as different things. It would use one immutable corpus, a small set of parallel analysis lanes, early closure of non-estimable population claims, changed-surface validation, and one final reviewer allowed to inspect the declared output root. Its explicitly unmeasured target is 16–24 wall hours for a comparable run (52–68% below actual); only a replay could turn that target into evidence. + +## 1. Zenith in five minutes + +Zenith is a persistent mission harness. It converts a broad user objective into explicit claims, schedules agents to produce and independently check evidence, pauses when evidence conflicts, and asks a final fresh reviewer whether the user-facing outcome really exists. + +```mermaid +flowchart LR + U["User mission"] --> O["Orchestrator: charter, contracts, task DAG"] + O --> W["Workers: implementation or research"] + W --> V["Validators: independent checks"] + V --> G{"Gate"} + G -->|"clear"| T["Terminal review"] + G -->|"fail or checkpoint"| A["Attention"] + A --> D["Decision: retry, patch, continue, stop"] + D --> O + T -->|"gap"| A + T -->|"no gap"| C["Done"] +``` + +The persistent artifacts are the point: another agent can resume without relying on conversational memory. + +| Term | Compact meaning | Tiny example | +|---|---|---| +| Mission | The durable charter and boundaries | “Compare two agents over seven days, read-only.” | +| Contract | A testable user-facing promise | “Every headline jq rate reconciles to call-level evidence.” | +| Task | A node of work, validation, or gating | “Build the jq call/result table.” | +| Attempt | One agent execution of one task | First attempt fails because a sidecar is missing. | +| Validation | Independent evidence about a contract | A validator recomputes jq categories from raw events. | +| Gate | A mechanical aggregation of validator verdicts | All active jq assertions pass. | +| Attention | A deliberate pause for orchestration judgment | The sample cannot support a population estimate. | +| Decision | The recorded response to attention | Patch the claim to descriptive-only; do not retry retrieval. | +| Supersession | Replace an obsolete task while keeping history | v2 report task replaces v1 after its method changes. | +| Terminal review | Fresh check against the original request | Confirm that the final report is present and usable. | + +For a normal research mission, the contracts should describe defensible conclusions and limitations—not every exploratory question. Discovery can be targetless work until it produces a claim worth accepting. + +### Intended loop versus this run + +```mermaid +flowchart TD + S["Scope clarified"] --> P["Acquire and freeze corpus"] + P --> X["Parallel tool, jq, integrity, token analyses"] + X --> R["Synthesize report"] + R --> V["Focused independent validation"] + V --> F["Fresh final review"] + + X -. "semantic method invalid" .-> M["24 manual-coding shards"] + M --> B["blindness packet revisions"] + B --> H["fail-closed verifier hardening"] + H --> Q["report/provenance v2–v9"] + Q --> V9["final gate clears"] + V9 --> T1["terminal review cannot read output"] + T1 --> T2["same review repeated twice"] + T2 --> Z["mission_running"] +``` + +## 2. This run schematically + +The original 13:02Z request asked for a broad comparison of tools and results for two Agent Builder projects. The user then explicitly raised the evidence floor: at least a couple thousand sessions, a week of `.ai` traffic, analyst-guided stratification, and wide request/response verification. Those additions are user-requested scope growth. + +Zenith encoded the clarified mission as a 2,400-attempt primary corpus plus up to 1,200 rarity-enriched successful sessions, with tool, jq, integrity, comparison, and independently estimated token analyses. The charter required all reproducibility artifacts and the final report to be written under mission evidence. + +The subsequent expansion was mostly harness-created assurance work: + +| Phase | What happened | Classification | +|---|---|---| +| Clarification and planning | Two contract-review passes, 17 initial assertions, 24 initial tasks | Harness policy applied to legitimate scope | +| Acquisition | Population limitations forced representative-rate claims to become descriptive | Necessary, correct fail-closed adaptation | +| Core analysis | Tool, jq, request/response, token and comparison artifacts produced | Necessary user-facing work | +| Semantic reliability | Generated work had been represented as independent/manual; repair expanded into 24 blinded coding shards | Method defect plus harness amplification | +| Blindness repair | Packet, startup, allowlist and output-root incompatibilities caused repeated revisions | Avoidable orchestration/method overhead | +| Fail-closed repair | Verifiers grew through schema, value, narrative and closed-inventory checks | Partly necessary; repeated full-chain packaging avoidable | +| Report repair | Provenance, runtime identity, stale prerequisites, historical dissent, semantic exactness and broken links produced report v2–v9 | Mixed: real defects, amplified by validation topology | +| Closure | Gate cleared; terminal reviewer was forbidden to inspect the only permitted output tree | Deterministic harness defect | + +## 3. What took the time + +### Run totals + +| Metric | Observed | +|---|---:| +| Wall time | 50.54 h | +| Uniquely matched worker/reviewer active time | 23.99 h | +| Union of uniquely matched active intervals | 21.97 h | +| Non-busy wall time relative to that union | 28.57 h | +| Effective parallelism within the matched subset | 1.09× | +| Configured maximum parallel nodes | 4 | +| Attempts | 142 | +| Attempts requesting attention | 39 | +| Decisions | 41: 30 patch, 5 retry, 6 continue | +| Attempt/reviewer matches | 70 selected; 75 ambiguous; 0 unmatched | +| Task growth | 24 inferred → 168 final (7.0×) | +| Contract growth | 17 inferred → 44 final (2.59×) | +| Supersession operations | 53 | +| Validator handoffs | 11 pass, 23 fail | +| Terminal reviews | 3, all `done=false` | +| Mission evidence | 30,878 files; 42.05 GB logical | +| Codex-reported tokens from uniquely matched sessions | 498.6M total; 483.5M cached input | + +Active time is a sum across concurrent sessions; it is not additive with wall time. The token counter is Codex-reported and input already includes cached input. It should not be interpreted as 498.6M newly processed tokens or as billable usage. The 75 ambiguous events are deliberately absent from both totals. + +### Active-effort Pareto + +| Classified phase | Active effort | Share | Total tokens | +|---|---:|---:|---:| +| Manual semantic reliability | 6.82 h | 26.4% | 112.9M | +| Core analysis | 4.51 h | 17.5% | 114.7M | +| Population and retrieval | 4.40 h | 17.1% | 94.2M | +| Fail-closed analysis repair | 3.67 h | 14.2% | 75.8M | +| Report/provenance repair | 3.06 h | 11.9% | 69.7M | +| Initial planning | 1.79 h | 6.9% | not separately available | +| Other work | 1.18 h | 4.6% | 24.5M | +| Terminal review | 0.35 h | 1.3% | 6.9M | +| Validation | 0.00 h | 0.0% | 0.0M | + +These percentages use 25.78 hours: uniquely matched stage time plus the separately observed initial-planning interval. They describe only the attributable subset. In particular, zero attributed validation time means no validation event obtained a unique session match; it does not mean validation work did not occur. The 75 ambiguous rows make a whole-run phase ranking unsupportable from this trace. + +### Critical path and idle time + +The structural critical path was: + +`scope → corpus → core analyses → semantic-reliability repair → fail-closed report → repeated provenance versions → final gate → terminal-review loop` + +There are 27 gaps of at least five minutes in the uniquely matched interval union; the two largest were 7.62 h and 5.38 h. The trace includes user interruption, overnight delay, Wi-Fi disruption and external model/usage-limit failures. Therefore the resulting 28.57 non-busy hours are an attribution-sensitive upper bound on scheduling opportunity, not “Zenith idle waste.” The matched subset reached 1.09× effective parallelism; ambiguity prevents treating that as a complete scheduler-utilization measure. + +The detailed timestamped ledger is [execution_ledger.csv](generated/execution_ledger.csv). Its phase labels are reproducible heuristics based on task identity and are deliberately not treated as ground truth. + +## 4. Why it happened + +### A. Exploratory research inherited an engineering acceptance topology + +The current orchestrator prompt requires atomic assertions before tasks, adversarial contract review, and at least two sequential contract-review passes for any non-trivial mission. Its default engineering milestone is work → scrutiny validation plus real-surface validation → gate. This is sensible for durable product behavior, but it makes weak epistemic questions look like commitments before source feasibility is known. + +In this run, questions such as representative semantic rates were contract-shaped before population eligibility and an independent coding method were established. Later discovery could not simply close the question as non-estimable; it triggered replacement work, validators, gates and assertion versions. + +### B. The semantic-reliability method failed before the work did + +The first reliability package used generated output as if it were independent manual coding. Correctly rejecting that evidence led to new codebooks, holdouts, blinded packets and 24 review shards. This preserved integrity, but it also created substantial work pursuing semantic rate claims after the population basis had already become descriptive. The unique-only ledger attributes 6.82 active hours to that phase; ambiguous events prevent a defensible whole-phase total. + +The missing control was an early question: “Does this claim still change the supported answer enough to justify a statistically independent coding program?” + +### C. Blindness was rebuilt through trial and error + +Persistent mission memory, sealed-startup rules, allowed packet files and coder output roots were not checked as one system before dispatch. Repeated agents then discovered incompatible assumptions at runtime. A static preflight could have checked self-containment, forbidden-source reachability, output-root writability, identity leakage, and whether two coders were actually independent. + +### D. Repair accumulated rather than converged + +The report lineage moved through multiple complete packages: runtime identity correction, stale prerequisite correction, new assertion IDs to escape historical dissent, provenance binding, semantic exactness, and link repair. Some defects were real. The costly property was that each fix spawned another work/validator/gate chain and copied large evidence trees. + +The mission evidence tree's 42.05 GB across 30,878 files has 30,876 unique inodes. This is not mostly cheap hard-link aliasing. Evidence versions behaved like full packages instead of immutable shared inputs plus small deltas. + +### E. Gates aggregate transitive historical validators + +The current coordinator walks every transitive predecessor of a gate and includes each validation task whose targets overlap the gate. It then requires all covering validator verdicts to pass. In a versioned repair graph, an old dissent can remain reachable and poison a current gate even when its work has been replaced. The run responded by introducing new report assertion IDs and more validators. + +The source comment assumes supersession rewrites dependencies so retired validators are unreachable. This trace demonstrates a topology where that assumption did not protect closure. The correct unit is the current evidence epoch for an assertion, while preserving old dissent as history. + +### F. Every gate checkpoint globally interrupts orchestration + +The coordinator raises attention even when a gate clears. Attention protocol stops dispatching until every open item has a decision. Checkpoints are valuable at semantic boundaries, but unconditional global pauses make independent subgraphs wait and add orchestration turns that cannot improve the just-cleared evidence. + +### G. The final review contract contradicted the mission charter + +The mission charter said: write only inside the Zenith mission evidence tree. The terminal-reviewer prompt says its only inspection surface is the normal workspace and explicitly forbids all Zenith project and mission artifacts. The reviewer therefore could not observe the final report by construction. + +All three terminal reviews returned the same class of gap. The coordinator treats `done=false` as attention and reaches `Done` only on `done=true`. Repeating the reviewer could not change the answer. A repeated-gap fingerprint should have classified this as a harness configuration conflict after the first occurrence. + +### H. Zenith cannot natively explain its own latency + +The runtime records attempts, task state and decisions, but it does not bind each attempt to provider session ID, task start/end, queue duration, model/token usage, artifact bytes, or a causal repair family. This analysis had to correlate 142 attempts with external Codex JSONL sessions. Even the exact harness commit that executed the run is absent from the project record. + +The inspected current source is behaviorally consistent with the trace, but `feb1d62` is not proven to be the executing commit. Code-level proposals below should therefore be validated against a replay before being treated as historical proof. + +## 5. What a lean run would look like + +The counterfactual is detailed in [counterfactual_mission.md](counterfactual_mission.md). Its minimum-sufficient DAG is: + +```mermaid +flowchart LR + S["Freeze outcome, budget, estimands"] --> A["Acquire once into immutable corpus"] + A --> T["Tool and jq analysis"] + A --> I["Integrity and anomaly analysis"] + A --> K["Token reconstruction"] + A --> C["Descriptive strata comparison"] + T --> R["Synthesis"] + I --> R + K --> R + C --> R + R --> V["Changed-surface independent validation"] + V --> F["Final reviewer with declared output root"] +``` + +Key differences: + +- Freeze the quality oracle as defensible conclusions and explicit limitations, not graph completion. +- Perform source and estimability checks before creating acceptance-bearing rate claims. +- Keep one immutable raw/compact corpus; version manifests and derived deltas, not full copies. +- Use parallel targetless discovery lanes; promote only report claims into contracts. +- If representative semantic rates are not estimable, publish descriptive examples and seal the rate claim `NOT ESTIMABLE` instead of launching a coding program by default. +- Validate the changed claim/evidence surface. Reuse unchanged validator results by content hash. +- Run one final review against an explicit, read-only deliverable root with mission history still hidden. + +The topology and uniquely attributable subset motivate an unmeasured 16–24 hour wall target under similar external conditions. This is a counterfactual target, not an observed saving or replay result. It should be accepted only if the final conclusions, traceability and uncertainty match the original result under blinded comparison. + +## 6. Recommended changes + +The branch-ready specifications are expanded in [IMPLEMENTATION_BACKLOG.md](IMPLEMENTATION_BACKLOG.md). + +| Priority | Current behavior | Proposed behavior | Before → after | Leverage | Quality risk | Size | Validation experiment | +|---|---|---|---|---|---|---|---| +| P0 | Terminal reviewer sees normal workspace only | Declare read-only `deliverable_roots`; hide process history, not the product artifact | mission-only output → invisible; declared output → reviewable | Closure correctness; prevents infinite loop | Medium: leakage/independence | M | Fixture with output only under mission evidence; clean, missing and tampered cases | +| P0 | Repeated terminal gaps are independent retries | Fingerprint gap + inputs; identical second result raises harness-conflict attention and blocks retry | same review ×3 → review once + diagnose | High on pathological loops | Low | S | Reproduce this run's three-review sequence | +| P0 | Research uses engineering contract defaults | Add research mission policy: discovery tasks first, contracts only for promoted claims | contract-first exploration → feasibility-first claims | Very high | Medium: under-specification | S–M | A/B replay this mission with blinded final quality review | +| P0 | No native duration/session/cost telemetry | Persist session ID, queued/start/end, provider usage, stop reason, parent decision and artifact deltas | external forensic join → native ledger | Enables every later optimization | Low | M | Unit schema tests plus one end-to-end trace reconciliation | +| P0 | Growth is effectively unbounded | Soft budgets for wall time, attempts, task/contract growth and version depth; require explicit value-of-information decision | silent 7× growth → visible budget crossing | High | Medium: premature stopping | M | Shadow-mode alerts on historical traces, no hard stop initially | +| P1 | Gate considers all transitive covering validators | Validate current assertion evidence epoch; retain historical dissent without vetoing replacement evidence | historical veto → active-epoch verdict | High | High: false pass if epoch wrong | L | Property tests over supersession/repair DAGs plus trace replay | +| P1 | Full validation repeats after small repairs | Cache verdict by contract, method and input hashes; invalidate only changed surface | full-chain rerun → delta validation | High | Medium–high | L | Mutation suite proving every relevant change invalidates cache | +| P1 | Blind packets fail at agent runtime | Static packet/startup/output-root/identity lint before dispatch | retry-to-discover → preflight failure | High for this run | Low | M | Encode each observed packet failure as a negative fixture | +| P1 | Non-estimable claims remain active repair targets | First-class `not_estimable` disposition with oracle and preserved descriptive evidence | impossible rate → repair chain; impossible rate → bounded limitation | High | Medium | M | Population-ineligible fixture; ensure no numeric claim can pass | +| P1 | Evidence versions copy full trees | Content-addressed immutable corpus + manifest/delta packages; optionally reflink local materialization | 42 GB versions → shared corpus + small deltas | Storage and read/token cost | Medium: provenance | L | Recreate v2–v9 packages and compare hashes, bytes and validation | +| P1 | Cleared gates always trigger global attention | Semantic checkpoint policy; auto-continue mechanical clears and block only affected subgraph | global stop → scoped continuation | Medium–high | Medium | M–L | Scheduler simulation with independent branches and injected failure | +| P2 | Scheduler optimizes readiness, not mission critical path | Prioritize critical-path nodes and batch independent validators | 1.09× in uniquely matched subset → higher bounded utilization | Medium | Medium | L | Deterministic trace simulation; compare makespan and decisions | +| P2 | Retry/replan relies on prose judgment | Structured failure taxonomy and repair-family loop detector | repeated symptom patches → method-level escalation | Medium | Low–medium | M | Classify historical decisions; measure precision before enforcement | +| P2 | Context capacity failure appears after spawn | Preflight task/context size and choose split or larger-capacity route | failed attempt → planned shard | Low–medium | Low | M | Oversized synthetic task and recorded model-capacity failures | + +## 7. Suggested implementation order + +1. **Make closure truthful.** Add declared deliverable roots, terminal-gap fingerprinting and exact runtime version recording. These are small, directly reproducible, and do not weaken validation. +2. **Make cost visible.** Add attempt/session/timing/usage/artifact telemetry and emit this ledger natively. +3. **Change research planning policy.** Introduce feasibility-first discovery, a quality oracle, soft growth budgets and first-class `not_estimable` closure. Run this in shadow mode on two research missions. +4. **Prevent known repair classes.** Add blindness-packet lint and structured repair-family/loop detection. +5. **Make validation incremental.** Introduce evidence epochs and hash-keyed reuse behind a feature flag; prove invalidation with adversarial mutation tests before defaulting on. +6. **Reduce data amplification.** Move source corpora to content-addressed immutable storage and emit delta manifests. +7. **Optimize scheduling last.** Once telemetry and correctness semantics are reliable, add critical-path and subgraph-scoped scheduling. Faster scheduling of unnecessary work is a rather expensive form of punctuality. + +## Measurement method and limits + +`analyze_trace.py` performs mission-evidence-payload-blind analysis over orchestration records and Codex session/event data. It does not open production-log or mission-evidence payload content; it retains bounded Codex session text only for event-to-session correlation. It computes: + +- wall interval from project creation through the latest recorded decision; +- active session intervals from `task_started` / `task_complete` events; +- their union and parallel overlap; +- task/contract growth from final state and patch additions; +- attempt, decision and terminal-review counts; +- unique-only match diagnostics, with ambiguous and unmatched events excluded from duration and usage; +- Codex-reported token totals; and +- logical/allocated artifact size and inode counts. + +The inferred initial task and contract counts subtract patch additions from final topology; in-place textual changes are not counted. Stage attribution is a task-identity heuristic, not ground truth. Non-busy time includes human and external-system pauses. Zero unmatched events does not prove attribution correctness, and 75 ambiguous events remain deliberately unattributed. The exact executing Zenith commit was not persisted. These limits are reasons to implement telemetry, not invitations to turn estimates into facts. + +## Acceptance test for the recommendations + +Replay the frozen original brief against current Zenith and a candidate harness with the same data-access limits. Blind the final evaluator to which harness produced each result. A candidate wins only if it: + +1. preserves every independently supported conclusion and explicit coverage limitation; +2. introduces no unsupported population, semantic or causal claim; +3. preserves source-to-claim traceability; +4. reaches an honest terminal state; +5. materially reduces wall time, active model effort, attempts, repeated validations, graph growth and artifact bytes. + +The first optimization target should be median wall time at equal quality across several research missions, not victory on this single unusually baroque trace. diff --git a/research/2026-07-production-log-mission/SOURCES.md b/research/2026-07-production-log-mission/SOURCES.md new file mode 100644 index 0000000..99151e6 --- /dev/null +++ b/research/2026-07-production-log-mission/SOURCES.md @@ -0,0 +1,51 @@ +# Evidence and Source Map + +This research uses local, read-only trace sources. Public paths below use stable placeholders: `$ZENITH_HOME` is the local Zenith data root, `$CODEX_HOME` is the local Codex data root, `` is the preserved product workspace, and `` is the source checkout used for the audit. + +## Historical run + +- Project bucket: `$ZENITH_HOME/projects/20260717T130345Z-read-only-all-around-production-log-research-for-agent-builder-p` +- Runtime mission metadata: `/.zenith-runtime/missions/mission-001` +- Durable mission charter, decisions and evidence inventory: `/.zenith` +- Mission charter: `/.zenith/missions/mission-001/mission.md` +- Root Codex conversation: `$CODEX_HOME/sessions/2026/07/.jsonl` +- Worker and reviewer conversations: `$CODEX_HOME/sessions/2026/07/**/*.jsonl`, narrowed by project ID/task ID and dispatch timestamp by `analyze_trace.py` + +The analyzer performs mission-evidence-payload-blind analysis over project/runtime JSON, attempt handoffs, terminal-review records, decision metadata, and Codex session/event data. It traverses the evidence tree only for filesystem sizes/inodes. It does not open production-log or mission-evidence payload content; it retains bounded Codex session text only for event-to-session correlation. + +## Harness source + +Clean research checkout: + +- `` +- branch `research/zenith-run-efficiency-20260719` +- upstream source snapshot `feb1d62` + +Primary inspected surfaces: + +- `zenith/src/zenith_harness/bundled/prompts/orchestrator/system_prompt.md` +- `zenith/src/zenith_harness/bundled/prompts/terminal-reviewer/system_prompt.md` +- `zenith/src/zenith_harness/coordinator.py` +- `zenith/src/zenith_harness/task_validation.py` +- `zenith/src/zenith_harness/config.py` +- ACP/provider runner and persistence modules under `zenith/src/zenith_harness/` + +The historical project does not record the executing harness commit. `feb1d62` is therefore a current-source audit target whose behavior matches the trace, not a proven identity for the July 17 process. + +## Preserved checkout + +`` was treated as read-only historical evidence and was not modified. + +## Generated evidence + +- `generated/execution_ledger.csv`: timestamped attempts, decisions, terminal reviews, deterministic session aliases, match diagnostics, active duration and reported token fields +- `generated/metrics.json`: summarized wall/active time, topology, outcomes, artifact sizes and method limitations +- `generated/idle_gaps.csv`: gaps between the union of matched active session intervals + +The three generated files are deterministic for the frozen sources. Two fresh analyzer runs produced identical SHA-256 hashes: + +```text +7882a386d40967bdd4275a0c1c2679eef7baa66c6d752c18864e40d996e36ecf execution_ledger.csv +168e43a55d2d20042162491731e0b6e06607119bd8cf9b55f803ae78a21a7f1e idle_gaps.csv +1a967622babb9ce59e2b98f5373bf8ebc061ece5351ddb62ceec5fd9fbbfc315 metrics.json +``` diff --git a/research/2026-07-production-log-mission/analyze_trace.py b/research/2026-07-production-log-mission/analyze_trace.py new file mode 100644 index 0000000..e518336 --- /dev/null +++ b/research/2026-07-production-log-mission/analyze_trace.py @@ -0,0 +1,653 @@ +#!/usr/bin/env python3 +"""Build a reproducible, mission-evidence-payload-blind Zenith trace profile. + +The script reads Zenith runtime records and Codex JSONL session/event data. It +does not open production-log or mission-evidence payload content; it retains +bounded Codex session text only for event-to-session correlation. +""" + +from __future__ import annotations + +import argparse +import csv +import json +import re +from collections import Counter +from dataclasses import dataclass +from datetime import datetime, timezone +from pathlib import Path +from typing import Any, Iterable + + +UTC = timezone.utc +ATTEMPT_RE = re.compile( + r"^(?P\d{4}-\d{2}-\d{2}T\d{2}-\d{2}-\d{2}Z)-\d{4}__(?P.+)\.json$" +) +DECISION_TS_RE = re.compile(r"^- Timestamp: (?P[^\s]+)$", re.MULTILINE) +JSON_BLOCK_RE = re.compile(r"```json\n(?P.*?)\n```", re.DOTALL) +HISTORICAL_WORKSPACE = "" + + +def parse_iso(value: str) -> datetime: + return datetime.fromisoformat(value.replace("Z", "+00:00")).astimezone(UTC) + + +def parse_filesafe(value: str) -> datetime: + return datetime.strptime(value, "%Y-%m-%dT%H-%M-%SZ").replace(tzinfo=UTC) + + +def iso(value: datetime | None) -> str: + return value.isoformat().replace("+00:00", "Z") if value else "" + + +def seconds(start: datetime | None, end: datetime | None) -> float: + if not start or not end: + return 0.0 + return max(0.0, (end - start).total_seconds()) + + +def read_json(path: Path) -> dict[str, Any]: + return json.loads(path.read_text()) + + +def tree_stats(path: Path) -> dict[str, int]: + count = 0 + logical_size = 0 + allocated_size = 0 + inodes: set[tuple[int, int]] = set() + for item in path.rglob("*"): + if item.is_file(): + stat = item.stat() + count += 1 + logical_size += stat.st_size + allocated_size += getattr(stat, "st_blocks", 0) * 512 + inodes.add((stat.st_dev, stat.st_ino)) + return { + "files": count, + "logical_bytes": logical_size, + "allocated_bytes": allocated_size, + "unique_inodes": len(inodes), + "hardlink_aliases": count - len(inodes), + } + + +def classify_task(task_id: str, task_type: str) -> str: + if task_type == "validate": + return "validation" + if task_type == "gate": + return "gate" + lowered = task_id.lower() + if any(token in lowered for token in ("semantic", "coder", "manual", "adjudicat", "recode", "holdout", "blind")): + return "manual_semantic_reliability" + if "analysis-failclosed" in lowered or "analysis-fail-closed" in lowered: + return "fail_closed_analysis_repair" + if any(token in lowered for token in ("report", "history", "lineage", "bind-", "link", "provenance-r")): + return "report_provenance_repair" + if any(token in lowered for token in ("source", "strata", "sampling", "retrieve", "corpus", "supplement-timing")): + return "population_and_retrieval" + if any(token in lowered for token in ("tools", "token", "reqresp", "jq", "rare", "compare", "ops")): + return "analysis" + return "other_work" + + +def terminal_review_start(path: Path) -> datetime: + return parse_filesafe(path.stem) + + +@dataclass +class Session: + path: Path + session_id: str + start: datetime + end: datetime + active_intervals: list[tuple[datetime, datetime]] + thread_source: str + source: str + final_usage: dict[str, int] + text: str + + @property + def active_seconds(self) -> float: + return sum(seconds(start, end) for start, end in self.active_intervals) + + +@dataclass(frozen=True) +class MatchResult: + session: Session | None + method: str + delta_seconds: float | None + eligible_candidate_count: int + ambiguity_status: str + + @property + def ambiguous(self) -> bool: + return self.method == "ambiguous" + + +def load_session(path: Path) -> Session | None: + meta: dict[str, Any] | None = None + first: datetime | None = None + last: datetime | None = None + turn_start: datetime | None = None + intervals: list[tuple[datetime, datetime]] = [] + final_usage: dict[str, int] = {} + text_parts: list[str] = [] + + with path.open(errors="replace") as handle: + for raw in handle: + try: + row = json.loads(raw) + except json.JSONDecodeError: + continue + stamp_raw = row.get("timestamp") + stamp = parse_iso(stamp_raw) if isinstance(stamp_raw, str) else None + if stamp: + first = first or stamp + last = stamp + if row.get("type") == "session_meta": + meta = row.get("payload", {}) + payload = row.get("payload", {}) + if row.get("type") == "event_msg" and payload.get("type") == "task_started" and stamp: + if turn_start is not None: + intervals.append((turn_start, stamp)) + turn_start = stamp + elif row.get("type") == "event_msg" and payload.get("type") == "task_complete" and stamp: + if turn_start is not None: + intervals.append((turn_start, stamp)) + turn_start = None + if row.get("type") == "event_msg" and payload.get("type") == "token_count": + info = payload.get("info") or {} + usage = info.get("total_token_usage", {}) + if isinstance(usage, dict): + final_usage = {key: int(value) for key, value in usage.items() if isinstance(value, int)} + if len(text_parts) < 2000: + text_parts.append(raw[:20_000]) + + if meta is None or first is None or last is None: + return None + if turn_start is not None: + intervals.append((turn_start, last)) + if not intervals: + intervals = [(first, last)] + source_value = meta.get("source") + source_text = json.dumps(source_value, sort_keys=True) if isinstance(source_value, dict) else str(source_value or "") + return Session( + path=path, + session_id=str(meta.get("id") or meta.get("session_id") or ""), + start=parse_iso(str(meta.get("timestamp"))) if meta.get("timestamp") else first, + end=last, + active_intervals=intervals, + thread_source=str(meta.get("thread_source") or ""), + source=source_text, + final_usage=final_usage, + text="".join(text_parts), + ) + + +def relevant_sessions( + sessions_root: Path, + project_id: str, + start: datetime, + end: datetime, +) -> list[Session]: + sessions: list[Session] = [] + for path in sessions_root.rglob("*.jsonl"): + loaded = load_session(path) + if loaded is None or loaded.start < start or loaded.start > end: + continue + if project_id not in loaded.text and "Zenith Terminal Reviewer" not in loaded.text: + continue + sessions.append(loaded) + return sorted(sessions, key=lambda item: (item.start, item.session_id)) + + +def build_session_aliases(sessions: Iterable[Session]) -> dict[str, str]: + aliases: dict[str, str] = {} + for session in sorted(sessions, key=lambda item: (item.start, item.end, item.session_id)): + if session.session_id and session.session_id not in aliases: + aliases[session.session_id] = f"session-{len(aliases) + 1:03d}" + return aliases + + +def match_session( + event_start: datetime, + event_id: str, + sessions: list[Session], + used: set[str], + *, + tolerance_seconds: int = 90, +) -> MatchResult: + task_candidates = [ + session + for session in sessions + if session.session_id not in used + and event_id in session.text + and abs((session.start - event_start).total_seconds()) <= tolerance_seconds + ] + if task_candidates: + deltas = { + session.session_id: abs((session.start - event_start).total_seconds()) + for session in task_candidates + } + minimum_delta = min(deltas.values()) + best = [session for session in task_candidates if deltas[session.session_id] == minimum_delta] + if len(best) != 1: + return MatchResult( + session=None, + method="ambiguous", + delta_seconds=minimum_delta, + eligible_candidate_count=len(task_candidates), + ambiguity_status="task_id_and_time_tie", + ) + selected = best[0] + used.add(selected.session_id) + return MatchResult( + session=selected, + method="task_id_and_time", + delta_seconds=minimum_delta, + eligible_candidate_count=len(task_candidates), + ambiguity_status="not_ambiguous", + ) + + time_candidates = [ + session + for session in sessions + if session.session_id not in used + and abs((session.start - event_start).total_seconds()) <= 15 + ] + if len(time_candidates) == 1: + selected = time_candidates[0] + delta = abs((selected.start - event_start).total_seconds()) + used.add(selected.session_id) + return MatchResult( + session=selected, + method="time_only_unique", + delta_seconds=delta, + eligible_candidate_count=1, + ambiguity_status="not_ambiguous", + ) + if time_candidates: + minimum_delta = min( + abs((session.start - event_start).total_seconds()) for session in time_candidates + ) + return MatchResult( + session=None, + method="ambiguous", + delta_seconds=minimum_delta, + eligible_candidate_count=len(time_candidates), + ambiguity_status="multiple_time_only_candidates", + ) + return MatchResult( + session=None, + method="unmatched", + delta_seconds=None, + eligible_candidate_count=0, + ambiguity_status="not_ambiguous", + ) + + +def interval_union_seconds(intervals: Iterable[tuple[datetime, datetime]]) -> float: + ordered = sorted((start, end) for start, end in intervals if end >= start) + if not ordered: + return 0.0 + total = 0.0 + current_start, current_end = ordered[0] + for start, end in ordered[1:]: + if start <= current_end: + current_end = max(current_end, end) + else: + total += seconds(current_start, current_end) + current_start, current_end = start, end + return total + seconds(current_start, current_end) + + +def merged_intervals(intervals: Iterable[tuple[datetime, datetime]]) -> list[tuple[datetime, datetime]]: + ordered = sorted((start, end) for start, end in intervals if end >= start) + if not ordered: + return [] + merged = [ordered[0]] + for start, end in ordered[1:]: + prior_start, prior_end = merged[-1] + if start <= prior_end: + merged[-1] = (prior_start, max(prior_end, end)) + else: + merged.append((start, end)) + return merged + + +def parse_decisions(decision_dir: Path) -> tuple[list[dict[str, Any]], dict[str, int]]: + rows: list[dict[str, Any]] = [] + growth = Counter() + for path in sorted(decision_dir.glob("*.md")): + text = path.read_text() + match = DECISION_TS_RE.search(text) + if not match: + continue + action = path.stem.split("-", 1)[1] + patch_tasks = patch_items = superseded = cancelled = 0 + for block in JSON_BLOCK_RE.finditer(text): + try: + payload = json.loads(block.group("body")) + except json.JSONDecodeError: + continue + if not isinstance(payload, dict) or not any(key in payload for key in ("add", "add_items", "supersede", "cancel")): + continue + patch_tasks += len(payload.get("add", [])) + patch_items += len(payload.get("add_items", [])) + superseded += len(payload.get("supersede", {})) + cancelled += len(payload.get("cancel", [])) + growth.update({"added_tasks": patch_tasks, "added_contracts": patch_items, "superseded_tasks": superseded, "cancelled_tasks": cancelled}) + rows.append( + { + "event_kind": "decision", + "event_id": path.stem, + "event_type": action, + "stage": "orchestration", + "start_utc": match.group("stamp"), + "end_utc": match.group("stamp"), + "duration_seconds": 0, + "session_id": "", + "input_tokens": 0, + "cached_input_tokens": 0, + "output_tokens": 0, + "reasoning_output_tokens": 0, + "total_tokens": 0, + "match_method": "", + "match_delta_seconds": "", + "match_candidate_count": "", + "match_ambiguity": "", + "done": "", + "passed": "", + "request_attention": "", + "final_status": "", + "note": f"add_tasks={patch_tasks}; add_contracts={patch_items}; supersede={superseded}; cancel={cancelled}", + } + ) + return rows, dict(growth) + + +def write_csv(path: Path, rows: list[dict[str, Any]]) -> None: + fieldnames = [ + "event_kind", "event_id", "event_type", "stage", "start_utc", "end_utc", + "duration_seconds", "session_id", "input_tokens", "cached_input_tokens", + "output_tokens", "reasoning_output_tokens", "total_tokens", "match_method", + "match_delta_seconds", "match_candidate_count", "match_ambiguity", "done", + "passed", "request_attention", "final_status", "note", + ] + with path.open("w", newline="") as handle: + writer = csv.DictWriter(handle, fieldnames=fieldnames, lineterminator="\n") + writer.writeheader() + writer.writerows(sorted(rows, key=lambda row: (row["start_utc"], row["event_kind"], row["event_id"]))) + + +def write_idle_gaps( + path: Path, + intervals: list[tuple[datetime, datetime]], + project_start: datetime, + project_end: datetime, +) -> list[dict[str, Any]]: + busy = merged_intervals(intervals) + gaps: list[dict[str, Any]] = [] + cursor = project_start + for start, end in busy: + if start > cursor: + gaps.append({"start_utc": iso(cursor), "end_utc": iso(start), "duration_seconds": round(seconds(cursor, start), 3)}) + cursor = max(cursor, end) + if project_end > cursor: + gaps.append({"start_utc": iso(cursor), "end_utc": iso(project_end), "duration_seconds": round(seconds(cursor, project_end), 3)}) + with path.open("w", newline="") as handle: + writer = csv.DictWriter( + handle, + fieldnames=["start_utc", "end_utc", "duration_seconds"], + lineterminator="\n", + ) + writer.writeheader() + writer.writerows(sorted(gaps, key=lambda row: row["duration_seconds"], reverse=True)) + return gaps + + +def main() -> None: + parser = argparse.ArgumentParser() + parser.add_argument("--project-root", type=Path, required=True) + parser.add_argument("--sessions-root", type=Path, required=True) + parser.add_argument("--output-dir", type=Path, required=True) + args = parser.parse_args() + args.output_dir.mkdir(parents=True, exist_ok=True) + + project_root = args.project_root.resolve() + runtime = project_root / ".zenith-runtime" / "missions" / "mission-001" + durable = project_root / ".zenith" / "missions" / "mission-001" + project = read_json(project_root / ".zenith-runtime" / "project.json") + state = read_json(project_root / ".zenith-runtime" / "state.json") + tasks_doc = read_json(runtime / "tasks.json") + task_state = read_json(runtime / "task-state.json").get("tasks", {}) + contract_state = read_json(runtime / "contract-state.json").get("items", {}) + tasks = {task["id"]: task for task in tasks_doc["tasks"]} + + attempt_paths = sorted((runtime / "attempts").glob("*.json")) + review_paths = sorted((runtime / "terminal-reviews").glob("*.json")) + project_start = parse_iso(project["created_at"]) + last_review_start = max((terminal_review_start(path) for path in review_paths), default=project_start) + session_end_bound = datetime.fromtimestamp(last_review_start.timestamp() + 3600, tz=UTC) + sessions = relevant_sessions(args.sessions_root.resolve(), project["id"], project_start, session_end_bound) + session_aliases = build_session_aliases(sessions) + used_sessions: set[str] = set() + matched_raw_session_ids: set[str] = set() + match_results: list[MatchResult] = [] + rows: list[dict[str, Any]] = [] + active_intervals: list[tuple[datetime, datetime]] = [] + stage_seconds = Counter() + stage_tokens = Counter() + outcome_counts = Counter() + unmatched_attempts: list[str] = [] + + first_attempt_start: datetime | None = None + for path in attempt_paths: + match = ATTEMPT_RE.match(path.name) + if not match: + continue + start = parse_filesafe(match.group("stamp")) + first_attempt_start = min(first_attempt_start, start) if first_attempt_start else start + task_id = match.group("task") + task = tasks.get(task_id, {"type": "unknown"}) + payload = read_json(path) + match_result = match_session(start, task_id, sessions, used_sessions) + match_results.append(match_result) + session = match_result.session + if match_result.method == "unmatched": + unmatched_attempts.append(path.name) + if session: + matched_raw_session_ids.add(session.session_id) + event_end = session.end if session else start + active = session.active_seconds if session else 0.0 + if session: + active_intervals.extend(session.active_intervals) + stage = classify_task(task_id, task.get("type", "unknown")) + stage_seconds[stage] += active + usage = session.final_usage if session else {} + stage_tokens[stage] += usage.get("total_tokens", 0) + done = payload.get("done") + passed = payload.get("passed") + attention = payload.get("request_attention") + outcome_counts[f"done_{str(done).lower()}"] += 1 + if task.get("type") == "validate": + outcome_counts[f"validator_passed_{str(passed).lower()}"] += 1 + if attention: + outcome_counts["requested_attention"] += 1 + rows.append( + { + "event_kind": "attempt", "event_id": task_id, "event_type": task.get("type", "unknown"), + "stage": stage, "start_utc": iso(start), "end_utc": iso(event_end), + "duration_seconds": round(active, 3), "session_id": session.session_id if session else "", + "input_tokens": usage.get("input_tokens", 0), "cached_input_tokens": usage.get("cached_input_tokens", 0), + "output_tokens": usage.get("output_tokens", 0), "reasoning_output_tokens": usage.get("reasoning_output_tokens", 0), + "total_tokens": usage.get("total_tokens", 0), "match_method": match_result.method, + "match_delta_seconds": round(match_result.delta_seconds, 3) + if match_result.delta_seconds is not None else "", + "match_candidate_count": match_result.eligible_candidate_count, + "match_ambiguity": match_result.ambiguity_status, "done": done, + "passed": passed if passed is not None else "", "request_attention": attention, + "final_status": task_state.get(task_id, {}).get("status", ""), "note": path.name, + } + ) + + if first_attempt_start and first_attempt_start > project_start: + stage_seconds["planning"] += seconds(project_start, first_attempt_start) + rows.append( + { + "event_kind": "phase", "event_id": "initial-planning", "event_type": "planning", "stage": "planning", + "start_utc": iso(project_start), "end_utc": iso(first_attempt_start), + "duration_seconds": round(seconds(project_start, first_attempt_start), 3), "session_id": "", + "input_tokens": 0, "cached_input_tokens": 0, "output_tokens": 0, "reasoning_output_tokens": 0, + "total_tokens": 0, "match_method": "", "match_delta_seconds": "", + "match_candidate_count": "", "match_ambiguity": "", "done": "", "passed": "", + "request_attention": "", "final_status": "", + "note": "Project creation to first worker dispatch; includes clarification and contract planning.", + } + ) + + review_results = Counter() + review_end: datetime | None = None + for path in review_paths: + start = terminal_review_start(path) + match_result = match_session( + start, "terminal review", sessions, used_sessions, tolerance_seconds=120 + ) + match_results.append(match_result) + session = match_result.session + if session: + matched_raw_session_ids.add(session.session_id) + payload = read_json(path) + event_end = session.end if session else start + review_end = max(review_end, event_end) if review_end else event_end + active = session.active_seconds if session else 0.0 + if session: + active_intervals.extend(session.active_intervals) + usage = session.final_usage if session else {} + stage_seconds["terminal_review"] += active + stage_tokens["terminal_review"] += usage.get("total_tokens", 0) + review_results[f"done_{str(payload.get('done')).lower()}"] += 1 + rows.append( + { + "event_kind": "terminal_review", "event_id": path.stem, "event_type": "terminal_review", + "stage": "terminal_review", "start_utc": iso(start), "end_utc": iso(event_end), + "duration_seconds": round(active, 3), "session_id": session.session_id if session else "", + "input_tokens": usage.get("input_tokens", 0), "cached_input_tokens": usage.get("cached_input_tokens", 0), + "output_tokens": usage.get("output_tokens", 0), "reasoning_output_tokens": usage.get("reasoning_output_tokens", 0), + "total_tokens": usage.get("total_tokens", 0), "match_method": match_result.method, + "match_delta_seconds": round(match_result.delta_seconds, 3) + if match_result.delta_seconds is not None else "", + "match_candidate_count": match_result.eligible_candidate_count, + "match_ambiguity": match_result.ambiguity_status, + "done": payload.get("done"), "passed": "", + "request_attention": not payload.get("done", False), "final_status": state.get("state", ""), + "note": "Fresh-context reviewer; mission artifacts forbidden by reviewer prompt.", + } + ) + + decision_rows, growth = parse_decisions(project_root / ".zenith" / "decisions") + rows.extend(decision_rows) + + for row in rows: + stage_seconds.setdefault(row["stage"], 0) + stage_tokens.setdefault(row["stage"], 0) + + all_usage = Counter() + for row in rows: + raw_session_id = row["session_id"] + if raw_session_id: + row["session_id"] = session_aliases[raw_session_id] + + for session in sessions: + if session.session_id in matched_raw_session_ids: + all_usage.update(session.final_usage) + + match_method_counts = Counter(result.method for result in match_results) + ambiguity_status_counts = Counter( + result.ambiguity_status for result in match_results if result.ambiguous + ) + + task_type_counts = Counter(task["type"] for task in tasks.values()) + task_status_counts = Counter(value.get("status", "unknown") for value in task_state.values()) + contract_status_counts = Counter(value.get("status", "unknown") for value in contract_state.values()) + action_counts = Counter(row["event_type"] for row in decision_rows) + initial_task_count = len(tasks) - growth.get("added_tasks", 0) + initial_contract_count = len(contract_state) - growth.get("added_contracts", 0) + latest_decision = max((parse_iso(row["start_utc"]) for row in decision_rows), default=project_start) + end = max(review_end or last_review_start, latest_decision) + wall_seconds = seconds(project_start, end) + worker_active_seconds = sum(row["duration_seconds"] for row in rows if row["event_kind"] in {"attempt", "terminal_review"}) + busy_union = interval_union_seconds(active_intervals) + + evidence_stats = tree_stats(durable / "evidence") + durable_stats = tree_stats(project_root / ".zenith") + runtime_stats = tree_stats(project_root / ".zenith-runtime") + report_validator_attempts = sum( + 1 for row in rows + if row["event_kind"] == "attempt" and row["event_type"] == "validate" and "report-failclosed" in row["event_id"] + ) + idle_gaps = write_idle_gaps(args.output_dir / "idle_gaps.csv", active_intervals, project_start, end) + long_idle_gaps = sorted( + (gap for gap in idle_gaps if gap["duration_seconds"] >= 300), + key=lambda gap: gap["duration_seconds"], + reverse=True, + ) + + metrics = { + "source": { + "project_id": project["id"], "mission_id": project.get("current_mission_id"), + "workspace_dir": HISTORICAL_WORKSPACE, "project_created_at": iso(project_start), + "analysis_end_at": iso(end), "runtime_state_after_reviews": state.get("state"), + }, + "elapsed": { + "wall_seconds": round(wall_seconds, 3), "wall_hours": round(wall_seconds / 3600, 3), + "planning_to_first_dispatch_seconds": round(seconds(project_start, first_attempt_start), 3), + "matched_worker_and_reviewer_active_seconds": round(worker_active_seconds, 3), + "matched_worker_and_reviewer_active_hours": round(worker_active_seconds / 3600, 3), + "union_busy_seconds": round(busy_union, 3), + "effective_parallelism_when_busy": round(worker_active_seconds / busy_union, 3) if busy_union else None, + "nonbusy_seconds": round(max(0.0, wall_seconds - busy_union), 3), + "nonbusy_hours": round(max(0.0, wall_seconds - busy_union) / 3600, 3), + "idle_gap_count_at_least_5m": len(long_idle_gaps), + "largest_idle_gaps_seconds": [gap["duration_seconds"] for gap in long_idle_gaps[:10]], + }, + "topology": { + "initial_task_count_inferred": initial_task_count, "final_task_count": len(tasks), + "task_growth_factor": round(len(tasks) / initial_task_count, 3) if initial_task_count else None, + "task_types": dict(task_type_counts), "task_statuses": dict(task_status_counts), + "initial_contract_count_inferred": initial_contract_count, "final_contract_count": len(contract_state), + "contract_growth_factor": round(len(contract_state) / initial_contract_count, 3) if initial_contract_count else None, + "contract_statuses": dict(contract_status_counts), "patch_growth": growth, + }, + "execution": { + "attempt_count": sum(row["event_kind"] == "attempt" for row in rows), + "terminal_review_count": sum(row["event_kind"] == "terminal_review" for row in rows), + "terminal_review_results": dict(review_results), "decision_count": sum(action_counts.values()), + "decision_actions": dict(action_counts), "attempt_outcomes": dict(outcome_counts), + "report_failclosed_validator_attempts": report_validator_attempts, + "matched_sessions": len(matched_raw_session_ids), + "match_method_counts": dict(match_method_counts), + "ambiguity_status_counts": dict(ambiguity_status_counts), + "ambiguous_match_count": match_method_counts.get("ambiguous", 0), + "unmatched_match_count": match_method_counts.get("unmatched", 0), + "unmatched_attempt_count": len(unmatched_attempts), "unmatched_attempts": unmatched_attempts, + }, + "usage": dict(all_usage), + "stage_active_seconds": {key: round(value, 3) for key, value in stage_seconds.items()}, + "stage_total_tokens": dict(stage_tokens), + "artifacts": {"mission_evidence": evidence_stats, "durable_project_tree": durable_stats, "runtime_tree": runtime_stats}, + "method_limits": [ + "Session token counters are Codex-reported totals; input totals include cached input and should not be added to cached input again.", + "Active time uses task_started/task_complete intervals from matched Codex sessions. It excludes uninstrumented shell/service latency outside those sessions.", + "The task and contract baselines are inferred by subtracting patch additions from final state; in-place textual growth is not represented.", + "This mission-evidence-payload-blind analysis did not open production-log or mission-evidence payload content; it read bounded Codex session/event text only for event-to-session correlation.", + "Ambiguous and unmatched events remain in the execution ledger but contribute no matched duration or token usage; zero unmatched events would not prove attribution correctness.", + ], + } + + write_csv(args.output_dir / "execution_ledger.csv", rows) + (args.output_dir / "metrics.json").write_text(json.dumps(metrics, indent=2, sort_keys=True) + "\n") + + +if __name__ == "__main__": + main() diff --git a/research/2026-07-production-log-mission/counterfactual_mission.md b/research/2026-07-production-log-mission/counterfactual_mission.md new file mode 100644 index 0000000..6c09478 --- /dev/null +++ b/research/2026-07-production-log-mission/counterfactual_mission.md @@ -0,0 +1,60 @@ +# Counterfactual Minimum-Sufficient Mission + +This is the smallest mission topology expected to produce equivalent defensible conclusions and uncertainty boundaries for the July 17 request. It deliberately does not reproduce accidental intermediate artifacts. + +## Frozen outcome and stop rules + +Outcome: a reproducible comparison of observed tool use, jq behavior, request/response anomalies and independently reconstructed token utilization for the two requested Agent Builder projects over the permitted week-scale `.ai` evidence. + +Quality oracle: + +- every quantitative claim names its denominator and evidence tier; +- population-ineligible or semantically unvalidated comparisons are descriptive and explicitly `NOT ESTIMABLE`; +- examples bridge to invocation/call/event evidence; +- source gaps remain limitations rather than being repaired into synthetic certainty; +- one independent reviewer can regenerate headline tables and inspect cited examples. + +Stop when all promoted claims have fresh validation, all unsupported claim classes are sealed as limitations, and the final artifact is reviewable from its declared root. Do not continue solely to improve coverage of a claim already classified `NOT ESTIMABLE` unless the user explicitly values that additional study. + +Soft budget: 24 wall hours, 40 attempts, 2× task growth, two versions per report/validator family. Crossing a budget requires a recorded value-of-information decision, not automatic termination. + +## DAG + +| Node | Type | Depends on | Acceptance-bearing? | Output | +|---|---|---|---|---| +| C0 | Charter | user confirmation | Yes | Outcome, estimands, evidence floor, budgets | +| S1 | Source feasibility | C0 | Yes | Source identity, population eligibility, access limits | +| A1 | Acquisition | S1 | Yes | One immutable raw/compact corpus and coverage manifest | +| D1 | Tool and jq discovery | A1 | No until claims promoted | Call/result joins, jq categories, candidate findings | +| D2 | Integrity/anomaly discovery | A1 | No until claims promoted | Open-ended anomaly ledger and examples | +| D3 | Token reconstruction | A1 | No until claims promoted | Independent estimates and sensitivity | +| D4 | Strata comparison | A1, S1 | No until claims promoted | Descriptive topic/language/project tables | +| P1 | Claim promotion | D1–D4 | Yes | Finite report claim contract; non-estimable dispositions | +| R1 | Synthesis | P1 | Yes | Report and small reproducibility manifest | +| V1 | Quantitative validation | R1, A1 | Yes | Recomputed headline tables and denominator checks | +| V2 | Example/provenance validation | R1, A1 | Yes | Sampled raw bridges and contradiction checks | +| G1 | Gate | V1, V2 | Yes | Current-epoch verdict only | +| T1 | Terminal review | G1 | Yes | Fresh review of original brief and declared report root | + +`D1`–`D4` run in parallel. `V1` and `V2` run in parallel and validate different surfaces. They are not duplicated scrutiny lanes over every exploratory task. + +## Decision rules that eliminate the observed loops + +1. If S1 cannot establish representative population eligibility, population rate contracts are never created. Descriptive comparisons remain valid when denominators are explicit. +2. Independent semantic coding is launched only if a promoted user-facing claim requires it and the value-of-information justifies its budget. Generated labels never count as manual independence. +3. Blind-review packets must pass a local preflight for self-containment, identity leakage, forbidden-source reachability and writable output root before agents spawn. +4. All analysis nodes consume the same immutable corpus by hash. A repair creates derived deltas and a new manifest, not a copied source tree. +5. A report repair invalidates only validators whose input hashes or claim surfaces changed. +6. The terminal reviewer can read declared deliverables and raw product/data surfaces, but cannot read worker reports, decisions, prior validator verdicts or closeout prose. +7. A second identical terminal-gap fingerprint is a harness conflict, not another review attempt. + +## Estimated savings and falsification + +| Change | Uniquely attributed trace cost | Unmeasured replay target | +|---|---:|---:| +| Avoid default 24-shard semantic program after non-estimability | 6.82 active h in uniquely matched semantic-reliability sessions | Target 4–6 active h | +| Changed-surface validation and no v2–v9 full lineage | 6.74 active h in uniquely matched validation/fail-closed/report-repair sessions | Target 3–5 active h | +| Correct terminal visibility and loop detection | 0.35 uniquely matched active h plus non-closure | Target 0.2–0.35 active h; enables completion | +| Critical-path/scoped scheduling | 28.57 non-busy h upper bound relative to uniquely matched intervals | Target 3–8 wall h; unknown until replay | + +The analyzer leaves 75 ambiguous events without duration or usage attribution, so these costs are lower-bound slices rather than whole-phase totals. The target ranges are unmeasured and overlap; they must not be summed mechanically. The combined unmeasured replay target is 16–24 wall hours. Falsify it by running the same frozen brief and oracle through both harnesses; reject the lean design if a blinded reviewer finds a lost supported conclusion, a weakened uncertainty boundary, or broken evidence provenance. diff --git a/research/2026-07-production-log-mission/generated/execution_ledger.csv b/research/2026-07-production-log-mission/generated/execution_ledger.csv new file mode 100644 index 0000000..24845f9 --- /dev/null +++ b/research/2026-07-production-log-mission/generated/execution_ledger.csv @@ -0,0 +1,188 @@ +event_kind,event_id,event_type,stage,start_utc,end_utc,duration_seconds,session_id,input_tokens,cached_input_tokens,output_tokens,reasoning_output_tokens,total_tokens,match_method,match_delta_seconds,match_candidate_count,match_ambiguity,done,passed,request_attention,final_status,note +phase,initial-planning,planning,planning,2026-07-17T13:03:45Z,2026-07-17T14:51:06Z,6441.0,,0,0,0,0,0,,,,,,,,,Project creation to first worker dispatch; includes clarification and contract planning. +attempt,work-source-population,work,population_and_retrieval,2026-07-17T14:51:06Z,2026-07-17T15:21:04.394000Z,1791.271,session-004,15512832,15127552,45659,10803,15558491,task_id_and_time,3.828,1,not_ambiguous,True,,False,cleared,2026-07-17T14-51-06Z-0000__work-source-population.json +attempt,work-strata-provenance,work,population_and_retrieval,2026-07-17T15:21:05Z,2026-07-17T15:22:53.624000Z,102.618,session-005,318041,257280,2249,478,320290,time_only_unique,3.403,1,not_ambiguous,False,,False,superseded,2026-07-17T15-21-05Z-0000__work-strata-provenance.json +decision,001-retry,retry,orchestration,2026-07-17T15:37:35Z,2026-07-17T15:37:35Z,0,,0,0,0,0,0,,,,,,,,,add_tasks=0; add_contracts=0; supersede=0; cancel=0 +attempt,work-strata-provenance,work,population_and_retrieval,2026-07-17T15:37:48Z,2026-07-17T15:45:27.572000Z,452.309,session-006,2889994,2663168,10315,2799,2900309,task_id_and_time,4.817,1,not_ambiguous,False,,False,superseded,2026-07-17T15-37-48Z-0000__work-strata-provenance.json +decision,002-retry,retry,orchestration,2026-07-17T17:21:29Z,2026-07-17T17:21:29Z,0,,0,0,0,0,0,,,,,,,,,add_tasks=0; add_contracts=0; supersede=0; cancel=0 +attempt,work-strata-provenance,work,population_and_retrieval,2026-07-17T17:21:39Z,2026-07-17T17:24:52.959000Z,185.429,session-007,453341,362240,3171,556,456512,task_id_and_time,4.172,1,not_ambiguous,False,,False,superseded,2026-07-17T17-21-39Z-0000__work-strata-provenance.json +decision,003-patch,patch,orchestration,2026-07-17T17:26:44Z,2026-07-17T17:26:44Z,0,,0,0,0,0,0,,,,,,,,,add_tasks=2; add_contracts=0; supersede=1; cancel=0 +attempt,work-strata-surface-discovery,work,population_and_retrieval,2026-07-17T17:26:56Z,2026-07-17T18:02:59.282000Z,2155.591,session-008,6985850,6623488,40689,9234,7026539,time_only_unique,3.389,1,not_ambiguous,True,,False,cleared,2026-07-17T17-26-56Z-0000__work-strata-surface-discovery.json +attempt,work-strata-provenance-v2,work,population_and_retrieval,2026-07-17T18:02:59Z,2026-07-17T18:31:52.300000Z,1726.292,session-009,6797402,6246400,35288,7875,6832690,time_only_unique,3.865,1,not_ambiguous,True,,False,cleared,2026-07-17T18-02-59Z-0000__work-strata-provenance-v2.json +attempt,work-freeze-sampling,work,population_and_retrieval,2026-07-17T18:31:53Z,2026-07-17T19:01:42.709000Z,1783.739,session-010,4420281,4275200,39945,10077,4460226,time_only_unique,2.542,1,not_ambiguous,True,,False,cleared,2026-07-17T18-31-53Z-0000__work-freeze-sampling.json +attempt,work-retrieve-corpus,work,population_and_retrieval,2026-07-17T19:01:43Z,2026-07-17T20:39:09.471000Z,5839.959,session-011,45975630,45355008,64725,11277,46040355,time_only_unique,3.331,1,not_ambiguous,True,,False,cleared,2026-07-17T19-01-43Z-0000__work-retrieve-corpus.json +attempt,validate-source-scrutiny,validate,validation,2026-07-17T20:39:10Z,2026-07-17T20:39:10Z,0.0,,0,0,0,0,0,ambiguous,7.201,2,multiple_time_only_candidates,True,False,True,cleared,2026-07-17T20-39-10Z-0000__validate-source-scrutiny.json +attempt,validate-source-surface,validate,validation,2026-07-17T20:39:10Z,2026-07-17T20:39:10Z,0.0,,0,0,0,0,0,ambiguous,7.201,2,multiple_time_only_candidates,True,False,True,cleared,2026-07-17T20-39-10Z-0001__validate-source-surface.json +decision,004-patch,patch,orchestration,2026-07-17T21:05:43Z,2026-07-17T21:05:43Z,0,,0,0,0,0,0,,,,,,,,,add_tasks=4; add_contracts=1; supersede=1; cancel=0 +attempt,work-repair-descriptive-corpus,work,population_and_retrieval,2026-07-17T21:05:53Z,2026-07-17T21:27:39.855000Z,1300.228,session-014,8562271,8353536,34826,6391,8597097,time_only_unique,3.414,1,not_ambiguous,True,,False,cleared,2026-07-17T21-05-53Z-0000__work-repair-descriptive-corpus.json +attempt,validate-descriptive-corpus-scrutiny,validate,validation,2026-07-17T21:27:40Z,2026-07-17T21:27:40Z,0.0,,0,0,0,0,0,ambiguous,7.14,2,multiple_time_only_candidates,True,False,True,cleared,2026-07-17T21-27-40Z-0000__validate-descriptive-corpus-scrutiny.json +attempt,validate-descriptive-corpus-surface,validate,validation,2026-07-17T21:27:40Z,2026-07-17T21:27:40Z,0.0,,0,0,0,0,0,ambiguous,7.14,2,multiple_time_only_candidates,True,True,False,cleared,2026-07-17T21-27-40Z-0001__validate-descriptive-corpus-surface.json +decision,005-patch,patch,orchestration,2026-07-17T21:41:38Z,2026-07-17T21:41:38Z,0,,0,0,0,0,0,,,,,,,,,add_tasks=4; add_contracts=1; supersede=1; cancel=0 +attempt,work-repair-supplement-timing,work,population_and_retrieval,2026-07-17T21:41:46Z,2026-07-17T21:50:18.888000Z,506.077,session-017,2034580,1934336,16586,3529,2051166,time_only_unique,3.547,1,not_ambiguous,True,,False,cleared,2026-07-17T21-41-46Z-0000__work-repair-supplement-timing.json +attempt,validate-supplement-timing-scrutiny,validate,validation,2026-07-17T21:50:19Z,2026-07-17T21:50:19Z,0.0,,0,0,0,0,0,ambiguous,3.555,2,multiple_time_only_candidates,True,True,False,cleared,2026-07-17T21-50-19Z-0000__validate-supplement-timing-scrutiny.json +attempt,validate-supplement-timing-surface,validate,validation,2026-07-17T21:50:19Z,2026-07-17T21:50:19Z,0.0,,0,0,0,0,0,ambiguous,3.555,2,multiple_time_only_candidates,True,True,False,cleared,2026-07-17T21-50-19Z-0001__validate-supplement-timing-surface.json +decision,006-continue,continue,orchestration,2026-07-17T22:00:38Z,2026-07-17T22:00:38Z,0,,0,0,0,0,0,,,,,,,,,add_tasks=0; add_contracts=0; supersede=0; cancel=0 +attempt,work-token-estimation,work,analysis,2026-07-17T22:00:47Z,2026-07-17T22:28:07.592000Z,1630.786,session-020,10184223,10000384,35663,6202,10219886,task_id_and_time,5.206,2,not_ambiguous,True,,False,cleared,2026-07-17T22-00-47Z-0001__work-token-estimation.json +attempt,work-tools-census,work,analysis,2026-07-17T22:00:47Z,2026-07-17T22:00:47Z,0.0,,0,0,0,0,0,ambiguous,5.206,2,multiple_time_only_candidates,True,,False,cleared,2026-07-17T22-00-47Z-0000__work-tools-census.json +attempt,work-jq-analysis,work,analysis,2026-07-17T22:28:08Z,2026-07-17T22:51:02.655000Z,1367.963,session-023,7091579,6930688,36912,8351,7128491,time_only_unique,3.485,1,not_ambiguous,True,,False,cleared,2026-07-17T22-28-08Z-0001__work-jq-analysis.json +attempt,work-reqresp-discovery,work,analysis,2026-07-17T22:28:08Z,2026-07-17T22:44:14.408000Z,959.715,session-022,6266837,6092032,29980,5451,6296817,task_id_and_time,3.256,2,not_ambiguous,True,,False,cleared,2026-07-17T22-28-08Z-0000__work-reqresp-discovery.json +attempt,work-rare-enrichment,work,analysis,2026-07-17T22:51:03Z,2026-07-17T23:41:09.766000Z,3000.378,session-024,23814781,23387392,37905,5017,23852686,task_id_and_time,3.226,1,not_ambiguous,True,,False,cleared,2026-07-17T22-51-03Z-0000__work-rare-enrichment.json +attempt,work-reqresp-final,work,analysis,2026-07-17T23:41:10Z,2026-07-18T00:19:27.181000Z,2287.55,session-025,21070366,20796416,52910,9023,21123276,time_only_unique,4.541,1,not_ambiguous,True,,False,cleared,2026-07-17T23-41-10Z-0000__work-reqresp-final.json +attempt,validate-analysis-scrutiny,validate,validation,2026-07-18T00:19:45Z,2026-07-18T00:19:45Z,0.0,,0,0,0,0,0,ambiguous,2.908,2,multiple_time_only_candidates,True,False,True,cleared,2026-07-18T00-19-45Z-0000__validate-analysis-scrutiny.json +attempt,validate-analysis-surface,validate,validation,2026-07-18T00:19:45Z,2026-07-18T00:19:45Z,0.0,,0,0,0,0,0,ambiguous,2.908,2,multiple_time_only_candidates,True,False,True,cleared,2026-07-18T00-19-45Z-0001__validate-analysis-surface.json +decision,007-patch,patch,orchestration,2026-07-18T00:38:28Z,2026-07-18T00:38:28Z,0,,0,0,0,0,0,,,,,,,,,add_tasks=11; add_contracts=1; supersede=1; cancel=0 +attempt,work-freeze-analysis-review-samples,work,other_work,2026-07-18T00:38:38Z,2026-07-18T01:02:48.409000Z,1441.415,session-028,14072165,13856000,35714,9928,14107879,task_id_and_time,4.926,1,not_ambiguous,True,,False,cleared,2026-07-18T00-38-38Z-0000__work-freeze-analysis-review-samples.json +attempt,work-independent-semantic-coder-a,work,manual_semantic_reliability,2026-07-18T01:02:49Z,2026-07-18T01:26:47.855000Z,1429.022,session-030,7087409,6736896,37686,9353,7125095,task_id_and_time,6.156,2,not_ambiguous,True,,False,cleared,2026-07-18T01-02-49Z-0000__work-independent-semantic-coder-a.json +attempt,work-independent-semantic-coder-b,work,manual_semantic_reliability,2026-07-18T01:02:49Z,2026-07-18T01:10:18.066000Z,439.233,session-031,1677811,1569280,10443,3840,1688254,task_id_and_time,6.164,1,not_ambiguous,False,,True,superseded,2026-07-18T01-02-49Z-0001__work-independent-semantic-coder-b.json +attempt,work-manual-reqresp-review-p0,work,manual_semantic_reliability,2026-07-18T01:02:49Z,2026-07-18T01:23:12.356000Z,1212.983,session-032,5834508,5687808,29336,5907,5863844,task_id_and_time,6.314,1,not_ambiguous,False,,True,cleared,2026-07-18T01-02-49Z-0002__work-manual-reqresp-review-p0.json +attempt,work-manual-reqresp-review-p1,work,manual_semantic_reliability,2026-07-18T01:02:49Z,2026-07-18T01:05:38.878000Z,160.044,session-029,426306,356096,3459,741,429765,time_only_unique,6.139,1,not_ambiguous,False,,True,cleared,2026-07-18T01-02-49Z-0003__work-manual-reqresp-review-p1.json +decision,008-patch,patch,orchestration,2026-07-18T01:28:46Z,2026-07-18T01:28:46Z,0,,0,0,0,0,0,,,,,,,,,add_tasks=27; add_contracts=0; supersede=5; cancel=0 +attempt,work-independent-semantic-coder-b-v2,work,manual_semantic_reliability,2026-07-18T01:29:17Z,2026-07-18T01:36:52.537000Z,444.569,session-034,1801496,1681408,12707,3476,1814203,task_id_and_time,6.672,1,not_ambiguous,False,,False,cleared,2026-07-18T01-29-17Z-0000__work-independent-semantic-coder-b-v2.json +attempt,work-refreeze-manual-review-v2,work,manual_semantic_reliability,2026-07-18T01:29:17Z,2026-07-18T01:36:56.513000Z,448.439,session-033,451456,394752,18226,4399,469682,time_only_unique,6.607,1,not_ambiguous,False,,False,cleared,2026-07-18T01-29-17Z-0001__work-refreeze-manual-review-v2.json +decision,009-retry,retry,orchestration,2026-07-18T09:13:51Z,2026-07-18T09:13:51Z,0,,0,0,0,0,0,,,,,,,,,add_tasks=0; add_contracts=0; supersede=0; cancel=0 +attempt,work-independent-semantic-coder-b-v2,work,manual_semantic_reliability,2026-07-18T09:14:02Z,2026-07-18T09:30:30.360000Z,980.256,session-037,2704146,2591232,34078,9867,2738224,task_id_and_time,5.218,2,not_ambiguous,True,,False,cleared,2026-07-18T09-14-02Z-0000__work-independent-semantic-coder-b-v2.json +attempt,work-refreeze-manual-review-v2,work,manual_semantic_reliability,2026-07-18T09:14:02Z,2026-07-18T09:44:02.127000Z,1792.272,session-036,7596787,7443456,39465,9534,7636252,task_id_and_time,5.184,2,not_ambiguous,True,,False,cleared,2026-07-18T09-14-02Z-0001__work-refreeze-manual-review-v2.json +attempt,work-manual-reqresp-review-v2-s00,work,manual_semantic_reliability,2026-07-18T09:44:02Z,2026-07-18T09:44:02Z,0.0,,0,0,0,0,0,ambiguous,3.898,4,multiple_time_only_candidates,True,,False,cleared,2026-07-18T09-44-02Z-0000__work-manual-reqresp-review-v2-s00.json +attempt,work-manual-reqresp-review-v2-s01,work,manual_semantic_reliability,2026-07-18T09:44:02Z,2026-07-18T09:44:02Z,0.0,,0,0,0,0,0,ambiguous,3.898,4,multiple_time_only_candidates,True,,False,cleared,2026-07-18T09-44-02Z-0001__work-manual-reqresp-review-v2-s01.json +attempt,work-manual-reqresp-review-v2-s02,work,manual_semantic_reliability,2026-07-18T09:44:02Z,2026-07-18T09:44:02Z,0.0,,0,0,0,0,0,ambiguous,3.898,4,multiple_time_only_candidates,True,,False,cleared,2026-07-18T09-44-02Z-0002__work-manual-reqresp-review-v2-s02.json +attempt,work-manual-reqresp-review-v2-s03,work,manual_semantic_reliability,2026-07-18T09:44:02Z,2026-07-18T09:44:02Z,0.0,,0,0,0,0,0,ambiguous,3.898,4,multiple_time_only_candidates,True,,False,cleared,2026-07-18T09-44-02Z-0003__work-manual-reqresp-review-v2-s03.json +attempt,work-manual-reqresp-review-v2-s04,work,manual_semantic_reliability,2026-07-18T10:08:35Z,2026-07-18T10:08:35Z,0.0,,0,0,0,0,0,ambiguous,3.69,4,multiple_time_only_candidates,True,,False,cleared,2026-07-18T10-08-35Z-0000__work-manual-reqresp-review-v2-s04.json +attempt,work-manual-reqresp-review-v2-s05,work,manual_semantic_reliability,2026-07-18T10:08:35Z,2026-07-18T10:08:35Z,0.0,,0,0,0,0,0,ambiguous,3.69,4,multiple_time_only_candidates,True,,False,cleared,2026-07-18T10-08-35Z-0001__work-manual-reqresp-review-v2-s05.json +attempt,work-manual-reqresp-review-v2-s06,work,manual_semantic_reliability,2026-07-18T10:08:35Z,2026-07-18T10:08:35Z,0.0,,0,0,0,0,0,ambiguous,3.69,4,multiple_time_only_candidates,True,,False,cleared,2026-07-18T10-08-35Z-0002__work-manual-reqresp-review-v2-s06.json +attempt,work-manual-reqresp-review-v2-s07,work,manual_semantic_reliability,2026-07-18T10:08:35Z,2026-07-18T10:08:35Z,0.0,,0,0,0,0,0,ambiguous,3.69,4,multiple_time_only_candidates,True,,False,cleared,2026-07-18T10-08-35Z-0003__work-manual-reqresp-review-v2-s07.json +attempt,work-manual-reqresp-review-v2-s08,work,manual_semantic_reliability,2026-07-18T10:32:52Z,2026-07-18T10:32:52Z,0.0,,0,0,0,0,0,ambiguous,2.155,4,multiple_time_only_candidates,True,,False,cleared,2026-07-18T10-32-52Z-0000__work-manual-reqresp-review-v2-s08.json +attempt,work-manual-reqresp-review-v2-s09,work,manual_semantic_reliability,2026-07-18T10:32:52Z,2026-07-18T10:32:52Z,0.0,,0,0,0,0,0,ambiguous,2.155,4,multiple_time_only_candidates,True,,False,cleared,2026-07-18T10-32-52Z-0001__work-manual-reqresp-review-v2-s09.json +attempt,work-manual-reqresp-review-v2-s10,work,manual_semantic_reliability,2026-07-18T10:32:52Z,2026-07-18T10:32:52Z,0.0,,0,0,0,0,0,ambiguous,2.155,4,multiple_time_only_candidates,True,,False,cleared,2026-07-18T10-32-52Z-0002__work-manual-reqresp-review-v2-s10.json +attempt,work-manual-reqresp-review-v2-s11,work,manual_semantic_reliability,2026-07-18T10:32:52Z,2026-07-18T10:32:52Z,0.0,,0,0,0,0,0,ambiguous,2.155,4,multiple_time_only_candidates,True,,False,cleared,2026-07-18T10-32-52Z-0003__work-manual-reqresp-review-v2-s11.json +attempt,work-manual-reqresp-review-v2-s12,work,manual_semantic_reliability,2026-07-18T10:55:28Z,2026-07-18T10:55:28Z,0.0,,0,0,0,0,0,ambiguous,3.661,4,multiple_time_only_candidates,True,,False,cleared,2026-07-18T10-55-28Z-0000__work-manual-reqresp-review-v2-s12.json +attempt,work-manual-reqresp-review-v2-s13,work,manual_semantic_reliability,2026-07-18T10:55:28Z,2026-07-18T10:55:28Z,0.0,,0,0,0,0,0,ambiguous,3.661,4,multiple_time_only_candidates,True,,False,cleared,2026-07-18T10-55-28Z-0001__work-manual-reqresp-review-v2-s13.json +attempt,work-manual-reqresp-review-v2-s14,work,manual_semantic_reliability,2026-07-18T10:55:28Z,2026-07-18T10:55:28Z,0.0,,0,0,0,0,0,ambiguous,3.661,4,multiple_time_only_candidates,True,,False,cleared,2026-07-18T10-55-28Z-0002__work-manual-reqresp-review-v2-s14.json +attempt,work-manual-reqresp-review-v2-s15,work,manual_semantic_reliability,2026-07-18T10:55:28Z,2026-07-18T10:55:28Z,0.0,,0,0,0,0,0,ambiguous,3.661,4,multiple_time_only_candidates,True,,False,cleared,2026-07-18T10-55-28Z-0003__work-manual-reqresp-review-v2-s15.json +attempt,work-manual-reqresp-review-v2-s16,work,manual_semantic_reliability,2026-07-18T11:21:44Z,2026-07-18T11:21:44Z,0.0,,0,0,0,0,0,ambiguous,3.976,4,multiple_time_only_candidates,True,,False,cleared,2026-07-18T11-21-44Z-0000__work-manual-reqresp-review-v2-s16.json +attempt,work-manual-reqresp-review-v2-s17,work,manual_semantic_reliability,2026-07-18T11:21:44Z,2026-07-18T11:21:44Z,0.0,,0,0,0,0,0,ambiguous,3.976,4,multiple_time_only_candidates,True,,False,cleared,2026-07-18T11-21-44Z-0001__work-manual-reqresp-review-v2-s17.json +attempt,work-manual-reqresp-review-v2-s18,work,manual_semantic_reliability,2026-07-18T11:21:44Z,2026-07-18T11:21:44Z,0.0,,0,0,0,0,0,ambiguous,3.976,4,multiple_time_only_candidates,True,,False,cleared,2026-07-18T11-21-44Z-0002__work-manual-reqresp-review-v2-s18.json +attempt,work-manual-reqresp-review-v2-s19,work,manual_semantic_reliability,2026-07-18T11:21:44Z,2026-07-18T11:21:44Z,0.0,,0,0,0,0,0,ambiguous,3.976,4,multiple_time_only_candidates,True,,False,cleared,2026-07-18T11-21-44Z-0003__work-manual-reqresp-review-v2-s19.json +attempt,work-manual-reqresp-review-v2-s20,work,manual_semantic_reliability,2026-07-18T11:40:47Z,2026-07-18T11:40:47Z,0.0,,0,0,0,0,0,ambiguous,4.516,4,multiple_time_only_candidates,True,,False,cleared,2026-07-18T11-40-47Z-0000__work-manual-reqresp-review-v2-s20.json +attempt,work-manual-reqresp-review-v2-s21,work,manual_semantic_reliability,2026-07-18T11:40:47Z,2026-07-18T11:40:47Z,0.0,,0,0,0,0,0,ambiguous,4.516,4,multiple_time_only_candidates,True,,False,cleared,2026-07-18T11-40-47Z-0001__work-manual-reqresp-review-v2-s21.json +attempt,work-manual-reqresp-review-v2-s22,work,manual_semantic_reliability,2026-07-18T11:40:47Z,2026-07-18T11:40:47Z,0.0,,0,0,0,0,0,ambiguous,4.516,4,multiple_time_only_candidates,True,,False,cleared,2026-07-18T11-40-47Z-0002__work-manual-reqresp-review-v2-s22.json +attempt,work-manual-reqresp-review-v2-s23,work,manual_semantic_reliability,2026-07-18T11:40:47Z,2026-07-18T11:40:47Z,0.0,,0,0,0,0,0,ambiguous,4.516,4,multiple_time_only_candidates,True,,False,cleared,2026-07-18T11-40-47Z-0003__work-manual-reqresp-review-v2-s23.json +attempt,work-merge-manual-review-v2,work,manual_semantic_reliability,2026-07-18T12:04:25Z,2026-07-18T12:16:31.963000Z,719.529,session-062,4480282,4321792,26350,5572,4506632,task_id_and_time,4.203,1,not_ambiguous,False,,True,superseded,2026-07-18T12-04-25Z-0000__work-merge-manual-review-v2.json +decision,010-patch,patch,orchestration,2026-07-18T12:19:04Z,2026-07-18T12:19:04Z,0,,0,0,0,0,0,,,,,,,,,add_tasks=2; add_contracts=0; supersede=1; cancel=0 +attempt,work-replace-manual-review-v2-s20,work,manual_semantic_reliability,2026-07-18T12:19:22Z,2026-07-18T12:44:29.446000Z,1500.488,session-063,9522701,9280512,49327,9445,9572028,time_only_unique,3.497,1,not_ambiguous,True,,False,cleared,2026-07-18T12-19-22Z-0000__work-replace-manual-review-v2-s20.json +attempt,work-merge-manual-review-v3,work,manual_semantic_reliability,2026-07-18T12:44:30Z,2026-07-18T12:56:38.600000Z,721.798,session-064,2936741,2828544,16905,2345,2953646,time_only_unique,3.616,1,not_ambiguous,True,,False,cleared,2026-07-18T12-44-30Z-0000__work-merge-manual-review-v3.json +attempt,work-adjudicate-analysis-repair,work,manual_semantic_reliability,2026-07-18T12:56:39Z,2026-07-18T13:19:09.153000Z,1345.881,session-065,7192012,6916864,29243,5694,7221255,time_only_unique,2.012,1,not_ambiguous,False,,True,superseded,2026-07-18T12-56-39Z-0000__work-adjudicate-analysis-repair.json +decision,011-patch,patch,orchestration,2026-07-18T13:21:50Z,2026-07-18T13:21:50Z,0,,0,0,0,0,0,,,,,,,,,add_tasks=5; add_contracts=0; supersede=1; cancel=0 +attempt,work-freeze-fresh-semantic-holdout-v3,work,manual_semantic_reliability,2026-07-18T13:22:14Z,2026-07-18T13:39:23.258000Z,1022.276,session-066,6548267,6366720,26188,5871,6574455,task_id_and_time,3.296,1,not_ambiguous,False,,True,superseded,2026-07-18T13-22-14Z-0001__work-freeze-fresh-semantic-holdout-v3.json +attempt,work-reseal-supplement-metadata-v3,work,other_work,2026-07-18T13:22:14Z,2026-07-18T13:36:44.072000Z,862.689,session-067,4466927,4290048,29659,10466,4496586,task_id_and_time,4.035,1,not_ambiguous,True,,False,cleared,2026-07-18T13-22-14Z-0000__work-reseal-supplement-metadata-v3.json +decision,012-patch,patch,orchestration,2026-07-18T13:41:33Z,2026-07-18T13:41:33Z,0,,0,0,0,0,0,,,,,,,,,add_tasks=2; add_contracts=0; supersede=1; cancel=0 +attempt,work-acquire-fresh-jq-reliability-pool-v4,work,analysis,2026-07-18T13:41:40Z,2026-07-18T14:06:39.596000Z,1492.412,session-068,7658079,7468032,33972,6767,7692051,time_only_unique,3.792,1,not_ambiguous,True,,False,cleared,2026-07-18T13-41-40Z-0000__work-acquire-fresh-jq-reliability-pool-v4.json +attempt,work-freeze-fresh-semantic-holdout-v4,work,manual_semantic_reliability,2026-07-18T14:06:40Z,2026-07-18T14:28:01.404000Z,1275.682,session-069,6653302,6352384,32811,6296,6686113,time_only_unique,3.454,1,not_ambiguous,True,,False,cleared,2026-07-18T14-06-40Z-0000__work-freeze-fresh-semantic-holdout-v4.json +attempt,work-independent-semantic-coder-a-v3,work,manual_semantic_reliability,2026-07-18T14:28:02Z,2026-07-18T14:28:02Z,0.0,,0,0,0,0,0,ambiguous,1.965,2,multiple_time_only_candidates,False,,True,superseded,2026-07-18T14-28-02Z-0000__work-independent-semantic-coder-a-v3.json +attempt,work-independent-semantic-coder-b-v3,work,manual_semantic_reliability,2026-07-18T14:28:02Z,2026-07-18T14:28:02Z,0.0,,0,0,0,0,0,ambiguous,1.965,2,multiple_time_only_candidates,False,,True,superseded,2026-07-18T14-28-02Z-0001__work-independent-semantic-coder-b-v3.json +decision,013-patch,patch,orchestration,2026-07-18T14:31:36Z,2026-07-18T14:31:36Z,0,,0,0,0,0,0,,,,,,,,,add_tasks=3; add_contracts=0; supersede=2; cancel=0 +attempt,work-prepare-blind-startup-v4,work,manual_semantic_reliability,2026-07-18T14:31:47Z,2026-07-18T15:09:41.461000Z,2268.071,session-072,7739151,7580160,36979,10044,7776130,task_id_and_time,2.8,1,not_ambiguous,True,,False,cleared,2026-07-18T14-31-47Z-0000__work-prepare-blind-startup-v4.json +attempt,work-independent-semantic-coder-a-v4,work,manual_semantic_reliability,2026-07-18T15:09:42Z,2026-07-18T15:09:42Z,0.0,,0,0,0,0,0,ambiguous,3.771,2,multiple_time_only_candidates,False,,True,superseded,2026-07-18T15-09-42Z-0000__work-independent-semantic-coder-a-v4.json +attempt,work-independent-semantic-coder-b-v4,work,manual_semantic_reliability,2026-07-18T15:09:42Z,2026-07-18T15:09:42Z,0.0,,0,0,0,0,0,ambiguous,3.771,2,multiple_time_only_candidates,False,,True,superseded,2026-07-18T15-09-42Z-0001__work-independent-semantic-coder-b-v4.json +decision,014-patch,patch,orchestration,2026-07-18T15:17:56Z,2026-07-18T15:17:56Z,0,,0,0,0,0,0,,,,,,,,,add_tasks=2; add_contracts=0; supersede=2; cancel=0 +attempt,work-independent-semantic-coder-a-v5,work,manual_semantic_reliability,2026-07-18T15:18:11Z,2026-07-18T15:18:11Z,0.0,,0,0,0,0,0,ambiguous,3.521,2,multiple_time_only_candidates,False,,True,superseded,2026-07-18T15-18-11Z-0000__work-independent-semantic-coder-a-v5.json +attempt,work-independent-semantic-coder-b-v5,work,manual_semantic_reliability,2026-07-18T15:18:11Z,2026-07-18T15:18:11Z,0.0,,0,0,0,0,0,ambiguous,3.521,2,multiple_time_only_candidates,False,,True,superseded,2026-07-18T15-18-11Z-0001__work-independent-semantic-coder-b-v5.json +decision,015-patch,patch,orchestration,2026-07-18T15:20:48Z,2026-07-18T15:20:48Z,0,,0,0,0,0,0,,,,,,,,,add_tasks=3; add_contracts=0; supersede=2; cancel=0 +attempt,work-prepare-blind-startup-v5,work,manual_semantic_reliability,2026-07-18T15:21:00Z,2026-07-18T15:33:58.471000Z,772.57,session-077,2734596,2624256,21352,4477,2755948,task_id_and_time,3.658,1,not_ambiguous,True,,False,cleared,2026-07-18T15-21-00Z-0000__work-prepare-blind-startup-v5.json +attempt,work-independent-semantic-coder-a-v6,work,manual_semantic_reliability,2026-07-18T15:33:59Z,2026-07-18T15:33:59Z,0.0,,0,0,0,0,0,ambiguous,1.733,2,multiple_time_only_candidates,True,,False,cleared,2026-07-18T15-33-59Z-0000__work-independent-semantic-coder-a-v6.json +attempt,work-independent-semantic-coder-b-v6,work,manual_semantic_reliability,2026-07-18T15:33:59Z,2026-07-18T15:33:59Z,0.0,,0,0,0,0,0,ambiguous,1.733,2,multiple_time_only_candidates,False,,False,superseded,2026-07-18T15-33-59Z-0001__work-independent-semantic-coder-b-v6.json +decision,016-retry,retry,orchestration,2026-07-18T16:33:31Z,2026-07-18T16:33:31Z,0,,0,0,0,0,0,,,,,,,,,add_tasks=0; add_contracts=0; supersede=0; cancel=0 +attempt,work-independent-semantic-coder-b-v6,work,manual_semantic_reliability,2026-07-18T16:33:40Z,2026-07-18T16:35:44.692000Z,118.248,session-080,235663,186880,3178,924,238841,time_only_unique,3.215,1,not_ambiguous,False,,True,superseded,2026-07-18T16-33-40Z-0000__work-independent-semantic-coder-b-v6.json +decision,017-patch,patch,orchestration,2026-07-18T16:36:35Z,2026-07-18T16:36:35Z,0,,0,0,0,0,0,,,,,,,,,add_tasks=2; add_contracts=0; supersede=1; cancel=0 +attempt,work-prepare-blind-startup-b-v6,work,manual_semantic_reliability,2026-07-18T16:36:44Z,2026-07-18T16:45:45.439000Z,534.88,session-081,1643408,1552384,17032,3842,1660440,task_id_and_time,3.843,1,not_ambiguous,True,,False,cleared,2026-07-18T16-36-44Z-0000__work-prepare-blind-startup-b-v6.json +attempt,work-independent-semantic-coder-b-v7,work,manual_semantic_reliability,2026-07-18T16:45:46Z,2026-07-18T16:49:26.688000Z,213.031,session-082,631058,570880,5478,1913,636536,time_only_unique,3.023,1,not_ambiguous,False,,True,superseded,2026-07-18T16-45-46Z-0000__work-independent-semantic-coder-b-v7.json +decision,018-patch,patch,orchestration,2026-07-18T16:50:19Z,2026-07-18T16:50:19Z,0,,0,0,0,0,0,,,,,,,,,add_tasks=2; add_contracts=0; supersede=1; cancel=0 +attempt,work-prepare-blind-startup-b-v7,work,manual_semantic_reliability,2026-07-18T16:50:32Z,2026-07-18T17:02:39.909000Z,722.973,session-083,3456608,3335424,24644,6642,3481252,task_id_and_time,2.691,1,not_ambiguous,True,,False,cleared,2026-07-18T16-50-32Z-0000__work-prepare-blind-startup-b-v7.json +attempt,work-independent-semantic-coder-b-v8,work,manual_semantic_reliability,2026-07-18T17:02:40Z,2026-07-18T17:18:58.703000Z,973.561,session-084,2637195,2517760,29022,8697,2666217,time_only_unique,1.901,1,not_ambiguous,True,,False,cleared,2026-07-18T17-02-40Z-0000__work-independent-semantic-coder-b-v8.json +attempt,work-adjudicate-analysis-repair-v3,work,manual_semantic_reliability,2026-07-18T17:18:59Z,2026-07-18T17:39:40.633000Z,1235.211,session-085,9857300,9651968,31709,6668,9889009,time_only_unique,3.212,1,not_ambiguous,False,,True,superseded,2026-07-18T17-18-59Z-0000__work-adjudicate-analysis-repair-v3.json +decision,019-patch,patch,orchestration,2026-07-18T17:42:10Z,2026-07-18T17:42:10Z,0,,0,0,0,0,0,,,,,,,,,add_tasks=4; add_contracts=0; supersede=1; cancel=0 +attempt,work-freeze-affected-recode-v5,work,manual_semantic_reliability,2026-07-18T17:42:19Z,2026-07-18T17:58:09.841000Z,942.959,session-086,2423073,2310400,31515,6781,2454588,task_id_and_time,3.404,1,not_ambiguous,True,,False,cleared,2026-07-18T17-42-19Z-0000__work-freeze-affected-recode-v5.json +attempt,work-independent-affected-recoder-a-v1,work,manual_semantic_reliability,2026-07-18T17:58:10Z,2026-07-18T17:58:10Z,0.0,,0,0,0,0,0,ambiguous,3.461,2,multiple_time_only_candidates,False,,True,superseded,2026-07-18T17-58-10Z-0000__work-independent-affected-recoder-a-v1.json +attempt,work-independent-affected-recoder-b-v1,work,manual_semantic_reliability,2026-07-18T17:58:10Z,2026-07-18T17:58:10Z,0.0,,0,0,0,0,0,ambiguous,3.461,2,multiple_time_only_candidates,False,,True,superseded,2026-07-18T17-58-10Z-0001__work-independent-affected-recoder-b-v1.json +decision,020-patch,patch,orchestration,2026-07-18T18:08:45Z,2026-07-18T18:08:45Z,0,,0,0,0,0,0,,,,,,,,,add_tasks=3; add_contracts=0; supersede=2; cancel=0 +attempt,work-reissue-affected-recode-packets-v6,work,manual_semantic_reliability,2026-07-18T18:09:05Z,2026-07-18T18:26:37.957000Z,1044.946,session-089,3751098,3623424,28045,6577,3779143,task_id_and_time,2.824,1,not_ambiguous,True,,False,cleared,2026-07-18T18-09-05Z-0000__work-reissue-affected-recode-packets-v6.json +attempt,work-independent-affected-recoder-a-v2,work,manual_semantic_reliability,2026-07-18T18:26:38Z,2026-07-18T18:26:38Z,0.0,,0,0,0,0,0,ambiguous,4.035,2,multiple_time_only_candidates,False,,True,superseded,2026-07-18T18-26-38Z-0000__work-independent-affected-recoder-a-v2.json +attempt,work-independent-affected-recoder-b-v2,work,manual_semantic_reliability,2026-07-18T18:26:38Z,2026-07-18T18:26:38Z,0.0,,0,0,0,0,0,ambiguous,4.035,2,multiple_time_only_candidates,False,,True,superseded,2026-07-18T18-26-38Z-0001__work-independent-affected-recoder-b-v2.json +decision,021-retry,retry,orchestration,2026-07-18T18:43:37Z,2026-07-18T18:43:37Z,0,,0,0,0,0,0,,,,,,,,,add_tasks=0; add_contracts=0; supersede=0; cancel=0 +attempt,work-independent-affected-recoder-a-v2,work,manual_semantic_reliability,2026-07-18T18:43:45Z,2026-07-18T18:43:45Z,0.0,,0,0,0,0,0,ambiguous,3.674,2,multiple_time_only_candidates,False,,False,superseded,2026-07-18T18-43-45Z-0000__work-independent-affected-recoder-a-v2.json +attempt,work-independent-affected-recoder-b-v2,work,manual_semantic_reliability,2026-07-18T18:43:45Z,2026-07-18T18:43:45Z,0.0,,0,0,0,0,0,ambiguous,3.674,2,multiple_time_only_candidates,False,,True,superseded,2026-07-18T18-43-45Z-0001__work-independent-affected-recoder-b-v2.json +decision,022-patch,patch,orchestration,2026-07-18T19:03:56Z,2026-07-18T19:03:56Z,0,,0,0,0,0,0,,,,,,,,,add_tasks=3; add_contracts=0; supersede=2; cancel=0 +attempt,work-reissue-affected-recode-programmatic-v7,work,manual_semantic_reliability,2026-07-18T19:04:04Z,2026-07-18T19:20:07.423000Z,956.856,session-094,3333219,3190784,34678,8496,3367897,task_id_and_time,3.389,1,not_ambiguous,True,,False,cleared,2026-07-18T19-04-04Z-0000__work-reissue-affected-recode-programmatic-v7.json +attempt,work-independent-affected-code-a-v1,work,other_work,2026-07-18T19:20:08Z,2026-07-18T19:20:08Z,0.0,,0,0,0,0,0,ambiguous,2.687,2,multiple_time_only_candidates,False,,True,superseded,2026-07-18T19-20-08Z-0000__work-independent-affected-code-a-v1.json +attempt,work-independent-affected-code-b-v1,work,other_work,2026-07-18T19:20:08Z,2026-07-18T19:20:08Z,0.0,,0,0,0,0,0,ambiguous,2.687,2,multiple_time_only_candidates,True,,False,cleared,2026-07-18T19-20-08Z-0001__work-independent-affected-code-b-v1.json +decision,023-patch,patch,orchestration,2026-07-18T19:47:18Z,2026-07-18T19:47:18Z,0,,0,0,0,0,0,,,,,,,,,add_tasks=2; add_contracts=0; supersede=1; cancel=0 +attempt,work-reissue-affected-code-a-v8,work,other_work,2026-07-18T19:47:42Z,2026-07-18T19:56:14.537000Z,506.049,session-097,1516927,1419776,17634,4140,1534561,task_id_and_time,3.317,1,not_ambiguous,True,,False,cleared,2026-07-18T19-47-42Z-0000__work-reissue-affected-code-a-v8.json +attempt,work-independent-affected-code-a-v2,work,other_work,2026-07-18T19:56:15Z,2026-07-18T20:20:10.919000Z,1429.729,session-098,4335712,4204288,34297,5384,4370009,time_only_unique,3.055,1,not_ambiguous,True,,False,cleared,2026-07-18T19-56-15Z-0000__work-independent-affected-code-a-v2.json +attempt,work-adjudicate-analysis-repair-v5,work,manual_semantic_reliability,2026-07-18T20:20:11Z,2026-07-18T20:41:20.286000Z,1262.491,session-099,8863034,8679168,28741,3958,8891775,time_only_unique,3.571,1,not_ambiguous,False,,True,superseded,2026-07-18T20-20-11Z-0000__work-adjudicate-analysis-repair-v5.json +decision,024-patch,patch,orchestration,2026-07-18T20:48:12Z,2026-07-18T20:48:12Z,0,,0,0,0,0,0,,,,,,,,,add_tasks=12; add_contracts=6; supersede=12; cancel=0 +attempt,work-finalize-analysis-failclosed,work,fail_closed_analysis_repair,2026-07-18T20:48:35Z,2026-07-18T21:07:08.311000Z,1106.65,session-100,6157550,6009856,20169,3827,6177719,time_only_unique,3.444,1,not_ambiguous,True,,False,cleared,2026-07-18T20-48-35Z-0000__work-finalize-analysis-failclosed.json +attempt,validate-analysis-failclosed-scrutiny,validate,validation,2026-07-18T21:07:08Z,2026-07-18T21:07:08Z,0.0,,0,0,0,0,0,ambiguous,4.25,2,multiple_time_only_candidates,True,False,False,cleared,2026-07-18T21-07-08Z-0000__validate-analysis-failclosed-scrutiny.json +attempt,validate-analysis-failclosed-surface,validate,validation,2026-07-18T21:07:08Z,2026-07-18T21:07:08Z,0.0,,0,0,0,0,0,ambiguous,4.25,2,multiple_time_only_candidates,False,False,False,cleared,2026-07-18T21-07-08Z-0001__validate-analysis-failclosed-surface.json +decision,025-patch,patch,orchestration,2026-07-18T21:26:44Z,2026-07-18T21:26:44Z,0,,0,0,0,0,0,,,,,,,,,add_tasks=4; add_contracts=0; supersede=1; cancel=0 +attempt,work-repair-analysis-failclosed-schema,work,fail_closed_analysis_repair,2026-07-18T21:27:06Z,2026-07-18T21:51:02.336000Z,1429.028,session-103,6126905,5979648,32104,7564,6159009,task_id_and_time,4.023,1,not_ambiguous,True,,False,cleared,2026-07-18T21-27-06Z-0000__work-repair-analysis-failclosed-schema.json +attempt,validate-analysis-failclosed-schema-scrutiny,validate,validation,2026-07-18T21:51:03Z,2026-07-18T21:51:03Z,0.0,,0,0,0,0,0,ambiguous,3.517,2,multiple_time_only_candidates,True,False,False,cleared,2026-07-18T21-51-03Z-0000__validate-analysis-failclosed-schema-scrutiny.json +attempt,validate-analysis-failclosed-schema-surface,validate,validation,2026-07-18T21:51:03Z,2026-07-18T21:51:03Z,0.0,,0,0,0,0,0,ambiguous,3.517,2,multiple_time_only_candidates,True,False,True,cleared,2026-07-18T21-51-03Z-0001__validate-analysis-failclosed-schema-surface.json +decision,026-patch,patch,orchestration,2026-07-18T22:12:21Z,2026-07-18T22:12:21Z,0,,0,0,0,0,0,,,,,,,,,add_tasks=4; add_contracts=0; supersede=1; cancel=0 +attempt,work-repair-analysis-failclosed-values-v3,work,fail_closed_analysis_repair,2026-07-18T22:12:43Z,2026-07-18T23:03:55.985000Z,3066.199,session-106,22488194,22078464,40526,7028,22528720,task_id_and_time,2.712,1,not_ambiguous,True,,False,cleared,2026-07-18T22-12-43Z-0000__work-repair-analysis-failclosed-values-v3.json +attempt,validate-analysis-failclosed-values-scrutiny,validate,validation,2026-07-18T23:03:56Z,2026-07-18T23:03:56Z,0.0,,0,0,0,0,0,ambiguous,3.474,2,multiple_time_only_candidates,False,False,False,cleared,2026-07-18T23-03-56Z-0000__validate-analysis-failclosed-values-scrutiny.json +attempt,validate-analysis-failclosed-values-surface,validate,validation,2026-07-18T23:03:56Z,2026-07-18T23:03:56Z,0.0,,0,0,0,0,0,ambiguous,3.474,2,multiple_time_only_candidates,True,False,True,cleared,2026-07-18T23-03-56Z-0001__validate-analysis-failclosed-values-surface.json +decision,027-patch,patch,orchestration,2026-07-18T23:32:44Z,2026-07-18T23:32:44Z,0,,0,0,0,0,0,,,,,,,,,add_tasks=4; add_contracts=0; supersede=1; cancel=0 +attempt,work-repair-analysis-failclosed-narrative-v4,work,fail_closed_analysis_repair,2026-07-18T23:33:10Z,2026-07-19T01:01:32.760000Z,5296.208,session-109,27302247,26912768,32786,5774,27335033,time_only_unique,3.083,1,not_ambiguous,True,,False,cleared,2026-07-18T23-33-10Z-0000__work-repair-analysis-failclosed-narrative-v4.json +attempt,validate-analysis-failclosed-narrative-scrutiny,validate,validation,2026-07-19T01:01:33Z,2026-07-19T01:01:33Z,0.0,,0,0,0,0,0,ambiguous,3.287,2,multiple_time_only_candidates,True,False,False,cleared,2026-07-19T01-01-33Z-0000__validate-analysis-failclosed-narrative-scrutiny.json +attempt,validate-analysis-failclosed-narrative-surface,validate,validation,2026-07-19T01:01:33Z,2026-07-19T01:01:33Z,0.0,,0,0,0,0,0,ambiguous,3.287,2,multiple_time_only_candidates,True,False,True,cleared,2026-07-19T01-01-33Z-0001__validate-analysis-failclosed-narrative-surface.json +decision,028-patch,patch,orchestration,2026-07-19T02:09:29Z,2026-07-19T02:09:29Z,0,,0,0,0,0,0,,,,,,,,,add_tasks=4; add_contracts=0; supersede=1; cancel=0 +attempt,work-repair-analysis-failclosed-inventory-v5,work,fail_closed_analysis_repair,2026-07-19T02:09:58Z,2026-07-19T02:48:49.330000Z,2323.639,session-112,13520206,13309184,46138,14277,13566344,task_id_and_time,3.522,1,not_ambiguous,True,,False,cleared,2026-07-19T02-09-58Z-0000__work-repair-analysis-failclosed-inventory-v5.json +attempt,validate-analysis-failclosed-inventory-scrutiny,validate,validation,2026-07-19T02:48:49Z,2026-07-19T02:48:49Z,0.0,,0,0,0,0,0,ambiguous,3.981,2,multiple_time_only_candidates,True,True,False,cleared,2026-07-19T02-48-49Z-0000__validate-analysis-failclosed-inventory-scrutiny.json +attempt,validate-analysis-failclosed-inventory-surface,validate,validation,2026-07-19T02:48:49Z,2026-07-19T02:48:49Z,0.0,,0,0,0,0,0,ambiguous,3.981,2,multiple_time_only_candidates,True,True,False,cleared,2026-07-19T02-48-49Z-0001__validate-analysis-failclosed-inventory-surface.json +decision,029-continue,continue,orchestration,2026-07-19T03:19:35Z,2026-07-19T03:19:35Z,0,,0,0,0,0,0,,,,,,,,,add_tasks=0; add_contracts=0; supersede=0; cancel=0 +attempt,work-compare-jq-descriptive,work,analysis,2026-07-19T03:20:03Z,2026-07-19T03:34:11.051000Z,841.19,session-116,5275469,5112832,29747,5861,5305216,task_id_and_time,3.551,2,not_ambiguous,True,,False,cleared,2026-07-19T03-20-03Z-0001__work-compare-jq-descriptive.json +attempt,work-compare-ops-descriptive,work,analysis,2026-07-19T03:20:03Z,2026-07-19T03:44:11.698000Z,1441.952,session-117,9347658,9143296,38049,7819,9385707,task_id_and_time,3.632,1,not_ambiguous,True,,False,cleared,2026-07-19T03-20-03Z-0002__work-compare-ops-descriptive.json +attempt,work-compare-tokens-descriptive,work,analysis,2026-07-19T03:20:03Z,2026-07-19T03:30:27.332000Z,614.58,session-118,3198848,3059712,19415,2786,3218263,task_id_and_time,4.118,1,not_ambiguous,True,,False,cleared,2026-07-19T03-20-03Z-0003__work-compare-tokens-descriptive.json +attempt,work-compare-tools-descriptive,work,analysis,2026-07-19T03:20:03Z,2026-07-19T03:32:40.573000Z,750.548,session-115,6761199,6593792,20118,3059,6781317,task_id_and_time,3.41,3,not_ambiguous,True,,False,cleared,2026-07-19T03-20-03Z-0000__work-compare-tools-descriptive.json +attempt,work-synthesis-report-failclosed,work,report_provenance_repair,2026-07-19T03:44:12Z,2026-07-19T04:03:10.282000Z,1131.946,session-119,8034087,7811072,40375,7516,8074462,time_only_unique,3.222,1,not_ambiguous,False,,True,superseded,2026-07-19T03-44-12Z-0000__work-synthesis-report-failclosed.json +decision,030-patch,patch,orchestration,2026-07-19T04:04:09Z,2026-07-19T04:04:09Z,0,,0,0,0,0,0,,,,,,,,,add_tasks=5; add_contracts=0; supersede=4; cancel=0 +attempt,work-preserve-original-report-failures,work,report_provenance_repair,2026-07-19T04:04:38Z,2026-07-19T04:18:09.882000Z,807.227,session-120,3973046,3831296,25682,5201,3998728,task_id_and_time,2.371,1,not_ambiguous,True,,False,cleared,2026-07-19T04-04-38Z-0000__work-preserve-original-report-failures.json +attempt,work-finalize-report-failclosed-v2,work,report_provenance_repair,2026-07-19T04:18:10Z,2026-07-19T04:30:42.420000Z,746.003,session-121,3736271,3590144,19181,4736,3755452,time_only_unique,3.167,1,not_ambiguous,True,,False,cleared,2026-07-19T04-18-10Z-0000__work-finalize-report-failclosed-v2.json +attempt,validate-report-failclosed-v2-scrutiny,validate,validation,2026-07-19T04:30:43Z,2026-07-19T04:30:43Z,0.0,,0,0,0,0,0,ambiguous,1.764,2,multiple_time_only_candidates,False,False,False,cleared,2026-07-19T04-30-43Z-0000__validate-report-failclosed-v2-scrutiny.json +attempt,validate-report-failclosed-v2-surface,validate,validation,2026-07-19T04:30:43Z,2026-07-19T04:30:43Z,0.0,,0,0,0,0,0,ambiguous,1.764,2,multiple_time_only_candidates,False,False,False,cleared,2026-07-19T04-30-43Z-0001__validate-report-failclosed-v2-surface.json +decision,031-patch,patch,orchestration,2026-07-19T09:37:46Z,2026-07-19T09:37:46Z,0,,0,0,0,0,0,,,,,,,,,add_tasks=3; add_contracts=0; supersede=1; cancel=0 +attempt,validate-report-failclosed-v3-scrutiny,validate,validation,2026-07-19T09:37:57Z,2026-07-19T09:37:57Z,0.0,,0,0,0,0,0,ambiguous,4.43,2,multiple_time_only_candidates,True,False,True,cleared,2026-07-19T09-37-57Z-0000__validate-report-failclosed-v3-scrutiny.json +attempt,validate-report-failclosed-v3-surface,validate,validation,2026-07-19T09:37:57Z,2026-07-19T09:37:57Z,0.0,,0,0,0,0,0,ambiguous,4.43,2,multiple_time_only_candidates,True,False,True,cleared,2026-07-19T09-37-57Z-0001__validate-report-failclosed-v3-surface.json +decision,032-patch,patch,orchestration,2026-07-19T09:53:06Z,2026-07-19T09:53:06Z,0,,0,0,0,0,0,,,,,,,,,add_tasks=5; add_contracts=0; supersede=1; cancel=0 +attempt,work-repair-tools-jq-runtime-facets-v4,work,analysis,2026-07-19T09:53:15Z,2026-07-19T10:24:01.734000Z,1840.162,session-126,13636311,13418752,40863,7220,13677174,time_only_unique,2.676,1,not_ambiguous,True,,False,cleared,2026-07-19T09-53-15Z-0000__work-repair-tools-jq-runtime-facets-v4.json +attempt,work-rebuild-final-report-runtime-facets-v4,work,report_provenance_repair,2026-07-19T10:24:02Z,2026-07-19T10:46:21.510000Z,1333.137,session-127,10598076,10386944,34877,7854,10632953,time_only_unique,3.111,1,not_ambiguous,True,,False,cleared,2026-07-19T10-24-02Z-0000__work-rebuild-final-report-runtime-facets-v4.json +attempt,validate-report-failclosed-v4-scrutiny,validate,validation,2026-07-19T10:46:22Z,2026-07-19T10:46:22Z,0.0,,0,0,0,0,0,ambiguous,3.041,2,multiple_time_only_candidates,True,False,True,cleared,2026-07-19T10-46-22Z-0000__validate-report-failclosed-v4-scrutiny.json +attempt,validate-report-failclosed-v4-surface,validate,validation,2026-07-19T10:46:22Z,2026-07-19T10:46:22Z,0.0,,0,0,0,0,0,ambiguous,3.041,2,multiple_time_only_candidates,True,False,True,cleared,2026-07-19T10-46-22Z-0001__validate-report-failclosed-v4-surface.json +decision,033-patch,patch,orchestration,2026-07-19T11:11:40Z,2026-07-19T11:11:40Z,0,,0,0,0,0,0,,,,,,,,,add_tasks=4; add_contracts=0; supersede=1; cancel=0 +attempt,work-reconcile-token-contract-report-v5,work,report_provenance_repair,2026-07-19T11:12:01Z,2026-07-19T11:23:35.349000Z,686.67,session-130,5321700,5178624,20306,3093,5342006,time_only_unique,4.284,1,not_ambiguous,True,,False,cleared,2026-07-19T11-12-01Z-0000__work-reconcile-token-contract-report-v5.json +attempt,validate-report-failclosed-v5-scrutiny,validate,validation,2026-07-19T11:23:36Z,2026-07-19T11:23:36Z,0.0,,0,0,0,0,0,ambiguous,3.26,2,multiple_time_only_candidates,True,True,False,cleared,2026-07-19T11-23-36Z-0000__validate-report-failclosed-v5-scrutiny.json +attempt,validate-report-failclosed-v5-surface,validate,validation,2026-07-19T11:23:36Z,2026-07-19T11:23:36Z,0.0,,0,0,0,0,0,ambiguous,3.26,2,multiple_time_only_candidates,True,True,False,cleared,2026-07-19T11-23-36Z-0001__validate-report-failclosed-v5-surface.json +decision,034-patch,patch,orchestration,2026-07-19T11:42:21Z,2026-07-19T11:42:21Z,0,,0,0,0,0,0,,,,,,,,,add_tasks=4; add_contracts=4; supersede=1; cancel=0 +attempt,work-bind-repaired-assertions-v6,work,report_provenance_repair,2026-07-19T11:42:30Z,2026-07-19T12:02:16.064000Z,1178.71,session-133,8802060,8614400,31519,6072,8833579,time_only_unique,4.178,1,not_ambiguous,True,,False,cleared,2026-07-19T11-42-30Z-0000__work-bind-repaired-assertions-v6.json +attempt,validate-report-failclosed-v6-scrutiny,validate,validation,2026-07-19T12:02:16Z,2026-07-19T12:02:16Z,0.0,,0,0,0,0,0,ambiguous,3.807,2,multiple_time_only_candidates,True,False,True,cleared,2026-07-19T12-02-16Z-0000__validate-report-failclosed-v6-scrutiny.json +attempt,validate-report-failclosed-v6-surface,validate,validation,2026-07-19T12:02:16Z,2026-07-19T12:02:16Z,0.0,,0,0,0,0,0,ambiguous,3.807,2,multiple_time_only_candidates,True,True,False,cleared,2026-07-19T12-02-16Z-0001__validate-report-failclosed-v6-surface.json +decision,035-patch,patch,orchestration,2026-07-19T12:25:45Z,2026-07-19T12:25:45Z,0,,0,0,0,0,0,,,,,,,,,add_tasks=4; add_contracts=4; supersede=1; cancel=0 +attempt,work-bind-regression-provenance-r3-v7,work,report_provenance_repair,2026-07-19T12:25:58Z,2026-07-19T12:44:15.971000Z,1090.291,session-136,5998179,5835520,32817,6980,6030996,time_only_unique,3.211,1,not_ambiguous,True,,False,cleared,2026-07-19T12-25-58Z-0000__work-bind-regression-provenance-r3-v7.json +attempt,validate-report-failclosed-v7-scrutiny,validate,validation,2026-07-19T12:44:16Z,2026-07-19T12:44:16Z,0.0,,0,0,0,0,0,ambiguous,2.482,2,multiple_time_only_candidates,True,False,True,cleared,2026-07-19T12-44-16Z-0000__validate-report-failclosed-v7-scrutiny.json +attempt,validate-report-failclosed-v7-surface,validate,validation,2026-07-19T12:44:16Z,2026-07-19T12:44:16Z,0.0,,0,0,0,0,0,ambiguous,2.482,2,multiple_time_only_candidates,True,True,False,cleared,2026-07-19T12-44-16Z-0001__validate-report-failclosed-v7-surface.json +decision,036-patch,patch,orchestration,2026-07-19T13:07:41Z,2026-07-19T13:07:41Z,0,,0,0,0,0,0,,,,,,,,,add_tasks=5; add_contracts=5; supersede=1; cancel=0 +attempt,work-freeze-typed-failure-lineage-v8,work,report_provenance_repair,2026-07-19T13:07:53Z,2026-07-19T13:18:35.425000Z,635.396,session-139,3120715,2971392,23591,3092,3144306,task_id_and_time,3.267,1,not_ambiguous,True,,False,cleared,2026-07-19T13-07-53Z-0000__work-freeze-typed-failure-lineage-v8.json +attempt,work-bind-r4-report-v8,work,report_provenance_repair,2026-07-19T13:18:36Z,2026-07-19T13:39:59.725000Z,1277.347,session-140,9092545,8899328,29764,4888,9122309,time_only_unique,3.232,1,not_ambiguous,True,,False,cleared,2026-07-19T13-18-36Z-0000__work-bind-r4-report-v8.json +attempt,validate-report-failclosed-v8-scrutiny,validate,validation,2026-07-19T13:40:00Z,2026-07-19T13:40:00Z,0.0,,0,0,0,0,0,ambiguous,2.272,2,multiple_time_only_candidates,True,False,True,cleared,2026-07-19T13-40-00Z-0000__validate-report-failclosed-v8-scrutiny.json +attempt,validate-report-failclosed-v8-surface,validate,validation,2026-07-19T13:40:00Z,2026-07-19T13:40:00Z,0.0,,0,0,0,0,0,ambiguous,2.272,2,multiple_time_only_candidates,True,False,True,cleared,2026-07-19T13-40-00Z-0001__validate-report-failclosed-v8-surface.json +decision,037-patch,patch,orchestration,2026-07-19T14:06:34Z,2026-07-19T14:06:34Z,0,,0,0,0,0,0,,,,,,,,,add_tasks=5; add_contracts=5; supersede=1; cancel=0 +attempt,work-reconstruct-phase-correct-history-v9,work,report_provenance_repair,2026-07-19T14:07:04Z,2026-07-19T14:19:57.227000Z,764.454,session-143,2018382,1881856,32979,4366,2051361,task_id_and_time,4.536,1,not_ambiguous,True,,False,cleared,2026-07-19T14-07-04Z-0000__work-reconstruct-phase-correct-history-v9.json +attempt,work-bind-r5-report-links-v9,work,report_provenance_repair,2026-07-19T14:19:57Z,2026-07-19T14:43:02.978000Z,1378.441,session-144,8635265,8436480,38030,7502,8673295,time_only_unique,4.572,1,not_ambiguous,True,,False,cleared,2026-07-19T14-19-57Z-0000__work-bind-r5-report-links-v9.json +attempt,validate-report-failclosed-v9-scrutiny,validate,validation,2026-07-19T14:43:03Z,2026-07-19T14:43:03Z,0.0,,0,0,0,0,0,ambiguous,3.863,2,multiple_time_only_candidates,True,True,False,cleared,2026-07-19T14-43-03Z-0000__validate-report-failclosed-v9-scrutiny.json +attempt,validate-report-failclosed-v9-surface,validate,validation,2026-07-19T14:43:03Z,2026-07-19T14:43:03Z,0.0,,0,0,0,0,0,ambiguous,3.863,2,multiple_time_only_candidates,True,True,False,cleared,2026-07-19T14-43-03Z-0001__validate-report-failclosed-v9-surface.json +decision,038-continue,continue,orchestration,2026-07-19T15:11:19Z,2026-07-19T15:11:19Z,0,,0,0,0,0,0,,,,,,,,,add_tasks=0; add_contracts=0; supersede=0; cancel=0 +terminal_review,2026-07-19T15-11-46Z,terminal_review,terminal_review,2026-07-19T15:11:46Z,2026-07-19T15:19:42.235000Z,467.068,session-147,2906708,2752768,9874,4263,2916582,task_id_and_time,3.841,1,not_ambiguous,False,,True,mission_running,Fresh-context reviewer; mission artifacts forbidden by reviewer prompt. +decision,039-continue,continue,orchestration,2026-07-19T15:20:39Z,2026-07-19T15:20:39Z,0,,0,0,0,0,0,,,,,,,,,add_tasks=0; add_contracts=0; supersede=0; cancel=0 +terminal_review,2026-07-19T15-21-06Z,terminal_review,terminal_review,2026-07-19T15:21:06Z,2026-07-19T15:27:20.864000Z,366.862,session-148,1777028,1658880,9359,3879,1786387,task_id_and_time,4.386,1,not_ambiguous,False,,True,mission_running,Fresh-context reviewer; mission artifacts forbidden by reviewer prompt. +decision,040-continue,continue,orchestration,2026-07-19T15:28:11Z,2026-07-19T15:28:11Z,0,,0,0,0,0,0,,,,,,,,,add_tasks=0; add_contracts=0; supersede=0; cancel=0 +terminal_review,2026-07-19T15-28-32Z,terminal_review,terminal_review,2026-07-19T15:28:32Z,2026-07-19T15:35:39.273000Z,417.927,session-149,2179462,2043648,7246,2209,2186708,time_only_unique,4.827,1,not_ambiguous,False,,True,mission_running,Fresh-context reviewer; mission artifacts forbidden by reviewer prompt. +decision,041-continue,continue,orchestration,2026-07-19T15:36:09Z,2026-07-19T15:36:09Z,0,,0,0,0,0,0,,,,,,,,,add_tasks=0; add_contracts=0; supersede=0; cancel=0 diff --git a/research/2026-07-production-log-mission/generated/idle_gaps.csv b/research/2026-07-production-log-mission/generated/idle_gaps.csv new file mode 100644 index 0000000..34e91d0 --- /dev/null +++ b/research/2026-07-production-log-mission/generated/idle_gaps.csv @@ -0,0 +1,62 @@ +start_utc,end_utc,duration_seconds +2026-07-18T01:36:56.513000Z,2026-07-18T09:14:09.855000Z,27433.342 +2026-07-19T04:30:42.420000Z,2026-07-19T09:53:21.572000Z,19359.152 +2026-07-18T09:44:02.127000Z,2026-07-18T12:04:32.434000Z,8430.307 +2026-07-17T13:03:45Z,2026-07-17T14:51:13.123000Z,6448.123 +2026-07-17T15:45:27.572000Z,2026-07-17T17:21:47.530000Z,5779.958 +2026-07-19T01:01:32.760000Z,2026-07-19T02:10:05.691000Z,4112.931 +2026-07-18T15:33:58.471000Z,2026-07-18T16:33:46.444000Z,3587.973 +2026-07-18T18:26:37.957000Z,2026-07-18T19:04:10.567000Z,2252.61 +2026-07-19T02:48:49.330000Z,2026-07-19T03:20:09.746000Z,1880.416 +2026-07-18T23:03:55.985000Z,2026-07-18T23:33:16.552000Z,1760.567 +2026-07-19T14:43:02.978000Z,2026-07-19T15:11:55.167000Z,1732.189 +2026-07-18T19:20:07.423000Z,2026-07-18T19:47:48.488000Z,1661.065 +2026-07-19T13:39:59.725000Z,2026-07-19T14:07:12.773000Z,1633.048 +2026-07-17T20:39:09.471000Z,2026-07-17T21:05:59.627000Z,1610.156 +2026-07-19T10:46:21.510000Z,2026-07-19T11:12:08.679000Z,1547.169 +2026-07-19T12:02:16.064000Z,2026-07-19T12:26:05.680000Z,1429.616 +2026-07-19T12:44:15.971000Z,2026-07-19T13:08:00.029000Z,1424.058 +2026-07-18T21:51:02.336000Z,2026-07-18T22:12:49.786000Z,1307.45 +2026-07-18T21:07:08.311000Z,2026-07-18T21:27:13.308000Z,1204.997 +2026-07-18T00:19:27.181000Z,2026-07-18T00:38:46.994000Z,1159.813 +2026-07-19T11:23:35.349000Z,2026-07-19T11:42:37.354000Z,1142.005 +2026-07-17T15:22:53.624000Z,2026-07-17T15:37:55.263000Z,901.639 +2026-07-17T21:27:39.855000Z,2026-07-17T21:41:52.811000Z,852.956 +2026-07-18T15:09:41.461000Z,2026-07-18T15:21:05.901000Z,684.44 +2026-07-18T17:58:09.841000Z,2026-07-18T18:09:13.011000Z,663.17 +2026-07-17T21:50:18.888000Z,2026-07-17T22:00:56.806000Z,637.918 +2026-07-18T20:41:20.286000Z,2026-07-18T20:48:41.661000Z,441.375 +2026-07-18T14:28:01.404000Z,2026-07-18T14:31:53.390000Z,231.986 +2026-07-18T13:19:09.153000Z,2026-07-18T13:22:20.982000Z,191.829 +2026-07-18T12:16:31.963000Z,2026-07-18T12:19:28.958000Z,176.995 +2026-07-18T17:39:40.633000Z,2026-07-18T17:42:26.882000Z,166.249 +2026-07-18T01:26:47.855000Z,2026-07-18T01:29:27.968000Z,160.113 +2026-07-18T13:39:23.258000Z,2026-07-18T13:41:47.184000Z,143.926 +2026-07-17T17:24:52.959000Z,2026-07-17T17:27:03.691000Z,130.732 +2026-07-19T04:03:10.282000Z,2026-07-19T04:04:42.655000Z,92.373 +2026-07-19T15:19:42.235000Z,2026-07-19T15:21:14.002000Z,91.767 +2026-07-19T15:27:20.864000Z,2026-07-19T15:28:41.346000Z,80.482 +2026-07-18T16:49:26.688000Z,2026-07-18T16:50:36.936000Z,70.248 +2026-07-18T16:35:44.692000Z,2026-07-18T16:36:50.559000Z,65.867 +2026-07-19T15:35:39.273000Z,2026-07-19T15:36:09Z,29.727 +2026-07-18T01:02:48.409000Z,2026-07-18T01:02:58.833000Z,10.424 +2026-07-17T23:41:09.766000Z,2026-07-17T23:41:19.631000Z,9.865 +2026-07-18T16:45:45.439000Z,2026-07-18T16:45:53.657000Z,8.218 +2026-07-18T12:44:29.446000Z,2026-07-18T12:44:36.802000Z,7.356 +2026-07-19T14:19:57.227000Z,2026-07-19T14:20:04.537000Z,7.31 +2026-07-17T22:28:07.592000Z,2026-07-17T22:28:14.692000Z,7.1 +2026-07-19T13:18:35.425000Z,2026-07-19T13:18:42.378000Z,6.953 +2026-07-18T20:20:10.919000Z,2026-07-18T20:20:17.795000Z,6.876 +2026-07-17T19:01:42.709000Z,2026-07-17T19:01:49.512000Z,6.803 +2026-07-17T22:51:02.655000Z,2026-07-17T22:51:09.388000Z,6.733 +2026-07-17T18:02:59.282000Z,2026-07-17T18:03:06.008000Z,6.726 +2026-07-18T17:18:58.703000Z,2026-07-18T17:19:05.422000Z,6.719 +2026-07-17T18:31:52.300000Z,2026-07-17T18:31:58.970000Z,6.67 +2026-07-18T19:56:14.537000Z,2026-07-18T19:56:21.190000Z,6.653 +2026-07-19T10:24:01.734000Z,2026-07-19T10:24:08.373000Z,6.639 +2026-07-19T03:44:11.698000Z,2026-07-19T03:44:18.336000Z,6.638 +2026-07-17T15:21:04.394000Z,2026-07-17T15:21:11.006000Z,6.612 +2026-07-19T04:18:09.882000Z,2026-07-19T04:18:16.417000Z,6.535 +2026-07-18T14:06:39.596000Z,2026-07-18T14:06:45.722000Z,6.126 +2026-07-18T17:02:39.909000Z,2026-07-18T17:02:45.142000Z,5.233 +2026-07-18T12:56:38.600000Z,2026-07-18T12:56:43.272000Z,4.672 diff --git a/research/2026-07-production-log-mission/generated/metrics.json b/research/2026-07-production-log-mission/generated/metrics.json new file mode 100644 index 0000000..045176a --- /dev/null +++ b/research/2026-07-production-log-mission/generated/metrics.json @@ -0,0 +1,157 @@ +{ + "artifacts": { + "durable_project_tree": { + "allocated_bytes": 42120847360, + "files": 31153, + "hardlink_aliases": 2, + "logical_bytes": 42055447824, + "unique_inodes": 31151 + }, + "mission_evidence": { + "allocated_bytes": 42118688768, + "files": 30878, + "hardlink_aliases": 2, + "logical_bytes": 42053903120, + "unique_inodes": 30876 + }, + "runtime_tree": { + "allocated_bytes": 1318912, + "files": 151, + "hardlink_aliases": 0, + "logical_bytes": 988971, + "unique_inodes": 151 + } + }, + "elapsed": { + "effective_parallelism_when_busy": 1.092, + "idle_gap_count_at_least_5m": 27, + "largest_idle_gaps_seconds": [ + 27433.342, + 19359.152, + 8430.307, + 6448.123, + 5779.958, + 4112.931, + 3587.973, + 2252.61, + 1880.416, + 1760.567 + ], + "matched_worker_and_reviewer_active_hours": 23.987, + "matched_worker_and_reviewer_active_seconds": 86352.103, + "nonbusy_hours": 28.572, + "nonbusy_seconds": 102857.598, + "planning_to_first_dispatch_seconds": 6441.0, + "union_busy_seconds": 79086.402, + "wall_hours": 50.54, + "wall_seconds": 181944.0 + }, + "execution": { + "ambiguity_status_counts": { + "multiple_time_only_candidates": 75 + }, + "ambiguous_match_count": 75, + "attempt_count": 142, + "attempt_outcomes": { + "done_false": 34, + "done_true": 108, + "requested_attention": 39, + "validator_passed_false": 23, + "validator_passed_true": 11 + }, + "decision_actions": { + "continue": 6, + "patch": 30, + "retry": 5 + }, + "decision_count": 41, + "match_method_counts": { + "ambiguous": 75, + "task_id_and_time": 36, + "time_only_unique": 34 + }, + "matched_sessions": 70, + "report_failclosed_validator_attempts": 16, + "terminal_review_count": 3, + "terminal_review_results": { + "done_false": 3 + }, + "unmatched_attempt_count": 0, + "unmatched_attempts": [], + "unmatched_match_count": 0 + }, + "method_limits": [ + "Session token counters are Codex-reported totals; input totals include cached input and should not be added to cached input again.", + "Active time uses task_started/task_complete intervals from matched Codex sessions. It excludes uninstrumented shell/service latency outside those sessions.", + "The task and contract baselines are inferred by subtracting patch additions from final state; in-place textual growth is not represented.", + "This mission-evidence-payload-blind analysis did not open production-log or mission-evidence payload content; it read bounded Codex session/event text only for event-to-session correlation.", + "Ambiguous and unmatched events remain in the execution ledger but contribute no matched duration or token usage; zero unmatched events would not prove attribution correctness." + ], + "source": { + "analysis_end_at": "2026-07-19T15:36:09Z", + "mission_id": "mission-001", + "project_created_at": "2026-07-17T13:03:45Z", + "project_id": "20260717T130345Z-read-only-all-around-production-log-research-for-agent-builder-p", + "runtime_state_after_reviews": "mission_running", + "workspace_dir": "" + }, + "stage_active_seconds": { + "analysis": 16227.236, + "fail_closed_analysis_repair": 13221.724, + "manual_semantic_reliability": 24538.269, + "orchestration": 0, + "other_work": 4239.882, + "planning": 6441.0, + "population_and_retrieval": 15843.513, + "report_provenance_repair": 11029.622, + "terminal_review": 1251.857, + "validation": 0.0 + }, + "stage_total_tokens": { + "analysis": 114680884, + "fail_closed_analysis_repair": 75766825, + "manual_semantic_reliability": 112877224, + "orchestration": 0, + "other_work": 24509035, + "planning": 0, + "population_and_retrieval": 94243675, + "report_provenance_repair": 69659447, + "terminal_review": 6889677, + "validation": 0 + }, + "topology": { + "contract_growth_factor": 2.588, + "contract_statuses": { + "failed": 15, + "passed": 22, + "pending": 7 + }, + "final_contract_count": 44, + "final_task_count": 168, + "initial_contract_count_inferred": 17, + "initial_task_count_inferred": 24, + "patch_growth": { + "added_contracts": 27, + "added_tasks": 144, + "cancelled_tasks": 0, + "superseded_tasks": 53 + }, + "task_growth_factor": 7.0, + "task_statuses": { + "cleared": 117, + "superseded": 51 + }, + "task_types": { + "gate": 20, + "validate": 40, + "work": 108 + } + }, + "usage": { + "cached_input_tokens": 483505152, + "input_tokens": 496654556, + "output_tokens": 1972211, + "reasoning_output_tokens": 421973, + "total_tokens": 498626767 + } +} diff --git a/research/2026-07-production-log-mission/test_analyze_trace.py b/research/2026-07-production-log-mission/test_analyze_trace.py new file mode 100644 index 0000000..f4ed7a1 --- /dev/null +++ b/research/2026-07-production-log-mission/test_analyze_trace.py @@ -0,0 +1,389 @@ +from __future__ import annotations + +import csv +import importlib.util +import json +import re +import subprocess +import sys +from collections import Counter +from datetime import datetime, timedelta, timezone +from pathlib import Path +from types import ModuleType + +import pytest + + +UTC = timezone.utc +PROJECT_ID = "synthetic-project" +MISSION_ID = "mission-001" +ANALYZER = Path(__file__).with_name("analyze_trace.py") +TOKEN_FIELDS = ( + "input_tokens", + "cached_input_tokens", + "output_tokens", + "reasoning_output_tokens", + "total_tokens", +) + + +def _iso(value: datetime) -> str: + return value.isoformat().replace("+00:00", "Z") + + +def _stamp(value: datetime) -> str: + return value.strftime("%Y-%m-%dT%H-%M-%SZ") + + +def _write_json(path: Path, value: object) -> None: + path.parent.mkdir(parents=True, exist_ok=True) + path.write_text(json.dumps(value)) + + +def _write_session( + sessions_root: Path, + *, + provider_id: str, + start: datetime, + correlation_ids: tuple[str, ...], + total_tokens: int, +) -> None: + usage = { + "input_tokens": total_tokens - 3, + "cached_input_tokens": total_tokens - 5, + "output_tokens": 2, + "reasoning_output_tokens": 1, + "total_tokens": total_tokens, + } + rows = [ + { + "timestamp": _iso(start), + "type": "session_meta", + "payload": { + "id": provider_id, + "timestamp": _iso(start), + "thread_source": "subagent", + "source": {"project_id": PROJECT_ID}, + }, + }, + { + "timestamp": _iso(start), + "type": "event_msg", + "payload": {"type": "task_started", "correlation_ids": correlation_ids}, + }, + { + "timestamp": _iso(start + timedelta(seconds=2)), + "type": "event_msg", + "payload": {"type": "token_count", "info": {"total_token_usage": usage}}, + }, + { + "timestamp": _iso(start + timedelta(seconds=4)), + "type": "event_msg", + "payload": {"type": "task_complete"}, + }, + ] + path = sessions_root / f"{provider_id}.jsonl" + path.parent.mkdir(parents=True, exist_ok=True) + path.write_text("".join(json.dumps(row) + "\n" for row in rows)) + + +def _write_attempt(runtime: Path, start: datetime, task_id: str) -> None: + _write_json( + runtime / "attempts" / f"{_stamp(start)}-0000__{task_id}.json", + {"done": True, "passed": None, "request_attention": False}, + ) + + +@pytest.fixture +def synthetic_trace(tmp_path: Path) -> tuple[Path, Path, set[str]]: + project_root = tmp_path / "private-input" / "project" + sessions_root = tmp_path / "private-input" / "sessions" + runtime_root = project_root / ".zenith-runtime" + runtime = runtime_root / "missions" / MISSION_ID + durable = project_root / ".zenith" / "missions" / MISSION_ID + start = datetime(2026, 1, 1, tzinfo=UTC) + + task_times = { + "unique-task": start + timedelta(minutes=1), + "unique-fallback": start + timedelta(minutes=2), + "multi-fallback": start + timedelta(minutes=3), + "multi-later-a": start + timedelta(minutes=3, seconds=30), + "multi-later-b": start + timedelta(minutes=3, seconds=50), + "equal-tie": start + timedelta(minutes=6), + "tie-later-a": start + timedelta(minutes=6, seconds=30), + "tie-later-b": start + timedelta(minutes=6, seconds=50), + "unmatched-task": start + timedelta(minutes=8), + } + tasks = [{"id": task_id, "type": "work"} for task_id in task_times] + _write_json( + runtime_root / "project.json", + { + "id": PROJECT_ID, + "current_mission_id": MISSION_ID, + "created_at": _iso(start), + "workspace_dir": str(tmp_path / "machine-specific-workspace"), + }, + ) + _write_json(runtime_root / "state.json", {"state": "mission_running"}) + _write_json(runtime / "tasks.json", {"tasks": tasks}) + _write_json( + runtime / "task-state.json", + {"tasks": {task["id"]: {"status": "complete"} for task in tasks}}, + ) + _write_json(runtime / "contract-state.json", {"items": {}}) + for task_id, task_start in task_times.items(): + _write_attempt(runtime, task_start, task_id) + + provider_ids = { + "synthetic-provider-unique", + "synthetic-provider-fallback", + "synthetic-provider-multi-a", + "synthetic-provider-multi-b", + "synthetic-provider-tie-a", + "synthetic-provider-tie-b", + "synthetic-provider-review", + } + _write_session( + sessions_root, + provider_id="synthetic-provider-unique", + start=start + timedelta(minutes=1, seconds=5), + correlation_ids=("unique-task",), + total_tokens=11, + ) + _write_session( + sessions_root, + provider_id="synthetic-provider-fallback", + start=start + timedelta(minutes=2, seconds=5), + correlation_ids=(), + total_tokens=12, + ) + _write_session( + sessions_root, + provider_id="synthetic-provider-multi-a", + start=start + timedelta(minutes=2, seconds=55), + correlation_ids=("multi-later-a",), + total_tokens=13, + ) + _write_session( + sessions_root, + provider_id="synthetic-provider-multi-b", + start=start + timedelta(minutes=3, seconds=5), + correlation_ids=("multi-later-b",), + total_tokens=14, + ) + _write_session( + sessions_root, + provider_id="synthetic-provider-tie-a", + start=start + timedelta(minutes=5, seconds=55), + correlation_ids=("equal-tie", "tie-later-a"), + total_tokens=15, + ) + _write_session( + sessions_root, + provider_id="synthetic-provider-tie-b", + start=start + timedelta(minutes=6, seconds=5), + correlation_ids=("equal-tie", "tie-later-b"), + total_tokens=16, + ) + + review_start = start + timedelta(minutes=10) + _write_json( + runtime / "terminal-reviews" / f"{_stamp(review_start)}.json", {"done": False} + ) + _write_session( + sessions_root, + provider_id="synthetic-provider-review", + start=review_start + timedelta(seconds=2), + correlation_ids=("terminal review",), + total_tokens=17, + ) + + (durable / "evidence").mkdir(parents=True) + (project_root / ".zenith" / "decisions").mkdir(parents=True) + return project_root, sessions_root, provider_ids + + +def _run_analyzer(project_root: Path, sessions_root: Path, output_dir: Path) -> None: + result = subprocess.run( + [ + sys.executable, + str(ANALYZER), + "--project-root", + str(project_root), + "--sessions-root", + str(sessions_root), + "--output-dir", + str(output_dir), + ], + check=False, + capture_output=True, + text=True, + ) + assert result.returncode == 0, result.stderr + + +def _load_analyzer() -> ModuleType: + spec = importlib.util.spec_from_file_location("synthetic_analyze_trace", ANALYZER) + assert spec and spec.loader + module = importlib.util.module_from_spec(spec) + sys.modules[spec.name] = module + spec.loader.exec_module(module) + return module + + +def test_session_aliases_are_stable_and_preserve_joins() -> None: + analyzer = _load_analyzer() + start = datetime(2026, 1, 1, tzinfo=UTC) + + def session(provider_id: str, offset: int) -> object: + stamp = start + timedelta(seconds=offset) + return analyzer.Session( + path=Path(f"{provider_id}.jsonl"), + session_id=provider_id, + start=stamp, + end=stamp, + active_intervals=[], + thread_source="subagent", + source="synthetic", + final_usage={}, + text="", + ) + + first = session("synthetic-provider-a", 10) + same_provider = session("synthetic-provider-a", 20) + earlier = session("synthetic-provider-b", 0) + aliases = analyzer.build_session_aliases([first, same_provider, earlier]) + + assert ( + aliases[first.session_id] == aliases[same_provider.session_id] == "session-002" + ) + assert aliases[earlier.session_id] == "session-001" + assert len(set(aliases.values())) == 2 + + +def test_synthetic_cli_fails_closed_reconciles_and_is_deterministic( + synthetic_trace: tuple[Path, Path, set[str]], + tmp_path: Path, +) -> None: + project_root, sessions_root, provider_ids = synthetic_trace + first_output = tmp_path / "first-output" + second_output = tmp_path / "second-output" + _run_analyzer(project_root, sessions_root, first_output) + _run_analyzer(project_root, sessions_root, second_output) + + first_files = sorted( + path.relative_to(first_output) + for path in first_output.rglob("*") + if path.is_file() + ) + second_files = sorted( + path.relative_to(second_output) + for path in second_output.rglob("*") + if path.is_file() + ) + assert ( + first_files + == second_files + == [ + Path("execution_ledger.csv"), + Path("idle_gaps.csv"), + Path("metrics.json"), + ] + ) + assert all( + (first_output / relative).read_bytes() + == (second_output / relative).read_bytes() + for relative in first_files + ) + + with (first_output / "execution_ledger.csv").open(newline="") as handle: + ledger = list(csv.DictReader(handle)) + metrics = json.loads((first_output / "metrics.json").read_text()) + rows = {row["event_id"]: row for row in ledger} + + assert rows["unique-task"]["match_method"] == "task_id_and_time" + assert rows["unique-task"]["match_delta_seconds"] == "5.0" + assert rows["unique-task"]["match_candidate_count"] == "1" + assert rows["unique-task"]["match_ambiguity"] == "not_ambiguous" + assert rows["unique-fallback"]["match_method"] == "time_only_unique" + assert rows["unique-fallback"]["match_delta_seconds"] == "5.0" + assert rows["unique-fallback"]["match_candidate_count"] == "1" + assert rows["unique-fallback"]["match_ambiguity"] == "not_ambiguous" + + assert rows["multi-fallback"]["match_method"] == "ambiguous" + assert rows["multi-fallback"]["match_delta_seconds"] == "5.0" + assert rows["multi-fallback"]["match_candidate_count"] == "2" + assert rows["multi-fallback"]["match_ambiguity"] == "multiple_time_only_candidates" + assert rows["equal-tie"]["match_method"] == "ambiguous" + assert rows["equal-tie"]["match_delta_seconds"] == "5.0" + assert rows["equal-tie"]["match_candidate_count"] == "2" + assert rows["equal-tie"]["match_ambiguity"] == "task_id_and_time_tie" + assert rows["unmatched-task"]["match_method"] == "unmatched" + assert rows["unmatched-task"]["match_delta_seconds"] == "" + assert rows["unmatched-task"]["match_candidate_count"] == "0" + assert rows["unmatched-task"]["match_ambiguity"] == "not_ambiguous" + + for event_id in ("multi-fallback", "equal-tie", "unmatched-task"): + assert rows[event_id]["session_id"] == "" + assert float(rows[event_id]["duration_seconds"]) == 0 + assert all(int(rows[event_id][field]) == 0 for field in TOKEN_FIELDS) + + assert rows["multi-later-a"]["match_method"] == "task_id_and_time" + assert rows["multi-later-b"]["match_method"] == "task_id_and_time" + assert rows["tie-later-a"]["match_method"] == "task_id_and_time" + assert rows["tie-later-b"]["match_method"] == "task_id_and_time" + + match_rows = [row for row in ledger if row["match_method"]] + recomputed_methods = Counter(row["match_method"] for row in match_rows) + recomputed_ambiguities = Counter( + row["match_ambiguity"] + for row in match_rows + if row["match_method"] == "ambiguous" + ) + assert metrics["execution"]["match_method_counts"] == dict(recomputed_methods) + assert metrics["execution"]["ambiguity_status_counts"] == dict( + recomputed_ambiguities + ) + assert ( + metrics["execution"]["ambiguous_match_count"] + == recomputed_methods["ambiguous"] + == 2 + ) + assert ( + metrics["execution"]["unmatched_match_count"] + == recomputed_methods["unmatched"] + == 1 + ) + assert metrics["execution"]["unmatched_attempt_count"] == 1 + assert metrics["execution"]["attempt_count"] == sum( + row["event_kind"] == "attempt" for row in ledger + ) + assert metrics["execution"]["terminal_review_count"] == sum( + row["event_kind"] == "terminal_review" for row in ledger + ) + + recomputed_usage = { + field: sum(int(row[field]) for row in match_rows) for field in TOKEN_FIELDS + } + assert metrics["usage"] == recomputed_usage + stages = {row["stage"] for row in ledger} + assert metrics["stage_active_seconds"] == { + stage: sum( + float(row["duration_seconds"]) for row in ledger if row["stage"] == stage + ) + for stage in stages + } + assert metrics["stage_total_tokens"] == { + stage: sum(int(row["total_tokens"]) for row in ledger if row["stage"] == stage) + for stage in stages + } + + public_bytes = b"\n".join( + (first_output / relative).read_bytes() for relative in first_files + ) + assert metrics["source"]["workspace_dir"] == "" + assert str(tmp_path).encode() not in public_bytes + assert not any(provider_id.encode() in public_bytes for provider_id in provider_ids) + selected_aliases = {row["session_id"] for row in match_rows if row["session_id"]} + assert len(selected_aliases) == 7 + assert all(re.fullmatch(r"session-\d{3}", alias) for alias in selected_aliases)