Skip to content

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

address review (claude): include arc-position hint in authored setup/payoff summary

Adam Eivy5dab2ee182a6
diff --git a/server/lib/editorial/checkRegistry.js b/server/lib/editorial/checkRegistry.js
index 663f60bdeb..774090ce49 100644
--- a/server/lib/editorial/checkRegistry.js
+++ b/server/lib/editorial/checkRegistry.js
@@ -123,7 +123,11 @@ export function authoredSetupPayoffSummary(readerMap) {
const label = typeof e?.label === 'string' ? e.label.trim() : '';
const note = typeof e?.note === 'string' ? e.note.trim() : '';
const text = label && note ? `${label} — ${note}` : (label || note);
- return text ? `- ${text}` : '';
+ if (!text) return '';
+ // A coarse expected-location hint so the model can reason about WHERE an
+ // authored hook should have paid off (reconciliation signal, #1299).
+ const pos = Number.isFinite(e?.atArcPosition) ? ` (arc position ${e.atArcPosition})` : '';
+ return `- ${text}${pos}`;
};
const hookLines = hooks.map(line).filter(Boolean);
const payoffLines = payoffs.map(line).filter(Boolean);
diff --git a/server/lib/editorial/checkRegistry.test.js b/server/lib/editorial/checkRegistry.test.js
index 593e4cfa0e..0a1cf2af47 100644
--- a/server/lib/editorial/checkRegistry.test.js
+++ b/server/lib/editorial/checkRegistry.test.js
@@ -399,14 +399,16 @@ describe('authoredSetupPayoffSummary (#1299)', () => {
expect(authoredSetupPayoffSummary({ hooks: [], payoffs: [] })).toBe('');
});
- it('renders authored hooks and payoffs as labelled bullet lists', () => {
+ it('renders authored hooks and payoffs as labelled bullet lists, with an arc-position hint when present', () => {
const out = authoredSetupPayoffSummary({
- hooks: [{ label: 'Who killed the duke?', note: 'planted Issue 1' }, { label: 'The hidden heir' }],
+ hooks: [{ label: 'Who killed the duke?', note: 'planted Issue 1', atArcPosition: 2 }, { label: 'The hidden heir' }],
payoffs: [{ label: 'The butler confesses', note: 'Issue 8' }],
});
expect(out).toContain('Authored hooks');
- expect(out).toContain('- Who killed the duke? — planted Issue 1');
+ expect(out).toContain('- Who killed the duke? — planted Issue 1 (arc position 2)');
+ // No position hint when atArcPosition is absent.
expect(out).toContain('- The hidden heir');
+ expect(out).not.toContain('The hidden heir (arc position');
expect(out).toContain('Authored payoffs');
expect(out).toContain('- The butler confesses — Issue 8');
});