`bun Services.ts doc` does not reproduce the table in `BackgroundServices.md`: two registered services are missing from the doc, and three of its rows cannot be generated
Version
LifeOS 7.40.4. Verified against a --depth 1 clone of tag v7.40.4, SHA
be9e8ef889f00a29f4fd677dee4772fdf32e07ce (git ls-remote --tags confirms the tag resolves there). The
repro below clones the public repo itself and runs under env -i with a throwaway HOME, so it depends on
nothing local to my machine and reads nothing from an existing install.
What is broken
LIFEOS/DOCUMENTATION/Services/BackgroundServices.md states in three places that its services table is
machine-produced: frontmatter generator: LIFEOS/TOOLS/Services.ts (run bun Services.ts doc to regenerate the table) at line 6, a command in the prose at line 20, and an HTML marker directly above the table at
line 39 reading generated by bun LIFEOS/TOOLS/Services.ts doc — do not hand-edit; update SERVICES in Services.ts. The section heading at line 37 is "The services (generated from live plists)", and the doc's
opening line promises "Every recurring Mac service LifeOS runs, in one place".
Running that generator against the shipped payload produces a different table. It emits 22 rows; the
committed table has 23. Twenty labels are shared. Three labels in the committed table are not emitted —
com.lifeos.amberroute, com.lifeos.bookmark-watchdog, com.lifeos.backups — and two labels the generator
does emit are absent from the committed table: com.lifeos.interviewdue and com.lifeos.pegwatch.
The omission is the half with a cost. Both missing services are ordinary entries in the shipped SERVICES
registry with their installers in the payload, so on a fresh public install bun Services.ts install --all --yes stands up a daily Interview due-check job and a 16-minute PegWatch CPU/GPU sweep, neither of which
is named anywhere in the file that claims to list every recurring service. grep -ci 'interviewdue\|pegwatch'
over the whole doc returns 0, so there is no prose mention either.
The three extra rows are less severe: each one's Install cell already carries the generator's containment
marker, "per-install private infrastructure — defined in LIFEOS/USER/CONFIG/services.json, NOT in the
public release payload", so a reader is told those are not shipped. What they establish is that the
committed table cannot be the output of the shipped generator on a public tree: loadUserServices() reads
$HOME/.claude/LIFEOS/USER/CONFIG/services.json, and the payload ships USER/CONFIG/ without a
services.json in it.
One cell's text has drifted independently of row membership. The generator prints s.purpose verbatim; the
distill row's Purpose in the doc (line 50) reads "content ideas → work issues, improvements → Upgrades
store, archive health report; stateful dedupe", while the registry string reads "content ideas, upgrades,
archive health."
I am not claiming to know how this happened; the clone is single-commit and carries no history. The pattern
is consistent with the table having been generated on an install that had a services.json and an older
registry — frontmatter last_updated is 2026-07-08T00:00:00Z — but that is a guess, offered as one.
Where (file:line)
The doc and the registry disagree about the service list, and the doc names the registry as its own source.
- Writer (the declared source of truth):
LIFEOS/TOOLS/Services.ts:63—export const SERVICES: Svc[], 22 entries.:109iscom.lifeos.interviewdue;:129iscom.lifeos.pegwatch. Neitheramberroutenorbookmark-watchdognorcom.lifeos.backupsappears in the file. - Generator:
LIFEOS/TOOLS/Services.ts:311-323— thedocbranch, which iteratesallServices()=SERVICES+loadUserServices()and prints one row each. - Per-instance source:
LIFEOS/TOOLS/Services.ts:145—USER_SERVICES_PATH = LIFEOS/USER/CONFIG/services.json. Absent from the payload, soloadUserServices()returns[]on any public install (the source comment at:139-145says exactly this). - Reader (the committed table):
LIFEOS/DOCUMENTATION/Services/BackgroundServices.md:43-65. The three non-generable rows are:63(amberroute),:64(bookmark-watchdog),:65(backups). The drifted Purpose cell is:50. - The marker that says the table is generated:
BackgroundServices.md:39; frontmattergenerator:at:6. - No staleness check exists for this doc:
LIFEOS/TOOLS/Services.ts:376— the usage line is<status|install|uninstall|doc>; there is nocheckmode. Nothing in the payload invokesServices.ts docoutside the doc's own prose.
Two related lines, for context rather than as part of the claim. The doc's "Fresh install" paragraph at
:69 still says DeployComponents.ts "currently covers ~9 components; wiring it to read Services.ts's
registry so a single Setup step covers all 16 is the tracked follow-up" — that follow-up appears to be what
#1872 closed in code for the next release, and the registry now holds 22 entries rather than 16.
(The shipped directory is USER/CONFIG/; LIFEOS/USER is the symlink the installer creates at install
time, which is why a plain payload copy has no LIFEOS/USER/CONFIG/ until then.)
skills/LifeOS/Tools/DeployComponents.ts:57-61 still lists the same three short labels at this tag; #1872
closed on 2026-08-17, three days after it was cut, so once that lands this doc becomes the only place in the
payload naming them as services.
Repro on a clean tree
Self-contained, about twenty seconds. Save as repro-up18.sh and run bash repro-up18.sh. It clones the
public repo at the tag, builds an isolated HOME from the payload, and reads nothing from an existing
install. It installs nothing and never calls launchctl.
#!/usr/bin/env bash
# UP-18 repro: does `Services.ts doc` reproduce the shipped BackgroundServices.md table?
set -u
WORK="$(mktemp -d)"
git clone --depth 1 --branch v7.40.4 https://github.com/danielmiessler/LifeOS.git "$WORK/repo" >/dev/null 2>&1
P="$WORK/repo/LifeOS/install"
# A clean HOME containing only the release payload: no ~/Library/LaunchAgents,
# no LIFEOS/USER/CONFIG/services.json. `env -i` so no ambient LIFEOS_* var leaks in.
mkdir -p "$WORK/home"
cp -R "$P" "$WORK/home/.claude"
env -i PATH="$PATH" HOME="$WORK/home" \
bun "$WORK/home/.claude/LIFEOS/TOOLS/Services.ts" doc > "$WORK/generated.md"
# Compare the SET OF SERVICES, not whole rows: the Cadence column is read from
# live plists by design, so it is machine-dependent. The row set is not — it is
# SERVICES[] plus a USER-tree services.json that no public install has.
lbl() { grep '^| \*\*' "$1" | sed -E 's/^\| \*\*[^*]*\*\* `([^`]+)`.*/\1/' | sort; }
lbl "$P/LIFEOS/DOCUMENTATION/Services/BackgroundServices.md" > "$WORK/shipped.labels"
lbl "$WORK/generated.md" > "$WORK/generated.labels"
echo "rows in shipped doc table : $(wc -l < "$WORK/shipped.labels" | tr -d ' ')"
echo "rows the generator emits : $(wc -l < "$WORK/generated.labels" | tr -d ' ')"
echo
echo "in the shipped table, NOT emitted by the generator:"
comm -23 "$WORK/shipped.labels" "$WORK/generated.labels" | sed 's/^/ /'
echo "emitted by the generator, NOT in the shipped table:"
comm -13 "$WORK/shipped.labels" "$WORK/generated.labels" | sed 's/^/ /'
echo
if diff -q "$WORK/shipped.labels" "$WORK/generated.labels" >/dev/null; then
echo "RESULT: match (nothing to report)"; exit 0
else
echo "RESULT: mismatch"; exit 1
fiObserved:
rows in shipped doc table : 23
rows the generator emits : 22
in the shipped table, NOT emitted by the generator:
com.lifeos.amberroute
com.lifeos.backups
com.lifeos.bookmark-watchdog
emitted by the generator, NOT in the shipped table:
com.lifeos.interviewdue
com.lifeos.pegwatch
RESULT: mismatchExit code 1.
Two static checks, same clone, that show the omitted pair is real and reachable:
cd LifeOS/LifeOS/install
# registered, with installers in the payload
grep -n 'com.lifeos.interviewdue\|com.lifeos.pegwatch' LIFEOS/TOOLS/Services.ts
ls LIFEOS/TOOLS/InstallInterviewDue.ts LIFEOS/TOOLS/InstallPegWatch.ts
# and named nowhere in the doc that lists every service
grep -ci 'interviewdue\|interview due\|pegwatch' LIFEOS/DOCUMENTATION/Services/BackgroundServices.mdObserved:
109: { label: "com.lifeos.interviewdue", title: "Interview due-check", category: "maintenance", optIn: true,
129: { label: "com.lifeos.pegwatch", title: "PegWatch (CPU/GPU peg detector)", category: "sweep", optIn: true,
LIFEOS/TOOLS/InstallInterviewDue.ts
LIFEOS/TOOLS/InstallPegWatch.ts
0And what the installer would actually do. install without --yes is the dry preview: the code prints its
targets and process.exit(0) before reaching any launchctl call, so this writes nothing and loads no job.
env -i PATH="$PATH" HOME="$WORK/home" \
bun "$WORK/home/.claude/LIFEOS/TOOLS/Services.ts" install --allObserved (20 lines; the two the doc never names are marked):
Installing 20 service(s):
(dry preview — re-run with --yes to execute)
com.lifeos.pulse: bash ~/.claude/LIFEOS/PULSE/manage.sh install
...
com.lifeos.interviewdue: bun ~/.claude/LIFEOS/TOOLS/InstallInterviewDue.ts <-- absent from the doc
...
com.lifeos.pegwatch: bun ~/.claude/LIFEOS/TOOLS/InstallPegWatch.ts <-- absent from the doc
com.lifeos.bunkermonitor: bun ~/.claude/LIFEOS/TOOLS/InstallBunkerMonitor.ts(20 rather than 22 because synthesis and distill carry #-prefixed non-runnable install notes and are
filtered out at Services.ts:326.)
Negative control
The control is the generator's own output against the committed file, which is why the repro is one script rather than a reading of the diff: the check is the thing the doc's marker asserts will pass.
On unpatched v7.40.4 the script exits 1, with three labels on one side and two on the other. If the
committed table were what the shipped generator produces from the shipped registry, comm would print
nothing on either side and the script would exit 0 with RESULT: match (nothing to report). That is the
same script, the same clone, the same command — only the contents of the two files decide which branch it
takes. Nothing needs to be edited to move it, and nothing in the script knows what the answer should be.
Three further controls in the same run:
- The comparison is payload-only. The row set is
SERVICES[]plusloadUserServices(), and the latter's source file is not in the payload (findforservices.jsonunder the copied tree returns nothing;LIFEOS/USER/CONFIG/does not exist). So the 22 is fixed by the release, not by the machine running it. - The two columns that are machine-dependent are deliberately excluded. Cadence is parsed from live
plists (
cadenceOfDarwin,Services.ts:246-256) and renders—on a tree with none installed; and for#-prefixed entries the Install cell skips theHOME→~substitution the other branch applies (:322). Comparing whole rows would go red for those reasons too, which would be noise. Comparing labels isolates the claim. Services.ts statuswas not used and is not quoted anywhere here. It callslaunchctl list(:173), which reports the state of the machine running it rather than anything about the release.docand theinstalldry preview call neitherlaunchctlnorsystemctl.
Suggested fix (options, none of them tested)
- Regenerate and commit the table, plus the three prose mentions — but not by pasting generator output as-is. The generated
distillrow carries the regenerating machine's absolute home path::322applies aHOME→~substitution on the normal branch, while the#branch iss.install.slice(1).trim()with no substitution at all. I hit this on my own run, where the row came back containing the full path of the scratch tree. That is the leak the comment at:317-319says the per-instance branch exists to prevent, so regenerating into a public doc needs that cell checked by hand until the substitution covers both branches. The doc's body also names the non-shipped services outside the table —:18-19usesamberrouteas the--onlyexample,:32refers to "the bookmark watchdog",:35to "backups" — so regenerating alone leaves the prose behind.bun LIFEOS/TOOLS/Services.ts docon a tree without a privateservices.json, pasted between the marker at:39and the end of the table. That alone makes the file match its marker and putsinterviewdueandpegwatchin front of readers. - Add a
checkmode and wire it to release.ArchitectureSummaryGenerator.tsin the same payload already has the shape — its header readscheck Check if summary is stale (exit 1 if stale, 0 if fresh), andhooks/handlers/RebuildArchSummary.ts:37invokes the generator. AServices.ts doc --checkcomparing emitted rows to the committed block, run at release time, would make this class of drift fail loudly rather than ship. - Decide what the doc should say about per-instance services. If the three USER-tree rows are meant to
be visible to public readers, they need a source the payload has; if they are not, the containment branch
at
:320-322could skipperInstanceentries entirely when generating a doc destined for the release, so a regeneration on a maintainer's machine produces the same table as on a clean one. Option 2 does not fix this on its own — a check run on a machine that hasservices.jsonwould go green on a table a public reader cannot reproduce.
#1812 is the precedent, and this file is the evidence for what that remedy amounts to. Its close says
marker-stamping means the doc and the manifest "can no longer drift apart silently" — and this document
carries that same generated-by marker at this tag while having drifted. A marker records a claim; it does
not check one. At this tag
HookSystem.md's regenerated blocks carry a date-stamp comment (:72, :114, :153, :241, :319:
"regenerated from settings.json 2026-08-10") and nothing verifies it. The one generated doc with a real
check-and-rebuild is ARCHITECTURE_SUMMARY.md, whose check runs from hooks/DocIntegrity.hook.ts:45 via
handlers/RebuildArchSummary.ts. So the remedy has landed per document rather than as a check covering every
marker-stamped file, and DocIntegrity.hook.ts is the natural host for a Services.ts doc --check.
Scope — what I did not verify
- Why the table diverged. Single-commit clone, no history inspected, no claim made. The mechanism in "What is broken" is marked as a guess.
- Whether
InstallInterviewDue.tsandInstallPegWatch.tssucceed. I read them into the dry-preview target list and confirmed both files ship. I did not execute either, and installed, loaded and started no launchd job at any point. - Any runtime consequence. None measured. The cost I can show is that a doc promising a complete list is
missing two entries that
install --allwill create, and carries three a public install cannot have. - Linux. Everything above ran on macOS.
Services.tsbranches onprocess.platformfor cadence and discovery, but the row set is platform-independent, so I expect the same result on Linux — untested. skills/LifeOS/Workflows/Setup.md:49. I looked at this as a possible second instance and concluded it is not one. Itspulse | optionalis in a table headed Default, describing the à-la-carte enhancements menu run byDeployComponents.ts, where every row buthooksreadsoptional. The doc'scoreis the Opt-in column reportingoptIn: falseon the registry entry, meaningServices.ts installwith no flags includes it. Different installers, different questions; both are true. Mentioned only so it does not get filed as a follow-up.
Confirmations
- Searched open and closed issues before filing. #2036 (CLOSED, mine) already tabled the
com.lifeos.backupsrow atBackgroundServices.md:65as inert for want ofservices.json, and its close says a template now exists in source — which is why this report does not lead with the three per-instance rows and claims nothing aboutbackupsbeyond "not generable from this payload". Other prior art: #1872 (CLOSED) names the same three orphan labels but fixesDeployComponents.ts's own list, not this doc, and does not mentioninterviewdueorpegwatch; #1812 (CLOSED) is the same shape onHookSystem.mdand is cited above as the precedent rather than a duplicate; #1926 (CLOSED) is a stale hand-maintained inventory table inMemorySystem.md. Queries included BackgroundServices, Services.ts, backups service, launchd, service registry, generated doc drift, amberroute, bookmark-watchdog, pegwatch, interviewdue, doc drift, regenerate table, services.json, do not hand-edit.pegwatchandinterviewduereturn zero results across the full issue history. - Repro runs on a clean tree. The script clones the public repo at
v7.40.4itself, builds an isolatedHOMEundermktemp -d, and runs underenv -i; it reads nothing from an existing install and installs nothing. - Personal data removed. No home paths, usernames, hostnames, or install-specific values appear above; every
path is either a repo-relative payload path or a
$WORK/~placeholder.
Source: danielmiessler/LifeOS