Files
Sharang ParnerkarandClaude Fable 5 32b0435738
CI / Check (pull_request) Successful in 5m40s
CI / Detect Changes (pull_request) Has been skipped
CI / Deploy Agent (pull_request) Has been skipped
CI / Deploy Dashboard (pull_request) Has been skipped
CI / Deploy Docs (pull_request) Has been skipped
CI / Deploy MCP (pull_request) Has been skipped
feat(werkbank): make the loop runnable — enqueue + artifact serve/fetch (WB-05b)
Closes the gap between "endpoints exist" and "a runner can actually run a job":

- POST /api/v1/werkbank/jobs/enqueue {tenant, target_id} — the control-plane
  "enqueue" half: extract the target's control-logic program, stash the source as
  a content-addressed blob, and queue a plc-provision job referencing it by hash.
- GET /api/v1/werkbank/artifacts/{hash} — serve a blob so the runner can fetch
  the program (traversal-safe: the hash is validated). Both runner-token gated.
- blob.rs: store_bytes / read_blob helpers; ingest::blob is now pub(crate).
- .env.example documents WERKBANK_RUNNER_TOKEN.

With the runner-side auth + blob fetch (werkbank repo), the loop runs end to end:
enqueue -> lease -> Docker executor fetches the program by hash, provisions,
probes, DASTs -> completes -> findings persisted against the target.

Tests: a new integration test enqueues from a PlcSps target, confirms the job
carries a program blob, and serves it back. All 4 werkbank_api tests pass; clippy
+ fmt clean.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-17 16:26:26 +02:00
..