Skip to content

Autonomous development for real products. Governed agents build from specs you approve, follow the rules you set, and nothing merges until another agent proves it. Your decisions, judgement and taste are the bar that work must clear. Declare your vision and let agents build it.

perf(rigor): scan history only for actionable causes [D1,A9]

Corey Olson23dc9f49cb9a
diff --git a/src/cli.js b/src/cli.js
index 815f7431..70539ef3 100644
--- a/src/cli.js
+++ b/src/cli.js
@@ -1347,7 +1347,7 @@ function resumeHere(io, view) {
const staleVerdicts = pendingMerges.filter(item => item.item_verdict_state);
const decisionSections = isMain ? coordinatorDecisionSections(board, ctx) : null;
const { shouts = [], ...decisions } = decisionSections ?? {};
- const needsState = personNeedsState(root, { board });
+ const needsState = personNeedsState(root, { board, includeRigorUndrafted: me.id === COORDINATOR });
return {
me,
all,
diff --git a/src/needs-state.js b/src/needs-state.js
index 3a421a35..de0e8143 100644
--- a/src/needs-state.js
+++ b/src/needs-state.js
@@ -12,7 +12,7 @@ import { rigorDraftNeeds, undraftedRigor } from './rigor-notices.js';
import { personNeeds } from './needs.js';
/** Borrow an existing connection or open a read-only one; retain exact row-decision matching. */
-export function personNeedsState(root, { board: providedBoard = null } = {}) {
+export function personNeedsState(root, { board: providedBoard = null, includeRigorUndrafted = false } = {}) {
const info = repoInfo(root);
const board = providedBoard ?? { db: store.openBoardReadOnly(join(info.commonDir, 'pullboard', 'board.sqlite')) };
try {
@@ -21,7 +21,8 @@ export function personNeedsState(root, { board: providedBoard = null } = {}) {
const config = loadConfig(root);
const rows = projectRowDecisions(decisions, { spec: loadSpec(root, config).rows, practice: loadDoctrine(root, config).rows });
const rigorDrafts = rigorDraftNeeds(rows);
- const projected = { ...state, rigorDrafts, rigorUndrafted: undraftedRigor(store.events(board), rows, { person: store.PERSON }) };
+ const projected = { ...state, rigorDrafts, ...(includeRigorUndrafted
+ ? { rigorUndrafted: undraftedRigor(store.events(board), rows, { person: store.PERSON }) } : {}) };
return { ...projected, needs: personNeeds(projected) };
} finally {
if (!providedBoard) store.closeBoard(board);
diff --git a/src/rigor-notices.js b/src/rigor-notices.js
index a9a18c6a..48008589 100644
--- a/src/rigor-notices.js
+++ b/src/rigor-notices.js
@@ -1,5 +1,5 @@
/** Automatic repeated-cause notices and proved rows waiting on the person [D1,D3,S1]. */
-import { causeProblem, eventCauses, rigorReport } from './rigor.js';
+import { causeProblem, eventCauses, isMergeConflict, rigorReport } from './rigor.js';
import { parseSpec } from './spec.js';
import { readRigorSource, RIGOR_NOTICE_ENGINE } from './rigor-source.js';
@@ -42,7 +42,8 @@ function declinedRepeat(cause, state) {
/** The move that crosses the repeat threshold posts once, and a third failure stays quiet. */
export function newRigorNotices(events, trigger, { person }) {
- const keys = new Set(rigorTriggerCauses(trigger, person));
+ const keys = new Set(rigorTriggerCauses(trigger, person).filter(key => !isMergeConflict(key)));
+ if (!keys.size) return [];
const state = noticeState(events, person);
return rigorReport(events, { person }).causes.filter(cause => {
if (!keys.has(cause.key) || declinedRepeat(cause, state)) return false;