Add a batch-scoped input key helper to compute_storage
Table of Contents
This page is a capture in the inbox bucket of the product backlog — a pre-sprint idea, not yet pulled into a sprint as a story.
1. What
process_dispatch_batch builds the shared input bundle key by hand
as "input/{batch_id}.tar.gz"
(projects/ores.shell/src/app/commands/compute_commands.cpp), and
download-input reverses the same string.
ores.compute.api/net/compute_storage.hpp defines input_key and
input_path keyed by workunit id — the only documented key
convention — so the batch-scoped key silently diverges from it. Add
a batch-scoped variant (e.g. input_key(batch_id)) or a documented
batch-bundle helper in compute_storage, and use it in both
dispatch-batch and download-input.
2. Why
A future caller who follows the documented convention computes a path that never exists; key drift is silent until a download fails. Two review rounds on PR #1992 flagged it. The round documented the batch-scoped convention in a comment; the helper itself is this follow-up.
3. References
- Review finding 4 on PR #1992 (comment 5410154095) and finding 3 on comment 5410160036.
ores.compute.api/net/compute_storage.hpp—input_key/input_path(workunit-scoped).projects/ores.shell/src/app/commands/compute_commands.cpp—process_dispatch_batchandprocess_download_input.
4. See also
- Task: Add compute read verbs to the shell — the PR that surfaced this.