fix(test): add missing display_name field to AgentProgress::SubagentSpawned in mirror_tests#3065
Conversation
…pawned in mirror_tests `Rust Core Coverage (cargo-llvm-cov)` has been failing on every PR CI run and on `main` since tinyhumansai#3054 merged. The root cause: ``` error[E0063]: missing field `display_name` in initializer of `openhuman::agent::progress::AgentProgress` --> src/openhuman/threads/turn_state/mirror_tests.rs:221:16 ``` tinyhumansai#3054 (feat(ui): user-friendly tool and agent labels in the chat tool timeline) added `display_name: Option<String>` to the `AgentProgress::SubagentSpawned` variant and updated every production call site (agent_orchestration/*, skills/run_log.rs, channels/web.rs, threads/turn_state/mirror.rs) — but missed this one test-only literal in `mirror_tests.rs`. Adding `display_name: None` preserves the test's prior behavior (no display name set, mirror falls back to `agent_id`). Cannot run `cargo test` locally to verify (cargo not on the non-interactive PATH on this host); CI is the authoritative check. The diff is a single-field addition to one struct literal — risk of landing wrong is minimal. Refs tinyhumansai#3061 (separately filed for the pre-tinyhumansai#3054 test isolation failures, which are now resolved by the env_lock() addition; the current red CI is purely this missing field).
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR updates a single test fixture in ChangesTest Event Schema Alignment
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
sanil-23
left a comment
There was a problem hiding this comment.
@hemanth1999k thanks for chasing this down — the diagnosis is right and the one-line fix in mirror_tests.rs is correct (display_name: None preserves the prior agent_id fallback).
Heads up though: the Rust Core Coverage (cargo-llvm-cov) gate is still red on this PR's own run, for the same reason. There's a second stale AgentProgress::SubagentSpawned literal that #3054 missed, and it's still failing to compile:
error[E0063]: missing field `display_name` in initializer of `AgentProgress`
--> tests/memory_core_threads_raw_coverage_e2e.rs:648:29
The grep over src/ in the PR description is why it slipped: tests/ is a separate integration-test crate and isn't under src/. The coverage job compiles those integration tests too, so the gate won't go green until that literal also gets display_name: None.
If you add the same one-liner at tests/memory_core_threads_raw_coverage_e2e.rs:648 (and re-grep across tests/ as well as src/ to be sure there are no others), this should fully unblock the gate. Once CI is green I'll come back and approve. Nice catch on the root cause.
|
@sanil-23 thanks for catching that — you're right, the grep over `src/` missed the integration-test crate entirely. I just rebased onto current `main` and the picture changed:
In other words, maintainers fixed the entire fan-out (including the two integration-test literals you flagged) directly on `main` in parallel with this PR. After rebase, my branch has zero diff against `main`. Closing this as fully superseded by the in-tree fix. Cheers for the careful review + the heads-up on `tests/` being a separate crate (lesson logged for next time). 🙌 For PR #3034 (the unrelated Persona change), the Rust Core Coverage gate should now pass once it's rebased on the fresh `main` — going to do that next. |
Summary
`Rust Core Coverage (cargo-llvm-cov)` has been failing on every PR-CI run and on `main` itself since #3054 merged. The root cause is a single missed test-only struct literal:
```
error[E0063]: missing field `display_name` in initializer of
`openhuman::agent::progress::AgentProgress`
--> src/openhuman/threads/turn_state/mirror_tests.rs:221:16
```
#3054 (`feat(ui): user-friendly tool and agent labels in the chat tool timeline`) added `display_name: Option` to the `AgentProgress::SubagentSpawned` variant and updated every production call site (`agent_orchestration/*`, `skills/run_log.rs`, `channels/providers/web.rs`, `threads/turn_state/mirror.rs`) — but missed this one test literal.
Fix
Add `display_name: None` to the test struct literal, preserving its prior behavior (no display name set → mirror falls back to `agent_id`).
Verification
Impact
Unblocks the `Rust Core Coverage (cargo-llvm-cov)` gate for the entire repo. Every PR opened since #3054 has been red on this check.
Related
Summary by CodeRabbit