Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1162,3 +1162,79 @@ action still out at the host does not hold back a newer one about the
same thing that the edge can do at once (a rank sent to the host,
then another the edge makes directly within the minute): the edge does
not keep track of askings that are out by what they are about.

## 2026-11-24T05:55Z Update: what is labelled as needing the owner, read at the edge (#13491, first part)

**What it was.** "What needs you" came from the laptop's dashboard,
which censuses two GitHub labels (`user/review`, `user/escalated`)
across the four repositories. With the laptop away the list was as old
as its last report, and nothing told the owner of a new thing only he
could do.

**What it does now.** The edge reads it from GitHub itself, like the
owner's prompts: each repository's own list of open issues carrying
each label. The three lists the app shows (what only he can do,
reviews, the rest) are made by one function, used for both readings,
so the app shows the same thing whoever read it. The dashboard's two
readers of an item's body (a stated reason, the hands mark of
FDR-0013) are copied into `src/needs.ts`, because the dashboard's
module needs a machine's files and cannot be part of the Worker; a
test holds each copy to the original for any body, and another holds
the whole list read here to the list the dashboard makes of the same
issues.

**Why the lists and not the search.** The lists are on the hour's
allowance and answer "not modified" by their tags, so eight lists that
have not changed cost nothing; the search is counted by the minute,
gives no tags, and lags. And the search no longer takes the question
the way the dashboard asks it: see below.

**How it fails.** A repository the token cannot see is named and the
rest is shown, with the app saying the list is not whole. Called too
often, out of reach, or GitHub in trouble: the read ends at the first
such answer and nothing more is asked. No repository readable at all
is a failed read, so the last good copy stays and says why. Refused
for all of it, the list is left to a machine for the hour, as with
anything else the edge reads. A machine that has not said which
repositories to look in goes on reporting the list itself.

**Three faults found on the way, none of them in this change.**

- The dashboard's census asks the search for
`repo:<repo> state:open label:"<label>"`. GitHub answers that 422
("Query must include 'is:issue' or 'is:pull-request'"), and its
documentation says so of any such query. Asked from here both ways I
can ask, that is the answer. If the dashboard's token is answered the
same, its census has been empty and marked incomplete, and "What
needs you" has shown nothing. I cannot see the laptop to confirm it.
Filed as #14103 with the check to run there. With this change the
app's list no longer depends on it.
- The screen never said that a list was incomplete: an empty,
incomplete census read as "Nothing needs your hands." It says so now,
and names what could not be read where the reader says.
- Each card's "updated" time was cut like a title, with a mark at the
cut, which made it no time at all: every card said "updated" and
nothing after. It is cut to the second now.

**Checked.** 459 tests pass (22 new: 13 of the reading in
`test/needs.test.ts`, two of the console's own command for it, six at
the edge, one of the app's wording). At the edge: read from each
repository's list with no machine; a repository that cannot be seen;
none that can; by tag, with only the list that changed read whole and
nothing written again; refused and left to the laptop; a laptop that
names no repositories; and a new hands item told to a subscribed
device by the edge's own wake. In the real runtime (47 checks): the
Worker's own check of the read comes back good, the stand-in's one
review is shown, and the lists were asked for. 40 single faults
planted in the new code: all 40 fail a test.

**One thing it costs.** When GitHub turns the edge away for the
hour, two sections of the first screen now ask at once (the prompts
and this), so two calls are refused before the wait is kept to, where
it was one.

**Not done.** Questions and sessions are still a machine's (#13491
stays open). What a session is waiting on the owner for comes from the
dashboard's own tiers, not from labels, and is still the laptop's.
Whether the edge's token can see all four repositories has not been
seen in service; if it cannot, the screen names the ones it cannot.
2 changes: 1 addition & 1 deletion planning/roadmaps/pm-stack.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The roadmap of record is this file and its siblings in `planning/roadmaps/`. The
| Platform: every Worker in one list | shipped | Eighteen Workers, where each lives, whether it is in service and how it gets there, held true to the repository by a test. | #13487 |
| The edge's own GitHub allowance | in-progress | The core must not stop being readable when agents have used the account's hourly allowance. | #13489 |
| Queue tasks filed, cancelled and unblocked from Cloudflare | shaped | A prompt sent with the laptop away is picked up, not only filed. | #13490 |
| Questions, what needs you and sessions with no machine | shaped | The last sections that are only as fresh as a machine's last report. | #13491 |
| Questions, what needs you and sessions with no machine | in-progress | The last sections that are only as fresh as a machine's last report. What is labelled as needing you is read by Cloudflare from each repository's own list (done); questions and sessions are still a machine's. | #13491 |
| What waits for a machine, done from Cloudflare once it can be | shipped | With GitHub answering again and no machine there, what the owner did is done by the edge itself and not kept waiting; never twice. | #13831 |
| The laptop's console follows main | proposed | The console on the laptop runs the build main is at, and it is seen from outside when it does not. | #13833 |

Expand Down
37 changes: 32 additions & 5 deletions pm-stack/console/edge/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ With the switch on and both tokens there (the usual state; see
| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| The app's page, script and icons | edge | unchanged |
| Checking who is calling | edge, and again on the laptop | the edge still answers the owner; anyone it is unsure of gets nothing |
| The board, the owner's prompts, pull requests, ranked issues | edge, read from GitHub and the queue store on each section's own interval | unchanged |
| The board, the owner's prompts, pull requests, ranked issues, what is labelled as needing the owner | edge, read from GitHub and the queue store on each section's own interval | unchanged |
| One pull request's page, the queue by state, roadmaps, bugs, intake, releases | edge, read when asked for | unchanged |
| Ask, reply, close a prompt, comment, rank, move a task, merge, start a deploy, file a note, a bug or a change | edge, at once; never sent to a machine, so never done twice | unchanged |
| The queue task of a prompt, a note or a bug filed at the edge | a machine: the edge files the issue and holds the task (`prompt.enqueue`, `triage.enqueue`) | held, filed once when one connects, dropped after a day and said so |
| Sessions, questions, things for the owner's hands, units, agents | a machine's report, kept at the edge | as of its last report, and the app says how old |
| Sessions (and what one of them is waiting on the owner for), questions, units, agents | a machine's report, kept at the edge | as of its last report, and the app says how old |
| Notifications: keys, subscriptions, sending | edge | unchanged; a reply to a prompt is noticed by the edge itself, which wakes each minute while a device is subscribed; one says the laptop has gone quiet |
| Linked phones and the widget's summary | edge | unchanged |
| Actions only a machine can do, safe to do late (answers, messages to agents, …) | a machine, relayed at once | held at the edge, run once when it is back, dropped after a day and said so |
Expand Down Expand Up @@ -225,6 +225,33 @@ it (the laptop's, the sign-in issuer's).
says when it answers again and which of the two it was. Health has
the times as `github.quiet.core` and `github.quiet.search`. "Try
again now" lifts both.
- **What is labelled as needing the owner is read from each
repository's own list.** Two labels say that something waits on him,
`user/review` and `user/escalated`. The edge asks each repository
the configuration names (`needsRepos`) for its open issues carrying
each (`GET /repos/<repo>/issues?state=open&labels=<label>`; that list
has the pull requests too), and makes the three lists the app shows
with the same function the laptop's console uses on the dashboard's
census: what only he can do (a hands mark in the body), reviews, and
the rest. A test holds the two readings to each other on the same
issues. The search is not used for this: it is counted by the minute,
it lags, and it takes issues and pull requests in separate queries
(asked for both at once it answers 422, which is what the dashboard's
own census does today: #14103). The lists are asked for by their
tags like any other, so the eight of them cost nothing while nothing
changes. A repository the token cannot see (404, or a 403 that is
not about calling too often) is named in what is shown, and the rest
is shown; the app says the list is not whole. Any other failure ends
the read at once and nothing more is asked: being called too often
or GitHub being out of reach would be no different for the next
list. No repository readable at all is a failed read, never an empty
list. The list carries no time of its own (the section's stamp says
when it was read), so one that has not changed is not written out
again. A new thing only the owner can do is told to his devices by
the edge's own wake, with no machine reporting. A machine that has
not said which repositories to look in (a console from before it
did) goes on reporting the list itself: read from no repositories it
would be an empty list, and whole.
- **A list that has not changed costs nothing.** The token is the
fleet's too: the agents draw on the same hourly allowance, which is
the account's, and twice on 2026-11-23 they used the hour up. So the
Expand Down Expand Up @@ -409,9 +436,9 @@ open nothing.

## Limits worth knowing

- What only a machine has (sessions, questions, things for the owner's
hands, units, agents) is its last report. It ages while no machine is
connected, and the app says how old it is.
- What only a machine has (sessions and what one of them is waiting on
the owner for, questions, units, agents) is its last report. It ages
while no machine is connected, and the app says how old it is.
- Something filed at the edge still needs a machine for its queue task:
the issue is filed at once and only the task is held, as
`prompt.enqueue` or `triage.enqueue`, until one connects. The queue
Expand Down
5 changes: 4 additions & 1 deletion pm-stack/console/edge/src/direct.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { timed } from "../../src/timed.ts";
import { Work } from "../../src/work.ts";

/** Sections the edge reads itself. */
export const DIRECT_READ_SECTIONS = ["board", "prs", "priorities", "asks"] as const;
export const DIRECT_READ_SECTIONS = ["board", "prs", "priorities", "asks", "census"] as const;
/** Actions the edge runs itself: each is one or a few calls to GitHub
* or the queue store, and needs nothing a machine has. */
export const DIRECT_ACTIONS = [
Expand Down Expand Up @@ -66,6 +66,7 @@ export const READ_FROM: Record<(typeof DIRECT_READ_SECTIONS)[number], Outward["t
prs: ["github"],
priorities: ["github"],
asks: ["github", "queue"],
census: ["github"],
};

export interface DirectSecrets {
Expand Down Expand Up @@ -802,6 +803,8 @@ export async function directRead(section: string, ops: Ops, work: Work): Promise
return ops.priorities();
case "asks":
return work.asks();
case "census":
return work.censusDirect();
default:
throw new Error(`not a section the edge reads itself: ${section}`);
}
Expand Down
12 changes: 10 additions & 2 deletions pm-stack/console/edge/src/edge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1461,7 +1461,15 @@ export class Edge {
private owned(cfg: EdgeConfig | null): string[] {
if (!this.primary(cfg)) return [];
const refused = this.refusedReads();
return DIRECT_READ_SECTIONS.filter((name) => !refused.includes(name));
return DIRECT_READ_SECTIONS.filter(
(name) =>
!refused.includes(name) &&
// What is labelled as needing the owner is read repository by
// repository: a machine that has not said which they are (one
// from before it did) goes on reporting the list itself. Read
// from no repositories it would be an empty list, and whole.
(name !== "census" || (cfg?.needsRepos.length ?? 0) > 0),
);
}

/** Sections this side's token was turned away for, and still is. */
Expand Down Expand Up @@ -2072,7 +2080,7 @@ export class Edge {
const delivery = await this.push.send("trouble", {
title: "The laptop has gone quiet",
body: this.primary(cfg)
? "It has not reported for ten minutes. Cloudflare carries on with the board, your prompts, pull requests and the plan; what needs the laptop waits for it."
? "It has not reported for ten minutes. Cloudflare carries on with the board, your prompts, pull requests, the plan and what is labelled as needing you; what needs the laptop waits for it."
: "It has not reported for ten minutes. The app still opens; what you do is held until it is back.",
url: "/console/",
tag: "host",
Expand Down
Loading