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 (codex): skip editorial checks when maxEditorialRounds:0

[._.]/ Adam Eivybe5de5d6dd6f
diff --git a/server/services/pipeline/seriesAutopilot.js b/server/services/pipeline/seriesAutopilot.js
index 65e319c712..f27f2fd35c 100644
--- a/server/services/pipeline/seriesAutopilot.js
+++ b/server/services/pipeline/seriesAutopilot.js
@@ -549,9 +549,14 @@ async function runEditorial(sId, record) {
const maxRounds = Number.isInteger(record.options.maxEditorialRounds)
? record.options.maxEditorialRounds
: MAX_EDITORIAL_ROUNDS;
- // maxRounds === 0 means "skip the editorial gate entirely".
+ // maxRounds === 0 means "skip the editorial gate entirely" — which includes
+ // the registry-driven editorial checks (the default info-dumping check is
+ // LLM-backed, so a skip run must not spend budget on it). Mark both reviewed
+ // so the resolver advances past editorialChecks too; the user can still run
+ // checks on demand via the route.
if (maxRounds === 0) {
record.runState.editorialReviewed = true;
+ record.runState.editorialChecksReviewed = true;
return {};
}
for (let round = 1; round <= maxRounds; round += 1) {
diff --git a/server/services/pipeline/seriesAutopilot.test.js b/server/services/pipeline/seriesAutopilot.test.js
index 91546d2898..d47c87b7c5 100644
--- a/server/services/pipeline/seriesAutopilot.test.js
+++ b/server/services/pipeline/seriesAutopilot.test.js
@@ -70,10 +70,11 @@ vi.mock('./manuscriptReview.js', () => ({
seedReviewFromFindings: vi.fn(async () => ({ comments: [] })),
getReview: vi.fn(async () => ({ comments: [] })),
}));
-vi.mock('./editorial/checkRunner.js', () => ({
+const checkRunnerSpies = {
runEditorialChecks: vi.fn(async () => ({ runId: 'ec', findings: [], perCheck: [], canceled: false })),
buildEditorialCheckPlan: vi.fn(async () => ({ seriesId: 's', checks: [], enabledCount: 0 })),
-}));
+};
+vi.mock('./editorial/checkRunner.js', () => checkRunnerSpies);
vi.mock('../settings.js', async (importOriginal) => ({
...(await importOriginal()),
getSettings: vi.fn(async () => ({})),
@@ -476,6 +477,16 @@ describe('autopilot conductor', () => {
expect(arcSpies.verifyArc).not.toHaveBeenCalled();
});
+ it('maxEditorialRounds:0 skips the editorial-checks step too (no budget spend)', async () => {
+ checkRunnerSpies.runEditorialChecks.mockClear();
+ const { seriesId } = await seedComplete();
+ await autopilot.startSeriesAutopilot(seriesId, { maxEditorialRounds: 0 });
+ await waitFor(runFinished(seriesId));
+ expect(autopilot.__testing.runs.get(seriesId)?.lastPayload?.type).toBe('complete');
+ // Skipping the editorial gate must also skip the registry checks pass.
+ expect(checkRunnerSpies.runEditorialChecks).not.toHaveBeenCalled();
+ });
+
it('a second start while active resolves to alreadyRunning', async () => {
// Hold the run open by making the verify loop wait on a never-converging
// finding plus a slow child so the first run is still active.