feat: plan the queue into waves (S13) and a cheap documentation path with a measured free-model pool (S12) #23

Merged
EduarD3V merged 1 commit from chore/agent-queue-plan into develop 2026-10-06 13:46:11 +02:00
Collaborator

Two Tier-4 items from docs/agent-pipeline/phase3-design.md, both previously recorded as not justified or not built. They share one theme: do the cheap thing only where it is provably safe.

S13 - plan the queue into dependency-ordered waves

scripts/agent-pipeline/queue-plan.py orders the ai-assist queue so two issues are never dispatched together when one depends on the other or when both would edit the same thing.

Two edge kinds, each labelled in the output: explicit references in a body (depends on / blocked by / after / needs / requires #N) are declared; shared work areas are declared-area, or inferred-route when the only evidence is that both bodies mention the same path. The label matters because an inferred edge is a guess.

Failure modes are the point. A cycle is refused and reported rather than ordered by picking something; a reference to an issue outside the queue is warned about rather than silently dropped. Both are in the self-test with chain, diamond, no-edge and inference-off cases: 8/8.

On the live queue it orders #22 first and #21 second, because both touch /alerts/sources/new. It only plans: no dispatch, no comment, no merge. Nothing calls it yet.

S12 - the cheap documentation path

scripts/agent-pipeline/fastpath.py asks a free model for a documentation or marketing patch and keeps it only if it survives the gates and touches only allowlisted paths. The cost objection is gone now that the free OpenRouter models are reachable through the 9router gateway.

Safety is mechanical and therefore testable: every path in the patch is checked against an allowlist before it is applied, the gates must already have been green, and a patch that breaks a gate is reverted. Product code, docs/use-cases/ and AGENTS.md are refused outright, which is why the two issues currently queued are not eligible: they concern the dashboard.

The pool is measured, not assumed. 5 of the 10 listed free models answered, 3 produced a usable unified diff, 1 answered but produced nothing usable, 4 were unavailable or rate limited. Two traps came out of that and are fixed: the gateway pads responses with blank lines before the JSON (which made a working model look broken), and a reasoning model prefixes its diff with thinking (which made a diff-shaped reply unappliable).

Self-test 12/12: docs patch kept; product-code patch refused and never applied; fenced/preambled reply salvaged and kept; non-diff reply no-patch; stale diff unappliable; gate-breaking patch discarded-gates and reverted; red baseline dirty-baseline so the patch is not blamed for a pre-existing failure.

What this does not claim. S12 is unproven against the full agent path. The ledger holds the cheap path's verdicts; the head-to-head comparison, with the human verdict on both and no human edit needed as the bar, is still missing. The doc says so plainly, along with the fact that the gates do not judge prose and that nothing calls the fast path automatically yet.

Both docs state their limits rather than their intentions: docs/agent-pipeline/queue-plan.md and docs/agent-pipeline/fastpath.md.

Two Tier-4 items from `docs/agent-pipeline/phase3-design.md`, both previously recorded as not justified or not built. They share one theme: do the cheap thing only where it is provably safe. ## S13 - plan the queue into dependency-ordered waves `scripts/agent-pipeline/queue-plan.py` orders the `ai-assist` queue so two issues are never dispatched together when one depends on the other or when both would edit the same thing. Two edge kinds, each labelled in the output: explicit references in a body (`depends on` / `blocked by` / `after` / `needs` / `requires #N`) are `declared`; shared work areas are `declared-area`, or `inferred-route` when the only evidence is that both bodies mention the same path. The label matters because an inferred edge is a guess. **Failure modes are the point.** A cycle is refused and reported rather than ordered by picking something; a reference to an issue outside the queue is warned about rather than silently dropped. Both are in the self-test with chain, diamond, no-edge and inference-off cases: **8/8**. On the live queue it orders #22 first and #21 second, because both touch `/alerts/sources/new`. It only plans: no dispatch, no comment, no merge. Nothing calls it yet. ## S12 - the cheap documentation path `scripts/agent-pipeline/fastpath.py` asks a free model for a documentation or marketing patch and keeps it only if it survives the gates and touches only allowlisted paths. The cost objection is gone now that the free OpenRouter models are reachable through the 9router gateway. Safety is mechanical and therefore testable: every path in the patch is checked against an allowlist **before** it is applied, the gates must already have been green, and a patch that breaks a gate is reverted. Product code, `docs/use-cases/` and `AGENTS.md` are refused outright, which is why the two issues currently queued are not eligible: they concern the dashboard. **The pool is measured, not assumed.** 5 of the 10 listed free models answered, 3 produced a usable unified diff, 1 answered but produced nothing usable, 4 were unavailable or rate limited. Two traps came out of that and are fixed: the gateway pads responses with blank lines before the JSON (which made a working model look broken), and a reasoning model prefixes its diff with thinking (which made a diff-shaped reply unappliable). Self-test **12/12**: docs patch kept; product-code patch refused *and never applied*; fenced/preambled reply salvaged and kept; non-diff reply `no-patch`; stale diff `unappliable`; gate-breaking patch `discarded-gates` *and reverted*; red baseline `dirty-baseline` so the patch is not blamed for a pre-existing failure. **What this does not claim.** S12 is unproven against the full agent path. The ledger holds the cheap path's verdicts; the head-to-head comparison, with the human verdict on both and no human edit needed as the bar, is still missing. The doc says so plainly, along with the fact that the gates do not judge prose and that nothing calls the fast path automatically yet. Both docs state their limits rather than their intentions: `docs/agent-pipeline/queue-plan.md` and `docs/agent-pipeline/fastpath.md`.
feat: plan the ai-assist queue into dependency-ordered waves
All checks were successful
CI and agent release / check-docs (pull_request) Successful in 24s
agent-guards / test-tampering (pull_request) Successful in 37s
CI and agent release / test-agent (pull_request) Successful in 1m35s
CI and agent release / test-dashboard (pull_request) Successful in 2m39s
CI and agent release / test-middleware (pull_request) Successful in 8m46s
CI and agent release / build (pull_request) Has been skipped
CI and agent release / release (pull_request) Has been skipped
CI and agent release / publish-images (pull_request) Has been skipped
c535fecd99
Phase 3 S13, built on request. The queue was empty when S13 was designed, so a dependency graph had no
edges to order over and it was recorded as not justified; it now has real work in it.

The planner derives edges two ways and labels every one: explicit references in a body (depends on /
blocked by / after / needs / requires #N) as 'declared', and shared work areas as 'declared-area' or
'inferred-route'. The label matters because an inferred edge is a guess - two bodies mentioning the same
URL are serialised because they probably touch that page, and the plan says so.

A cycle is refused and reported rather than ordered by guessing, and a reference to an issue outside the
queue is warned about rather than dropped. Both are covered by the self-test, along with chain, diamond,
no-edge, declared-area and inference-off cases: 8/8. Ordering bugs are silent - a planner that emits one
wave looks correct on a queue with no dependencies, which is the queue this was written against.

On the live queue it orders #22 then #21, because both touch /alerts/sources/new. It plans only: it never
dispatches, never comments, never merges. Nothing calls it yet - wiring it ahead of dispatch is a separate
step.
EduarD3V merged commit 91d7dd4d03 into develop 2026-10-06 13:46:11 +02:00
gotoi-agent changed title from feat: plan the ai-assist queue into dependency-ordered waves (S13) to feat: plan the queue into waves (S13) and a cheap documentation path with a measured free-model pool (S12) 2026-10-06 13:46:58 +02:00
Sign in to join this conversation.
No description provided.