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.

Merge branch 'main' into core/227

Corey Olson292d819a7952
diff --cc src/board.js
index 2cbf59c1,5d6f989c..a93cca38
--- a/src/board.js
+++ b/src/board.js
@@@ -1,3 -1,24 +1,25 @@@
++import { correctedNoVerdictReopen } from './reopen-history.js';
+ import {
+ getShout,
+ milestones,
+ openRequests,
+ pendingRefreeze,
+ pendingRefreezeProblem,
+ milestonePriorities,
+ } from './board-read-auxiliary.js';
+ export {
+ getShout,
+ allShouts,
+ shoutDetails,
+ openRequests,
+ pendingRefreeze,
+ pendingRefreezeProblem,
+ milestonePriorities,
+ peekShouts,
+ projectItemThreads,
+ milestones,
+ unverifiedSubmissions,
+ } from './board-read-auxiliary.js';
export { openHandoff, takeHandoff } from './handoff.js';
import { LAND_COLLISION_ENGINE } from './landing-collision-engine.js';
import * as capacity from './line-capacity-board.js';
@@@ -1185,39 -1208,39 +1210,6 @@@ export function submit(board, id, { age
});
}
--/**
-- * True only after a no-verdict reopen followed by an explicit refreeze, or an edit that clears the
-- * old frozen bar followed by a new claim. Reopening a verified landing failure is excluded.
-- *
-- * @param {any} board
-- * @param {number} id
-- * @param {string} commit
-- * @returns {boolean}
-- */
--function correctedNoVerdictReopen(board, id, commit) {
-- const history = board.db.prepare(
-- "SELECT event_id, event_kind, event_detail FROM event WHERE item_id = ? AND event_kind IN ('submit', 'reopen', 'edit', 'refreeze', 'claim') ORDER BY event_id DESC",
-- ).all(id);
-- const boundary = history.findIndex((entry) => entry.event_kind === 'submit' || entry.event_kind === 'reopen');
-- if (boundary < 0 || history[boundary].event_kind !== 'reopen') return false;
-- const reopened = JSON.parse(history[boundary].event_detail);
-- if (reopened.judgment !== null || reopened.supersedes !== undefined) return false;
--
-- const previousSubmission = history.slice(boundary + 1).find((entry) => {
-- if (entry.event_kind !== 'submit') return false;
-- const detail = JSON.parse(entry.event_detail);
-- return detail.commit === commit;
-- });
-- if (!previousSubmission) return false;
-- const afterReopen = history.slice(0, boundary);
-- const latestBarChange = afterReopen.find((entry) => entry.event_kind === 'refreeze'
-- || (entry.event_kind === 'edit' && Object.hasOwn(JSON.parse(entry.event_detail), 'unfrozen')));
-- if (!latestBarChange) return false;
-- if (latestBarChange.event_kind === 'refreeze') return true;
-- return afterReopen.some((entry) => entry.event_kind === 'claim' && entry.event_id > latestBarChange.event_id
-- && Boolean(JSON.parse(entry.event_detail).digest));
--}
--
export { reviewHolder } from './board-query.js';
/** Validate a newly constructed review release while keeping old sealed replay executable [V1,R1,H16].
@@@ -1438,10 -1461,10 +1430,10 @@@ export function verify(board, id, { age
*
* @param {any} board
* @param {number} id
- * @param {{ agentId: string, note: string, cause?: string }} request
+ * @param {{ agentId: string, note: string, cause?: string, withdrawVerdict?: boolean }} request
* @returns {{ id: number, commit: string, supersedes?: number, landingFailure?: object }}
*/
- export function reopen(board, id, { agentId, note = '', conflict, cause, reopenFirstRefusalMinutes, withdrawVerdict }) {
-export function reopen(board, id, { agentId, note = '', conflict, cause, reopenFirstRefusalMinutes, quotedLandingFailure }) {
++export function reopen(board, id, { agentId, note = '', conflict, cause, reopenFirstRefusalMinutes, quotedLandingFailure, withdrawVerdict }) {
return atomic(board, () => {
let submittedCommit = null;
const forMerge = conflict !== undefined && conflict !== null;
diff --cc src/reopen-history.js
index 00000000,00000000..52df57ca
new file mode 100644
--- /dev/null
+++ b/src/reopen-history.js
@@@ -1,0 -1,0 +1,32 @@@
++/**
++ * True only after a no-verdict reopen followed by an explicit refreeze, or an edit that clears the
++ * old frozen bar followed by a new claim. Reopening a verified landing failure is excluded.
++ *
++ * @param {any} board
++ * @param {number} id
++ * @param {string} commit
++ * @returns {boolean}
++ */
++export function correctedNoVerdictReopen(board, id, commit) {
++ const history = board.db.prepare(
++ "SELECT event_id, event_kind, event_detail FROM event WHERE item_id = ? AND event_kind IN ('submit', 'reopen', 'edit', 'refreeze', 'claim') ORDER BY event_id DESC",
++ ).all(id);
++ const boundary = history.findIndex((entry) => entry.event_kind === 'submit' || entry.event_kind === 'reopen');
++ if (boundary < 0 || history[boundary].event_kind !== 'reopen') return false;
++ const reopened = JSON.parse(history[boundary].event_detail);
++ if (reopened.judgment !== null || reopened.supersedes !== undefined) return false;
++
++ const previousSubmission = history.slice(boundary + 1).find((entry) => {
++ if (entry.event_kind !== 'submit') return false;
++ const detail = JSON.parse(entry.event_detail);
++ return detail.commit === commit;
++ });
++ if (!previousSubmission) return false;
++ const afterReopen = history.slice(0, boundary);
++ const latestBarChange = afterReopen.find((entry) => entry.event_kind === 'refreeze'
++ || (entry.event_kind === 'edit' && Object.hasOwn(JSON.parse(entry.event_detail), 'unfrozen')));
++ if (!latestBarChange) return false;
++ if (latestBarChange.event_kind === 'refreeze') return true;
++ return afterReopen.some((entry) => entry.event_kind === 'claim' && entry.event_id > latestBarChange.event_id
++ && Boolean(JSON.parse(entry.event_detail).digest));
++}