Repository navigation
Description
Finding
pkgs/id durable worlds live in a CWD-relative .id-worlds/<NAME>/ directory that is gitignored nowhere. Running id serve with a world from inside a repo checkout creates .id-worlds/<name>/ in the checkout, and most of its contents — the world's journal, directory, petnames, mail outbox, installed modules and records namespace — show up in git status, one git add -A from being committed. This is the same failure #420 and #432 fixed for the identity DB and for events.redb/groups.jsonl; the world directory as a whole was missed, and only two of its files happen to be covered by those basename fixes.
Evidence (verified on current main d3bba2d3)
pkgs/id/src/commands/serve.rs:408,416-418:pub const WORLDS_DIR: &str = ".id-worlds";andworld_dir(name)returnsPathBuf::from(WORLDS_DIR).join(name)— relative, no data-dir prefix of its own.pkgs/id/src/main.rs:82-87(comment + code): all data paths are CWD-relative; the process only changes directory when--data-diror--newis given. A plainid servefrom a checkout therefore writes.id-worlds/into the checkout.pkgs/id/src/cli.rs:387documents: "The world's files live in.id-worlds/<NAME>/."- World directory contents:
pkgs/id/src/world_store.rs:321-346opensjournal.jsonl,directory.jsonl,petnames.jsonl,outbox.jsonlandmodules/<blake3>.wasmunder the world dir;pkgs/id/src/artifact.rs:50putsartifacts.jsonlbesidedirectory.jsonl;serve.rs(~line 574) addsrecords.namespace; the event store and group log addevents.redb/groups.jsonl. git check-ignoreon maind3bba2d3— none of these is ignored:.id-worlds/lobby/journal.jsonl-> NOT IGNORED.id-worlds/lobby/directory.jsonl-> NOT IGNORED.id-worlds/lobby/artifacts.jsonl-> NOT IGNORED.id-worlds/lobby/petnames.jsonl/outbox.jsonl-> NOT IGNORED.id-worlds/lobby/records.namespace-> NOT IGNORED.id-worlds/lobby/modules/abc.wasm-> NOT IGNORED- Only
events.redb(root.gitignore:120) andgroups.jsonl(:122) are covered, by the repo-wide basename rules from pkgs/id: events.redb (event store) and groups.jsonl (group log) are gitignored nowhere — CWD-relative defaults leave them one git add -A from commit #432. Root.gitignore:117-122has.iroh*,.identity.db,.identity.redb,events.redb,events.redb.tmp,groups.jsonl— no.id-worlds.
- Dedup:
gh search issues "id-worlds"returns nothing; pkgs/id: .identity.db/.identity.redb only gitignored under pkgs/id/ — a serve run from any other in-repo directory leaves the identity DB one git add -A from recommit #420/pkgs/id: events.redb (event store) and groups.jsonl (group log) are gitignored nowhere — CWD-relative defaults leave them one git add -A from commit #432 cover different files and are closed.
Why it matters
A world's journal and directory are the world's durable state (inputs, installs, directory records, petnames, queued mail). Committing them by accident leaks that state into git history and bloats the repo with append-only logs and wasm modules — exactly the accident class #372/#420/#432 already had to clean up for the identity DB and event store. The partial coverage is worse than none in one way: git status still shows the directory, so the remaining files look deliberately tracked.
Acceptance criteria
- Root
.gitignoreignores.id-worlds/at any depth (mirroring the repo-wide.iroh*/events.redbentries from pkgs/id: .identity.db/.identity.redb only gitignored under pkgs/id/ — a serve run from any other in-repo directory leaves the identity DB one git add -A from recommit #420/pkgs/id: events.redb (event store) and groups.jsonl (group log) are gitignored nowhere — CWD-relative defaults leave them one git add -A from commit #432), sogit check-ignore .id-worlds/<any>/journal.jsonl(anddirectory.jsonl,artifacts.jsonl,petnames.jsonl,outbox.jsonl,records.namespace,modules/*.wasm) succeeds. - No tracked file lives under a
.id-worlds/path (verify withgit ls-files | grep id-worlds— expected empty), so nogit rm --cachedis needed; if one exists, remove it from tracking in the same change. - The existing id entries (
.identity.db,.identity.redb,events.redb,groups.jsonl) are unchanged.
Suggested fix: add .id-worlds/ to the root .gitignore id block next to .iroh*.
Activity