diff --git a/.opencode/.gitignore b/.opencode/.gitignore index 94b416f779..35c7218dc2 100644 --- a/.opencode/.gitignore +++ b/.opencode/.gitignore @@ -13,3 +13,10 @@ antigravity-accounts.json antigravity-accounts.json.*.tmp antigravity-signature-cache.json antigravity-logs/ + +# OpenCode per-channel service configs (service.json, service-.json): +# generated server passwords/endpoints, per-machine, rewritten by the CLI +# service layer on start. Root .gitignore already covers service-prod.json; +# the "local" channel's file (written by a source-run dev server whose +# project was this clone) blocked pm-git-sync the same way (#5389). +service*.json diff --git a/pm-stack/aggregator/README.md b/pm-stack/aggregator/README.md index 4bc21361a0..209c6c066d 100644 --- a/pm-stack/aggregator/README.md +++ b/pm-stack/aggregator/README.md @@ -451,7 +451,7 @@ of silently showing canned data. `bun run dev` sets the switch for you. | `PM_AGG_COMMENTS_FILE` | `./comments.json` | Dashboard comment store (#906) — aggregator-local; created on first comment | | `PM_AGG_ACTIONS_FILE` | `./actions.json` | Dashboard action store (#1152/#1154/#1156) — aggregator-local; created on first action | | `PM_AGG_REGISTRY_FILE` | `./registry.json` | Durable session identity registry (#906) — merged records persist across restarts | -| `PM_AGG_ACTIVITY_FILE` | `./activity-ingestion.json` | Activity-ingestion store (#3321) — per-source checkpoints + dedupe seen sets + gap records for the watchdog/Kaneo stream writers | +| `PM_AGG_ACTIVITY_FILE` | `~/.local/state/pm-aggregator/activity-ingestion.json` | Activity-ingestion store (#3321) — per-source checkpoints + dedupe seen sets + gap records for the watchdog/Kaneo stream writers | Secrets are read from the environment only and are never committed or printed. Names here reference Bitwarden entries (`kaneo.*`, `grist.*`). diff --git a/pm-stack/aggregator/src/config.ts b/pm-stack/aggregator/src/config.ts index be7dbadd7b..75575363b3 100644 --- a/pm-stack/aggregator/src/config.ts +++ b/pm-stack/aggregator/src/config.ts @@ -137,7 +137,16 @@ export function loadConfig(env: Record = process.env actionsFile: s(env.PM_AGG_ACTIONS_FILE, join(process.cwd(), "actions.json")), viewsFile: s(env.PM_AGG_VIEWS_FILE, join(process.cwd(), "views.json")), eventsFile: s(env.PM_AGG_EVENTS_FILE, join(process.cwd(), "events.json")), - activityFile: s(env.PM_AGG_ACTIVITY_FILE, join(process.cwd(), "activity-ingestion.json")), + // Default is the state dir, NOT cwd (#5389): aggregator runtime state + // lives in ~/.local/state/pm-aggregator (2026-10-27 precedent), and the + // cwd default let an env-less run write this store into whatever + // checkout it started from -- in the primary clone that dirtied the + // tree and blocked pm-git-sync. install.sh renders PM_AGG_ACTIVITY_FILE + // to this same path for the unit. + activityFile: s( + env.PM_AGG_ACTIVITY_FILE, + join(homedir(), ".local", "state", "pm-aggregator", "activity-ingestion.json"), + ), registryFile: s(env.PM_AGG_REGISTRY_FILE, join(process.cwd(), "registry.json")), snapshotsDir: s(env.PM_AGG_SNAPSHOTS_DIR, join(process.cwd(), "snapshots")), digestsDir: s(env.PM_AGG_DIGESTS_DIR, join(process.cwd(), "digests")),