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.

chore(core): merge approved row guards for doctrine [D1,D2,A5]

Corey Olson9a2212e2ae51
diff --cc src/cli.js
index e88008f3,302c491f..bf081a25
--- a/src/cli.js
+++ b/src/cli.js
@@@ -54,7 -54,8 +54,8 @@@ import { listResources } from './resour
import { citedTestFiles, rowEvidence, rowStage } from './evidence.js';
import { exportView, serveView } from './serve.js';
import { serveApi } from './api.js';
-import { doctorProblems } from './doctor.js';
+import { doctorProblems, doctrineProblems } from './doctor.js';
+ import { staleFrozenItems, staleItemFinding } from './approved-rows.js';
import { mainPolicy, itemPolicy, submissionPaths, frozenCheck, checkAtCommit, dependencySnapshots } from './trusted-policy.js';
import { exportBoard, importBoard } from './exchange.js';
import { addSigner, assertRequiredSigners, defaultPrincipal, hasSignerFile } from './signature.js';
@@@ -1296,7 -1301,7 +1301,7 @@@ function readCommands(io, { first, seco
return 1;
}
const ctx = context(io);
- const problems = [...doctorProblems(ctx.file, ctx.info.root, tryGit), ...doctrineProblems(ctx.info.root, ctx.config)];
- const problems = doctorProblems(ctx.file, ctx.info.root, tryGit, ctx.config);
++ const problems = [...doctorProblems(ctx.file, ctx.info.root, tryGit, ctx.config), ...doctrineProblems(ctx.info.root, ctx.config)];
io.result?.({ problems });
if (!problems.length) {
io.say('board is clean');
diff --cc src/doctor.js
index d51f4939,de5c3959..a9e14033
--- a/src/doctor.js
+++ b/src/doctor.js
@@@ -8,16 -5,10 +8,18 @@@ import { checkAtCommit, submissionPaths
import { BLANKS, STATES, storeTriggers } from './machine.js';
import { readEventLogVersion, SCHEMA_VERSION } from './board.js';
+ import { staleFrozenItems, staleItemFinding } from './approved-rows.js';
+ import { loadSpec } from './spec.js';
const blankCharacters = new Set(BLANKS.map((point) => String.fromCodePoint(point)));
+/** Offer a working tracked or untracked rename without rewriting the repo's doctrine [D1,D2]. */
+export function doctrineProblems(root, config) {
+ if (config.practice !== LEGACY_DOCTRINE_FILE || !existsSync(join(root, LEGACY_DOCTRINE_FILE))) return [];
+ const tracked = tryGit(root, ['ls-files', '--error-unmatch', '--', LEGACY_DOCTRINE_FILE]).status === 0;
+ const command = tracked ? 'git mv' : 'mv';
+ return [finding('DOCTRINE_LEGACY', `${LEGACY_DOCTRINE_FILE} is the legacy name for the repo doctrine`, `${command} -- ${LEGACY_DOCTRINE_FILE} ${DOCTRINE_FILE}`)];
+}
+
/**
* Check a board and its git pins without opening it through the migrator, which repairs boards on
* open. `doctor` must report the evidence it sees and leave that evidence untouched.