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:
@@ -683,6 +683,7 @@ def count_open_topic_proposals(repo: Path, dossier: str) -> int:
|
||||
def build_ready_queue(repo: Path, config: dict, state: dict, in_flight: set) -> list[dict]:
|
||||
candidates: list[dict] = []
|
||||
dossiers = config["dossiers"]
|
||||
sample_override = bool(config.get("sample_override", False))
|
||||
for idx, dossier in enumerate(dossiers):
|
||||
unreviewed = count_unreviewed_research(repo, dossier, state)
|
||||
max_unreviewed = config["max_unreviewed_research_per_dossier"]
|
||||
@@ -693,7 +694,7 @@ def build_ready_queue(repo: Path, config: dict, state: dict, in_flight: set) ->
|
||||
files = item_files(repo, dossier, f"{nn}-{slug}")
|
||||
entry = get_item_state(state, key)
|
||||
wtype, reason = next_work_type_for_item(files, entry)
|
||||
if wtype == "research" and unreviewed >= max_unreviewed:
|
||||
if wtype == "research" and unreviewed >= max_unreviewed and not sample_override:
|
||||
continue
|
||||
if wtype is None:
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user