refactor(harness): remove scaffold agent fallback infrastructure - #5425
Conversation
PR Summary by QodoRemove scaffold-based agent fallback infrastructure
AI Description
Diagram
High-Level Assessment
Files changed (10)
|
|
🤖 Finished Review · ✅ Success · Started 10:34 PM UTC · Completed 10:50 PM UTC |
Site previewPreview: https://5482e845-site.fullsend-ai.workers.dev Commit: |
Code Review by Qodo
1. Opaque fallback error
|
ReviewFindingsLow
Previous runReviewFindingsLow
Previous run (2)ReviewFindingsMedium
Low
Previous run (3)ReviewFindingsMedium
Low
Previous run (4)ReviewFindingsMedium
Low
Previous run (5)ReviewReason: stale-head The review agent reviewed commit Previous run (6)ReviewFindingsMedium
Low
Previous run (7)ReviewFindingsMedium
Previous run (8)ReviewFindingsLow
Previous run (9)ReviewFindingsLow
Previous run (10)ReviewFindingsMedium
Previous run (11)ReviewFindingsLow
Previous run (12)ReviewFindingsLow
Previous run (13)ReviewFindingsHigh
Medium
Low
Previous run (14)ReviewFindingsHigh
Medium
Low
Previous run (15)ReviewFindingsHigh
Previous run (16)ReviewFindingsLow
Previous run (17)ReviewFindingsLow
Previous run (18)ReviewFindingsLow
Previous run (19)ReviewFindingsLow
Previous run (20)ReviewFindingsMedium
Low
Previous run (21)ReviewFindingsLow
Previous run (22)ReviewFindingsLow
Previous run (23)ReviewFindingsMedium
Low
Previous run (24)ReviewFindingsHigh
Low
Previous run (25)ReviewFindingsMedium
Low
Previous runReviewFindingsHigh
Medium
Low
Labels: PR removes harness wrapper generation layer and simplifies agent resolution infrastructure Previous run (26)ReviewFindingsMedium
Low
Previous run (27)ReviewFindingsHigh
Medium
Low
Labels: PR removes harness wrapper generation layer and simplifies agent resolution infrastructure |
e41d1db to
8e16c5b
Compare
|
🤖 Finished Review · ❌ Failure · Started 11:56 PM UTC · Completed 12:32 AM UTC |
8e16c5b to
82d754b
Compare
|
🤖 Review · ❌ Terminated · Started 1:39 AM UTC · Ended 1:55 AM UTC |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Superseded by updated review
|
🤖 Finished Review · ✅ Success · Started 1:39 AM UTC · Completed 1:55 AM UTC |
82d754b to
cfeda1e
Compare
|
🤖 Finished Review · ✅ Success · Started 2:01 AM UTC · Completed 2:15 AM UTC |
cfeda1e to
52059b2
Compare
|
🤖 Finished Review · ✅ Success · Started 2:21 AM UTC · Completed 2:37 AM UTC |
Superseded by updated review
|
🤖 Finished Review · ✅ Success · Started 9:11 PM UTC · Completed 9:25 PM UTC |
|
🤖 Finished Review · ✅ Success · Started 9:31 PM UTC · Completed 9:45 PM UTC |
|
🤖 Finished Review · ✅ Success · Started 9:49 PM UTC · Completed 10:06 PM UTC |
|
🤖 Finished Review · ✅ Success · Started 10:10 PM UTC · Completed 10:22 PM UTC |
|
/fs-review |
|
🤖 Review · |
|
🤖 Finished Review · ✅ Success · Started 10:34 PM UTC · Completed 10:48 PM UTC |
|
🤖 Finished Review · ✅ Success · Started 10:56 PM UTC · Completed 11:17 PM UTC |
|
🤖 Finished Review · ✅ Success · Started 11:27 PM UTC · Completed 11:42 PM UTC |
|
🤖 Finished Review · ✅ Success · Started 11:54 PM UTC · Completed 12:12 AM UTC |
waynesun09
left a comment
There was a problem hiding this comment.
Final verification pass (2 agents) after the extensive prior review history on this PR (5+ rounds, all threads resolved, CI green, 2 prior approvals).
Re-verified the one MEDIUM finding without a written reply — internal/cli/poll.go:101's claimed case-insensitive dedup bug in buildRouter. Confirmed false positive: both the first loop (seen[lower], lowercased) and the second loop's lookup against defaultAgentsRepoKnownAgents's already-lowercase keys correctly key seen by lowercase form throughout — traced through a concrete "Code" example and independently verified with a standalone test of the exact loop logic (["Code", "triage"], no duplicate).
Fresh full-diff sweep — no dangling references to removed symbols (MergedAgents, LookupMergedAgent, HarnessWrappersLayer, AgentEntryBuilder, DefaultAgentEntries, configAgentNames), go build/go vet clean, retained disk-adjacent helpers (resolveHarnessPath, scaffold.HarnessNames()) correctly untouched for lock.go/migrate.go, no downstream tooling depends on the old error-message wording, and test coverage for the tryAgentsRepoFallback-as-sole-fallback paths is adequate.
Migration-safety claim ("all customer installations verified migrated") — spot-checked real consuming-org configs; corroborated in practice (orgs without an agents: block still resolve via the retained agents-repo fallback for first-party agents, not the removed disk path). No formal audit artifact backs the claim in the PR/tracking issue, but the actual blast radius of it being wrong is narrow, the failure mode is a loud non-silent error (never a silent fallback to stale behavior), and rollback is a trivial single-commit revert with no dependent work merged yet.
No blocking issues found. Approving.
|
🤖 Review · |
Remove scaffold-based agent resolution (MergedAgents, LookupMergedAgent, HarnessWrappersLayer, AgentEntryBuilder, DefaultAgentEntries, configAgentNames) and disk-based harness fallback from resolveAgentSource. Agent resolution now uses a 2-tier model: config agents take precedence, then agents-repo fallback (fullsend-ai/agents). The agents-repo fallback is retained because the config agents key is optional. Implements Step 7 of the agent extraction plan per ADR 0058. Not a breaking change: the disk fallback resolved harness/*.yaml wrapper files generated by HarnessWrappersLayer during `fullsend admin install`, not user-created files. This PR removes both the layer that writes those files and the fallback that reads them. All installations have been verified migrated to config-driven agents (the Step 7 prerequisite), and the agents-repo fallback still covers all first-party agents for online environments. Signed-off-by: Greg Allen <gallen@redhat.com> Signed-off-by: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Greg Allen <gallen@redhat.com>
|
🤖 Finished Review · ✅ Success · Started 5:25 PM UTC · Completed 5:41 PM UTC |
There was a problem hiding this comment.
Note: The following inline comments could not be posted on the diff (GitHub returned 422) and are included here instead:
internal/config/config.go(file-level): Line 24 · [low] stale-code-comment
The AgentEntry.Enabled field comment references 'merged agent set' and 'built-in scaffold agents' — both concepts removed by this PR. MergedAgents() is deleted and the scaffold fallback is replaced by agents-repo fallback.
Suggested fix: Update comment to: 'Enabled controls whether the agent is included in resolution. When nil (omitted) the agent defaults to enabled. When explicitly set to false the agent is suppressed — this allows disabling agents-repo defaults or config-registered agents without removing their config entry.'
internal/config/config.go(file-level): Line 394 · [low] stale-code-comment
The comment inside ValidateAgentEntries says 'it exists solely to disable a scaffold default by name'. After this PR, scaffold defaults no longer exist; suppression-only entries now disable agents-repo defaults or other config-registered agents by name.
Suggested fix: Update comment to: 'it exists solely to disable a default or config-registered agent by name.'
|
🤖 Finished Retro · ✅ Success · Started 5:47 PM UTC · Completed 6:00 PM UTC |
Retro: PR #5425 -- Remove scaffold agent fallback infrastructureTimelineHuman-authored refactoring PR (ggallen) removing 3-tier agent resolution down to 2-tier. +219/-1,391 across 29 files. Created July 21, merged July 24 (~67 hours). 25 force-pushes triggered 28 review bot runs (22 review submissions, 35 issue comments). Three human reviewers: waynesun09 (4 reviews with substantive findings that drove code fixes), rh-hemartin (1 approval), ggallen (7 response comments). Agents repo: What worked well
Review quality gapwaynesun09 found three HIGH issues the bot missed across 28 runs:
waynesun09 also caught 4 MEDIUM issues: test assertions weakened to generic substrings (~8 tests), non-deterministic test setup (missing The bot produced one confirmed false positive: a medium-severity "logic-error" about case-insensitive deduplication in Evidence for existing issues
Proposals filed
|
Closes #5552
Summary
MergedAgents/LookupMergedAgentmerge,HarnessWrappersLayer, disk fallback viaresolveHarnessPath) from agent discoveryresolveAgentSource()from 3-tier (config → agents-repo → disk) to 2-tier (config → agents-repo)AgentEntryBuilder/DefaultAgentEntries(unused Phase 2 stubs),configAgentNames, andcommitSHAfrombuildLayerStacksignatureThe agents-repo runtime fallback (
tryAgentsRepoFallback) is retained because theagentskey in config.yaml is optional — orgs without agent entries still need runtime resolution fromfullsend-ai/agents.Scaffold files themselves are not deleted (Step 8). The customize overlay is untouched (deprecated per ADR 0064, separate concern).
migrate.goandbaseurl.goare untouched.Migration prerequisite (Step 7)
The prerequisite from
docs/plans/agent-extraction-to-agents-repo.mdStep 7 — "All fullsend customers must be upgraded to a version that supports config-driven agents and have registered agents-repo agents in their.fullsend/config.yaml" — has been verified. All customer installations now have config-driven agent entries, making the disk-based scaffold fallback unreachable.Impact of disk fallback removal:
defaultAgentsRepoKnownAgentsallowlist (triage, code, fix, review, retro, prioritize) require a config entry — custom agents already needed config registration for credentials and dispatch.--offlineruns and token-less environments (wheretryAgentsRepoFallbackis unavailable) require agents to be in config — these scenarios previously fell through to disk but config registration is the supported path.findConfigAgentEntry) is purely local — no forge client, git token, or network access needed. The cited offline/token-less failure modes only apply to agents genuinely missing from config.Known follow-up:
fullsend lockand disk-based harness filesfullsend lock(internal/cli/lock.go) resolves harnesses fromharness/*.yamlfiles on disk. WithHarnessWrappersLayerremoved from the install pipeline, new installs won't generate these wrapper files. This is expected:.fullsendconfig repo (git-tracked) and persist.fullsend lockcontinues to work.fullsend agent add(ADR-0058), replacing the rolefullsend lockserved for disk-based harnesses. Updatinglock.goto be config/agents-repo-aware is a separate follow-up.Test plan
go build ./...passesgo test ./internal/config/... ./internal/layers/... ./internal/harness/...passesgo test ./internal/cli/...— no new failures (8 pre-existing env-dependent failures on upstream/main unrelated to this change)grep -rnconfirms no remaining references toMergedAgents,HarnessWrappersLayer,DefaultAgentEntries,AgentEntryBuilder,configAgentNamesresolveHarnessPathno longer called fromrun.go(retained inlock.gofor lock operations)🤖 Generated with Claude Code