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
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
address review (codex): state the auto-default contract accurately — no pin, not "no stored key"
[._.]/ Adam Eivyc5c5fa220b56
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.mdindex 2abb6af4ea..319588c6ff 100644--- a/.changelog/NEXT.md+++ b/.changelog/NEXT.md@@ -105,13 +105,11 @@- The chart renders as a labelled, bar-gridded kit sheet in hand-rolled SVG — no engraving library, theme-aware ink in both light and dark, beat boundaries emphasized so a 16th-note row still reads in fours, and each bar scrolling as a unit on a phone. Play mode adds a transport bar: a practice-tempo input + slider (20–320) seeded from the chart's own `tempo:`, percent-of-written buttons (50/75/90/100/110%), a count-in of up to 2 bars, a loop toggle with a from/to bar range, and a metronome click layered over the kit on the same clock. A playhead column tracks the sounding step and the screen stays awake while it plays; space plays/stops, `+`/`-` nudge the tempo, `[`/`]` set the loop ends at the bar you're on.- The kit is synthesized, so nothing is downloaded and no samples ship. The practice tempo is remembered per song on the machine you set it on — it is never written into the record, so it can't sync over a peer's own practice speed. Non-drum songs are untouched: transpose, chord diagrams and autoscroll behave exactly as before, and the transpose/voicing controls simply hide for a kit chart where they'd mean nothing. Pasting a drum chart into the importer auto-selects the format and previews it on the grid, and one example groove ("Example Rock Beat") ships as the format's worked reference — existing installs receive it on upgrade without ever overwriting a copy you've edited or deleted.-<<<<<<< HEAD## Sprite Manager corrections- **[issue-3134] Every sprite regeneration surface now takes a correction note, so a bad result can be described instead of re-rolled and hoped over.** The turnaround sheet and the 7 directional anchors already worked this way; the main reference, a place/object's ambient reference, and the walk-cycle / scanner-action / ambient-loop videos could only be re-rolled blind — same prompt, new random seed. Each of those five now shows the same optional note ("the legs barely lift", "the trunk leans too far right") and appends it to the prompt as an explicit, high-priority correction on the next Generate. Leaving it empty is byte-for-byte the regenerate you get today, so nothing changes until you type something.- The note lives in one place per sprite, so one typed on a workflow panel is visible on the matching asset card and rides whichever Regenerate you click. Notes are scoped to the thing they describe, though: a still-image fix written against the east anchor never leaks into the east walk video's prompt, and the ambient reference and its loop keep separate notes. Notes reset when you switch sprites.- The correction that produced a given re-roll is recorded with it and shown in the existing prompt provenance (Asset Inspector / lightbox), matching how anchors and the turnaround already behave. A scanner clip's provenance also now rebuilds from the scanner's own prompt rather than reporting the walk prompt it was never rendered with.-=======## Creative Commissions- **[issue-3135] A creative commission can now pin the backend that actually renders it — local diffusion, Codex, or Grok — instead of taking whatever the planner happened to pick.** Which backend a scheduled image/video commission rendered on used to be an accidental side effect: the Creative Director's planner LLM writes the render job's parameters freehand, it never set a backend, and so every commission silently landed on local diffusion no matter what you wanted. Image commissions now carry an **Image backend** picker (Auto / Local diffusion / Codex / Grok), video commissions a **Video backend** picker (Auto / Local / Grok), and a music video carries both; pinning Local also lets you name the model to render with. The pin travels to the render itself and overrides the planner, so "this one always renders on Grok" actually holds.@@ -119,4 +117,3 @@- A pin is re-checked against your live settings each run rather than trusted blindly: if you later turn off the Codex or Grok toggle in Settings, the affected commission quietly falls back to a backend that works instead of failing every nightly fire. The form says so too — a pin whose backend is currently disabled is flagged in place rather than silently dropped, so you can see why your choice stopped applying.- The pin genuinely overrides the planner rather than politely deferring to it: a model you named for Local rendering wins over whatever model the planner wrote, and a backend the planner tried to name is discarded in favour of yours. A Grok-pinned video also gets its clip length translated to a length Grok actually delivers, rounding up — so a 10-second commission renders a 10-second clip instead of silently falling to Grok's 6-second minimum.- Commissions federate, so the pin syncs across your machines; the commission sync version was raised to keep an older peer from silently stripping the field and pushing the un-pinned version back.->>>>>>> f8a772e60 (feat: let a creative commission pin the backend that renders it (#3135))diff --git a/server/services/creativeCommissions/abilityAdapters.js b/server/services/creativeCommissions/abilityAdapters.jsindex 1c4510be55..533c83e07c 100644--- a/server/services/creativeCommissions/abilityAdapters.js+++ b/server/services/creativeCommissions/abilityAdapters.js@@ -103,10 +103,11 @@ function genValue(commission, key) {* planner LLM authored, and gives every plan-driven CD project the same knob for* free, not just commission-spawned ones.*- * Returns `null` when nothing is pinned (every mode `auto`), so an unpinned- * commission adds no key at all and the enqueued params stay byte-identical to- * pre-#3135 behavior. A `modelId` alone is never a pin — the mode has to name a- * backend for a model id to mean anything.+ * Returns `null` when nothing is pinned (every mode `auto`), which is what makes+ * the default a no-op: no pin ⇒ `enforceRenderBackendPin` returns the enqueued+ * params byte-identical to pre-#3135 behavior, without even reading settings. A+ * `modelId` alone is never a pin — the mode has to name a backend for a model id+ * to mean anything.*/export function buildRenderBackendPin(commission) {const gen = commission?.generation;@@ -135,9 +136,15 @@ function buildVideoGeometryParams(commission, { defaultVideoModelId } = {}) {quality: gen?.quality || 'standard',modelId: gen?.model || (typeof defaultVideoModelId === 'function' ? defaultVideoModelId() : undefined),targetDurationSeconds: gen?.targetDurationSeconds || 10,- // Only present when the commission actually pinned a backend (#3135) — an- // unpinned commission must not even carry the key, so createProject stores- // the same `null` a hand-made project gets.+ // Only passed when the commission actually pinned a backend (#3135), so an+ // unpinned commission's createProject call is byte-identical to a hand-made+ // project's — both omit the arg and buildProjectRecord stores `null`, exactly+ // as it stores `musicBed`/`plan`/`directive` null on a bare project. (The+ // stored KEY is new either way; that's the standard additive-field shape for+ // this record, which round-trips through the JSONB column verbatim. What+ // matters for back-compat is that an unpinned commission can never produce a+ // non-null pin, and the ENQUEUED job params stay untouched — see+ // enforceRenderBackendPin.)...(renderBackend ? { renderBackend } : {}),};}diff --git a/server/services/creativeCommissions/abilityAdapters.test.js b/server/services/creativeCommissions/abilityAdapters.test.jsindex 4f83b21cca..738ccb2863 100644--- a/server/services/creativeCommissions/abilityAdapters.test.js+++ b/server/services/creativeCommissions/abilityAdapters.test.js@@ -166,9 +166,10 @@ describe('buildProjectParams — every type yields well-formed render settings',});describe('buildRenderBackendPin — per-commission render backend (#3135)', () => {- it('returns null when nothing is pinned (auto = no key at all)', () => {- // The hard back-compat criterion: an auto/absent pin must not add a- // renderBackend key, so createProject stores exactly what it stored before.+ it('returns null when nothing is pinned (auto = no pin)', () => {+ // The hard back-compat criterion: an auto/absent pin must never produce a+ // pin, so the enqueue-time forcing step is a strict no-op (see media.test.js)+ // and createProject is called with exactly the args it got before.expect(buildRenderBackendPin({ generation: { imageMode: 'auto', imageModelId: null } })).toBeNull();expect(buildRenderBackendPin({ generation: {} })).toBeNull();expect(buildRenderBackendPin({})).toBeNull();diff --git a/server/services/creativeDirector/projectsLogic.test.js b/server/services/creativeDirector/projectsLogic.test.jsindex 12306c0801..8250b51c2b 100644--- a/server/services/creativeDirector/projectsLogic.test.js+++ b/server/services/creativeDirector/projectsLogic.test.js@@ -150,6 +150,20 @@ describe('normalizeRenderBackend (#3135)', () => {expect(normalizeRenderBackend({ video: { mode: 'local', modelId: ' example-model ' } })).toEqual({ video: { mode: 'local', modelId: 'example-model' } });});++ it('never fabricates the key onto an existing record read back or synced', () => {+ // buildProjectRecord only runs at CREATE. A pre-#3135 project on disk must+ // round-trip without the key appearing (which would silently change its+ // content hash), and a pin arriving from a newer peer must survive verbatim.+ const legacy = sanitizeProjectForSync({ id: 'cd-legacy', name: 'X', updatedAt: '2026-01-01T00:00:00.000Z' });+ expect('renderBackend' in legacy).toBe(false);++ const fromPeer = sanitizeProjectForSync({+ id: 'cd-new', name: 'Y', updatedAt: '2026-01-02T00:00:00.000Z',+ renderBackend: { image: { mode: 'grok' } },+ });+ expect(fromPeer.renderBackend).toEqual({ image: { mode: 'grok' } });+ });});describe('applyProjectPatch', () => {