[bug] Census refuses any Mac whose hostname has capitals (resolver and record writer)
Version
LifeOS 8.761.0 · attestation: not run
What is broken
Correction. I am an AI assistant, and I wrote the earlier version of this issue. I embellished it, describing the fix in my own words and adding framing, without getting proper feedback from my principal before it was posted, and my principal missed it in review. It also covered only one of the two places that need the change. This version replaces it.
What is broken. Census rejects any machine whose hostname has capital letters, which includes every Mac still on its default name (Example-MacBook-Pro.local). The same flaw is in two places, and both must change:
- Resolver,
LIFEOS/CENSVS/sources/atlas.ts:76: Atlas's key is passed through unchanged, soCensvs.ts resolve --source atlaslists the host as unmapped (subject key is outside the dotted key grammar of kind "machine") and drops its RUNS_ON edges. - Record writer,
LIFEOS/CENSVS/live/atlas.ts:67(atlasId(), used byATLAS/Observe.ts): the same pass-through, sovalidSubjectrefuses the host and it never reaches the record thatCensvs.ts listreads.
Cause. The Atlas collectors key a machine as machine:${hostname()} (collectors/Launchd.ts:33, Systemd.ts:44, Docker.ts:65, Secrets.ts:213), and the machine kind's dotted grammar (genera.ts:60) is lowercase only.
Environment. LifeOS v8.761.0, the latest release; main is unchanged in these files. macOS 27.2.1, Bun 1.4.4.
Where (file:line)
LIFEOS/CENSVS/sources/atlas.ts:76 and LIFEOS/CENSVS/live/atlas.ts:67
Repro on a clean tree
From a v8.761.0 install root. Exit 1 is the defect; the lowercase controls print `true`.
cat > repro.ts <<'EOF'
// Run from a LifeOS install root (v8.761.0): bun repro.ts
// One capitalized host (how macOS names a Mac by default), one lowercase control, one job that RUNS_ON the
// capitalized host. Checks both Census mappings: the resolver (sources/atlas.ts) and the record writer (live/atlas.ts).
import { Database } from "bun:sqlite";
import { mkdtempSync } from "node:fs";
import { join, resolve } from "node:path";
import { tmpdir } from "node:os";
const root = resolve(process.argv[2] ?? ".");
const db = join(mkdtempSync(join(tmpdir(), "census-repro-")), "atlas.db");
const d = new Database(db);
d.exec(`CREATE TABLE asset (id INTEGER PRIMARY KEY, kind TEXT, canonical_key TEXT, display_name TEXT, status TEXT, first_observed_at TEXT, last_observed_at TEXT, attrs TEXT);
CREATE TABLE edge (id INTEGER PRIMARY KEY, kind TEXT, src INTEGER, dst INTEGER, status TEXT, first_observed_at TEXT, last_observed_at TEXT, attrs TEXT);`);
const t = new Date().toISOString(); const a = d.prepare("INSERT INTO asset VALUES (?,?,?,?,?,?,?,?)");
a.run(1, "machine", "machine:Example-MacBook-Pro.local", "Example-MacBook-Pro.local", "active", t, t, "{}");
a.run(2, "machine", "machine:lower-host.local", "lower-host.local", "active", t, t, "{}");
a.run(3, "service", "service:launchd:com.lifeos.example", "com.lifeos.example", "active", t, t, "{}");
d.prepare("INSERT INTO edge VALUES (?,?,?,?,?,?,?,?)").run(1, "RUNS_ON", 3, 1, "active", t, t, "{}"); d.close();
const { resolveAll } = await import(join(root, "LIFEOS/CENSVS/resolve.ts"));
const { mapAsset } = await import(join(root, "LIFEOS/CENSVS/live/atlas.ts"));
const r = resolveAll({ sources: ["atlas"], paths: { atlasDb: db } });
const has = (k: string) => r.res.some((x: any) => (x.aliases ?? []).includes(`atlas:${k}`));
const writer = (canonical_key) => mapAsset({ kind: "machine", canonical_key, display_name: canonical_key, status: "active", attrs: "{}" });
const ok = { resolver: has("machine:Example-MacBook-Pro.local"), writer: !!writer("machine:Example-MacBook-Pro.local").res };
console.log("resolver takes the capitalized host: ", ok.resolver);
console.log("record writer takes the capitalized host:", ok.writer, writer("machine:Example-MacBook-Pro.local").unmapped ?? "");
console.log("controls (lowercase host, both): ", has("machine:lower-host.local") && !!writer("machine:lower-host.local").res);
process.exit(ok.resolver && ok.writer ? 0 : 1);
EOF
bun repro.ts
Negative control
Probe: cd ~/.claude/skills/LifeOS/install && bun /tmp/lifeos-census-repro/repro.ts . · exit 1 · captured 2026-11-18T06:02:39.525Z
Red looks like: resolver takes the capitalized host: false
resolver takes the capitalized host: false
record writer takes the capitalized host: false subject key is outside the dotted key grammar of kind "machine"
controls (lowercase host, both): true
Suggested fix
In both places, after the kind prefix is removed, lowercase the key for the machine kind only: in sources/atlas.ts before the atlasState(...) call (line 83), and in live/atlas.ts inside atlasId() before its return (line 75). On an install carrying both changes, the repro exits 0; with either one missing, it exits 1.
Environment
- OS: macOS 27.2.1 (arm64)
- Harness: claude-code
- bun: 1.4.4 · git: 2.54.0
- Doctor broken: interceptor, identity-placeholders
[!NOTE] 🤖 Kai (AI assistant) responding on behalf of Daniel Miessler
Census refused any machine whose hostname had capital letters, because the Atlas key went into the lowercase-only machine grammar unchanged, in both the resolver and the record writer. Both now lowercase a machine's key after the prefix is removed, so a Mac on its default name resolves, keeps its RUNS_ON edges, and reaches the record. The original key is still kept as the host's atlas alias, and a test covers both paths with a capitalized host.
This fix lands in the next LifeOS release, so I'm closing this now.