Skip to content

v0.132.0: every task output fails to upload on an instance (spored provenance S3 client has no region) #1094

Closed

Description

@scttfrdmn

Severity: on v0.132.0, every spawn task run or pooled task with outputs loses them. The run is reported state: failed, retry_class: output_delivery_error, even though the command exited 0.

Seen live (2026-10-17, approved test, task prov-live-1076, i-0595929bb81765152, t4g.micro, us-east-1, released v0.132.0 CLI and spored). command.log:

Error: upload /work/out/count.txt to s3://spawn-results-435415984226-us-east-1/provenance-live-test/out/count.txt: operation error S3: PutObject, resolve auth scheme: resolve endpoint: endpoint rule error, Invalid region: region was not a valid DNS name.

Cause: cmd/spored/provenance.go builds its S3 clients with config.LoadDefaultConfig(ctx) and nothing else. On an instance the wrapper exports no AWS_REGION and there is no ~/.aws/config. The AWS CLI finds the region in IMDS by itself, but the Go SDK only does so with config.WithEC2IMDSRegion(), which pkg/agent/queue_runner.go already uses. provenance stage-in failed the same way, silently, as designed: inputs.json was left incomplete, so regenerable could not be recorded. provenance cost worked, because it sets the region from IMDS itself; cost_estimate was 0.000002.

Why the pre-release check missed it: I ran spored provenance upload against real S3 from a workstation that has a region configured. That checks S3 behaviour, not the instance environment.

Second defect, the bigger one: the wrapper has no fallback when spored provenance upload fails, so a provenance failure became a lost output. The design says provenance must never cost a researcher their output.

Fix (v0.132.1):

  1. All provenance subcommands load their config via provAWSConfig, which adds WithEC2IMDSRegion. Gated by a fake-IMDS test with every other region source cleared, plus an AST check that no subcommand calls LoadDefaultConfig directly. Both fail against a compiling revert.
  2. If spored provenance upload fails for any reason, the wrapper uploads the output with plain aws s3 cp, untagged. Untagged means kept, so this is the safe direction.

Refs #1076

Activity

  1. scttfrdmn commented on Oct 17, 2026

    @scttfrdmn
    ContributorAuthor

    Exposure, measured: instances install the latest spored at boot (pkg/launcher/bootstrap.go), not one matched to the CLI's version. So the breakage was limited to instances that booted while v0.132.0's spored was latest: spawn-binaries-us-east-1/spawn/versions/0.132.0/spored-linux-arm64 was written at 22:16:43Z, and v0.132.1 replaced spawn/spored-linux-* at 23:24:39–23:25:12Z. That is about 69 minutes. Instances booted since then get the fixed spored, whatever CLI launched them. "Every" in the title means every affected task in that window, not every v0.132.0 CLI launch from now on. I've corrected the warning on the v0.132.0 release notes to match.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions