Repository navigation
docs(adr): let overlays set any harness field and route models - #7842
Conversation
E2E tests are runningAuthorization passed for this commit. See the E2E Tests workflow for results. |
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 route each severity your way: inline, summary, both, or drop |
PR Summary by QodoDocument per-task model and effort routing through harness overlays
AI Description
Diagram
High-Level Assessment
Files changed (5)
|
|
I'm not doing review because I think we need first to agree in the form and content before going into the finer details. |
44b7257 to
eee2693
Compare
Rework ADR 0112 after review on fullsend-ai#7842: instead of a routing-specific mechanism, overlays become general enough that per-task routing needs nothing of its own. - ADR 0112: overlays may set any harness field except base, trigger, overlays, slug and the deprecated forge. Every field except the routing fields is guarded: an overlay that sets one may read only runtime.forge, config (from the trusted ref) and the event and ADR 0098 entity fields the spec lists as trusted. Their when: expressions gain runtime.attempt, and every run records an overlay resolution trace. - ADR 0130: a harness may declare the models and efforts it supports. The resolved model and effort, and persona models on runtimes that resolve them, must be on the list; overlays may only narrow it, and a child inherits it unless it declares its own. The list order is the fallback chain for the agent and its personas. This replaces the model catalog, tiers and floor. - ADR 0131: a harness may set persona models in a subagents: map, ranked below the repo's subagents entry and above persona frontmatter. Unmatched harness keys are ignored and traced, not fatal. - Normalized event v1: add optional state.change_proposal.diff and linked_work_items, and list the trusted fields; every other field is untrusted by default. Add dated notes to ADR 0088, ADR 0091 and ADR 0104, annotate the security-threat-model.md cost-routing question, and update architecture.md and the adaptive-agent-selection.md and operational-observability.md open questions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
Site previewPreview: https://af2074ba-site.fullsend-ai.workers.dev Commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Rework ADR 0112 after review on fullsend-ai#7842: instead of a routing-specific mechanism, overlays become general enough that per-task routing needs nothing of its own. - ADR 0112: overlays may set any harness field except base, trigger, overlays, slug, role and the deprecated forge. Every field except model, effort, description and doc is guarded: an overlay that sets one may read only runtime.forge, config (from the trusted ref) and the event and ADR 0098 entity fields the spec lists as trusted. Every run records an overlay resolution trace in the plan output and a dedicated span. When a routed model isn't served, the runner retries once with the model and effort the run would use without overlays, and FULLSEND_FALLBACK_MODELS applies as each runtime allows. Persona-model routing and LLM-based routing are deferred. - Normalized event v1: add optional state.change_proposal.diff and linked_work_items (for routing, not yet populated, with path and key patterns), and list the trusted fields; every other field is untrusted by default. Add a dated note to ADR 0088 and a forward note to harness-fields.md, annotate the security-threat-model.md cost-routing question, and update architecture.md and the adaptive-agent-selection.md open question. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
14ba2da to
5c15140
Compare
Rework ADR 0112 after review on fullsend-ai#7842: instead of a routing-specific mechanism, overlays become general enough that per-task routing needs nothing of its own. - ADR 0112: overlays may set any harness field except base, trigger, overlays, slug, role and the deprecated forge. Every field except model, effort, description and doc is guarded: an overlay that sets one may read only runtime.forge, config (from the trusted ref) and the event and ADR 0098 entity fields the spec lists as trusted. Every run records an overlay resolution trace in the plan output and a dedicated span. When a routed model isn't served, the runner retries once with the model and effort the run would use without overlays, and FULLSEND_FALLBACK_MODELS applies as each runtime allows. Persona-model routing and LLM-based routing are deferred. - Normalized event v1: add optional state.change_proposal.diff and linked_work_items (for routing, not yet populated, with path and key patterns), and list the trusted fields; every other field is untrusted by default. Add a dated note to ADR 0088 and a forward note to harness-fields.md, annotate the security-threat-model.md cost-routing question, and update architecture.md and the adaptive-agent-selection.md open question. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
5c15140 to
b1aac83
Compare
ralphbean
left a comment
There was a problem hiding this comment.
We talked this over some in slack. I think the guarded fields topic as it is currently written is difficult to understand. Cleaning that and trimming that can make the meaning, limitations, and consequences of the guarded fields more clear.
Rework ADR 0112 after review on fullsend-ai#7842: instead of a routing-specific mechanism, overlays become general enough that per-task routing needs nothing of its own. - ADR 0112: overlays may set any harness field except base, trigger, overlays, slug, role and the deprecated forge. Every field except model, effort, description and doc is guarded: an overlay that sets one may read only runtime.forge, config (from the trusted ref) and the event and ADR 0098 entity fields the spec lists as trusted. Every run records an overlay resolution trace in the plan output and a dedicated span. When a routed model isn't served, the runner retries once with the model and effort the run would use without overlays, and FULLSEND_FALLBACK_MODELS applies as each runtime allows. Persona-model routing and LLM-based routing are deferred. - Normalized event v1: add optional state.change_proposal.diff and linked_work_items (for routing, not yet populated, with path and key patterns), and list the trusted fields; every other field is untrusted by default. Add a dated note to ADR 0088 and a forward note to harness-fields.md, annotate the security-threat-model.md cost-routing question, and update architecture.md and the adaptive-agent-selection.md open question. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
b1aac83 to
dd1b4f6
Compare
|
Now that the security aspect is more explicit and descriptive, why do we care about that? For example, we didn't talk about the key As per the ADR if you inspect the diffs in the overlay with a CEL expression, you can't set env variables or the image. Why the limitation? Is there really a security benefit? Wouldn't the case of the Or to modify their skills, increasing their context? |
rh-hemartin
left a comment
There was a problem hiding this comment.
I don't see very clearly the cases for the security part, looks like a cumbersome restriction to me as user, but I trust you folks.
ifireball
left a comment
There was a problem hiding this comment.
Well those trusted fields and guarded fields concepts are a wrinkle I wasn't expecting... But seems to make sense...
|
Thanks @rh-hemartin , that's a fair push. The guard is really aimed at the fields that change what the agent is allowed to do: I think you're right that So I'd rather not change the list after everyone's approved, and keep everything guarded by default for now. When we implement this we can look at moving |
|
3 |
|
2 |
|
1 |
Summary
I reworked this after Hector's and Ralph's feedback. Overlays get opened up to (almost) any harness field, so per-task routing comes "for free" from overlays keyed on change facts. The security rule for doing that lives in ADR 0112, the change facts go into the normalized-event spec (no ADR), and there's no model catalog or list of supported models at all. If a model an overlay picked isn't served, the run just retries with the model and effort it would have used without overlays. Docs only, no code.
Related Issue
Refs #5777, #2842, fullsend-ai/agents#497 (cheaper runs on trivial changes), fullsend-ai/agents#535 (deeper review on security signals), #6527 (don't downgrade the deciding session), #6964 and fullsend-ai/agents#1225 (a listed model that isn't served).
This is still the alternative to #7808. It doesn't close any of these since each still needs the implementation.
Changes
base,trigger,overlays,slug,roleand the deprecatedforge. Merge rules and ADR 0091's precedence don't change. A guarded field is one an overlay can only set from facts the change's author can't choose, and every field is guarded exceptmodel,effort,descriptionanddoc. A guarded overlay may only readruntime.forge,config(from the same trusted ref as OWNERS and the harness) and the event and entity fields the spec lists as trusted, and can only usehas()on objects the schema always requires. That way a PR author can't pick which branch of a harness applies to things likepolicyorenv. A missing event or key still counts as no match like today, and any other evaluation error on a guarded overlay fails the run. Every run records an overlay resolution trace in the plan output and its own span, including when a fallback replaced a routedmodeloreffort. When the runtime reports that a model an overlay set isn't served, the runner retries the run once with the model and effort it would use without overlays, andFULLSEND_FALLBACK_MODELSapplies as each runtime allows. This replaces the catalog, tiers and floor from the first version, and thesupported:block (ADR 0130) from the last one, which we dropped after talking it through with Hector and Ralph.state.change_proposal.diffandlinked_work_items, added for 0112's routing and not yet populated, with patterns for paths (relative and canonical) and keys. Plus a "Trusted fields" list: anything not on it, including fields added later, is untrusted.docs/architecture.mdgets one Decided line (not yet implemented). Annotations inadaptive-agent-selection.mdandsecurity-threat-model.md.docs/contributing/harness-fields.mdgets a dated forward note; its tables describe current behavior and change when this gets implemented.Deferred: persona-model routing (with the configuration standardization work in flight) and LLM-based routing (not decided here, see AISDLC-95, would need its own ADR).
Example harness
The ADR fixes the concepts, not the schema, so treat the field names as placeholders.
Validation would reject:
Testing
make lintpasses (stage changes first, then run). All pre-commit hooks pass, including the ADR status, number and frontmatter lints, the markdown link check and gitlint.Notes for review
renumber-adr.policyorenvkeyed on something now untrusted (labels,entity.kind, comment text) would start failing validation once this is implemented. The built-in harnesses only key onevent.source.system,has(event.source)andruntime.forge, so they're fine..fullsendand the harnesses, so guarded overlays don't add exposure. Tightening it to default or protected branches would be its own follow-up since it affects OWNERS too.Checklist
!for breaking changes)🤖 Generated with Claude Code