idle-draft: add sample_override config flag to bypass cold-start throttle

Optional config key (default false). When true, research candidates are
offered even at max_unreviewed_research_per_dossier; research_sampled
bookkeeping, mark sampled, and status flags are unchanged so unsampled
items stay visible for later human verification.

Claude-Session: https://claude.ai/code/session_01Lgv4Qn82boNFC1jn8QXSNw
This commit is contained in:
Paul O'Reilly
2026-08-03 07:26:41 +12:00
parent 29618f4319
commit bdd10cbbc1
3 changed files with 21 additions and 1 deletions

View File

@@ -86,6 +86,12 @@ Parse `--config` as JSON. Required top-level keys: `parallel`, `providers`, `wor
verbatim. Missing required keys or malformed structure → log loudly, exit **2**.
`--parallel` on the CLI overrides the config value.
Optional key `sample_override` (bool, default `false`): when `true`, the cold-start
throttle (§ dispatch, below) is bypassed — `research` candidates are offered even when
the dossier is at `max_unreviewed_research_per_dossier`. Nothing else changes:
`research_sampled` bookkeeping, `mark … sampled`, and the `status` flags are unaffected,
so unsampled research remains visible and awaiting human verification.
### 4. State load and validation
Read `<repo>/idle-draft.state.json`. Missing file is not an error — treat as
@@ -184,6 +190,8 @@ from consideration for further dispatch until the in-flight task completes.
whose state entry does **not** have `research_sampled: true`. Once that count reaches
`max_unreviewed_research_per_dossier`, no further `research` candidates are offered for
that dossier this cycle (draft/review candidates in that dossier are unaffected).
If config `sample_override` is `true`, this throttle is skipped entirely; the unsampled
counts and `research_sampled` state are still maintained exactly as above.
**`topic_ideas`:** dossier-level (not tied to an `NN-slug`), considered only when the
combined candidate list above (across all dossiers) is empty. For each dossier, eligible