From aff9ddd04d205e77325b6c5bdf8770fd2fb6f66e Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Mon, 18 May 2026 17:04:36 +0100 Subject: [PATCH] Fix repo Face identity description bounds --- .../core/src/void-self-state-projection.ts | 35 ++++++++++++++++--- packages/core/src/void-self-state-service.ts | 2 ++ state/evidence.jsonl | 1 + 3 files changed, 34 insertions(+), 4 deletions(-) diff --git a/packages/core/src/void-self-state-projection.ts b/packages/core/src/void-self-state-projection.ts index 7b6ded5..d44730d 100644 --- a/packages/core/src/void-self-state-projection.ts +++ b/packages/core/src/void-self-state-projection.ts @@ -49,14 +49,30 @@ export interface VoidSelfStateIdentityDefaults { publicDescription?: string; } +const MAX_PUBLIC_DESCRIPTION_LENGTH = 1000; + +export function normalizeVoidSelfStateIdentityDefaults( + identity: VoidSelfStateIdentityDefaults, +): VoidSelfStateIdentityDefaults { + return { + ...identity, + publicDescription: truncateOptionalText( + identity.publicDescription, + MAX_PUBLIC_DESCRIPTION_LENGTH, + ), + }; +} + export function createEmptyVoidSelfState( options: { createdAt?: string; identity?: VoidSelfStateIdentityDefaults } = {}, ): VoidSelfStateTypedProjection { const createdAt = options.createdAt ?? new Date().toISOString(); - const identity = options.identity ?? { - agentId: "void-moderator", - publicName: "Void", - }; + const identity = normalizeVoidSelfStateIdentityDefaults( + options.identity ?? { + agentId: "void-moderator", + publicName: "Void", + }, + ); return { selfProfile: voidSelfProfileSchema.parse({ @@ -119,6 +135,17 @@ export function createEmptyVoidSelfState( }; } +function truncateOptionalText(value: string | undefined, maxLength: number): string | undefined { + const trimmed = value?.trim(); + if (!trimmed) { + return undefined; + } + if (trimmed.length <= maxLength) { + return trimmed; + } + return trimmed.slice(0, maxLength - 1).trimEnd(); +} + export function buildVoidSelfStateContext( typedState: VoidSelfStateTypedProjection, options: VoidSelfStateProjectionOptions, diff --git a/packages/core/src/void-self-state-service.ts b/packages/core/src/void-self-state-service.ts index e29c1d4..acfea35 100644 --- a/packages/core/src/void-self-state-service.ts +++ b/packages/core/src/void-self-state-service.ts @@ -22,6 +22,7 @@ import { } from "./void-self-state-domain"; import { createEmptyVoidSelfState, + normalizeVoidSelfStateIdentityDefaults, type VoidSelfStateIdentityDefaults, type VoidSelfStateTypedProjection, } from "./void-self-state-projection"; @@ -131,6 +132,7 @@ function repairSelfProfileIdentity( state: VoidSelfStateTypedProjection, identity: VoidSelfStateIdentityDefaults, ): void { + identity = normalizeVoidSelfStateIdentityDefaults(identity); let changed = false; if (state.selfProfile.agentId !== identity.agentId) { diff --git a/state/evidence.jsonl b/state/evidence.jsonl index 73c26d8..d44ca80 100644 --- a/state/evidence.jsonl +++ b/state/evidence.jsonl @@ -148,3 +148,4 @@ {"ts":"2026-05-18T13:53:46Z","type":"bugfix","status":"ok","note":"Operations watchdog recovery notifications can have zero issue lines; Build-OwnerNotificationMessage now accepts an empty IssueLines array so healthy recovery DMs do not create a watchdog.notification warning."} {"ts":"2026-05-18T14:01:49Z","type":"bugfix","status":"ok","note":"Inspection found two live-loop seams beyond the watchdog notice: repo Face state files could retain Void's default selfProfile under renderer masking, and canonical speech receipts could keep historical duplicate reply targets. Repo Face initialization now seeds/repairs typed selfProfile identity, repo Face MCP state operations pass identity defaults, and state writes normalize direct-reply receipts to keep the earliest receipt per channel/reply target."} {"ts":"2026-05-18T14:11:37Z","type":"research","status":"ok","note":"Nibu character-card sweep found missing Discord/story doctrines: manufactured waifu/loli companion shell and agency/non-binary presentation arc, sadistic anti-human life-support respect boundary, glitchcraft/simulation exploit progression, parallel-instance continuity horror, and broken/discarded first-contact before later triumphant Nibu. These are now crystallized into Nibu's repo Face state and repo-local identity surface."} +{"ts":"2026-05-18T16:04:09Z","type":"implementation","status":"ok","note":"Repo Face heartbeat failure traced to overlong identity publicDescription entering typed Face self-profile; capped identity defaults at the typed state boundary so rich registry doctrine can feed prompts without violating self-profile schema. Verified npm run build, manual heartbeat tick exit 0, scheduled task LastTaskResult 0, and Nibu heartbeat job 7232b2e6 completed."}