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([issue-1642]): log moodBoard image-resolver de-dup to changelog

[._.]/ Adam Eivy38c7483179e6
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.md
index 34e93df941..e553e4dcc0 100644
--- a/.changelog/NEXT.md
+++ b/.changelog/NEXT.md
@@ -150,5 +150,6 @@
## Internal
- **[issue-1640] Extracted the duplicated gallery-image filename resolver into one shared `server/lib/localImageFilename.js` helper.** Four federated-record domains each carried a byte-identical copy of the "resolve a stored image reference to its bare `data/images/` filename (or null for empty/external-URL/non-image-path)" logic that the peer-sync asset pipeline relies on — `headshotImageFilename` (authors), `portraitImageFilename` (artists), `coverImageFilename` (albums), and `startingImageFilename` (Creative Director projects). They now all delegate to a single `localImageFilename(urlOrPath)` (barrelled + cataloged per the module-organization rule); each domain keeps its named export as a thin wrapper so the imports `peerSync.js` relies on are unchanged. Pure-function refactor, no behavior change; the new helper is unit-tested and each domain's existing `logic.test.js` still pins the wrapper behavior. (`server/lib/localImageFilename.js`, `server/services/{authors,artists,albums,creativeDirector}/`)
+- **[issue-1642] Mood Board's image-asset resolver now builds on that same shared helper instead of carrying its own copy.** The mood-board `imageUrlToAppAsset` (the `{ kind, filename }` superset that also resolves `/data/image-refs/`) reimplemented the identical "trim → reject external URL → strip querystring → basename" pipeline that `localImageFilename` already owns. It now delegates the gallery-image and rejection cases to `localImageFilename` and shares a new `assetBasename` primitive (the strip-querystring→basename step) for the image-refs branch, so the last copy of that logic is gone. Pure-function refactor, no behavior change — the existing `moodBoard/logic.test.js` cases all still pass and `assetBasename` is unit-tested. (`server/lib/localImageFilename.js`, `server/services/moodBoard/logic.js`)
- **[issue-1524] Renumbered the duplicate `121-comic-script-visible-text-prompt` migration to `126`.** A rebase had landed two migration files numbered 121 (`121-codex-tui-bypass-sandbox` and `121-comic-script-visible-text-prompt`) on main. Both still applied exactly once (migrations are keyed by full filename, not number), so this was cosmetic — but the duplicate number muddied log/sort order. Renamed the comic-script one to the next free number; it's an idempotent hash-driven prompt-replace, so installs that already applied it re-run it harmlessly as a no-op. (`scripts/migrations/126-comic-script-visible-text-prompt.js`)
- **[issue-1577] Added a drift guard tying the Series Autopilot dry-run plan to the resolver.** `buildDryRunPlan` (the steps the autopilot advertises it WILL run) is kept in sync with `resolveNextStep` (the steps execute actually runs) **by hand** — a future edit to the resolver could leave the plan advertising steps execute will skip, or vice-versa, with no test to catch it. A new parity test walks `resolveNextStep` the way the execute dispatch does (applying each completed step's effect and re-resolving) to collect the ordered step sequence, then asserts it matches `buildDryRunPlan`'s output across the comic+visual, text-only, editorial-rounds-0, and TV fixtures. Test-only; no behavior change. (`server/services/pipeline/seriesAutopilot.test.js`)