Archilyzer · Source

archilyzer

Archilyzer
git clone https://archilyzer.pages.dev/source/archilyzer.git
Log | Files | Refs | README | LICENSE

commit 885f7b876c525ed46137a8e56468fb5bd5fca726
parent 06a417082b48e40811b89064a613720508f395ba
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Tue, 13 Oct 2026 22:39:53 -0400

plans: release 28 F1 as shipped — an auto research run continues by itself; FACTS: the auto-continue contract; CHANGELOG

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

Diffstat:
Meditor/CHANGELOG.md | 1+
Mplans/FACTS.md | 30++++++++++++++++++++++++++++++
Mplans/release-28.md | 56++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 87 insertions(+), 0 deletions(-)

diff --git a/editor/CHANGELOG.md b/editor/CHANGELOG.md @@ -1,6 +1,7 @@ # Changelog ## [Unreleased] +- **A research run on `auto` continues into its sweep by itself.** Once its acquisitions settle — every job it started has ended and nothing waits for your yes or no — the editor runs the same sweep **Continue into a sweep** would, on the run's own model, and the run's queue in umtool says **continued automatically by i<n>**. The caps hold: the sweep's per-job cap applies, and past the day's API total it is not started; the queue says so, and it is tried again the next day (UTC). A channel the run acquired into that is in no site build yet is left out of the sweep, with the warning "not in any build yet: <slug> — rebuild the site and continue again" on the queue and on the sweep; a run with nothing it could sweep waits for a newer build. `propose` and `limits` runs are still continued by you, and an editor booted idle (`ARCHILYZER_IDLE_BOOT`) continues nothing. Needs a restart of the editor and umtool. - **A drafted field of a report video says it was drafted, and a final build refuses it until it is approved.** A field a generation task writes (a card's narration today; on-screen text, a teaser's lines, the cut's order, the flips, the threads and the YouTube text as their tasks land) carries `drafted` — who drafted it, on which model, when — in the manifest. umtool shows **drafted by <model>** and its review state beside the field (the On-screen table, the teaser editor, the narration page) with **Approve** and **Reject** (with a note), and `/browse/<project>/review` (**Review drafts — N** on the project page) lists every drafted field of the cut and what a final build would refuse. Verdicts are kept in `drafts.review.json` beside the manifest, each on the value it was given on, so a re-draft or an edit needs approving again. A **final** build refuses a drafted field not approved (`--drafts-unreviewed` builds the unapproved anyway, never a rejected one); preview and fast builds only warn. A narration written by hand keeps the rule it had, and existing `narration.review.json` verdicts read as they were (new ones are written to `drafts.review.json`). - **A draft never overwrites what you wrote.** A field with words in it and no `drafted` mark is yours: no generation task replaces it, even when asked to redraft. Its draft is kept aside in `<task>-draft.json` and shown under the field in umtool with **Use this**, which writes it as your own edit. Editing a drafted field in umtool makes it yours (its mark goes). - **A report video manifest may carry `publish.youtube { title, description }`** — two strings, a title of at most 100 characters — for the YouTube text a later task drafts. diff --git a/plans/FACTS.md b/plans/FACTS.md @@ -9240,3 +9240,33 @@ parsed to 0 cues, indexing the video textless) is CLOSED by `200a3105` (transcri - **`report-draft {extractorModel}`** is a sweep's, a Claude id `isKnownApiModel` accepts; it replaces `generation.models.extractor` for that job. - **A report-draft job's progress** is the task's: `TaskDeps.progress?({metric: "turns" | "cards" | "entries", current, total?})` → `JobProgress {metric, initial: 0, target, current}`. A task calls `h.progress(...)` (TaskHandle; a throwing listener is swallowed). Media tasks report `cards` / `entries` the same way. +## Release 28 F1: an `auto` research run continues by itself (verified 2026-10-14, branch `r28/research-f`) + +- **`maybeAutoContinue(article, n, deps)`** (`common/controller/researchAutoContinue.ts`, `deps` = `ReportDraftDeps`) + is the one function; it answers `{outcome: "continued", by, jobId?, warnings} | {outcome: "held" | "refused", + reason} | {outcome: "not-now", why, final?}` and is idempotent. Only `auto` continues by itself; `propose` and + `limits` are final not-nows. The continuation is `enqueueReportDraft({task: "sweep", article, iteration: n, + model: <the research run's own model>, channels: <the kept ones>})` — Continue's own path, so `markContinued`, + caps.sweep and the daily cap at the ask and at the job's turn are unchanged. +- **The record** is `research.autoContinue` in the run's `iteration.json` (`AutoContinueRecord`, + `lib/report/draft/research/state.ts`): `{status: "claimed" | "continued" | "refused" | "held", at, by?, reason?, + warnings?, day?, buildsAt?}`, mirrored as `ResearchView.autoContinue` (research-approve's answer), plus a + `{kind: "auto-continue", outcome, …}` line in the run's `turns.jsonl`. **The claim is the once-only mark**, taken by + `updateIteration`'s function patch under the article store's lock; a claim is fresh for `CLAIM_STALE_MS` (10 min), + and a stale one with a sweep made after it (`parent` n) is recorded as the continuation. `refused` is retried + only on a later UTC day than `day`; `held` (nothing it would sweep is in any composed build) on a build newer than + `buildsAt` or a later day. A channel in no build (`listCorpusBuilds`) is left out with the warning `not in any + build yet: <slug> — rebuild the site and continue again`, also a failed `unbuilt channels` check on the sweep. +- **The triggers.** `onJobEnd(listener)` (`common/jobs/registry.ts`, new): every job's end, once, on a later turn + (`setImmediate`) after `finalize`. `settle` in `researchRuns.ts` watches an `auto` run's pending job ids + (`watchResearchJobs` / `takeWatchedRun`, in-process, bounded at 2000); the listener continues a watched job's + run, and the end of a `report-draft` job or a site build (`SCAN_ON_END`) runs the scan. `scanAutoContinue(deps)` reads every article's iteration + dirs holding a `proposals.json` (a run finished with is remembered, not re-read), one scan at a time. + `armResearchAutoContinue(deps, {log?, env?, bootScan?})` arms the listener and a boot scan and refuses an idle + boot (false); `researchAutoContinueTick()` is the heartbeat's call (`editor/app/scheduler/heartbeat.ts` `fire`) + and returns null unarmed. The editor arms it in `instrumentation.ts` BELOW the idle gate, through + `editor/app/api/ops/_autoContinue.ts` (the report-draft route's deps). +- **The heartbeat is off by default** (`syncScheduler.heartbeatSeconds` 0; the live `settings.json` has 0, verified + 2026-10-14): live, the job-end listener and the boot scan are the triggers, and a `refused` or `held` run is + retried only at the next end of a report-draft job or a site build, the next boot, or a heartbeat if one is + configured. diff --git a/plans/release-28.md b/plans/release-28.md @@ -377,6 +377,62 @@ Gates: in the lane's totals below. Not done here: the MCP's `sweep_plan` / `ask_plan` text (Claude Code's own /sweep) does not state `WHOLE_SENTENCE_QUOTE_RULE` (`mcp/src/instructions.ts` is not this lane's; one line where the claim-quotes and verbatim rules are). +### F1, as shipped (2026-10-14, lane F, `r28/research-f`) + +An `auto` research run continues into its sweep by itself once its acquisitions settle. + +| Commit | What | +| --- | --- | +| `7739bce5` | `controller/researchAutoContinue.ts`: `maybeAutoContinue`, `scanAutoContinue`, `armResearchAutoContinue` / `researchAutoContinueTick`; `onJobEnd` in `jobs/registry.ts`; `researchRuns.ts` watches an `auto` run's pending jobs (`watchResearchJobs`, `takeWatchedRun`) and its view carries `autoContinue`; `AutoContinueRecord` in `research/state.ts`; the heartbeat's call; the editor arms it below the idle gate (`_autoContinue.ts`); 6 tests | +| `526261f1` | umtool: the research queue says "continued automatically by iN", or why not; the editor stub continues an `auto` run as the editor does; `article-research.spec` asserts it | +| `a3084416` | OPERATING.md's research section, the `autonomy` field doc and SETTINGS.md, research-approve's help and COMMANDS.md | +| `62f732d3` | a site build's end runs the scan too (`SCAN_ON_END`), so a held run continues after the rebuild; 1 test | +| (this commit) | this record, FACTS "Release 28 F1", CHANGELOG | + +- **Who continues by itself:** autonomy `auto` only. `propose` and `limits` are continued by the operator, as in r27. +- **When:** the run is done; nothing waits for a yes or no; every acquisition job has ended (done, failed or + cancelled); it is not continued already. +- **The once-only mark** is a claim taken under the article store's lock (`updateIteration`'s function patch), so a + heartbeat and a job end racing continue once. A claim is fresh for 10 minutes. A stale claim whose sweep exists is + recorded as the continuation, not made again. +- **What it asks:** Continue's own path, `report-draft {task: "sweep", iteration: n, model, channels}`. + - The model is the research run's own (the brief's "the run's model/route"). The umtool button still defaults to the + sweep route's. + - The per-job cap is `caps.sweep`; the daily cap is checked first, again at the ask, and again at the job's turn. + - A daily-cap refusal, like any refusal of the ask, is recorded as `refused` and tried again only on a later UTC + day. +- **Builds:** a channel in no composed build is left out. The warning `not in any build yet: <slug> — rebuild the site + and continue again` is on the run's record and is a failed `unbuilt channels` check on the sweep. With nothing left, + the run is `held` (nothing enqueued) until a build newer than the hold, or a later day. +- **Triggers:** + - the registry's new `onJobEnd`: a watched acquisition job's end continues its run; the end of a `report-draft` job + (the research job's own) or a site build runs the scan; + - the scan: on the heartbeat (`fire`, after the tick) and once at boot. + - The editor arms both in `instrumentation.ts` below the idle gate, and `armResearchAutoContinue` refuses an idle + boot itself. +- **On the run:** `research.autoContinue` (status, at, by, reason, warnings, day, buildsAt) in `iteration.json`, an + `auto-continue` line in `turns.jsonl`, `ResearchView.autoContinue` in research-approve's answer, and umtool's + queue line. +- **Found:** the editor's heartbeat is off by default (`syncScheduler.heartbeatSeconds` 0; the live `settings.json` + says 0). Live, the triggers are the job ends and the boot scan. A refused run is retried the next day only when a + report-draft or site-build job ends, the editor restarts, or a heartbeat is configured. +- **No change to `reportDraft.ts`:** the continuation is asked from code through `enqueueReportDraft`, and the daily + cap is pre-checked with `generationUsage`'s exports. No settings key was added; the `autonomy` doc says what `auto` + now does. + +Gates (from the worktree root; counts at the branch start → the tip): +- tsc clean (all packages) before every commit. +- common 4042 → 4049/4049 (7 new, `controller/researchAutoContinue.test.ts`, five runs each clean); editor unit + 290 → 290/290; mcp 345 of 346 at the start (1 failure, "a real editor that stops answering a poll hands back the + job", not reproduced since) → 346/346; `test:scripts` 870 + 3 skipped, 1 failure at the start (`queue-lock`, H2's + flake) → 871 + 3 skipped, 0 failed (874; the count unchanged, the failure not reproduced). +- `settings example --check`, `docs env|files|cli --check`: clean. +- Editor build (heavy slot, 5 GB cap): clean in 52 s. +- e2e, single specs in the foreground: + - umtool `article-research.spec.ts` 3/3 (31.2 s; its prebuild's capped build 29 s), the new auto-continue test included; + - umtool `article-iterations.spec.ts` + `article-new.spec.ts` 7/7 (40.6 s); + - editor `report-draft.spec.ts` 3/3 (19.2 s; its prebuild's capped build 48 s), with the new boot arming in its server. + ## Not in this release Comment and thread generation for social posts (X/Bluesky promotion); auto-publishing to YouTube (r28 writes the text