refactor(#5668): remove dead scaffold functions and make lock config-aware - #5682
Conversation
…aware Remove HarnessNames(), HarnessContentHash(), and HarnessBaseURLWithHash() from internal/scaffold/baseurl.go — these functions have no production callers after PR #5588 removed the migrateModified code path. Their corresponding tests are also removed. Update fullsend lock to resolve agents from config when no local harness file exists. The new resolveHarnessForLock function tries the local harness directory first, then falls back to config-driven resolution via harness.ResolveRegisteredPath. This supports both local-path and URL-sourced agent entries. The --all flag now also discovers agents registered in config.yaml, not just local harness files. Closes #5668
|
🤖 Finished Review · ✅ Success · Started 4:09 PM UTC · Completed 4:24 PM UTC |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
Looks good to me Previous runReviewFindingsMedium
Low
Previous run (2)ReviewFindingsHigh
Medium
Low
Labels: PR modifies harness resolution logic in the lock command and removes scaffold dead code Next steps:
|
|
/fs-fix - Rebase and fix all the review issues, both inline and in the sticky comments. Also, check the CI failures and see if any fix is needed there. |
|
🤖 Finished Fix · ✅ Success · Started 4:36 PM UTC · Completed 4:47 PM UTC |
- Handle agent_source field in resolveFromLock mutation switch as no-op
to prevent URL-resolved harness sources from being injected as skills
- Fix Source field in lock result for URL-resolved agents to use agent
name instead of cache-internal basename ("content")
- Log warning when harness.RegisteredAgents errors in runLockAll instead
of silently discarding the error
- Propagate Warning field in agent_source dependency construction
- Add TestResolveFromLock_AgentSourceNoOp to verify the switch fix
- Add Source and agent_source assertions to TestLockOneAgent_ConfigFallback
Addresses review feedback on #5682
|
/fs-review |
|
🤖 Finished Review · ✅ Success · Started 4:57 PM UTC · Completed 5:16 PM UTC |
Superseded by updated review
|
/fs-fix - Rebase and fix all the review issues, both inline and in the sticky comments. |
|
🤖 Finished Fix · ✅ Success · Started 5:18 PM UTC · Completed 5:27 PM UTC |
- Use sentinel error (errHarnessNotFound) in resolveHarnessPath and check with errors.Is in resolveHarnessForLock instead of fragile strings.Contains matching on error message text. - Skip harness-level AllowedRemoteResources check for agent_source dependencies in resolveFromLock, since these URLs are validated against the org-level allowlist during lock creation. - Update TestResolveFromLock_AgentSourceNoOp to use a different domain for the agent_source URL to verify the allowlist bypass works. Addresses review feedback on #5682
|
/fs-review |
|
🤖 Finished Review · ✅ Success · Started 5:31 PM UTC · Completed 5:44 PM UTC |
|
🤖 Finished Retro · ✅ Success · Started 7:01 PM UTC · Completed 7:17 PM UTC |
Retro: PR #5682 — remove dead scaffold functions and make lock config-awareOutcome: Merged in ~2h 51m (16:07–18:58 UTC). 3 commits across 3 review-fix cycles. 5 files changed (+414/−101). Timeline
Review Quality: ExcellentThe review agent produced 6 findings across 2 cycles — all valid, zero false positives. The HIGH finding caught a genuine harness-corruption bug (new Autonomy ReadinessThe human reviewer (ggallen) approved without adding any findings beyond what the review agent identified. The review agent fully covered the human review, consistent with existing tracking in #4852 and #4795 for similar Go-focused agent PRs. Friction Points (all tracked by existing issues)1. Gate check bot classification (#1569, #5536): The fix workflow gate check uses a 2. Code agent missing switch case for new type (#853, #2694): The code agent added a new No Novel ProposalsAll identified friction points are covered by existing open issues. The workflow functioned as designed — the review-fix loop caught real bugs iteratively, and the human reviewer confirmed the agent's judgment. The code agent's first-time output was architecturally sound; the issues were implementation-level gaps that the review agent correctly caught at appropriate severity levels. |
Summary
HarnessNames(),HarnessContentHash(), andHarnessBaseURLWithHash()frominternal/scaffold/baseurl.go— no production callers remain after PR refactor(scaffold)!: delete agent files from scaffold embed #5588 removed themigrateModifiedcode pathfullsend lockto resolve agents fromconfig.yamlwhen no local harness file exists in.fullsend/harness/, supporting both local-path and URL-sourced agent entriesfullsend lock --allto discover agents registered in config, not just local harness filesRelated Issue
Addresses the two remaining items from #5552:
fullsend lockconfig/agents-repo-awareChanges
internal/scaffold/baseurl.go: Remove three dead functions and their unused imports (crypto/sha256,encoding/hex,io/fs,sort,strings)internal/scaffold/baseurl_test.go: Remove corresponding test functionsinternal/cli/lock.go: AddresolveHarnessForLock()that tries local path first, then falls back toharness.ResolveRegisteredPath()for config-registered agents; restructurelockOneAgent()to load org config early; updaterunLockAll()to merge config agent names with local discoveriesinternal/cli/lock_all_test.go: Add 9 tests covering config fallback paths (local path preference, URL fallback, disabled agents, missing config,--allwith config agents)Testing
go test ./internal/scaffold/...passesgo test ./internal/cli/ -run "TestLock|TestRunLock|TestResolveHarnessPath|TestResolveFromLock|TestDiscoverHarness|TestResolveHarnessForLock"— all 50+ lock tests pass with-raceresolveHarnessForLockfunction and config-awarelockOneAgent/runLockAllChecklist
!for breaking changes)Closes #5668
Post-script verification
agent/5668-lock-awareness-dead-code)b4fd4ae8b290e94e2a8c22918621146e28e92182..HEAD)