Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

docs([bucket-record-path-helper]): remove from PLAN.md and log to changelog

[._.]/ Adam Eivyfda49dd6eb11
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.md
index 2bcbc6eb34..dc66c4a4c5 100644
--- a/.changelog/NEXT.md
+++ b/.changelog/NEXT.md
@@ -41,6 +41,7 @@
- **[extract-use-universe-load-hook] Internal refactor: the duplicated "load the linked universe" logic in pipeline stages now sits behind one reusable hook.** No user-visible change.
- **[series-llm-override-resolution-helper] Internal refactor: the series provider/model fallback that three pipeline LLM actions each inlined now lives in one shared helper.** No user-visible change.
- **[story-builder-extract-image-render-hook] Internal refactor: the single-image render lifecycle the Story Builder characters step and universe base-style probe each re-implemented now sits behind shared hooks, and the Story Builder's provider/model picker reuses the shared selector.** No user-visible change.
+- **[bucket-record-path-helper] Internal refactor: the share-bucket exporter and importer now build record-file paths through shared helpers instead of repeating the same hand-joined path in ~10 places.** No user-visible change.
- **[season-continuity-extract-honors-series-llm] Committing a season's episodes now extracts continuity canon with the series' chosen model.** When you accept a season breakdown, the automatic bible/continuity extraction uses the LLM pinned to that series (and honors a per-run model override) instead of falling back to your global active provider — matching how on-demand canon and scene extraction already behave.
- **[story-builder-refine-fallback-changes] Refining a reader map no longer reports edits it didn't make.** When a reader-map refinement comes back empty and your existing map is kept unchanged, the builder now reports no changes instead of listing the edits the discarded attempt had described.
diff --git a/PLAN.md b/PLAN.md
index 3669c5b257..2272f47b12 100644
--- a/PLAN.md
+++ b/PLAN.md
@@ -11,7 +11,6 @@ Claimable, well-specified, no decision needed — `/claim`-able. Unordered.
- [ ] [hidream-qwen-loras-runner-consumers] **Wire HIDREAM/QWEN through `client/src/pages/Loras.jsx`.** `imageGenResolutions.js` was extended on 2026-05-28 (`compatibilityKey` now returns HIDREAM/QWEN as their own keys). Still pending: `client/src/pages/Loras.jsx` `RUNNER_LABELS` / `RUNNER_BG_COLORS` / Top-LoRA section list omit HIDREAM/QWEN so the LoRA picker shows them as unlabeled / no badge color.
- [ ] [flux2-runner-sidecar-tests] **Test coverage for `generateImage`'s sidecar `meta` payload.** `server/services/imageGen/local.test.js` exercises `buildArgs` but never asserts on the sidecar `meta` object built inside `generateImage` — including the `referenceImageFilenames` + `referenceImageStrengths` fields. A focused test would need to either factor the meta-builder out of `generateImage` so it's callable without spawning Python, or stub the spawn + assert on the persisted sidecar JSON.
- [ ] [extract-use-universe-load-hook] **Extract a `useUniverse(universeId)` load hook.** `client/src/components/pipeline/stages/StoryboardsStage.jsx` (~line 57) and `NounsStage.jsx` (~line 149) now run a byte-identical `useMounted` + `let cancelled` + `getUniverse(series.universeId).then(...).catch(...)` effect to load the linked universe record. Extract a `client/src/hooks/useUniverse.js` returning `[universe, loading, error]` (handling the mount/cancel guards internally), register it in the hooks `index.js` barrel + README, and migrate both call sites. Deferred from the wardrobe-picking PR: migrating `NounsStage` is outside that diff's scope and the new module trips the barrel maintenance rule. Surfaced by /simplify (reuse, 2026-06-01).
-- [ ] [bucket-record-path-helper] **Extract bucket record-file path helpers.** The share-bucket exporter and importer hand-join `join(bucket.path, 'records', '<type>', `${id}.json`)` at ~10 sites across `server/services/sharing/exporter.js` (series/issues/universes/media/reviews) and `server/services/sharing/importer.js` (`readReferencedRecords` + the manuscript-review read). `buckets.js` already has the parallel blob helpers (`bucketBlobPath`/`bucketBlobsDir`) but no record-path equivalent. Add `bucketRecordsDir(bucketPath, type)` + `bucketRecordPath(bucketPath, type, id)` to `buckets.js`, optionally add `records/reviews` to `ensureBucketLayout`, and migrate all sites. Deferred from the manuscript-review-sync PR: it's a cross-cutting cleanup of pre-existing hand-joins (my new code follows the established pattern), so it warrants its own change rather than a half-migration. Surfaced by /simplify (reuse, 2026-06-02).
- [ ] [create-issue-preload-series-for-batch] **`createIssue`'s renumber pass re-reads the series on every call — preload it for batch episode seeding.** `createIssue` (`server/services/pipeline/issues.js`) calls `getSeries()` inside its `renumberInline` pass on every invocation. `commitEpisodesToIssues` (`server/services/pipeline/arcPlanner.js`) creates one issue per episode in a loop, so a 12-episode season does 12 redundant `getSeries()` reads of an unchanging record (and `generateIssuesFromArc` already fetched it once). Add a `createIssueWithPreloadedSeries(series, input)` variant (or a `{ preloadedSeries }` option) that threads the already-fetched series into `renumberInline`, and route the batch loop through it. Pre-existing in `createIssue` (the Pipeline season-episodes route pays the same cost); LLM-bound batch so the realized win is small — surfaced by /simplify (efficiency) during the story-builder-issue-llm-seeding PR (2026-06-01). Deferred because it touches the `issues.js` renumber internals beyond this diff's scope.
## Blocked / Deferred (skip for `/claim`)