Skip to content

feat(aggregator): slice 1 — live needs-you + quota panels (fleet feed + laptop server) - #892

Merged
dezren39 merged 7 commits into
mainfrom
aggregator-slice1
Oct 25, 2026
Merged

dezren39 merged 7 commits into
mainfrom
aggregator-slice1

Conversation

@dezren39

@dezren39 dezren39 commented Oct 25, 2026 •

Copy link
Copy Markdown
Member

Implements slice 1 of the aggregator dashboard per #890, design in #851 (quota + throughput) and #852 (needs-you).

What ships

Needs-you (#852) — fleet sessions classified into the six states, attention-ordered, evidence inline:

  • Laptop sessions mapped live from the OpenChamber-managed OpenCode server (port + password read from its state file at request time, 45 s in-process cache).
  • Sandbox sessions via the fleet feed (the sandbox server binds its own loopback).
  • Both through the shared OpenCode v2 mapper (src/sources/opencode.ts): active set, pending permission requests, open forms, last-turn errors (idle error / finish=error / errored tool part), consecutive identical errors, long-running tool calls. Keeper supervision entries from jules-review-state.json annotate matching sessions.

Quota (#851) — from the fleet feed file produced on the sandbox by scripts/collect-fleet-feed.ts (~5 min systemd timer):

  • Per-pool extractors (src/quota-extract.ts) over the stewardship quota view's dated reads; fail-soft — a pool whose read pattern stops matching renders with identity + a 'no current read' note. Live per-pool burn attribution from the sandbox server's active sessions; model-choice guidance (headroom / burn-before-reset / do-not-start) computed at collection (src/quota-guidance.ts).
  • Corrected pool map: exactly ONE Meta pool (Muse API High Usage, meta the only door); no 'muse plan' pool, no assistant-Power pool.

Network (Drew 2026-10-25) — the aggregator binds loopback + tailnet (PM_AGG_HOSTS, user unit pm-aggregator), no public route. In the same pass, ready-for-agent now binds all interfaces (bare --host) so 6056 answers on the tailnet address too.

Deployment — aggregator/install.sh (SOPS-rendered env, user unit, health gates); sandbox collector units in aggregator/systemd/.

Verified live (2026-10-25)

  • http://127.0.0.1:4870 and http://100.99.113.103:4870: /quota and /attention 200, real data, provenance states each facet's source + feed age; Meta pool renders walled until its 19:00 CDT reset.
  • ready-for-agent: ss shows 0.0.0.0:6056; loopback + tailnet 200.
  • Collector timer run pushed a fresh feed end-to-end.
  • bun test 40 pass; bunx tsc --noEmit clean.

Deferred to slice 2 (per #890)

Projector-ized live per-source quota/attention feeds; throughput burn segments + token-rate history; session -> PR join; Jules sessions in the attention feed; action affordances (view stays read-only); a public password-gated hostname if wanted.

Refs #890
Refs #851
Refs #852


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

Muse Sweep added 6 commits October 25, 2026 14:42
…ptop server

Quota (#851) renders the fleet feed produced on the sandbox by
scripts/collect-fleet-feed.ts: per-pool extractors over the
stewardship quota view's dated reads (fail-soft to identity + note),
guidance computed from pool state. Attention (#852) merges laptop
sessions mapped live from the OpenChamber-managed server (45s cache)
with sandbox sessions from the feed, both through the shared OpenCode
v2 mapper in src/sources/opencode.ts. Server binds PM_AGG_HOSTS
(loopback + tailnet on the laptop, no public route).

Refs #890, #851, #852
…dy-for-agent tailnet bind

pm-aggregator.service (user unit, env rendered from the laptop SOPS
file by aggregator/install.sh) binds loopback + tailnet per Drew's
2026-10-25 network call. ready-for-agent gets the same treatment:
bare --host (all interfaces) so 6056 answers on the tailnet address
too. The sandbox collector timer ships the fleet feed every ~5 min.

Refs #890
The quota sources, server password file, and laptop SSH key live in
that user's home; a root system service cannot read them.

Refs #890
@dezren39
dezren39 requested a review from a team as a code owner October 25, 2026 14:52
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-10-25T14:52:52.773077Z d7bd3ae PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 26 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 55380bdf-dfa0-48d8-9fbb-14d9ac593c3f
Commits

Reviewing files that changed from the base of the PR and between a365373 and 17026b9.

Files selected for processing: 21
  • pm-stack/README.md
  • pm-stack/aggregator/README.md
  • pm-stack/aggregator/install.sh
  • pm-stack/aggregator/scripts/collect-fleet-feed.ts
  • pm-stack/aggregator/scripts/push-fleet-feed.sh
  • pm-stack/aggregator/src/config.ts
  • pm-stack/aggregator/src/derive.ts
  • pm-stack/aggregator/src/feed.ts
  • pm-stack/aggregator/src/model.ts
  • pm-stack/aggregator/src/quota-extract.ts
  • pm-stack/aggregator/src/quota-guidance.ts
  • pm-stack/aggregator/src/render.ts
  • pm-stack/aggregator/src/server.ts
  • pm-stack/aggregator/src/sources/live.ts
  • pm-stack/aggregator/src/sources/opencode.ts
  • pm-stack/aggregator/systemd/fleet-feed-collector.service
  • pm-stack/aggregator/systemd/fleet-feed-collector.timer
  • pm-stack/aggregator/test/opencode.test.ts
  • pm-stack/aggregator/test/quota.test.ts
  • pm-stack/ready-for-agent/systemd/ready-for-agent.service
  • pm-stack/systemd/pm-aggregator.service
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@dezren39
dezren39 merged commit d096f92 into main Oct 25, 2026
4 checks passed
@dezren39
dezren39 deleted the aggregator-slice1 branch October 25, 2026 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant