GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(projector): integrated queue/PM view, machine face (#7078) by dezren39 · Pull Request #8481 · developing-today/code

feat(projector): integrated queue/PM view, machine face (#7078) #8481

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Sign up for GitHub

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
dezren39 merged 2 commits into main from queue/14839-7078-queue-view
Nov 11, 2026

Uh oh!

There was an error while loading. Please reload this page.

Merged

feat(projector): integrated queue/PM view, machine face (#7078) #8481

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
2 commits
Select commit Hold shift + click to select a range
08107ed
feat(projector): integrated queue/PM view, machine face (#7078)
Nov 11, 2026
cf87bc4
fix(projector): claimed_at is authoritative; pin hot-list high-water …
Nov 11, 2026
File filter
Filter by extension

Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Diff view
Diff view

There are no files selected for viewing

14 changes: 14 additions & 0 deletions 14 pm-stack/projector/README.md
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,20 @@ local source you don't commit.
| `/hot/checkpoints` | POST | bearer | ack a checkpoint `{consumer, cursor, highWater}` |
| `/reconcile` | POST | bearer | trigger a reconciliation poll |

### Integrated queue/PM view — machine face (#7078, #2072 slice 3)

`bun run src/cli.ts queue-view --tasks <tasks.json> [--window-hours 24] [--consumer queue-view] [--no-ack]`
prints one read-only JSON view joining fleet queue task records (JSON
exported from the queue broker: an array, or `{ "tasks": [...] }`) with
this projector's slice-2 hot list, consumed through a consumer
checkpoint (pinned high-water; the checkpoint is acked only after the
view prints, unless `--no-ack`). The view lists queued items in claim
order, items claimed inside the window with their claiming
system/lane, snapshot counts by status (which reconcile with
`fleet queue health` when fed the full task list), and links to the
existing aggregator/projector trend stores. It writes nothing and
collects nothing new; the human face is a later slice-3 piece.

**Subjects** are external keys:

- `kaneo:<projectSlug>/<taskId>` — a Kaneo board item (e.g. `kaneo:code/CODE-107`)
Expand Down
61 changes: 59 additions & 2 deletions 61 pm-stack/projector/src/cli.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -1,18 +1,75 @@
// CLI: one-off reconciliation against the live GitHub API.
// CLI: one-off jobs against the live stores.
// bun run src/cli.ts reconcile
// bun run src/cli.ts queue-view --tasks <tasks.json> [--window-hours 24]
// [--consumer queue-view] [--no-ack]
//
// queue-view (#7078, #2072 slice 3 first piece) is the read-only
// integrated queue/PM view, machine face: it joins fleet queue task
// records (JSON exported from the queue broker — an array, or an object
// with a `tasks` array) with the slice-2 hot list consumed through a
// consumer checkpoint, and prints the view as JSON on stdout. The
// checkpoint is acked only after the view has been printed, unless
// --no-ack is passed.
import { readFileSync } from "node:fs";
import { openDb, migrate } from "./store";
import { reconcileRepos } from "./reconcile";
import { buildQueueView, consumeHotList, defaultTrendLinks, type QueueTaskRecord } from "./queue-view";

const cmd = process.argv[2] ?? "reconcile";
const env = process.env as Record<string, string | undefined>;

function arg(name: string): string | undefined {
const i = process.argv.indexOf(`--${name}`);
return i >= 0 ? process.argv[i + 1] : undefined;
}

const db = openDb(env);
await migrate(db);

if (cmd === "reconcile") {
const { reconcileRepos } = await import("./reconcile");
console.log("[projector] reconcile start:", env.PM_REPOS);
const result = await reconcileRepos(db, env);
console.log(JSON.stringify(result, null, 2));
} else if (cmd === "queue-view") {
const tasksPath = arg("tasks");
if (!tasksPath) {
console.error("queue-view: --tasks <file> is required (queue task records as JSON)");
process.exit(2);
}
const parsed = JSON.parse(readFileSync(tasksPath, "utf8")) as
| QueueTaskRecord[]
| { tasks: QueueTaskRecord[] };
const tasks = Array.isArray(parsed) ? parsed : parsed.tasks;
if (!Array.isArray(tasks)) {
console.error("queue-view: tasks file must be a JSON array or { tasks: [...] }");
process.exit(2);
}
const windowHours = Number(arg("window-hours") ?? "24");
const consumer = arg("consumer") ?? "queue-view";
// Consume BEFORE capturing the window end: consumeHotList pins the
// hot-list high-water, and the window end must be at or after that
// pin. Capturing `until` first would let an event appended after
// `until` but before the pin be consumed, filtered out of the view
// by the window, and then acked past — lost for good. With this
// order every consumed event has received_at <= pin <= until, and
// anything appended after the pin is neither consumed nor acked.
// (Codex finding on PR #8481, 2026-11-11.)
const consumed = await consumeHotList(db, consumer);
const until = new Date();
const since = new Date(until.getTime() - windowHours * 3_600_000);
const view = buildQueueView(tasks, consumed.events, {
since: since.toISOString(),
until: until.toISOString(),
consumer,
fromSeq: consumed.fromSeq,
highWater: consumed.highWater,
links: defaultTrendLinks(env),
});
console.log(JSON.stringify(view, null, 2));
if (!process.argv.includes("--no-ack")) {
const cursor = await consumed.ack();
console.error(`[projector] queue-view: consumer ${consumer} checkpoint acked at ${cursor}`);
}
} else {
console.error(`unknown command: ${cmd}`);
process.exit(2);
Expand Down
Loading
Oops, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Loading
Oops, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.