feat(fetchsvc): in-sandbox fetch-skill subcommand (Phase 4, PR 2) - #2221
feat(fetchsvc): in-sandbox fetch-skill subcommand (Phase 4, PR 2)#2221ggallen wants to merge 1 commit into
Conversation
Add `fullsend fetch-skill` subcommand for agents to fetch skills at runtime from inside the sandbox. The subcommand reads FULLSEND_FETCH_URL and FULLSEND_FETCH_TOKEN from the environment and POSTs the skill URL to the runner-side fetch service over HTTP. The runner starts the fetch service on a dynamic TCP port with per-run bearer token authentication (timing-safe comparison). The service is wired into the run flow and environment variables are injected during sandbox bootstrap. A SandboxUploader adapter wraps sandbox.UploadDir to implement the fetchsvc.Uploader interface. Also includes carryover fixes from PR 1 review: use treeHash from CachePutDir for CachePath, propagate audit log errors, and detect MaxBytesError to return 413. 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>
Site previewPreview: https://bf7a4e9e-site.fullsend-ai.workers.dev Commit: |
|
🤖 Finished Review · ✅ Success · Started 12:54 PM UTC · Completed 1:07 PM UTC |
|
Review skipped — this PR is already closed. The Posted by fullsend pre-review check |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
|
🤖 Finished Retro · ✅ Success · Started 12:58 PM UTC · Completed 1:04 PM UTC |
Retro: PR #2221 — closed-and-replaced PR triggered wasted agent runsWhat happened: PR #2221 ( Wasted work: The review run consumed tokens and compute before discovering the PR was closed. The retro run (this one) was also dispatched unnecessarily on a PR with no agent interaction and no merge. No new proposals — all improvements already tracked:
This PR is a textbook case for all of these issues. Prioritizing #1870 and #2176 would prevent the most common source of wasted agent runs in close-and-recreate workflows. |
|
Review skipped — this PR is already closed. The Posted by fullsend post-review check |
Summary
fullsend fetch-skill <url>subcommand for agents to fetch skills at runtime from inside the sandbox, communicating with the runner-side fetch service over HTTP with bearer token authstartFetchService) with dynamic TCP port allocation, per-run UUID bearer token (timing-safe comparison), and graceful shutdownSandboxUploaderadapter wrappingsandbox.UploadDirto implement thefetchsvc.UploaderinterfacerunAgent()and injectsFULLSEND_FETCH_URL/FULLSEND_FETCH_TOKENenv vars during sandbox bootstrapCachePutDirreturn value correctness, audit log error propagation,MaxBytesError→ 413Context
This is Phase 4, PR 2 of ADR-0038 (Universal Harness Access). PR 1 (#2173) delivered the runner-side
fetchsvcpackage. This PR completes the client side so agents can invokefullsend fetch-skillinside the sandbox. PR 3 will addallow_runtime_fetch/max_runtime_fetchesharness schema fields to gate the feature.Key decisions
/sandbox/workspace/bin/fullsend, avoiding cross-compilation and GoReleaser changesTest plan
fetch-skillsubcommand (success, error codes, missing env, auth propagation, request body, timeout)go test ./...— all 28 packages passgo vetcleanmake lintpassesfullsend fetch-skill --helpdisplays correct usage🤖 Generated with Claude Code