Repository navigation
refactor: single durable subagent status (D11 phase 4) - #350
Conversation
Introduce a NoEquivalentStatus type in the tasks crate and re-export it from the crate root so callers can represent a task status with no equivalent mapping. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Introduce status_map modules in the run ledger and transcript view that convert their local statuses to and from the canonical OrchestrationTaskStatus, adding tinyagents-tasks as a dependency so both views share one lifecycle vocabulary. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Adds coverage for the outcome status mapping used by detached and invocation subagent paths, exercising the shared map through both entry points so regressions in either flow are caught. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Introduce status types and tracking for subagents so orchestration can report their progress and outcomes. The subagent module now wires into the shared status machinery. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
The detached and invocation status maps now delegate to From and TryFrom implementations instead of matching inline, and the shared NoEquivalentStatus type comes from the tasks crate. The status tests were reduced to checking that the deprecated free functions agree with the From impls. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Move the status conversion logic into shared helpers so the orchestration, session, and task crates map statuses consistently instead of duplicating the same match arms. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Add README notes covering the orchestration crate and the subagent outcome status mapping, and add tests that pin down how subagent outcomes map to task statuses. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
The run ledger and transcript view READMEs now describe how their status enums convert to and from the canonical `OrchestrationTaskStatus`, and the `AgentRunStatus` doc comment notes the same. This records the mapping semantics and confirms the serialized wire strings are unchanged. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
…ersions Completion records now derive their status via the shared TryFrom mappings instead of hand-written matches, so the incomplete-vs-failed distinction stays consistent across vocabularies. Cancelled outcomes are still skipped by routing policy, and the status-vocabulary docs now point at the tinyagents-tasks README. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Tiny Sweeper reviewTiny Sweeper completed its review; deterministic results follow. State: Ready for maintainer review Review snapshot
Completeness: Complete What changed`OrchestrationTaskStatus` is established as the canonical status. Payload-free enums (`AgentRunStatus`, `TranscriptSubagentStatus`, `CompletionStatus`, `SubAgentJobStatus`) convert in both directions; payload-carrying types (`DetachedSubagentStatus`, `SubagentOutcomeKind`) convert out only, by reference, since payloads cannot be rebuilt. `NoEquivalentStatus` moved to `tinyagents-tasks/types.rs`, the old orchestration `status/types.rs` is deleted, the deprecated free functions delegate to the new `From` impls, and the single mapping table now lives in the `tinyagents-tasks` README. `tinyagents-session` gains a dependency on `tinyagents-tasks`. Features
Tests
FindingsNo active actionable findings. Resolved this pass
Before mergeNone. How this fits togetherflowchart LR
n0["persist"]:::impacted
n1["persist_cancelled"]:::impacted
n2["load_terminal"]:::impacted
n3["cache_terminal"]:::impacted
n4["load_pause_winner"]:::impacted
n0 -->|calls| n1
n0 -->|calls| n2
n0 -->|calls| n3
n0 -->|calls| n4
n1 -->|calls| n3
n1 -->|calls| n4
n4 -->|calls| n2
n4 -->|calls| n3
classDef changed fill:#0d4429,stroke:#238636,color:#e6edf3
classDef impacted fill:#161b22,stroke:#6e7681,color:#c9d1d9
classDef flagged fill:#5a1e02,stroke:#d93f0b,color:#ffffff
classDef blocking fill:#67060c,stroke:#f85149,color:#ffffff
Agent review detailscritique
security
tests
commits
description
e2e
Evidence and run details
|
|
Warning Review limit reached
This review includes 31 billable files and costs up to $7.75. Or wait 29 minutes for your next included review. View limit detailsLimit details: You’ve used all 2 included reviews currently available. Review configuration: ⚙️ Run configuration
⛔ Files ignored due to path filters (1)
📒 Files selected for processing (31)
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fd1dba2636
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
Requesting changes: 1 lane(s) blocking, worst finding is critical.
Fix or reply to the findings below and push. The next review clears this automatically once they are gone — you should not need to dismiss anything by hand.
$0.0306 · 647,367 in / 33,279 out · 80,058 cached (12%) · gpt-5.6-luna, glm-5.3-flash
critique: $0.0173 · 327,527 in / 19,795 out · 45,223 cached (14%) · gpt-5.6-luna, glm-5.3-flash
security: $0.0127 · 240,424 in / 10,430 out · 31,443 cached (13%) · gpt-5.6-luna
tests: $0.0002 · 26,258 in / 483 out · 1,856 cached (7%) · glm-5.3-flash
description: $0.0002 · 25,925 in / 438 out · 1,408 cached (5%) · glm-5.3-flash
The NoEquivalentStatus error type now lives in types.rs alongside the other shared task types, and status.rs keeps only the CompletionStatus conversions. The crate root no longer re-exports it directly, so callers reach it through the types module. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Add the std::fmt import to the task types module so formatting traits are available for upcoming implementations. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
There was a problem hiding this comment.
Requesting changes: 2 lane(s) blocking, worst finding is critical.
Fix or reply to the findings below and push. The next review clears this automatically once they are gone — you should not need to dismiss anything by hand.
$0.0101 · 258,264 in / 16,284 out · 35,958 cached (14%) · gpt-5.6-luna, glm-5.3-flash
critique: $0.0050 · 101,044 in / 8,119 out · 20,383 cached (20%) · gpt-5.6-luna, glm-5.3-flash
security: $0.0044 · 76,708 in / 5,479 out · 12,503 cached (16%) · gpt-5.6-luna
tests: $0.0002 · 26,717 in / 563 out · 1,536 cached (6%) · glm-5.3-flash
description: $0.0002 · 26,375 in / 250 out · 1,408 cached (5%) · glm-5.3-flash
Co-authored-by: Medulla <medulla@tinyhumans.ai>
There was a problem hiding this comment.
The previously-blocking findings are resolved. Clearing the changes request.
$0.0021 · 109,557 in / 6,053 out · 8,156 cached (7%) · gpt-5.6-luna, glm-5.3-flash
critique: $0.0014 · 28,419 in / 3,381 out · 5,084 cached (18%) · gpt-5.6-luna, glm-5.3-flash
tests: $0.0002 · 26,765 in / 777 out · 1,536 cached (6%) · glm-5.3-flash
description: $0.0002 · 26,423 in / 203 out · 1,408 cached (5%) · glm-5.3-flash
Co-authored-by: Medulla <medulla@tinyhumans.ai>
There was a problem hiding this comment.
tinysweeper found nothing blocking. Approving.
$0.0044 · 180,241 in / 12,269 out · 6,090 cached (3%) · gpt-5.6-luna, glm-5.3-flash
critique: $0.0027 · 42,959 in / 6,429 out · 6,090 cached (14%) · gpt-5.6-luna, glm-5.3-flash
tests: $0.0010 · 82,017 in / 2,683 out · 0 cached (0%) · glm-5.3-flash
description: $0.0003 · 26,470 in / 927 out · 0 cached (0%) · glm-5.3-flash
Co-authored-by: Medulla <medulla@tinyhumans.ai>
There was a problem hiding this comment.
tinysweeper found nothing blocking. Approving.
$0.0024 · 106,036 in / 7,352 out · 4,060 cached (4%) · gpt-5.6-luna, glm-5.3-flash
critique: $0.0017 · 23,638 in / 4,036 out · 4,060 cached (17%) · gpt-5.6-luna, glm-5.3-flash
tests: $0.0002 · 26,925 in / 626 out · 0 cached (0%) · glm-5.3-flash
description: $0.0002 · 26,583 in / 891 out · 0 cached (0%) · glm-5.3-flash
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Summary
D11 phase 4.
OrchestrationTaskStatus(tinyagents-tasks) is now the one durable lifecycle status for a subagent or task run.DetachedSubagentStatusstays the live type with a payload. Every other subagent-run status enum is expressed in terms of the canonical one withFrom(total) orTryFrom(fallible,NoEquivalentStatus). No public type is removed and no serde wire format changes.Treatment per type
Treatment (a) everywhere, since every one of these has a persisted or consumed wire form that cannot be replaced by the task status's strings (e.g.
successvscompleted,timed_outvsincomplete):AgentRunStatus(session): totalFromboth ways.TranscriptSubagentStatus(session):Fromin,TryFromout.CompletionStatus(tasks):Fromin,TryFromout.SubAgentJobStatus,SubagentOutcomeKind,DetachedSubagentStatus(orchestration):From/TryFromin, plus direct job/outcome/detached toAgentRunStatus/CompletionStatus/job pairs (the canonical status has noIncomplete, so direct pairs keep that distinction).Deprecated (treatment b), because the
Fromimpls supersede them and nothing in OpenHuman calls them:status::task_status_to_run_status,status::run_status_to_task_status. The existingSubagentStatusaliases stay deprecated.to_task_status()/to_run_status()stay as thin wrappers.NoEquivalentStatusmoved to tinyagents-tasks and is re-exported at its old path.tinyagents-sessionnow depends ontinyagents-tasks(no cycle; nothing new transitively).The mapping table is in
crates/tinyagents-tasks/src/README.md("Status mapping").Tests
Exhaustive per-conversion tests and golden serde tests (old JSON in, same JSON out) for task, completion, ledger, job (+ snapshot), outcome kind, transcript projection, and detached labels (detached has no serde form). Completion-record paths now use the
TryFromimpls instead of a private copy of the mapping.cargo test --workspacepasses except the knownvalidate_repo_root_rejects_non_repo; clippy-D warnings,fmt --checkclean; no newcargo docwarnings in touched files.OpenHuman impact
Grepped
/cratesfor all seven types: only additive API, no hostimpl From/TryFromon them (no coherence conflict), host never calls the deprecated functions orNoEquivalentStatus, so no source edits are expected. On the gitlink bump both hostCargo.lockfiles gain atinyagents-session->tinyagents-tasksedge (--lockedbuilds need regenerating). Not built against the host here.Co-authored-by: Medulla medulla@tinyhumans.ai