#161 lada: surface all per-task progress metrics to the Hub (openclaw self-select)#162
Merged
Conversation
… self-select) Lada capture mode already parses percent/eta/elapsed/processed_frames/ remaining_frames/fps/current_file into MonitorStatus.metrics, which rides /status → hub.db verbatim — the transport was already complete. The gap was consumer-side discoverability. - status.md: render per-task essentials (percent · ETA · fps) appended to the Lada line, additively so the legacy "X/Y done (Z left)" / "| file |" substrings the V2 scrapers match stay byte-identical. Each field guarded (_is_num / 0..100 / _inline eta); capture-off Lada renders exactly as before. - openclaw-integration.md: field table + reader example + status.md sample now document every per-task field, flagged capture-mode-only. - Tests: lock the exact metrics contract (names/types) via the real reader path; status.md render/no-regression/sanitize/bad-state coverage. No protocol/hub-store change (metrics is an open dict, already forwarded). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
A managed Lada that supplies I/O via lada_extra_args (--input/--output) instead of the folder fields has capture-mode progress but no queue_total (_queue_counts reads only the folder fields). Nesting progress under queue_total hid it for that supported config. Assemble the Lada line from three independent, space-joined pieces (queue seg · current file · progress); byte-identical when all present, still renders progress when only that is available. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Assert set(_progress) equals the expected per-task keys so a future rename fails the test instead of silently dropping a field from the Hub — matching the design doc's intent. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Owner
Author
Review trail (/afk — Claude-driven)Both external reviews ran (reviewer ≠ implementer):
CI green. Left open awaiting operator merge (leave-open policy). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #161.
What
Lada capture mode already parses the full per-task progress set —
percent,elapsed,processed_frames,eta,remaining_frames,fps,current_file— intoMonitorStatus.metrics, which is serialized verbatim into/statusand stored whole inhub.db.status_log. The agent→hub transport was already complete. The gap was consumer-side discoverability: openclaw's guide documented only thequeue_*fields, andstatus.mdrendered only queue counts, so the data was present in the JSON but nothing selected it.This formally delivers those fields to the Hub side — no wire/protocol change.
Changes
status.md(status_md.py): append per-task essentials (percent · ETA · fps) to the Lada line. Additive — the legacyX/Y done (Z left)and| file |substrings the V2 scrapers (idle-detector-v2 / daily-report) match stay byte-identical. Each field guarded (_is_num,0<=percent<=100,_inlined eta); capture-off Lada renders exactly as before; hard-bad state still shows state, not stale progress.openclaw-integration.md: field-reference table + reader example +status.mdsample now document every per-task field, each flagged capture-mode only (lada_capture_progress: true).test_lada.pylocks the exact metrics contract (names/types) via the real reader path so a future rename can't silently drop a field from the Hub, and asserts idle snapshots omit progress;test_status_md.pycovers render, capture-off no-regression, NaN/n/a/out-of-range dropping, eta sanitize, and error-state.Not changed
lada.pyparsing change (all fields already emitted).metricsis an open dict, already forwarded.Tests
uv run --locked pytest→ all green.uv lock --checkclean.ruffclean.Design
docs/specs/2026-07-02-161-lada-hub-metrics-design.md.Review trail (/afk)
Claude implement + TDD. External gates run automatically: Codex 外门 then Kimi 终审. Left open awaiting operator merge (leave-open policy).