feat: add transitive dependency resolution to URL resolver#1923
Conversation
Site previewPreview: https://c91e2c13-site.fullsend-ai.workers.dev Commit: |
ReviewFindingsNo findings. Previous runReviewFindingsLow
Info
Previous run (2)ReviewFindingsHigh
Low
Info
Previous run (3)ReviewFindingsMedium
Low
Info
Previous run (4)ReviewFindingsMedium
Low
Info
Previous run (5)ReviewFindingsHigh
Medium
Low
Info
Previous run (6)ReviewFindingsMedium
Low
Info
Previous run (7)ReviewFindingsLow
Info
Previous run (8)ReviewFindingsMedium
Low
Info
Previous run (9)ReviewFindingsMedium
Low
Info
Previous run (10)ReviewFindingsMedium
Low
Info
Previous run (11)ReviewFindingsHigh
Medium
Low
Info
Previous run (12)ReviewFindingsMedium
Low
Previous run (13)ReviewFindingsMedium
Low
Previous run (14)ReviewFindingsMedium
Low
Info
Previous run (15)ReviewFindingsHigh
Medium
Low
Info
|
37b5fc4 to
66f4047
Compare
66f4047 to
5a92684
Compare
5a92684 to
16dcd7a
Compare
16dcd7a to
3bb4eff
Compare
3bb4eff to
27b5b2f
Compare
27b5b2f to
cf7b98c
Compare
9a32659 to
f7de488
Compare
…Phase 2 PR 2) This commit contains only the changes from PR fullsend-ai#1923: - Add transitive dependency resolution for URL-referenced resources - New relurl.go for relative URL resolution - New skill.go for skill frontmatter parsing - Updated ADR and implementation plans Cherry-picked from: fullsend-ai#1923 Original commit: f7de488
db4a825 to
3b14c68
Compare
15e8186 to
d885b9b
Compare
d885b9b to
e488e72
Compare
e488e72 to
d81b657
Compare
…Phase 2 PR 2) Implements recursive skill dependency resolution for the universal harness access resolver (ADR-0038 Phase 2, PR 2 of 3). Changes: - Add ResolveRelativeURL for RFC 3986 relative URL resolution - Add MaxDepth/MaxResources limits to ResolveOpts with explicit depth parameter threading through resolveTransitiveDeps (no mutable state) - Cycle detection via inProgress DFS stack, diamond dedup via resolved map - Conflicting SHA256 hashes for the same URL are detected and rejected - Skills with dependencies: frontmatter are recursively resolved; policy references are fetched as leaf nodes (runtime semantics deferred) - Rename resolveState.appended to inDeps for semantic clarity - Standardize resolveURL error messages to consistent "%s: " prefix format - Add explicit HTTPS-only scheme check in resolveURL as defense-in-depth for transitive dep URLs (fetch.FetchURL also enforces this) - Wrap ParseFrontmatter errors with parentURL context in resolveTransitiveDeps - 14 new transitive resolution tests: chain, diamond, cycle, depth limit, resource limit, allowlist, hash mismatch, relative URL, conflicting hashes, policy leaf, MaxDepth=0 disabled, default, overlap dedup, non-HTTPS scheme - 4 new relurl tests: invalid percent-encoding, empty relRef, empty parentURL, parent URL with no path component - Update stale pseudocode in design docs to reflect Phase 2 implementation Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Greg Allen <gallen@redhat.com>
d81b657 to
7a7c8eb
Compare
Summary
Phase 2 PR 2 of ADR-0038 (Universal Harness Access). Extends the URL resolver to recursively resolve transitive dependencies declared in SKILL.md frontmatter.
dependencies:(other skills) andpolicy:(skill-level policy) in YAML frontmatter../common/SKILL.mdresolves against parent URL)allowed_remote_resourcesprefix check and SHA256 integrity verification as direct depsDepends on: #1857 (merged)
Followed by: PR 3 (CLI wiring —
--max-depth/--max-resourcesflags)Changes
internal/skill/skill.goPolicyfield toSkillMetainternal/skill/skill_test.gointernal/resolve/resolve.goresolveState,MaxDepth/MaxResourcestoResolveOpts, recursive resolver with cycle/diamond/depth/breadth checks,resolveTransitiveDepsinternal/resolve/relurl.goResolveRelativeURL(RFC 3986)internal/resolve/relurl_test.gointernal/resolve/resolve_test.goTest plan
go test ./internal/skill/...— policy field parsinggo test ./internal/resolve/...— all 28 tests pass (14 Phase 1 + 14 new)go vet ./...— cleanmake lint— cleango test ./...— full suite passesh.Skills, policy refs indepsonly🤖 Generated with Claude Code
Closes #1965