Skip to content

fix(archil): type createBranch's conflict as Conflict - #1093

Merged
sam-goodwin merged 1 commit into
mainfrom
fix/archil-branch-conflict
Nov 8, 2026
Merged

sam-goodwin merged 1 commit into
mainfrom
fix/archil-branch-conflict

Conversation

@sam-goodwin

Copy link
Copy Markdown
Member

createBranch on a name that's taken now fails with a typed Conflict, so a caller racing another create can recover the existing branch.

archil.createBranch({ id, branch_name, from_checkpoint_name }).pipe(
  Effect.catchTag("Conflict", () => getBranch(id, branch_name)),
);

Live, a second create of the same branch answers:

409 {"success":false,"error":"Branch \"probe\" already exists","code":"conflict"}

Conflict follows #1091's one-tag-per-code rule ({ status: 409, body: { "/code": "conflict" } }, message only), and the package root exports it over core's generic Conflict, like NotFound.

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Benchmarks: PR c2f38b76a vs main b5ab6ac53

  • ⚪ Bundle size 63.9 KB: ±0.0% (±0 B), same as main
  • ⚪ Runtime speed 1.8 µs: −26.8% (−0.6 µs), same as main
  • ⚪ Runtime memory 676.5 KB: ±0.0% (±0 B), same as main
  • ⚪ Objects at import 1,000: ±0.0% (±0), same as main
  • ⚪ Whole-SDK memory aws 39.0 MB (unchanged), cloudflare 8.08 MB (unchanged), gcp 24.1 MB (unchanged)
  • ⚪ Repo size 429.4 MB tracked in 8,209 files, same as main (+1.1 KB). .generated-specs/ 0 B, src/services/ 403.3 MB, everything else 26.0 MB.

sdk-memory

bundle-programs

memory-programs

bundle memory
speed objects

Numbers
Metric Change vs main Programs
Bundle (gzip) no change 19
Import heap no change 8
Objects at import no change 8
Added latency (p50) ¹ no change 8
Import time ¹ no change 8
First call ¹ no change 8
Program Call Bundle (gzip) Import heap Objects at import Added latency (p50) Import time First call
archil archil.listDisks 47.7 KB 639.1 KB 839 1.7 µs 7.6 ms 3.3 ms
aws s3.listBuckets 72.4 KB — — — — —
aws~awsJson1_0 dynamodb.listTables 65.2 KB — — — — —
aws~awsJson1_1 kms.listKeys 64.5 KB — — — — —
aws~awsQuery sts.getCallerIdentity 65.9 KB — — — — —
aws~ec2Query ec2.describeRegions 65.9 KB — — — — —
aws~restJson1 lambda.listFunctions 66.4 KB — — — — —
azure resources.ListTenants 55.2 KB — — — — —
cloudflare workers.listScripts 66.9 KB — — — — —
cloudflare~CloudflareProtocol ips.listIps 47.6 KB — — — — —
fly-io machines.getRegions 62.7 KB 759.8 KB 1,109 2.5 µs 8.8 ms 3.2 ms
fly-io~FlyApiProtocol mpg.listUsers 62.4 KB 654.3 KB 1,005 1.8 µs 8.0 ms 3.1 ms
fly-io~FlyGraphqlProtocol addons.addOn 59.9 KB 660.6 KB 1,000 4.8 µs 8.0 ms 2.9 ms
fly-io~SpritesProtocol sprites.createOrganizationToken 63.4 KB 682.4 KB 1,037 4.8 µs 8.3 ms 3.3 ms
gcp storage_v1.listBuckets 48.5 KB — — — — —
github gists.list 51.0 KB 615.7 KB 881 1.8 µs 7.5 ms 3.5 ms
neon neon.listProjects 49.6 KB 767.6 KB 992 1.1 µs 8.0 ms 3.4 ms
resend resend.listLogs 49.0 KB 641.2 KB 858 0.9 µs 7.6 ms 3.1 ms
stripe stripe.GetFiles 48.6 KB — — — — —

PR c2f38b76a against main b5ab6ac53 (main's cached run from 2026-11-07 18:51 UTC). 19 programs, measured in 27 s on 8 vCPU.

Package Tarball Unpacked Files
archil 103.0 KB (+2.2%) 462.8 KB (+2.2%) 58
core 285.1 KB 1.1 MB 196
fly-io 164.4 KB 973.5 KB 71
github 1.9 MB 17.2 MB 328
neon 200.4 KB 1.1 MB 47
resend 62.8 KB 446.4 KB 47
Tracked files Size Change vs main Files
services 403.3 MB +354 B 2,220
in-tree-specs 146.5 KB ±0 B 5
patches 8.2 MB +764 B 3,839
handwritten 5.9 MB +10 B 1,540
benches 9.5 MB ±0 B 189
other 2.2 MB ±0 B 416
Total 429.4 MB +1.1 KB 8,209

What a checkout or worktree writes to disk, from git ls-tree (benches/repo-size/tree.ts). The dashboard's Repo size page has the full picture.

Effect alone: effect-minimal bundle 8.8 KB gzip, hand-written effect-http call 47.8 KB gzip; effect import 76.6 ms and 12.7 MB heap; bare mocked HTTP roundtrip 10.5 µs p50.

Bundled (from src/): resend, neon, github, fly-io, aws, cloudflare, gcp, azure, stripe, archil. Built and probed (from lib/): resend, neon, github, fly-io, archil. Changed in this PR: archil.

Job time: bundle 7.5 s, build: tsrs 0.2 s, build: bundle-lib 2.3 s, build: strip-lib-docs 0.1 s, build 2.6 s, size 1.0 s, runtime 15.5 s, providers 0.0 s.

¹ Timings run on a different runner than main's, so 🟡 marks a large move that may still be noise. Sizes, heap and object counts are stable. Offline: every call hits a canned in-memory response. Full suite: node benches/sdks/run.ts. Job log

github-actions Bot added a commit that referenced this pull request Nov 8, 2026
@alchemy-version-bot

Copy link
Copy Markdown
Contributor

Install the packages built from this commit:

@distilled.cloud

pnpm install https://pkg.distilled.cloud/@distilled.cloud/archil/pr:1093:c2f38b7
pnpm install https://pkg.distilled.cloud/@distilled.cloud/aws4signer/pr:1093:c2f38b7
pnpm install https://pkg.distilled.cloud/@distilled.cloud/core/pr:1093:c2f38b7

Published Nov 8, 2026, 1:38 AM UTC. Expires Nov 15, 2026, 1:38 AM UTC, extended while this pull request is open.

@sam-goodwin
sam-goodwin added this pull request to the merge queue Nov 8, 2026
Merged via the queue into main with commit f667048 Nov 8, 2026
11 checks passed
@sam-goodwin
sam-goodwin deleted the fix/archil-branch-conflict branch November 8, 2026 02:21
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