Repository navigation
docs(adr): route runtime and model per task from a config policy - #7251
waynesun09 wants to merge 2 commits into
Conversation
Every runtime/model/effort/persona choice is static per agent (ADR 0091, ADR 0104); CEL overlays cannot set model or effort and the normalized event carries no diff size, so a one-line docs change and a 2,000-line CI refactor get the same opus-at-high review. #5777, #6891, #2842 and agents#497 ask for a cheaper model or effort on trivially scoped changes, agents#535 for a deeper review on security signals, #6560 for a cost preview, and #6964 / agents#1225 record the retry-on-unavailable incident class that a pre-sandbox served-model check would end. ADR 0112 decides that `fullsend run` resolves the four fields an `agents:` entry holds per task, on the host, before the sandbox exists, from a `routing:` block in config.yaml: rules keyed on system-derived task facts only (never PR text), a precedence slot between the per-run overrides and the static entry, guards (allowed set, runtime capability matrix, never-downgrade set kept as #6527 wrote it, persona floors, served-model preflight), effort before model, every choice echoed, a shadow mode, and learning that lands only as a reviewed policy change. The two rejected options are per-prompt routing inside the sandbox (the #6361 draft) and routing in an LLM gateway, which stays an optional provider. Living documents: a Decided line under Agent Runtime in architecture.md and annotations on the open questions in adaptive-agent-selection, cross-run-memory and operational-observability. No code change. Assisted-by: Claude Claude-Session: https://claude.ai/code/session_01BCAjgeumZBcuaRSVvsbAkY Signed-off-by: Wayne Sun <gsun@redhat.com>
|
🤖 Review · Commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Rules cannot read a diff; a short read-only run on the fast tier can. Record the advisor as a follow-on decision and fix the one constraint this ADR owns for it: an assessment read from author-controlled content may fire an escalation rule alone but may satisfy a downgrade rule only together with a system-derived fact, and it never widens the allowed set or crosses the never-downgrade floor. Assisted-by: Claude Claude-Session: https://claude.ai/code/session_01BCAjgeumZBcuaRSVvsbAkY Signed-off-by: Wayne Sun <gsun@redhat.com>
|
🤖 Finished Review · ✅ Success · Started 1:51 AM UTC · Completed 2:12 AM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5 · Effort: high · Cost: $5.08 |
|
Risk Assessment: moderate (2/5) DetailsRe-review of the identical commit: Tier 1 metadata is low (docs-only, 5 files, 171 lines, no protected/security/CI/dependency paths, non-bot non-first-time author), but Tier 2 git-history churn on the modified shared docs (especially docs/architecture.md) has risen since the prior review; the weighted composite still rounds to 2 (moderate), preserving the prior score with a slightly stronger git-history basis. Previous runRisk Assessment: moderate (2/5) DetailsDocs-only PR (5 files, 171 lines, no protected/security/CI/dependency paths, non-first-time non-bot author) drives a low Tier 1 score, but two frequently-churned shared docs pull the git-history tier up to moderate, yielding a composite score of 2 (moderate) with no linked issue to factor in. |
ReviewFindingsLow
None of the above are critical or high, and none identify a functional bug — these are internal-consistency and under-specification gaps in the Decision text of an ADR that is marked Accepted but has not yet merged. Per this repo's own A separate candidate finding — adding a backlink from Next steps:
Previous runReviewFindingsLow
Info
None of the above are critical or high; nothing here blocks the decision recorded by this ADR. They are wording/internal-consistency gaps in the Decision text itself (precedence vs. legacy config, undefined fields like Next steps:
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can choose which labels appear on a finding, and whether they show icons or text |
PR Summary by QodoDocument host-side per-task runtime and model routing policy
AI Description
Diagram
High-Level Assessment
Files changed (5)
|
|
🤖 Finished Review · ✅ Success · Started 8:20 PM UTC · Completed 8:40 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5 · Effort: high · Cost: $4.84 |
Additional design and validation contextA few points worth incorporating as this ADR is refined:
AI-generated. Review for accuracy. |
|
🤖 Finished Retro · ✅ Success · Started 7:11 PM UTC · Completed 7:17 PM UTC Commit: Runtime: claude · Model: sonnet → claude-sonnet-5 · Effort: high · Cost: $1.27 |
|
PR #7251 (docs-only ADR 0112 draft, closed without merge on 2026-09-28) was overall a clean run. The review agent (fullsend-ai/agents@main, pi runtime, sonnet, high effort) surfaced 9 legitimate low/info-severity internal-consistency gaps in the ADR text (undefined The one real inefficiency: fullsend re-ran a full high-effort review (cost $4.84) on 2026-09-24 when the author flipped the PR from draft to ready_for_review, even though the head SHA (611ed05) was byte-identical to the commit already reviewed 12 days earlier (cost $5.08) on 2026-09-12. The second review's own generated prose even states "The PR's head commit is unchanged since the prior review" — yet the pipeline still ran the entire high-effort review and produced near-verbatim duplicate findings, for roughly $10 combined spend on a single unchanging commit. This is a known, actively-tracked class of problem, so no new issue is filed:
Recommend attaching this run's evidence (the specific file/line pointers above, plus the quantified ~$10 double-spend) to #1715 and #4401 rather than opening a new issue. |
What
ADR 0112:
fullsend runresolves runtime, model, effort and persona models per task, on the host, before the sandbox exists, from arouting:block in.fullsend/config.yaml. Docs only; no code in this PR.Why
Every choice is static per agent today (ADR 0091, ADR 0104). CEL overlays cannot set
modeloreffort(ADR 0088) and the normalized event carries no diff size or paths, so a one-line docs change and a 2,000-line CI refactor get the same opus-at-high review.Asks this decision answers with one mechanism:
The decision, in brief
routing.rules[]withagents:, CELwhen:over a system-derivedtaskvariable, and aset:limited to the four fields anagents:entry holds. PR title, body, comments, commit messages and branch names are never routing inputs; downgrade rules may key only on allowlisted labels.FULLSEND_*variables ›routing.rules› the agent'sagents:entry › repo default.allowed_models∩ catalog, runtime capability matrix,never_downgrade(the Runtime parity backlog: deferred runtime/model UX items (pi Agent tool, per-role models, per-run overrides, model switching, other clouds) #6527 rule kept as written: a downgrade rule forreviewmoves effort andsubagents, never the orchestrator's model), personamin_tierfloors, served-model preflight before the sandbox.metrics.json, root span, status comment);shadowmode records without acting.routing:as the only path to production. No in-run adaptation.Rejected options recorded: per-prompt routing inside the sandbox (the closed #6361 draft) and routing in an LLM gateway, which stays an optional provider.
Living documents updated
docs/architecture.md: one Decided line under Agent Runtime.docs/problems/adaptive-agent-selection.md,cross-run-memory.md,operational-observability.md: annotations on the open questions this partially answers.Notes for review
mainor by an open PR at the time of writing (0106–0111 are claimed by docs(adr): adopt entity-first harness evaluation #6956, docs(#237): add ADR 0106 for skill loading policy #7120, docs(#6407): adopt deterministic entity context staging #7080, feat(telemetry): capture tool results in Level 3 content and emit execute_tool spans #6603, docs(#294): add ADR 0109 for trace retention policy #7121, docs(adr): define dedicated auto-merge authority boundary #7151, docs(#635): define first-class agent promotion criteria #7182); will renumber on rebase if merge order moves it.routing:schema with shadow mode, then in-run escalation on pi and Claude, then replay) are not in this PR; the ADR records the decision they implement.https://claude.ai/code/session_01BCAjgeumZBcuaRSVvsbAkY