roadmap BUILT

281. watch holds exactly what ps holds, so it is nothing

calef, 2026-09-13: "We can cut ps with the watch and simplify." (Title and filename provisional: a title is a name and therefore calef's.)

In brief. In a capability system the question "should these be one program or two" has an answer that is not a matter of taste: two programs are two programs when they hold different authority. These held the same authority, from the same named constants, and one was a loop of the other. That argued for a flag. Following it one step further argued for neither.

There was never a gate on this one. calef decided the shape when he raised it and decided it again when he cut it. What was still his at build time was the flag's spelling and the fate of crates/watch, and the cut answered both by removing the things they named.

The measurement that decides it, which outlives the conclusion

Both programs took exactly three slots, and not merely three of the same shape. The same grant_plan constants:

slot user/src/ps.rs user/src/watch.rs
report REPORT = 0 REPORT = 0
the process domain grant_plan::DOMAIN_SLOT grant_plan::DOMAIN_SLOT
diagnostics grant_plan::DIAGNOSTICS_SLOT grant_plan::DIAGNOSTICS_SLOT

The refresh needed no capability of its own, which is the fact that could have gone the other way and did not. wait_interval() was a yield-spin over monotonic_ns(), because this kernel has no timed wait (user/src/timetable.rs's module docs name the gap). Had the interval needed a clock capability, a flag would mean ps always carries authority it usually does not use, and the separate program would have been the least-authority answer. It did not, so it was not.

This paragraph is the durable part of this milestone and it is deliberately written to survive the conclusion moving. Identical cspaces from the same named constants, where one program is the other's loop, is not a boundary; it is a split with nothing behind it. That is a reusable test for "one program or two" in a capability system, and it is worth reaching for the next time the question comes up, whichever way the answer goes.

And the second program was the first one's loop

watch.rs called ps::collect, used ps::Row and ps::MAX_ROWS, followed the same refusal rule and the same diagnostics-before-output ordering. Its diag_slot() fallback carried the comment "ps's own fallback, verbatim". Verbatim duplication across two binaries is the shape rule 7 exists to prevent, arrived at from the other direction: not a #[path] module, but a copy.

Why a flag became a deletion

The flag was the right call on the authority argument alone, and it is still the right call on that argument. What changed is that the argument is not the only one.

Follow it one step further and the flag's entire content is a busy-wait over a table of two columns that barely changes. abi::survey carries a tid and a state. Watching a tid and a state refresh twice a second is not worth a spin loop, a ceiling constant, a clamp function, an escape-sequence prefix and a line of help text. Folding it into ps bought a simplification; deleting it bought more of the same simplification and cost nothing anyone was using.

What makes that safe to do rather than merely tempting is milestone 282 (a thread's CPU time, and the top it makes possible), minted and decided the same day (design/decisions/0150-per-thread-cpu-accounting.md). It adds per-thread scheduled CPU time as a u64 on Thread, tick-sampled in sched::on_tick() and exposed as a fourth word on abi::rendezvous::SURVEY. Once that lands there is something worth watching and something to rank by, and the live view gets rebuilt properly as top rather than as a refresh flag on a static table. Cutting now is not losing the feature; it is declining to carry a poor version of it across the milestone that makes a good one possible.

It was never in watch's family

Upstream watch re-runs an arbitrary command. This one never could, and never would have. Re-running a named command needs a program to hold authority to spawn another program by name, which in this system is the shell's own capability (grant_plan::spawnproto) and is granted to nothing the shell spawns. An interruptible child is built with no capabilities in its cspace at all. So it redrew the one thing it could already reach without that: the supervision domain it was spawned into, which is ps's listing.

That makes it a very thin member of top's family wearing watch's name, which is why the name was wrong and why top is the right shape to rebuild under 282.

The names, and why two unratified ones vanished without a ruling

Neither watch nor crates/watch was ever ratified, and that was deliberate. Both shipped flagged provisional in milestone 126, on the argument that watch is what upstream procps calls the tool (dpkg -L procps lists /usr/bin/watch), which the naming tenet calls the best name available for a standard term a reader already knows. Both were flagged anyway because this program was genuinely narrower than upstream's: one fixed built-in view, not an arbitrary command line. calef declined to rule on either while this milestone might retire them. It did, which is the outcome the provisional flag existed to keep open, and it is recorded here so a reader meeting two names that disappeared unratified does not have to wonder whether somebody forgot.

The provenance blocks lived at the things themselves (milestone 115's shape), so they died with the files. What they said is carried in crates/grant_plan's Prog enum, at the variant's place, and in notes/process-view.md's own section, because nobody reads a deleted file any more than they read a branch.

What it retires

One program, one [[bin]], one archive entry in each of xtask's two architecture manifests, one typed command, one Prog variant and its wire id, two scripted swish-check lines, one crate, one kernel test module, and two unratified names. ps and crates/ps are untouched: the whole point of the reshaped milestone is that ps gains nothing, including the spin loop it would have gained from the flag.

The refusals

BUGS

Follow-on

Index row

calef, 2026-09-13: "We can cut ps with the watch and simplify." The measurement that decides it: ps and watch held the same three slots from the same grant_plan constants, and in a capability system two programs are two programs when they hold different authority, so the split was arbitrary. The refresh needed no capability of its own either, the interval being a yield-spin over the ambient monotonic counter. That argued for a flag; one step further and the flag's whole content was a busy-wait over a table of two columns that barely changes, so it was deleted instead. Safe rather than merely tempting because milestone 282 (DECISIONS §150) adds per-thread CPU time to abi::rendezvous::SURVEY, after which the live view is rebuilt properly as top. Retired two unratified names calef deliberately never ruled.