fix(#2806): resolve host_files relative src paths for URL bases#2808
Conversation
When a harness is sourced from a URL (via base: composition or
config-registered agents), host_files entries with relative src
paths were not being resolved. resolveBaseScripts handles scripts
and resolveBaseResources handles agent/policy/skills, but neither
handled host_files[].src. Relative paths remained as unresolved
strings and failed at sandbox setup time.
Add resolveBaseHostFiles() which iterates host_files entries,
detects relative src paths (skipping ${VAR} env var references,
URLs, and absolute paths), fetches them from the base URL using
the existing fetchBaseFile infrastructure, caches them
content-addressed, and rewrites src to the local cache path.
The function is called from loadBaseChain alongside the existing
resolveBaseScripts and resolveBaseResources calls.
Note: pre-commit could not run in sandbox due to shellcheck
install failure (network restriction). Post-script runs
pre-commit authoritatively.
Closes #2806
Site previewPreview: https://581a7051-site.fullsend-ai.workers.dev Commit: |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
/fs-review |
|
🤖 Finished Review · ✅ Success · Started 11:14 PM UTC · Completed 11:22 PM UTC |
|
Looks good to me Labels: PR fixes a bug in the harness compose pipeline (internal/harness/compose.go) |
|
🤖 Finished Retro · ✅ Success · Started 11:43 PM UTC · Completed 11:49 PM UTC |
Retro: PR #2808 — resolve host_files relative src paths for URL basesWorkflow quality: Excellent. This was a clean end-to-end autonomous workflow with no rework cycles. Timeline
Total time: ~1h46m from issue to merge. Zero rework iterations. What went well
Marginal improvements (already tracked)The only observations I identified are already covered by existing open issues:
No new proposals filed — all improvement opportunities are already tracked. |
When a harness is sourced from a URL (via base: composition or config-registered agents), host_files entries with relative src paths were not being resolved. resolveBaseScripts handles scripts and resolveBaseResources handles agent/policy/skills, but neither handled host_files[].src. Relative paths remained as unresolved strings and failed at sandbox setup time.
Add resolveBaseHostFiles() which iterates host_files entries, detects relative src paths (skipping ${VAR} env var references, URLs, and absolute paths), fetches them from the base URL using the existing fetchBaseFile infrastructure, caches them content-addressed, and rewrites src to the local cache path. The function is called from loadBaseChain alongside the existing resolveBaseScripts and resolveBaseResources calls.
Note: pre-commit could not run in sandbox due to shellcheck install failure (network restriction). Post-script runs pre-commit authoritatively.
Closes #2806
Post-script verification
agent/2806-host-files-url-resolution)e5bbbf48f09f3bc0f7ea2abf24afafd88a8e8d56..HEAD)