Files
local-cal/.opencode/context/openagents-repo/guides/resolving-installer-wildcard-failures.md
2026-04-07 11:31:26 -04:00

60 lines
1.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!-- Context: openagents-repo/guides | Priority: high | Version: 1.0 | Updated: 2026-02-15 -->
# Guide: Resolving Installer Wildcard Failures
**Purpose**: Capture the root cause, fix, and lessons from wildcard context install failures.
**Last Updated**: 2026-01-12
---
## Prerequisites
- Installer changes scoped to `install.sh`
- Registry entries validated (`./scripts/registry/validate-registry.sh`)
**Estimated time**: 10 min
## Steps
### 1. Identify the failure mode
**Symptom**:
```
curl: (3) URL rejected: Malformed input to a URL function
```
**Cause**: Wildcard expansion returned context IDs that werent path-aligned (e.g., `standards-code` mapped to `.opencode/context/core/standards/code-quality.md`). Installer treated IDs as paths.
### 2. Expand wildcards to path-based IDs
**Goal**: Make wildcard expansion output `core/...` IDs that map directly to a path.
**Update**:
- Expand `context:core/*` to `core/standards/code-quality` style IDs
### 3. Resolve context paths deterministically
**Goal**: Avoid ambiguous matches and ensure one registry entry is used.
**Update**:
- Add `resolve_component_path` to map context IDs to the registry path
- Use `first(...)` in jq queries for deterministic selection
### 4. Verify installation
```bash
bash scripts/tests/test-e2e-install.sh
```
**Expected**: All E2E tests pass on macOS and Ubuntu.
## Verification
```bash
REGISTRY_URL="file://$(pwd)/registry.json" ./install.sh --list
```
## Troubleshooting
| Issue | Solution |
|-------|----------|
| `Malformed input to a URL function` | Ensure wildcard expansion returns `core/...` IDs and uses `resolve_component_path` |
| Multiple context entries for one path | Use `first(...)` in jq lookups |
## Related
- guides/debugging.md
- guides/updating-registry.md
- core-concepts/registry.md