Extract and summarise bounds are each agent's own limits, set on its form

agents.limits holds extract_top, extract_min, summarise_top and
summarise_min; the scope query reads them per ranked row, and a row saved
before this behaves like a fresh agent. The four global config keys go.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
WolfandClaude Fable 5.1 committed 2026-09-28 16:02:06 +02:00
1 parent e602eb3388
commit cebe62ddc9
20 files changed
+229 -147

No files matched your search

+6 -7
View File
@@ -6,9 +6,10 @@ what the model is told, the schema it answers in, what to do with the
answer), and running it is `desk.modeltask`'s.
A role is waiting while it has no summary, has some text, and is in the top
`summarise.per_agent` of an enabled agent's ungated scores at
`summarise.min_score` or more. That bound is what keeps the cost flat: a pull
summarises the roles somebody will look at, not the 30k that are open. A batch built for named uids (the read page's Summarise
of an enabled agent's ungated scores as deep and as low as that agent's own
`limits` say (`summarise_top`, `summarise_min`). That bound is what keeps the
cost flat: a pull summarises the roles somebody will look at, not the 30k
that are open. A batch built for named uids (the read page's Summarise
button) takes those roles whatever their rank. See `Store.summarise_waiting`.
The text is `article_text` when the posting page was fetched, else
@@ -121,8 +122,7 @@ def _item(role: Role) -> dict[str, Any]:
def _waiting(config: Config, store: Store, limit: int,
uids: Sequence[str] | None = None) -> list[Role]:
return store.summarise_waiting(limit, config.summarise.per_agent, uids,
min_score=config.summarise.min_score)
return store.summarise_waiting(limit, uids)
def build_batch(config: Config, store: Store, limit: int = 10,
@@ -166,8 +166,7 @@ TASK: ModelTask[SummariseResult] = ModelTask(
verb="summarising", noun="summaries", idle="nothing to summarise",
items="summaries",
settings=lambda config: config.summarise,
pending=lambda config, store: store.summarise_pending(
config.summarise.per_agent, config.summarise.min_score),
pending=lambda config, store: store.summarise_pending(),
waiting=lambda config, store, limit: [r.uid for r in _waiting(config, store, limit)],
build_batch=build_batch,
system=lambda store: SYSTEM,