Skip to content

Send the org selector header from the artifact shell host - #1501

Merged
RhysSullivan merged 1 commit into
mainfrom
artifact-org-header
Jul 29, 2026
Merged

Send the org selector header from the artifact shell host#1501
RhysSullivan merged 1 commit into
mainfrom
artifact-org-header

Conversation

@RhysSullivan

Copy link
Copy Markdown
Collaborator

Prod fix: every artifact tool call on cloud fails with no_organization — the console artifact page's HTTP shell host sent only content-type + authorization, and #1488 made org-scoped session reads fail closed without the org selector header.

The host now heads all three of its requests (POST /executions, POST /executions/:id/resume, PUT /artifacts/:id/preview) the same way the typed API client does, via getExecutorOrganizationHeaders(), resolved per request so the memoized host can't outlive the org it named. Hosts without org scoping produce no slug and send no header, unchanged.

Why dev/CI missed it: the artifacts branch was cut before #1488 merged, so header-less requests still fell back to the session org everywhere the feature was exercised; the collision only existed after both landed on main.

Unit tests cover all three request types with and without an active slug.

The console artifact page's HTTP host sent only content-type and
authorization, so every artifact tool call on cloud failed with
no_organization once org-scoped session reads began failing closed.

Head all three of its requests (executions, resume, preview upload) the
same way the typed API client does, resolving the scope per request.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 29, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
executor-marketing ba91e0f Commit Preview URL

Branch Preview URL
Jul 29 2026, 09:54 PM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 29, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
❌ Deployment failed
View logs
executor-cloud ba91e0f Jul 29 2026, 09:52 PM

@RhysSullivan
RhysSullivan marked this pull request as ready for review July 29, 2026 21:52
@RhysSullivan
RhysSullivan merged commit 6a801f2 into main Jul 29, 2026
17 of 19 checks passed
@github-actions

github-actions Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Cloudflare preview

Torn down — the PR is closed.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant