Skip to content

Holder-bound report token scope, metrics --push, post-Command reporting, and manual/site updates #2069

Closed

Description

@JacobStephens2

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 report token scope & upload endpoint: Add report to console token create <holder> --scopes report (validating <holder> as a Fleet machine name, while keeping viewer address default scopes unchanged at read,security,act,run,admin). Add an authenticated Console API report endpoint that accepts a report bearer token over HTTPS (or 127.0.0.1) and atomically writes the uploaded metrics snapshot only into <holder>'s own peer-metrics cache slot—granting zero read, security, act, run, or admin access 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 + saved report token). Implement metrics --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_at age 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, metrics flags (--fleet, --push, window/filter flags), and report-scoped outbound Fleet reporting in the user manual (docs/guide.md), regenerate site/docs/index.html, and update hand-written site/ 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 with 403 on every read, security, act, run, and admin endpoint.
  • metrics --push uploads the worker's local metrics snapshot to a loopback receiving Console, and the receiving Console immediately shows <holder> in /metrics (Fleet default and machine=<holder>) with its pushed_at age 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 0 and logs a warning.
  • CLI/OpenAPI/ADR 0026 parity checks pass with metrics --push and the receiving report endpoint covered.
  • npm run docs:check --prefix site and npm test --prefix site pass after updating docs/guide.md, regenerating site/docs/index.html, and updating relevant hand-written site/ pages.

Blocked by

Activity

  1. added
    enhancement
    ready-for-agent
    on Nov 11, 2026
  2. added a commit that references this issue on Nov 12, 2026
  3. JacobStephens2 commented on Nov 12, 2026

    @JacobStephens2
    OwnerAuthor

    Closed by #2086, merged into issue-2036 by a thirdshift Ticket run with Self-merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementready-for-agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions