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
fix: send arcRole to the arc verifier so its role-balance check stops firing on every series
[._.]/ Adam Eivy68cc1e36c8df
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.mdindex 8d4cd818c1..0cc644ffe7 100644--- a/.changelog/NEXT.md+++ b/.changelog/NEXT.md@@ -36,9 +36,7 @@## Fixed- **The prompt-drift baseline caught up with the arc-resolve migration, un-reddening `main`.** Migration 254 shipped a new `pipeline-arc-resolve.md` and correctly recorded the prior default as an accepted-old hash, but the independent baseline in `scripts/setup-data-drift.test.js` still named the superseded hash as current — so the drift sweep disagreed with the migrations it mirrors and the suite failed on every commit after it landed. The baseline now carries the shipped hash and lists the previous one among the accepted-old set. The guard itself is unchanged and still fails when a migration ships a hash it doesn't export.-=======- **Body stats on the MeatSpace Overview card no longer show raw float precision.** A unit-converted weight rendered every binary digit it carried (the shape `170.35000000000002 lbs`), blowing out the tile's line and implying precision the measurement never had. Weight, body fat, lean mass, and the body-composition chart's tooltip now share `formatWeight` / `formatPercent` from the client formatters, which round to one decimal, drop trailing zeros, and render a dash for a missing reading instead of a coerced zero.->>>>>>> 6e49f74b9 (fix: round MeatSpace body weight and percentages for display (#3794))- **Labels floating over 3D and Three.js previews now follow the active theme.** The status bar on a generating Three.js model read as dark green text on a near-black slab — that chrome was written as a fixed black scrim with white text, and on a light theme the white text is remapped to the theme's dark ink while the black scrim stays black. Overlay chrome across the 3D and Three.js surfaces (the generation status bar, the preview's background/explode and part-selection panels, the orbit hint and articulation badge, the mesh viewer's display-settings button, and the "Change image" labels on both pickers) now takes its surface and ink from the theme itself, so it matches the page and stays legible over a dark canvas, a light one, or a photograph.@@ -81,3 +79,4 @@- **System Health alerts now name the page that fixes them.** Every warning banner was a bare statement — "Disk usage at or above 90%" with no control, no link, and nothing to press. Each alert now carries its own remediation link chosen from the warning's type: disk goes to the disk usage breakdown, memory/CPU/process/crash-loop alerts to the process list, an app-status alert to Apps, a Postgres alert to Database settings. The three drill-in links also moved out of the bottom process card and up under the alerts, because at phone widths every control on the route sat below the fold — a glance at the page reduced to "something is wrong" with no next step on screen.- **Tribe now opens on the people who need a touch, and the "Needs Care" number is a control.** The page led with two blocks of pure summary — four stat tiles and a five-row ring-capacity table — before any person appeared, so at phone width the search field, the ring filter, every relationship and every **Touch** button sat below the fold: a screen announcing that 17 people are overdue with no way to act on any of them. The Care Queue is now the tab you land on, so the first screen is the queue itself with its Touch buttons. The **Needs Care** and **Coming Up** tiles became real buttons that filter the list to exactly the bucket they count (clicking the active one clears it), the filter is a shareable `?status=` deep link that the Circle roster honors too, and the ring-capacity meters collapse behind a "Ring capacity" disclosure below desktop width. The tiles themselves are a two-column grid on a phone instead of four stacked rows.- **OpenClaw is a chat screen again instead of the Settings tab strip with a chat under it.** `/openclaw` is a top-level route, but it rendered a "Settings" title and the full 22-item settings tab bar above its own header — so the first screen was navigation for somewhere else, and at phone width the composer and its **Send** button both started below the fold. The settings chrome is gone, the runtime-status readout collapsed into a disclosure that shows the runtime label at a glance, and the session list now hides behind a **Sessions** button below `lg` (picking a session closes it) so the conversation owns the width. In the composer, the three context fields (app, directory, extra instructions) fold behind a **Context** toggle that badges how many are set, and the drag/paste/files hint row came out because the placeholder already says it — leaving the message box and Send pinned to the bottom of the pane at any scroll position.+- **Arc verification no longer reports a phantom "no pilot or finale" on a volume that has both.** The check that flags arc-role imbalance reads each episode's `arcRole`, but the plan snapshot handed to the verifier never included that field — so it saw twelve episodes with no roles at all and reported the imbalance on every single pass, on every series, no matter how the volume was actually laid out. On its own that was a stray low-severity finding. What made it expensive is that the foundation gate's structure repair reverts its whole rewrite whenever verification comes back with *any* blocker left: the phantom finding could never be closed, so a run whose real contradictions had all been fixed still rolled the repair back and paused for human review, reporting the correct fixes as a failed attempt. (Observed on a series that paused with "structure repair left 5 arc-verification blocker(s)", one of which was this.) The snapshot now carries `arcRole` — as an explicit `null` when unset, so "no role" stays distinguishable from a dropped field — which also means the auto-resolver can finally see the roles it is being asked to fix instead of assigning them blind.diff --git a/PLAN.md b/PLAN.mdindex 05b3ccc2a7..0aa3ce39db 100644--- a/PLAN.md+++ b/PLAN.md@@ -345,3 +345,7 @@ is not reliably announced.### Let runner mode recover when the cos-runner app comes up after the server- [ ] `useRunner` (`server/services/agentState.js`) is decided once, at boot, from a single `isRunnerAvailable()` probe in `subAgentSpawner.js#runInitSpawner` — and everything that keeps runner mode honest lives inside that `if (runnerAvailable)` branch: `initCosRunnerConnection()`, the `connection:ready` re-dequeue, the `connection:lost` warning. So if `portos-cos` is down when `portos-server` boots (a plain PM2 restart ordering, or the user stopped it and later restarts the server), the process silently degrades to direct mode **for its lifetime**: every agent becomes a child of `portos-server` and dies with it, which is the exact orphaning runner mode exists to prevent. Starting the runner afterwards recovers nothing until the next server restart, and there is no log or UI signal that the demotion happened. The new runner-down HOLD does not apply either — it is gated on `useRunner`, which is false. **The call to make:** always call `initCosRunnerConnection()` (the socket already reconnects indefinitely with capped backoff) and drive `setUseRunner` from `connection:ready` / `connection:lost` instead of from the boot probe, keeping the probe only as the cold-start seed. That collapses the two disagreeing sources of truth for "runner mode" into one and makes the hold correct in both directions. Watch two things while doing it: agents spawned directly before a mid-life promotion must keep completing through the direct path (`isAgentOwnedLocally` already distinguishes them), and `syncRunnerAgents()` should run on promotion so a runner that was up before this server took over is reconciled. Deferred from the runner-hold fix, which was scoped to the reported symptom (runner stopped while the server was already running). Surfaced by the /simplify altitude review.++### Stop the arc-verify prompt from checking fields its context never renders++- [ ] The arc-verify prompt's checklist and `buildVerifyContext`'s `renderLeaf` (`server/services/pipeline/arcPlanner/context.js`) are two independent lists that have to agree, with nothing enforcing it. They drifted once already: check #6 in `data/prompts/stages/pipeline-arc-verify.md` reports an arc-role imbalance from `arcRole`, which the leaf did not render, so every verified series got a permanent "zero pilot/finale" finding no resolver could ever close — and because the foundation gate's structure arm reverts whenever `verifyArc` leaves *any* blocker, that one phantom finding stalled the gate on plans with nothing wrong with them. `arcRole` is now rendered, but the class is still open: the same silent drift returns the next time a check names a field (`status`, `lengthProfile`, `themes`, a season field) the leaf drops. **The call to make:** add a test that parses the installed + shipped `pipeline-arc-verify.md` for backticked leaf field names and asserts each one appears in a leaf built by `buildVerifyContext`, failing loudly on a check that reads a field the context cannot supply. Prove it with a bypass probe (delete a field from the leaf and watch the test fail) — a rendered-but-unread field is harmless, an unrendered-but-checked field is a permanent false positive. `renderVolumeIssue` needs the same treatment against `pipeline-volume-verify.md` if that prompt ever grows a field-level check. Surfaced while unstalling a foundationGate pause whose structure repair had been reverting on this phantom blocker.diff --git a/server/services/pipeline/arcPlanner.test.js b/server/services/pipeline/arcPlanner.test.jsindex cc22419a96..369b6b1b3e 100644--- a/server/services/pipeline/arcPlanner.test.js+++ b/server/services/pipeline/arcPlanner.test.js@@ -558,6 +558,28 @@ describe('arcPlanner — verifyArc', () => {]);});+ // The verify prompt's arc-role imbalance check (#6) can only see what this+ // leaf renders. While `arcRole` was missing from it, a volume with a correct+ // pilot and finale still reported "zero pilot/finale" on every pass — and+ // because the foundation gate's structure arm reverts whenever verifyArc+ // leaves any blocker, that permanent false positive stalled the gate.+ it('renders each episode arcRole so the arc-role imbalance check can see it', async () => {+ const s = await setupSeries();+ await seriesSvc.updateSeries(s.id, { arc: { logline: 'L', summary: 'S' } });+ const sea = await seasonsSvc.createSeason(s.id, { title: 'V1' });+ await issuesSvc.createIssue({ seriesId: s.id, title: 'Ep 1', seasonId: sea.id, arcPosition: 1, arcRole: 'pilot' });+ await issuesSvc.createIssue({ seriesId: s.id, title: 'Ep 2', seasonId: sea.id, arcPosition: 2 });+ await issuesSvc.createIssue({ seriesId: s.id, title: 'Ep 3', seasonId: sea.id, arcPosition: 3, arcRole: 'finale' });++ stageRunnerSpy = vi.fn(async () => ({ content: { issues: [] }, runId: 'r1', providerId: 'p', model: 'm' }));+ await planner.verifyArc(s.id);++ const tree = JSON.parse(stageRunnerSpy.mock.calls[0][1].seasonsTreeJson);+ // null (not absent) for the middle episode — "no role" has to be legible as+ // a value, or the check can't tell an unset role from a dropped field.+ expect(tree[0].episodes.map((e) => e.arcRole)).toEqual(['pilot', null, 'finale']);+ });+it('drops malformed verify issues + defaults severity to medium', async () => {const s = await setupSeries();await seriesSvc.updateSeries(s.id, { arc: { logline: 'L' } });diff --git a/server/services/pipeline/arcPlanner/context.js b/server/services/pipeline/arcPlanner/context.jsindex 7b5afeb3b7..de5d2ceafc 100644--- a/server/services/pipeline/arcPlanner/context.js+++ b/server/services/pipeline/arcPlanner/context.js@@ -519,11 +519,18 @@ export async function buildVerifyContext(series, preloadedWorld, { spineOnly = fconst tree = groupIssuesBySeasonTree(seasons, issues, {// `synopsis` key (not `beats`) so it matches the prompt's existing// language; sourced from idea.input which carries the LLM's logline+synopsis.+ // `arcRole` is required, not decorative: the verify prompt's arc-role+ // imbalance check (#6) reports "zero pilot/finale" purely from this leaf, so+ // omitting it made that finding unsatisfiable — a volume with a correct+ // pilot and finale still got flagged, every pass. The foundation gate's+ // structure arm reverts whenever verifyArc leaves any blocker, so that one+ // permanent false positive stalled the gate on plans with nothing wrong.renderLeaf: (iss) => ({number: iss.number,title: iss.title,status: iss.status,arcPosition: iss.arcPosition,+ arcRole: iss.arcRole || null,synopsis: (iss.stages?.idea?.input || '').trim() || null,}),seasonFields: (s) => ({