feat(fetchsvc): runner-side runtime fetch service (Phase 4, PR 1) - #2173
Conversation
E2E tests did not runE2E tests run automatically for org/repo members and collaborators on pull requests. For other contributors, a maintainer must add the See E2E testing guide for details. |
Site previewPreview: https://cd125058-site.fullsend-ai.workers.dev Commit: |
|
🤖 Review · Started 2:38 PM UTC |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
eeb3b92 to
de33a4d
Compare
|
🤖 Review · Started 2:43 PM UTC |
|
/ok-to-test |
de33a4d to
fb03fbe
Compare
|
🤖 Finished Review · ✅ Success · Started 2:52 PM UTC · Completed 3:04 PM UTC |
|
🤖 Finished Retro · ✅ Success · Started 2:57 PM UTC · Completed 3:04 PM UTC |
|
/ok-to-test |
ReviewFindingsLow
Info
Previous runReviewFindingsLow
Info
Previous run (2)ReviewFindingsLow
Info
Previous run (3)ReviewFindingsMedium
Low
Info
Previous run (4)ReviewFindingsLow
Info
Previous run (5)ReviewFindingsHigh
Medium
Low
Info
Previous run (6)ReviewFindingsLow
Info
Previous run (7)ReviewFindingsMedium
Low
Info
Previous run (8)ReviewFindingsMedium
Low
Info
Previous run (9)ReviewFindingsMedium
Low
Info
|
Retro: PR #2173 —
|
| Pattern | Waste | Details |
|---|---|---|
| Force push cancellations | ~13 min agent time | 2 review runs cancelled after 4.5 and 8.5 min respectively |
| Duplicate review runs on same SHA | 3 concurrent runs | Runs 27355485271, 27355818104, 27355898627 all reviewing commit fb03fbe |
| Premature retro dispatch | 1 retro run | Retro triggered by close event, ran despite PR being reopened 1:44 later |
All major patterns are already covered by existing open issues. No new proposals are warranted:
- Debounce/dedup on rapid pushes: Debounce review dispatch on rapid synchronize events #1014, Deduplicate review runs on rapid successive pushes #1418, Deduplicate review runs when PR is rebased multiple times in quick succession #1422, Deduplicate review dispatches for the same HEAD SHA #1452
- Concurrency groups / cancel-in-progress: Add concurrency group to dispatch-review job in fullsend.yaml #981, Enable cancel-in-progress for review dispatches on the same PR #1357
- SHA-level dedup: Deduplicate review dispatches for the same HEAD SHA #1452
- Skip retro on PRs with no agent results: Skip retro dispatch for unmerged PRs with no agent interaction #1411, Skip retro dispatch on PRs with no agent involvement #939
- Skip retro on close-without-merge with successor: Skip retro dispatch for closed-without-merge PRs with immediate successor #2176
- Cancel-in-progress already implemented (Cancel in-flight review runs when PR HEAD advances #887, Cancel in-progress reviews when PR is updated #1365 closed) but the close/reopen cycle creates a new PR event context that bypasses it
The one subtle gap — retro triggered by close event proceeding even after the PR is reopened (because the 60s debounce completes before the reopen) — is substantially covered by #1411 (skip retro when no completed agent interaction). If #1411 were implemented, this retro run would have been skipped since no review had posted results yet.
Code quality note: The PR itself looks well-structured with good security properties (integrity verification, allowlist enforcement). Codecov reports 81% patch coverage with ~25 uncovered error-handling paths in service.go. No blocking issues observed in the code.
fb03fbe to
8b6ab45
Compare
|
🤖 Finished Review · ✅ Success · Started 3:21 PM UTC · Completed 3:33 PM UTC |
8b6ab45 to
1ff93d9
Compare
7c92acb to
1536a18
Compare
|
🤖 Finished Review · ✅ Success · Started 7:02 PM UTC · Completed 7:14 PM UTC |
1536a18 to
5e96514
Compare
|
🤖 Finished Review · ✅ Success · Started 7:26 PM UTC · Completed 7:37 PM UTC |
Implements ADR-0038 Phase 4 PR 1: a transport-agnostic runtime skill fetch service in internal/fetchsvc/. Agents running in sandboxes can request skill directories mid-execution via HandleFetch or HTTP handler. Pipeline: validate URL → check allowlist → parse forge URL → rate limit (with rollback on failure) → cache lookup → forge fetch → integrity verify → cache store → upload → audit log. Key design decisions: - Typed fetchError with HTTP status codes (no string matching) - Atomic CAS-based rate limiter with release-on-failure - Content-addressed caching via fetch.CachePutDir/CacheGetDir - SSRF hardened: only forge-hosted URLs via forge API - Uploader interface abstracts sandbox upload (stubbed in tests) - MaxBytesReader with 413 status for oversized requests - Audit log errors propagated (matching resolve.go pattern) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Greg Allen <gallen@redhat.com>
5e96514 to
df32289
Compare
|
🤖 Finished Review · ✅ Success · Started 8:35 PM UTC · Completed 8:47 PM UTC |
ralphbean
left a comment
There was a problem hiding this comment.
LGTM. One minor note inline.
|
🤖 Finished Retro · ✅ Success · Started 11:47 AM UTC · Completed 11:59 AM UTC |
Retro: PR #2173 —
|
| Pattern | Existing Issues |
|---|---|
| Re-raising dismissed findings | #1672, #1583 |
| Duplicate findings across iterations | #1013, #1285, #1500 |
| Debounce rapid pushes | #1014, #1422, #1418 |
| New low-severity findings surfacing on approved passes | #1367, #1582 |
| Cancel-in-progress for reviews | #1357, #981 |
A previous retro (run at 15:04 UTC, before most review iterations completed) reached similar conclusions. This retro confirms those findings with the full interaction history.
Summary
internal/fetchsvc/package implementing the runner-side fetch service for ADR-0038 Phase 4 (runtime dependency loading)allowed_remote_resourcesallowlist enforcement, per-run rate limiting, forge API fetch, tree hash integrity verification, content-addressed caching, sandbox upload, and JSONL audit logging withfetch_type: "runtime"HandleFetch(ctx, req)method andhttp.Handler; the actual transport (Unix socket, HTTP, exec-based) will be wired in Phase 4 PR 3Context
Phase 4 of ADR-0038 adds runtime dependency loading — agents can discover and fetch additional skills mid-execution. This is split into 3 PRs:
fullsend-fetch-skillbinaryallow_runtime_fetch,max_runtime_fetches) and transport wiringThis PR introduces no new callers — it's a standalone package with no risk to existing behavior.
Test plan
go test ./...— all existing tests pass (no regressions)go vet ./internal/fetchsvc/— cleangofmt— cleanmake lint— all hooks pass🤖 Generated with Claude Code