Skip to content

perf(artifact-delivery): serve a warm run from its ready build - #506

Merged
harlan-zw merged 4 commits into
mainfrom
perf/warm-run-shortcut
Oct 7, 2026
Merged

harlan-zw merged 4 commits into
mainfrom
perf/warm-run-shortcut

Conversation

@harlan-zw

@harlan-zw harlan-zw commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

🔗 Linked issue

None. Launch prep for skilld run latency, approved by Harlan.

❓ Type of change

  • 📖 Documentation
  • 🐞 Bug fix
  • 👌 Enhancement
  • ✨ New feature
  • 🧹 Chore
  • ⚠️ Breaking change

📚 Description

A warm run built its Skill again. It requested a new Resolution, waited for the queue, and waited while the build re-signed bytes R2 already held. In 14 production runs on 2026-10-07, a warm run took 5.6 to 9.2 s, 6.8 s at the median. The queue wait and the build took 1.2 s and 4.5 s at the median.

POST /api/v1/resolutions now answers a public request from the ready build of the same Repository, commit, Skill folder and policy. The answer is that ready Resolution, with the same shape GET /api/v1/resolutions/:id returns, so released CLIs parse it. Nothing is queued. The ready build must pass the checks a reused build passes: the trusted root verifies its attestation, it names the current policy, its check results pass, and R2 still holds its bytes.

  • A registry name is already pinned to its admitted folder and commit, so it needs no GitHub read.
  • A request on a branch resolves on GitHub first, through the same client and KV cache builds use, within 2.5 s. When no ready build fits, the build gets the request pinned to that commit and folder, so it does not read the branch again. A slower or failed GitHub answer builds the request as sent.
  • A private request is never served. The run sweep passes no serveReady, so every sweep check still builds.
  • Each decision emits an artifact-resolution-served wide event with its miss reason.

After this change a warm run makes the POST, then the trusted root, grant and download requests. In the same 14 runs those three took 40 ms, 147 ms and 157 ms at the median.

Where a warm run gets its answer: the POST route asks serveReadyResolution, which checks D1 and R2 before it answers with the ready Resolution

🤖 AI disclosure: Harlan Agent Kit modified this description. My AI open-source policy.

A warm run requested a new Resolution, waited for the queue, then waited
again while the build re-signed the same bytes: 5.6 to 9.2 s in 14
production runs on 2026-10-07. When a ready public build of the same
Repository, commit, Skill folder and policy passes every reuse check,
the POST now answers with that ready Resolution, as GET would, and
queues nothing.

A request that names no commit resolves on GitHub first, within 2.5 s,
using the cached commit and tree reads. When no ready build fits, the
build gets the request pinned to that commit and folder, as a registry
name already is. The run sweep keeps building every check.
@harlan-github-agent harlan-github-agent Bot added harlan-agent-running An Agent holds a Task on this issue or pull request right now. harlan-agent-review-required Pull request triage requires an adversarial Review for this head commit. labels Oct 6, 2026
@harlan-github-agent

harlan-github-agent Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

🤖 MERGED

Harlan Agent Kit posted this automated review. It is not Harlan's personal review or approval. AI open source policy. Last updated: 2026-10-07 01:20 UTC.

GitHub merged this pull request.

No material findings were recorded.

The pull request closed.

@harlan-zw harlan-zw added the harlan-agent-review Pull request triage requires an adversarial Review. Adding this label manually always forces one. label Oct 6, 2026
@harlan-github-agent harlan-github-agent Bot added harlan-agent-blocked The automated Review found a material defect in this head commit. and removed harlan-agent-review Pull request triage requires an adversarial Review. Adding this label manually always forces one. harlan-agent-running An Agent holds a Task on this issue or pull request right now. harlan-agent-review-required Pull request triage requires an adversarial Review for this head commit. labels Oct 6, 2026

@harlan-github-agent harlan-github-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Harlan Agent Kit posted this automated review. AI open source policy.

Automated Review: BLOCKED.

Read the Review results

@harlan-github-agent harlan-github-agent Bot added harlan-agent-running An Agent holds a Task on this issue or pull request right now. and removed harlan-agent-blocked The automated Review found a material defect in this head commit. labels Oct 6, 2026
@harlan-github-agent harlan-github-agent Bot added harlan-agent-running An Agent holds a Task on this issue or pull request right now. harlan-agent-ready The automated Review passed every gate on this head commit. and removed harlan-agent-running An Agent holds a Task on this issue or pull request right now. labels Oct 6, 2026

@harlan-github-agent harlan-github-agent Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Harlan Agent Kit posted this automated review. AI open source policy.

Automated Review: BLOCKED.

Read the Review results

@harlan-github-agent harlan-github-agent Bot added harlan-agent-running An Agent holds a Task on this issue or pull request right now. harlan-agent-blocked The automated Review found a material defect in this head commit. and removed harlan-agent-ready The automated Review passed every gate on this head commit. harlan-agent-running An Agent holds a Task on this issue or pull request right now. labels Oct 7, 2026
#510 lets a ready build serve only a CLI that reads what it holds, so
the warm run passes the CLI's linked-files capability to
findReusableBuild.
@harlan-github-agent harlan-github-agent Bot added harlan-agent-running An Agent holds a Task on this issue or pull request right now. and removed harlan-agent-blocked The automated Review found a material defect in this head commit. labels Oct 7, 2026
#510 loads a Skill through a streaming read and the signer hashes the
stored object as a stream.
@harlan-zw
harlan-zw merged commit 03ebe63 into main Oct 7, 2026
@harlan-zw
harlan-zw deleted the perf/warm-run-shortcut branch October 7, 2026 01:05
@harlan-github-agent harlan-github-agent Bot removed the harlan-agent-running An Agent holds a Task on this issue or pull request right now. label Oct 7, 2026
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