Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions docs/ADRs/0045-forge-portable-harness-schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -710,9 +710,12 @@ forge-specific artifact. The harness and agent definition are portable.
`agent: agents/triage.md`) resolved? Options: (a) reject relative paths
in URL-referenced bases (require all paths to be URLs or absolute),
(b) resolve relative to the base URL's path prefix, (c) resolve
relative to the child harness's directory. Option (c) is the simplest
for Phase 1 and works because scripts are scaffolded locally — `base`
handles declarative config, scripts stay local.
relative to the child harness's directory. **Resolved: Option (b).**
`resolveBaseResources` fetches agent, policy, and skills relative to the
base URL's path prefix, caches them content-addressed, and rewrites the
fields to local cache paths. Scripts already used this approach via
`resolveBaseScripts`; extending it to declarative resources closes the
gap where inherited resources would fail `ValidateFilesExist`.

- **host_files merge edge cases.** The merge rules specify
last-writer-wins deduplication by `dest` path when base and child both
Expand Down
2 changes: 1 addition & 1 deletion docs/plans/universal-harness-access.md
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ During execution, the agent can fetch `https://github.com/fullsend-ai/library/tr
"fetch_time": "2026-05-07T12:34:56Z",
"url": "https://github.com/fullsend-ai/library/tree/8cd3799.../skills/rust-conventions",
"sha256": "def456...",
"fetch_type": "static", // or "runtime"
"fetch_type": "static", // "static", "runtime", "base_script", "base_resource", or "base_skill"
"allowed_by": "allowed_remote_resources[0]"
}
```
Expand Down
14 changes: 9 additions & 5 deletions internal/cli/lock_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,9 @@ func TestRunLock_URLBaseOnlyDeps(t *testing.T) {
baseHash := fetch.ComputeSHA256(baseContent)

srv, policy := newLockTestServer(t, map[string][]byte{
"/base.yaml": baseContent,
"/base.yaml": baseContent,
"/agents/shared.md": []byte("# shared agent"),
"/skills/common/SKILL.md": []byte("# common skill"),
})

dir := t.TempDir()
Expand Down Expand Up @@ -969,8 +971,8 @@ func TestRunLock_URLBaseOnlyDeps(t *testing.T) {
entry := lf.Lookup("urlbase")
require.NotNil(t, entry)

// Should have exactly one dependency: the URL base.
require.Len(t, entry.Dependencies, 1)
// Dependencies: base + agent resource + skill resource
require.Len(t, entry.Dependencies, 3)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[minor] (non-blocking) The count went from 1 to 3 but only deps[0] is asserted on. The compose_test.go tests check Field and Type for each new dep — would it make sense to do the same here so the integration test verifies the right deps, not just the right count?

assert.Equal(t, "base", entry.Dependencies[0].Field)
assert.Equal(t, fmt.Sprintf("%s/base.yaml", srv.URL), entry.Dependencies[0].URL)
assert.Equal(t, baseHash, entry.Dependencies[0].SHA256)
Expand All @@ -983,7 +985,9 @@ func TestRunLock_URLBaseOnlyDepsWithPlatform(t *testing.T) {
baseHash := fetch.ComputeSHA256(baseContent)

srv, policy := newLockTestServer(t, map[string][]byte{
"/base.yaml": baseContent,
"/base.yaml": baseContent,
"/agents/shared.md": []byte("# shared agent"),
"/skills/common/SKILL.md": []byte("# common skill"),
})

dir := t.TempDir()
Expand Down Expand Up @@ -1013,7 +1017,7 @@ func TestRunLock_URLBaseOnlyDepsWithPlatform(t *testing.T) {

entry := lf.Lookup("urlbase-forge")
require.NotNil(t, entry)
require.Len(t, entry.Dependencies, 1)
require.Len(t, entry.Dependencies, 3)
assert.Equal(t, "base", entry.Dependencies[0].Field)
}

Expand Down
3 changes: 2 additions & 1 deletion internal/cli/run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,8 @@ func TestRunAgent_WithURLBase(t *testing.T) {
baseHash := fetch.ComputeSHA256(baseContent)

srv, policy := newLockTestServer(t, map[string][]byte{
"/base.yaml": baseContent,
"/base.yaml": baseContent,
"/agents/shared.md": []byte("# shared agent"),
})

dir := t.TempDir()
Expand Down
Loading
Loading