docs(harness-monitor): add file-level P0 implementation plan#580
Conversation
Selected harness-monitor as highest-priority area from the repo todo inventory. Documents current gaps, file-level changes, tests, and verification for the four P0 run-centric console items. Co-authored-by: Cursor Agent (claude-4.6-sonnet-high-thinking) <198982749+cursoragent@users.noreply.github.com>
📝 WalkthroughWalkthroughAdds a new ChangesHarness Monitor Run-Centric Implementation Plan
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
🤖 Augment PR SummarySummary: Docs-only PR that selects Harness Monitor as the top run-centric priority area and adds a file-level plan to complete the P0 run-centric operator-console gaps. Changes:
Technical Notes: No production code changes in this PR; the new doc is intended to guide follow-up baby-step commits with test/snapshot gates. 🤖 Was this summary useful? React with 👍 or 👎 |
|
|
||
| ## Current State Assessment | ||
|
|
||
| Harness Monitor has already migrated to a four-layer layout (`context/`, `run/`, `observe/`, `govern/`, `evaluate/`, `attribute/`, `ui/`). Domain scaffolding exists but the TUI path still diverges from the CLI/orchestrator path in several critical places. |
| - Do not regress prompt-first runs, recovered markers, or existing synthetic run fallback | ||
| - Do not revert run semantics to session-centric navigation | ||
| - Do not duplicate assessment logic in UI — reuse `assess_run`, `assess_run_guardrails`, `gates.rs` | ||
| - All new UI strings must go through i18n if user-facing (TUI currently uses English literals; match existing `run_details.rs` pattern) |
There was a problem hiding this comment.
This constraint says new UI strings must go through i18n, but the parenthetical about “TUI currently uses English literals” could be read as permission to keep hardcoded strings. Consider clarifying so follow-up PRs don’t interpret this as bypassing i18n.
Severity: low
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
There was a problem hiding this comment.
🧹 Nitpick comments (1)
docs/exec-plans/active/harness-monitor-run-centric-implementation.md (1)
30-62: 📐 Maintainability & Code Quality | 🔵 TrivialUse standard Markdown language tags for code blocks.
The code blocks use
```70:74:crates/...as the language identifier, which is non-standard and disables syntax highlighting. Use standard language tags and put file/line references in leading comments instead.♻️ Proposed formatting
-```70:74:crates/harness-monitor/src/ui/views.rs +```rust +// crates/harness-monitor/src/ui/views.rs:70-74 let hook_backed_session_count = items.len(); items.extend( self.unmatched_agents_for_runs(&agent_matches) .into_iter() .filter(|_| hook_backed_session_count == 0) +``` -```495:496:crates/harness-monitor/src/run/orchestrator.rs +```rust +// crates/harness-monitor/src/run/orchestrator.rs:495-496 if !has_session_runs { for agent in detected_agents +``` -```1007:1017:crates/harness-monitor/src/ui/run_details.rs +```rust +// crates/harness-monitor/src/ui/run_details.rs:1007-1017 fn fitness_snapshot_for_run<'a>( cache: &'a AppCache, run: &crate::ui::state::SessionListItem,🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/exec-plans/active/harness-monitor-run-centric-implementation.md` around lines 30 - 62, The markdown examples are using non-standard fenced code block labels like ```70:74:crates/...`, which prevents syntax highlighting. Update the affected blocks in the document to use a standard language tag such as rust on the fence, and move the file/line reference into a leading comment inside each block; apply this consistently to the snippets from views.rs, orchestrator.rs, and run_details.rs.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@docs/exec-plans/active/harness-monitor-run-centric-implementation.md`:
- Around line 30-62: The markdown examples are using non-standard fenced code
block labels like ```70:74:crates/...`, which prevents syntax highlighting.
Update the affected blocks in the document to use a standard language tag such
as rust on the fence, and move the file/line reference into a leading comment
inside each block; apply this consistently to the snippets from views.rs,
orchestrator.rs, and run_details.rs.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 85c34a99-8ff6-4cfb-8f56-2532f007703f
📒 Files selected for processing (2)
docs/exec-plans/active/harness-monitor-run-centric-implementation.mddocs/exec-plans/active/harness-monitor-run-centric-priorities.md
Summary
Completes the repo todo inventory workflow by selecting Harness Monitor (highest architectural priority) and producing a file-level implementation plan for the four P0 run-centric console items.
What changed
docs/exec-plans/active/harness-monitor-run-centric-implementation.mdwith:views.rs:74,orchestrator.rs:495)docs/exec-plans/active/harness-monitor-run-centric-priorities.mdImplementation order (for follow-up PRs)
Validation
Docs-only change; no code validation required per repo guidelines.
Summary by CodeRabbit