xai-org/grok-build · error

Upload queue closed

Error message

Upload queue closed

What it means

Error "Upload queue closed" thrown in xai-org/grok-build.

Source

Thrown at crates/codegen/xai-file-utils/src/queue.rs:1149

            client_version: self.client_version.clone(),
            compress,
            parent_span: tracing::Span::current(),
            _in_flight: in_flight,
        };
        self.stats.pending.fetch_add(1, Ordering::Relaxed);
        self.stats
            .pending_bytes
            .fetch_add(original_size, Ordering::Relaxed);
        self.stats.enqueued.fetch_add(1, Ordering::Relaxed);
        if let Err(e) = self.tx.send(item).await {
            let rejected = e.0;
            remove_owned_source(&rejected.source, Some(&self.stats));
            self.stats.pending.fetch_sub(1, Ordering::Relaxed);
            self.stats
                .pending_bytes
                .fetch_sub(original_size, Ordering::Relaxed);
            self.stats.notify_transition();
            return Err(anyhow::anyhow!("Upload queue closed"));
        }
        Ok(EnqueueResult {
            completion_rx: rx,
            original_size,
        })
    }
    /// Enqueue a working-tree file by taking an immutable reflink/CoW snapshot of
    /// it into the queue dir, verifying that snapshot against `expected_sha256`,
    /// then uploading the snapshot (never the live source).
    ///
    /// Snapshotting at enqueue closes the verify-then-upload corruption window:
    /// verify and upload operate on the SAME bytes, so a later mutation of the
    /// working-tree file cannot poison the content-addressed object.
    ///
    /// Reflink-vs-copy disk budgeting is handled at the `snapshot_route` gate
    /// below. A stale snapshot (source changed since the manifest hash) is
    /// discarded and the completion resolves to a non-fatal `Err`. Mirrors
    /// `enqueue_file`'s channel-full/closed fallback. Returns an [`EnqueueResult`].

View on GitHub (pinned to bc7f02eddd)

When it happens

Trigger: Thrown at crates/codegen/xai-file-utils/src/queue.rs:1149 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of xai-org/grok-build@bc7f02eddd (2026-08-31). Data as JSON: /api/errors/4f86bf1188c445b8. Report an issue: GitHub.