Repository navigation
Closed
Labels
Description
Parent
#2036 (decisions: PR #2064, Q3.1, Q4.1–Q4.2; glossary: Fleet, Credentials, User config, Run metrics; ADR 0026)
What to build
Enable sleeping or NATted worker machines (such as a laptop VM) to push their Run metrics snapshots outward over HTTPS to an always-on Console behind a holder-bound report token scope—both via metrics --push and automatically on a best-effort basis when a Command finishes—and update the user manual and public site pages.
- Holder-bound
reporttoken scope & upload endpoint: Addreporttoconsole token create <holder> --scopes report(validating<holder>as a Fleet machine name, while keeping viewer address default scopes unchanged atread,security,act,run,admin). Add an authenticated Console API report endpoint that accepts areportbearer token over HTTPS (or127.0.0.1) and atomically writes the uploaded metrics snapshot only into<holder>'s own peer-metrics cache slot—granting zeroread,security,act,run, oradminaccess and refusing any payload whose machine identity mismatches<holder>. (Q4.2, ADR 0026) - Worker configuration,
metrics --push, and post-Command reporting: Add User config and Credentials support on a worker machine to pair/configure outbound report destinations (Console HTTPS/loopback address + savedreporttoken). Implementmetrics --push [<peer>]as the explicit CLI twin (registered in CLI-only parity exclusions matching ADR 0026) and trigger a bounded-timeout best-effort push automatically when a Command finishes whenever an outbound report destination is configured—logging a warning and never failing the Command if offline or refused. (Q4.1, Q4.2) - Read-only Console presentation for outbound-reporting peers: On the receiving Console, include reported peers in Fleet Metrics (and the machine selector) with their
pushed_atage and compact inline failure summaries, displaying clear read-only/offline context instead of broken detail links when the reporting worker cannot be reached inbound. (Q4.2) - Documentation & site updates: Document the Console Metrics view,
metricsflags (--fleet,--push, window/filter flags), andreport-scoped outbound Fleet reporting in the user manual (docs/guide.md), regeneratesite/docs/index.html, and update hand-writtensite/pages (site/index.html,site/how-it-works/,site/architecture/) where Console views,metrics, and Fleet access are covered.
Acceptance criteria
- A
report-scoped token created for<holder>(lima-thirdshift) succeeds in uploading<holder>'s metrics snapshot to the receiving Console, is rejected if it attempts to write another machine name, and is rejected with403on everyread,security,act,run, andadminendpoint. -
metrics --pushuploads the worker's local metrics snapshot to a loopback receiving Console, and the receiving Console immediately shows<holder>in/metrics(Fleet default andmachine=<holder>) with itspushed_atage and read-only failure summaries (no broken inbound detail links). - Completing a scripted Command on a worker configured with an outbound report target automatically pushes the updated metrics snapshot to the receiving Console; when the receiving Console is stopped/offline, the Command still exits
0and logs a warning. - CLI/OpenAPI/ADR 0026 parity checks pass with
metrics --pushand the receiving report endpoint covered. -
npm run docs:check --prefix siteandnpm test --prefix sitepass after updatingdocs/guide.md, regeneratingsite/docs/index.html, and updating relevant hand-writtensite/pages.
Activity
Merge pull request #2086 from JacobStephens2/issue-2069
JacobStephens2 commentedon Nov 12, 2026
Closed by #2086, merged into issue-2036 by a thirdshift Ticket run with Self-merge.