feat(fusillade): dispatch by API key id (DW-1010)
Queued work authenticated with a key secret stored on every batch and
request template. This is the expand step towards not storing it: requests
now also record the key id, and the daemon dispatches as that id with a
per-attempt internal credential, sent only to this process's own /ai and
valid for the daemon's processing timeout. Rows without an id (queued
before this release) dispatch with their stored key as before.
The secret is still written exactly as before, so the previous release
decodes, claims and dispatches every row this one writes. DW-1012 stops
writing it.
Batches already carry api_key_id. Batchless templates gain one (on the
template, because batch_requests_archive must mirror requests column for
column), set via the new create_flex_as / create_background_as. A claim
reports the id in the request's batch metadata under
API_KEY_ID_METADATA_KEY, which keeps the fusillade public API additive.
Stack created with GitHub Stacks CLI • Give Feedback 💬