feat(scaffold): replace triage harness with external agent registry - #2750
feat(scaffold): replace triage harness with external agent registry#2750ggallen wants to merge 1 commit into
Conversation
PR Summary by QodoScaffold: replace triage harness with pinned external fullsend-ai/agents reference
AI Description
Diagram
High-Level Assessment
Files changed (9)
|
Site previewPreview: https://de0721a3-site.fullsend-ai.workers.dev Commit: |
|
🤖 Finished Review · ✅ Success · Started 1:29 PM UTC · Completed 1:42 PM UTC |
Code Review by Qodo
1. External triage URL blocked
|
| // ExternalAgent describes an agent harness hosted outside the fullsend scaffold. | ||
| type ExternalAgent struct { | ||
| URLPrefix string // raw.githubusercontent.com base, e.g. "https://raw.githubusercontent.com/fullsend-ai/agents/" | ||
| CommitSHA string // pinned commit in the external repo | ||
| HarnessPath string // path prefix within the repo, e.g. "harness/" | ||
| ContentHash string // SHA-256 hex digest of the remote harness file | ||
| } | ||
|
|
||
| // externalAgents maps harness names to agent definitions hosted in standalone repos. | ||
| var externalAgents = map[string]ExternalAgent{ | ||
| "triage": { | ||
| URLPrefix: "https://raw.githubusercontent.com/fullsend-ai/agents/", | ||
| CommitSHA: "b929ce3d411bf45e01e1459361221bdee6803912", | ||
| HarnessPath: "harness/", | ||
| ContentHash: "16d87496f672dab3fda3a448477ee85b67cdfb7cec625563fbeecb65dc0ce0cc", | ||
| }, | ||
| } | ||
|
|
||
| // IsExternalAgent reports whether the named harness is hosted outside the scaffold. | ||
| func IsExternalAgent(name string) bool { | ||
| _, ok := externalAgents[name] | ||
| return ok | ||
| } | ||
|
|
||
| var ( | ||
| validHarnessName = regexp.MustCompile(`^[a-z][a-z0-9_-]*$`) | ||
| validCommitSHA = regexp.MustCompile(`^[0-9a-f]{40}$`) | ||
| ) | ||
|
|
||
| // HarnessBaseURL returns the raw.githubusercontent.com URL for a scaffold | ||
| // harness template at a specific commit SHA. The URL does not include an | ||
| // integrity hash fragment — use HarnessBaseURLWithHash for that. | ||
| // HarnessBaseURL returns the raw.githubusercontent.com URL for a harness | ||
| // template at a specific commit SHA. For external agents the commitSHA | ||
| // parameter is ignored — the pinned SHA from the external registry is used. | ||
| // The URL does not include an integrity hash fragment — use | ||
| // HarnessBaseURLWithHash for that. | ||
| func HarnessBaseURL(harnessName, commitSHA string) (string, error) { | ||
| if !validHarnessName.MatchString(harnessName) { | ||
| return "", fmt.Errorf("invalid harness name %q: must match %s", harnessName, validHarnessName.String()) | ||
| } | ||
| if ext, ok := externalAgents[harnessName]; ok { | ||
| return ext.URLPrefix + ext.CommitSHA + "/" + ext.HarnessPath + harnessName + ".yaml", nil | ||
| } |
There was a problem hiding this comment.
1. External triage url blocked 🐞 Bug ≡ Correctness
HarnessBaseURL("triage", ...) now produces a base URL under
https://raw.githubusercontent.com/fullsend-ai/agents/, but the default org config allowlist does not
include that prefix. As a result, triage wrapper harnesses will fail base composition with "base URL
is not in allowed_remote_resources" at runtime.
Agent Prompt
### Issue description
Triage harness wrappers now reference an external base URL under `https://raw.githubusercontent.com/fullsend-ai/agents/…`, but the default `allowed_remote_resources` (org config) does not allow this prefix. This will cause triage runs to fail during base composition.
### Issue Context
- `HarnessWrappersLayer` always generates wrapper files with `base: <HarnessBaseURLWithHash(...)>`.
- Base URL fetching enforces prefix allowlisting and hard-fails when the URL is not in `allowed_remote_resources`.
- `HarnessBaseURL("triage", ...)` now returns an `agents/`-hosted URL via the external agent registry.
### Fix Focus Areas
- internal/config/config.go[119-135]
- internal/config/config_test.go[46-67]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
6c3fe63 to
eed1373
Compare
ReviewFindingsMedium
Labels: PR modifies harness resolution infrastructure and extracts the triage agent to an external registry. Previous runReviewReason: stale-head The review agent reviewed commit |
|
/fs-review |
eed1373 to
a51e657
Compare
|
🤖 Review · |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
The triage agent now lives in fullsend-ai/agents. Instead of keeping a stub harness in the scaffold, the external agent registry in baseurl.go is the single source of truth: HarnessNames() merges scaffold harnesses with external agents, and HarnessWrappersLayer generates wrappers pointing directly to the external repo. - Add ExternalAgent registry to baseurl.go with pinned commit SHA and content hash for the triage harness - Delete triage harness and all triage-specific scaffold files (agent prompt, env, policy, schema, pre/post scripts) - Update HarnessNames() to merge scaffold and external agent names - Remove post-triage-test.sh from Makefile script-test target - Update validate-output-schema-test.sh to use prioritize schema instead of deleted triage schema - Update docs/agents/triage.md source link to external repo - Update all tests for the new external agent pattern Signed-off-by: Claude <noreply@anthropic.com> Signed-off-by: Greg Allen <gallen@redhat.com>
a51e657 to
5e38928
Compare
|
🤖 Finished Review · ✅ Success · Started 1:59 PM UTC · Completed 2:16 PM UTC |
|
Closing in favor of config-driven agent registry approach (see ADR branch: https://github.com/ggallen/fullsend/tree/adr-config-driven-agents). The hardcoded external agent registry this PR introduced will be replaced by agent registration in org/per-repo config. |
|
🤖 Finished Retro · ❌ Failure · Started 2:53 PM UTC · Completed 3:01 PM UTC |
Summary
Completes the triage agent extraction (Phase 2) by removing the triage harness from the scaffold entirely and registering it in an external agent registry.
baseurl.go— external agents have a pinned commit SHA and content hash, soHarnessWrappersLayergenerates wrappers pointing directly tofullsend-ai/agents(no stub file, no doublebase:indirection)HarnessNames()to merge scaffold harness names with external agent registry entries, so "triage" remains discoverable without a placeholder fileskills/issue-labels/SKILL.md(shared with the review harness) and.github/workflows/triage.yml(thin workflow caller)validate-output-schema-test.shto use prioritize schema instead of deleted triage schemadocs/agents/triage.mdsource link to point to external repoDepends on PR #2733 (merged) and PR #2751 (merged).
Test plan
go test ./internal/scaffold/...— all passgo test ./internal/harness/...— all passgo test ./internal/layers/...— all passgo test ./...— full suite passesmake script-test— all pass🤖 Generated with Claude Code