feat(harness): add remote harness agent discovery via forge API (ADR-0045 Phase 3 PR 2) - #2327
Conversation
Site previewPreview: https://fb1d8ae7-site.fullsend-ai.workers.dev Commit: |
|
🤖 Finished Review · ✅ Success · Started 12:21 PM UTC · Completed 12:32 PM UTC |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
ReviewFindingsLow
Info
Previous runReviewFindingsMedium
Low
Info
Previous run (2)Looks good to me Low
Info
|
a723e87 to
541b45b
Compare
|
🤖 Finished Review · ✅ Success · Started 12:42 PM UTC · Completed 12:53 PM UTC |
…0045 Phase 3 PR 2) Add DiscoverRemoteAgents() that discovers agent identity (role, slug) from harness files in a remote config repo via the forge API. Extract parseRaw() from LoadRaw() so callers with raw YAML bytes (e.g. from forge API responses) can parse without filesystem I/O. Signed-off-by: Greg Allen <gallen@redhat.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Greg Allen <gallen@redhat.com>
541b45b to
22be06d
Compare
|
🤖 Finished Review · ✅ Success · Started 12:59 PM UTC · Completed 1:10 PM UTC |
|
🤖 Finished Retro · ✅ Success · Started 7:23 PM UTC · Completed 7:29 PM UTC |
Retro Analysis: PR #2327Verdict: Workflow went well — no new proposals. This was a clean, human-authored feature PR (ADR-0045 Phase 3 PR 2) that added remote harness agent discovery via the forge API. The workflow executed effectively:
Potential improvements already trackedI identified minor inefficiencies but all are covered by existing open issues:
|
Summary
DiscoverRemoteAgents()function that discovers agent identity (role, slug) from harness files in a remote config repo via the forge API — the remote counterpart ofDiscoverAgents()which reads from the local filesystemParseRaw(data []byte) (*Harness, error)fromLoadRaw()so callers with raw YAML bytes (e.g. from forge API responses) can parse without filesystem I/OLoadRaw()refactored to callParseRaw()internally — no behavior change for existing callersDetails
New files:
internal/harness/discover_remote.go—DiscoverRemoteAgentsfunction usingforge.Client.ListDirectoryContents+GetFileContentAtRefinternal/harness/discover_remote_test.go— 14 subtests covering sorted output, missing dir, files without role/slug, malformed YAML, per-file API errors, empty dir, yml extension, subdirectory skipping, non-YAML filtering, sort stability, path field semantics, and error propagationModified files:
internal/harness/harness.go— extractedParseRaw()fromLoadRaw()No production callers added yet — this is pure library code. Subsequent PRs (Phase 3 PRs 4 and 5) will wire
DiscoverRemoteAgentsintoloadKnownSlugsand the uninstall flows.100% code coverage on
discover_remote.goandParseRaw. Overall harness package at 86.1%.Test plan
go test -v -run TestDiscoverRemoteAgents ./internal/harness/— all 14 subtests passgo test -coverprofile=cover.out ./internal/harness/ && go tool cover -func=cover.out | grep discover_remote.go— 100% coveragemake go-test— all existing tests passmake lint— passesmake go-vet— passes🤖 Generated with Claude Code