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: keep disclosure repair calibration scoped to repair objectives
[._.]/ Adam Eivy773ac3c38495
diff --git a/server/lib/goalFidelity.test.js b/server/lib/goalFidelity.test.jsindex cfdbdeab65..be37f326b2 100644--- a/server/lib/goalFidelity.test.js+++ b/server/lib/goalFidelity.test.js@@ -8,6 +8,7 @@ import {mergeOutcomeObjective,mergeOutcomeReview,normalizeGoalFidelityVerdict,+ productionAfterChangeHunks,resolveGoalFidelityConfig,taskObjective,} from './goalFidelity.js';@@ -202,3 +203,20 @@ describe('mergeOutcomeReview', () => {expect(mergeOutcomeReview({ number: 7653, prState })).toBeNull();});});+++describe('productionAfterChangeHunks', () => {+ it('does not invent a summary root or join an outer JSX condition across a hunk gap', () => {+ const diff = [+ 'diff --git a/Card.jsx b/Card.jsx', '--- a/Card.jsx', '+++ b/Card.jsx',+ '@@ -1,6 +1,6 @@',+ ' {expanded && (', ' <div>', ' {taskSummary && (',+ '+ <MarkdownOutput content={taskSummary} />', ' )}',+ '@@ -20,2 +20,2 @@', ' </div>', ' )}',+ ].join('\n');+ const rows = productionAfterChangeHunks(diff);+ expect(rows).toHaveLength(2);+ expect(rows[0].source).toContain('<MarkdownOutput');+ expect(rows.every(row => row.renderPredicates.length === 0)).toBe(true);+ });+});diff --git a/server/services/codeReview.js b/server/services/codeReview.jsindex 615b66dc95..cd7b557bfc 100644--- a/server/services/codeReview.js+++ b/server/services/codeReview.js@@ -1131,7 +1131,9 @@ export async function runLocalGoalFidelityReview({ backend, model, objective, diconst summaryDisclosureObjective = trimmedObjective.startsWith(SUMMARY_DISCLOSURE_REPAIR_CUE)|| (/\bsummar(?:y|ies)\b/i.test(statedObjective)&& /\b(?:completed[ -]+agent[ -]+cards?|agent[ -]+completion[ -]+cards?)\b/i.test(statedObjective)- && /\b(show(?:s|ing|n)?|expand(?:s|ed|ing)?|collaps(?:e[sd]?|ing))\b/i.test(statedObjective))+ && /\b(show(?:s|ing|n)?|expand(?:s|ed|ing)?|collaps(?:e[sd]?|ing))\b/i.test(statedObjective)+ && /\b(?:hide|hidden|until|behind|suppress|prevent|remove|avoid)\b/i.test(statedObjective)+ && !/\b(?:document|audit|review|explain|describe|intentionally|preview)\b/i.test(statedObjective))const startedAt = Date.now()const result = await runReviewerCompletion({backend,diff --git a/server/services/codeReview.test.js b/server/services/codeReview.test.jsindex cf938820ff..db448b9061 100644--- a/server/services/codeReview.test.js+++ b/server/services/codeReview.test.js@@ -1165,7 +1165,12 @@ describe('codeReview helpers', () => {expect(global.fetch).toHaveBeenCalledTimes(2)})- it('keeps the full rubric for summary disclosure on cards outside the completed-agent shape', async () => {+ it.each([+ 'Keep the dashboard card summary hidden until Show and put its transcript behind a separate disclosure.',+ 'Document why completed-agent cards leak summaries before Show.',+ 'Intentionally retain a summary preview on completed-agent cards before Show.',+ taskObjective({ description: 'Completed-agent cards leak summaries before Show.', metadata: { prompt: 'Keep the preview; document its behavior.' } }),+ ])('keeps the full rubric outside the completed-agent repair shape: %s', async objective => {global.fetch = vi.fn(async (_url, init) => {const { messages } = JSON.parse(init.body)expect(messages[0].content).toContain('old launch-video failure')@@ -1174,8 +1179,7 @@ describe('codeReview helpers', () => {})expect(await runLocalGoalFidelityReview({backend: 'ollama', model: 'example-model',- objective: 'Keep the dashboard card summary hidden until Show and put its transcript behind a separate disclosure.',- diff: summaryDisclosureCase.diff,+ objective, diff: summaryDisclosureCase.diff,})).toMatchObject({ ok: true, verdict: 'rethink', missing: ['requested dashboard behavior'] })})