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
changelog: character-arc prose cap fix
[._.]/ Adam Eivyf05db0e074a6
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.mdindex 99c1e70740..26869a6313 100644--- a/.changelog/NEXT.md+++ b/.changelog/NEXT.md@@ -108,3 +108,4 @@- **That rejected-rewrite evidence now survives the pause, and the isolation pass banks its own.** Accumulating a run's discarded blocker sets fixed the gate mid-run, but two boundaries still threw the evidence away — both the same failure one level out. A run that reverted two *different* rewrites before pausing persisted only the newest set, so a Resume inherited the last rollback alone and its resolver could re-author the first; the whole history now rides a separate `runDiscardedFindings` on the paused marker, which leaves the panel's "Discarded — what the reverted round produced" copy true of the field it renders and hands the resumed gate everything. And the per-finding isolation pass — the escalation that resolves a residual one finding at a time once the whole-set retries are spent — computed its avoid list once for the whole pass and never recorded its own rejected patches, so a rewrite rejected on target 1 could be re-proposed verbatim on target 3, and nothing it learned reached the ordinary resolve that follows a successful isolation. Each rejected patch's verified consequence is now banked like a whole-set rollback's, and the avoid list is rebuilt per target. It is still filtered against everything the pass is currently repairing, so no attempt is told to both fix and avoid the same finding, and a marker written before the new field exists resumes on what it has.- **The foundation gate now remembers every repair it rejected for a dimension, not just the last one.** Two rollback-evidence models were living side by side in one file: the arc gate accumulates every discarded set for its whole lifetime and carries it across a pause, while the foundation gate kept a single most-recent rejection per dimension — so a dimension that rejected two different repairs handed the third evidence of only the second, and the editor was free to re-author the first. Same evidence loss, one level down, and a reader had every reason to assume the two behaved alike. Both gates now ride one shared per-key bank: the arc gate banks a flat history as before, the foundation gate banks one per dimension, and each rejected set is recorded at the moment it is thrown away rather than when the next attempt happens to read it — so an unverified restore, which pauses without ever reaching a retry, still contributes its evidence. An accepted repair no longer wipes the dimension's history (a candidate the gate rejected is still a candidate it rejected; only the stale "this failed, try another angle" strategy note is cleared), and the evidence is filtered against the gap the call is actually being asked to close, so no editor is told to both fix and avoid the same thing. It survives the pause too, as a per-dimension `foundationDiscardedFindings` on the paused marker that a resume seeds its bank from — a marker written before the field existed simply resumes with an empty bank, exactly as it does today.- **An "isolated" arc repair now has to actually be one small edit.** When arc verification's auto-resolve regresses twice on the same residual, the gate escalates to fixing one finding at a time — snapshot, resolve that finding alone, re-verify, keep the patch only if it closed its own target without growing the set. Isolating the *finding* never isolated the *edit*, though: every entry in a single-finding response trivially names that one finding, so the finding-keyed filter passed a whole-arc rewrite plus every volume, and each "isolated" attempt regressed exactly like the whole-set pass it had escalated from. On the run that surfaced this, both attempts started from the same verified 2-blocker checkpoint and came back with 4 and then 7, so the gate paused having retained nothing after four resolves and three verifications. The resolver now has an explicit isolated mode: the prompt is told the contract, and the server discards the candidate *before persistence* unless it is one causal patch — one owner record, one changed field (one exact-text replacement, one short scalar, or one existing character-transition patch). Echoed identity fields that match what is stored don't count as changes, and neither do edits the appliers would have dropped anyway. A rejected candidate costs its own resolve call and nothing else: there is no rewrite to roll back and no verification round billed to discover that it was worse. Coordinated cross-record repairs stay with the whole-set and corrective passes, and every existing guard — spine-only scope, the blocker-count rollback, the round limits, restoring the best verified snapshot — is untouched.+- **A character-arc beat is no longer clipped mid-word, which was enough on its own to stall an arc verification.** The per-character arc fields — each transition's label and note, plus want, need, start state and end state — were capped with a hard slice, so an over-long value written by the arc auto-resolver ended wherever the character count ran out: one live series carried a beat that stopped at "...the four-minute crossing e". That path never sees the route's validator (the resolver writes through the service sanitizer directly), and the next verification round reads the fragment as an authoring gap it can't close, which is precisely the verify → resolve loop `trimToClause` was introduced to break for arc summaries, loglines and ending hooks. Those fields now use the same boundary-aware cap: an over-cap value backs off to the last complete sentence, or to the last whole word when there is no sentence break to find. `characterName` keeps its hard trim, because it is an identity string matched against the canon cast rather than prose.