feat(hostcheck): run plugin bundles inside the wanderer host #1
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
public/wanderer-plugins!1
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/hostcheck"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes nothing by itself; part of public/wanderer#9 (M0.4).
What #9 asked for, and what was already there
#9: "scaffold a plugin from
plugins/sdk; wire a build →.wasm→ runtime-install path".Checked against the code, not the ticket comments:
example/(list_routes_v1+get_route_detail_v1) on SDK v0.21.2 (a241d1b3). It mirrors upstream's komoot/strava plugins: sametinygo build -target=wasi -scheduler=none -no-debug,manifestcheck, andfail()convention..wasm:make build/package. CI run 13697 onfc201fbbuilt it green.make install-localwrites<data>/plugins/<id>/, the directory the db scans (pluginsystem.PluginDir→/data/plugins). homelab-flux #670 mounts thewanderer-pluginsPVC there.manifestcheckonly validates the JSON schema.This PR:
make hostcheckhostcheck/is a Go program built againstdb/of the pinned wanderer release (sparse checkout in.wanderer, v0.21.2 = a241d1b3). Prod runs the upstreamflomp/wanderer-db:v0.21.2image, so this is the exact host code.install-local, then discovers them withpluginsystem.DiscoverLocalPlugins, the loader the db runs on startup.list_*→get_*_detailthrough wanderer's plugin worker. The worker re-execs the binary asplugin-worker, like the db'smain.go. The calls use the sync's input shapes, the output is decoded strictly into the host types, and the importer's GPX rules are applied.Finding: plugin error codes are lost on wanderer v0.21.2
Upstream plugins report errors with
pdk.SetErrorString(json)+return 1. On v0.21.2, extism hands that back as a Go error, and the worker treats it as fatal:auth_failed,rate_limited, ...) never reachesInstanceStatusForPluginError;provider_unavailableinstead ofneeds_reauth.Upstream fixed this today on
dev(open-wanderer/wanderer#1424 / #1425, db017977), after v0.21.2. hostcheck accepts the v0.21.2 behaviour with a WARN and expects the structured error once the pin moves past it.Tests (run on spl-vm03; nothing on the NAS)
make hostcheckat v0.21.2: pass. Output:dev(db017977, with #1425): pass, and the error path returnsplugin error "invalid_request".plugin.wasmis rejected by the loader (runtime_entrypoint_missing);unknown function: list_routes_v9.gofmtclean,go vetclean,go mod tidyis a no-op (go.mod/go.sum came from the VM).CI note
build.ymlruns only on pushes tomain(and dispatch). This branch push started nothing. After merge, the run adds a sparse GitHub clone plus a pocketbase-dependency compile (several CPU-minutes) on the NAS runner, so merge in a quiet window or once the CI VM is up.README
routingplugin type.🤖 Generated with Claude Code
https://claude.ai/code/session_01XMf4EKLnjYyjFp8QGWgFFq