Skip to content

Commit f21dc53

Browse files
committed
Merge commit '9af28ea702d59cd207cbc635f65b3f6c0fef7dec' into HEAD
2 parents b9d474a + 9af28ea commit f21dc53

928 files changed

Lines changed: 35370 additions & 37267 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/CONTRIBUTING.md‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ pnpm dev
2929
Ordinary installs include native optional dependencies for the current OS and CPU only.
3030
Before a cross-architecture build (including `pnpm build:mac`, which produces both x64 and
3131
arm64 artifacts by default), run `pnpm install:release` to add the other CPU's variants.
32-
See [the install policy](../docs/reference/pnpm-install-policy.md).
3332

3433
## Branch Naming
3534

‎.github/pull_request_template.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<!-- What problem does this solve, and why is this approach better than the alternatives you considered? -->
1212

1313
## Linked Issue
14+
1415
_If you do not have one and are an outside contributors, your PR **wiil** be ignored. Refs is not sufficient. Link an actual issue_
1516
<!-- Link the issue this PR addresses, there should ALWAYS be one (for outside contributors) -->
1617
<!-- SPECIAL CASE: If you are a maintainer (member of stablyai org) AVOID opening needless issues. Only attach pre-existing ones -->
@@ -39,7 +40,7 @@ Fixes #
3940

4041
## Agent skill upstream boundary
4142

42-
- [ ] Not applicable, or this change follows `docs/reference/agent-skill-sharing-upstream-boundary.md` and copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.
43+
- [ ] Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.
4344

4445
## Notes
4546

‎.github/workflows/ci-cache-warmup.yml‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414
- '.github/actions/prepare-native-runtime/**'
1515
- '.github/actions/prepare-git-compatibility/**'
1616
- '.github/actions/prepare-headless-compiler/**'
17-
- 'config/scripts/headless-detector-compiler-cache*'
17+
- 'config/scripts/headless-detector-compiler-cache.mjs'
1818
- '.github/actions/prepare-linux-package-fixture/**'
1919
- 'config/docker/headless-serve-shutdown/**'
2020
- 'config/docker/cli-launch-contract/**'
@@ -44,12 +44,11 @@ on:
4444
- '.github/workflows/ci-cache-warmup.yml'
4545
- '.github/actions/prepare-git-compatibility/**'
4646
- '.github/actions/prepare-headless-compiler/**'
47-
- 'config/scripts/headless-detector-compiler-cache*'
47+
- 'config/scripts/headless-detector-compiler-cache.mjs'
4848
- '.github/actions/prepare-linux-package-fixture/**'
4949
- 'config/docker/headless-serve-shutdown/**'
5050
- 'config/docker/cli-launch-contract/**'
5151
- 'config/docker/daemon-shutdown-descendants/**'
52-
- 'config/scripts/ci-cache-warmup-workflow.test.mjs'
5352

5453
permissions:
5554
contents: read

‎.github/workflows/cloud-deploy-relay-production-same-cap-job.yml‎

Lines changed: 39 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ jobs:
3030
if: ${{ github.ref == 'refs/heads/main' }}
3131
runs-on: blacksmith-2vcpu-ubuntu-2204
3232
# The pre-drain sample adds 3-8 min (20 at most); a timeout cancels the job and skips the failsafe.
33-
timeout-minutes: 90
33+
# A 1200000 drain step alone may take 50 min.
34+
timeout-minutes: 120
3435
environment: production
3536
env:
3637
GCP_PROJECT_ID: onorca-cloud
@@ -53,8 +54,9 @@ jobs:
5354
# /v1/assign at hosts / window and is re-placed through the director's drain-return
5455
# lane. The wave validator admits only its closed set, and anything below the 300000
5556
# default only on US general cells: Asia drains are bound by their targets' accept
56-
# rate. The transition wait below is the 15-min migration lease plus this window. A
57-
# cell on an older image drains at once.
57+
# rate. The transition wait below is the 15-min migration lease plus this window, plus
58+
# its excess over 300000, since restart-safe waits a window of quiet after the drain. A
59+
# cell on an older image drains at once, or refuses a window above 300000.
5860
DRAIN_PACE_WINDOW_MS: ${{ inputs.drain-pace-window-ms }}
5961
steps:
6062
- name: Require exact reusable-workflow configuration
@@ -499,8 +501,8 @@ jobs:
499501
if: ${{ inputs.mode == 'verify' }}
500502
run: echo 'Exact same-cap rollback point verified.'
501503

502-
# The sample can age the first one-hour token by up to 20 min; the drain's 20-min
503-
# restart-safe wait gets a fresh one.
504+
# The sample can age the first one-hour token by up to 20 min; the drain's restart-safe
505+
# wait (20 min at the default pace, 50 at the slowest) gets a fresh one.
504506
- id: drain-auth
505507
if: ${{ inputs.mode != 'verify' && env.ROLLBACK_RESUME != 'true' }}
506508
uses: google-github-actions/auth@v2
@@ -517,6 +519,11 @@ jobs:
517519
env:
518520
ORCA_RELAY_ADMIN_ID_TOKEN: ${{ steps.drain-auth.outputs.id_token }}
519521
run: |
522+
# Before any mutation: a cell whose image caps the pace below this one stops untouched.
523+
node dev/scripts/prepare-relay-production-capacity-canary.mjs \
524+
--director-origin "${DIRECTOR_ORIGIN}" --cell-origin "${CELL_ORIGIN}" \
525+
--cell-id "${TARGET_CELL_ID}" --approved-cells same-cap --mode pace-check \
526+
--pace-window-ms "${DRAIN_PACE_WINDOW_MS}"
520527
# Opens the window the report-only shadow health gate below judges this cell over.
521528
echo "drain-started-at=$(date -u +%FT%TZ)" >> "${GITHUB_OUTPUT}"
522529
echo "MUTATION_STARTED=true" >> "${GITHUB_ENV}"
@@ -555,7 +562,7 @@ jobs:
555562
--heartbeat either --admission migration-only --draining required \
556563
--activity restart-safe --expected-image-digests "${PREDECESSOR_IMAGE_DIGEST}" \
557564
--pace-window-ms "${DRAIN_PACE_WINDOW_MS}" \
558-
--timeout-ms "$((900000 + DRAIN_PACE_WINDOW_MS))"
565+
--timeout-ms "$((900000 + DRAIN_PACE_WINDOW_MS + (DRAIN_PACE_WINDOW_MS > 300000 ? DRAIN_PACE_WINDOW_MS - 300000 : 0)))"
559566
echo "drain-settled-at=$(date -u +%FT%TZ)" >> "${GITHUB_OUTPUT}"
560567
561568
- id: capacity-auth
@@ -709,19 +716,31 @@ jobs:
709716
env:
710717
ORCA_RELAY_ADMIN_ID_TOKEN: ${{ steps.post-auth.outputs.id_token }}
711718
run: |
712-
# A single transient 5xx (LB warm-up behind a fresh instance) must not
713-
# fail a canary; 4xx (auth, generation mismatch) still fails fast.
719+
# Rides out one DB stall: 5-7 s, then readiness grace and two 10 s LB
720+
# health checks (c18, 10-07 18:49Z: 503 "no healthy upstream", healthy
721+
# 16 s later). A cell still down after 60 s fails; other 4xx fail fast.
722+
# Retried in this loop: the runner's 7.81 client (Ubuntu 22.04) never
723+
# retries under --fail-with-body, so its --retry flags were inert.
714724
admin_post() {
715-
local out="${RUNNER_TEMP}/$1.json"
716-
if ! curl --fail-with-body --max-time 30 \
717-
--retry 3 --retry-delay 2 --retry-connrefused --output "${out}" \
718-
--request POST "$2" \
719-
--header "Authorization: Bearer ${ORCA_RELAY_ADMIN_ID_TOKEN}" \
720-
--header 'Content-Type: application/json' --data "$3"; then
721-
cat "${out}" >&2
722-
return 1
723-
fi
724-
cat "${out}"
725+
local out="${RUNNER_TEMP}/$1.json" window=60 delay=5 status
726+
local deadline=$((SECONDS + window))
727+
while true; do
728+
# A refused or timed-out attempt writes no body; never report the last one's.
729+
rm -f "${out}"
730+
status="$(curl --silent --show-error --max-time 30 --output "${out}" \
731+
--write-out '%{http_code}' --request POST "$2" \
732+
--header "Authorization: Bearer ${ORCA_RELAY_ADMIN_ID_TOKEN}" \
733+
--header 'Content-Type: application/json' --data "$3")" || status=000
734+
case "${status}" in
735+
2??) cat "${out}"; return 0 ;;
736+
000|408|429|5??) ((SECONDS + delay < deadline)) || break ;;
737+
*) break ;;
738+
esac
739+
sleep "${delay}"
740+
done
741+
echo "admin_post $1: HTTP ${status}" >&2
742+
cat "${out}" >&2 2>/dev/null || true
743+
return 1
725744
}
726745
node dev/scripts/verify-relay-capacity-transition.mjs \
727746
--director-origin "${DIRECTOR_ORIGIN}" --cell-origin "${CELL_ORIGIN}" \
@@ -824,8 +843,8 @@ jobs:
824843
# read cost its full retry budget and can push the job past timeout-minutes, and a
825844
# cancelled job takes the whole wave with it. A healthy gate is already minutes of
826845
# serial reads, so both bounds sit above that: the script settles at seven minutes and
827-
# reaching this eight is the pathological case. Eight on top of a ~14-minute cell still
828-
# leaves the job's 90 minutes intact.
846+
# reaching this eight is the pathological case. Eight on top of a cell of ~14 minutes
847+
# (~45 at the slowest pace) still leaves the job's 120 minutes intact.
829848
timeout-minutes: 8
830849
env:
831850
DRAIN_STARTED_AT: ${{ steps.drain.outputs.drain-started-at }}

‎.github/workflows/cloud-deploy-relay-production-same-cap.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ on:
5454
required: true
5555
type: string
5656
drain-pace-window-ms:
57-
description: Window the cell spreads its drain over; below 300000 only for US general cells, named in the confirmation
57+
description: Window the cell spreads its drain over; below 300000 only for US general cells; any other value named in the confirmation
5858
required: true
5959
default: '300000'
6060
type: choice
61-
options: ['300000', '60000', '30000']
61+
options: ['300000', '60000', '30000', '900000', '1200000']
6262
canary-run-id:
6363
description: Successful same-code canary in this rehome control generation; reusable across batches
6464
required: false

‎.github/workflows/pr.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1272,6 +1272,7 @@ jobs:
12721272
src/main/wsl/wsl-runner.test.ts
12731273
src/main/wsl/wsl-guest-environment.test.ts
12741274
src/main/wsl/wsl-executable-path.win32.test.ts
1275+
src/main/claude-accounts/claude-profile-history-windows.test.ts
12751276
src/main/wsl/wsl-w1-w3-contract.test.ts
12761277
src/shared/source-scan/source-tree-scan.test.ts
12771278
src/main/cli/wsl-cli-powershell-boundary.test.ts

‎.gitignore‎

Lines changed: 2 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,9 @@ design-docs/
9090
# Machine-local agent hook endpoint files may contain auth tokens.
9191
/agent-hooks/
9292

93-
# Local-only design/planning docs (not checked in), including most of docs/reference/.
93+
# Local-only design/planning docs (not checked in).
9494
# Durable docs that should be tracked must live in one of the allow-listed
95-
# locations below (assets, readme, STYLEGUIDE, mobile terminal shortcut bar,
96-
# and the tracked reference docs linked from AGENTS.md / README.md).
95+
# locations below (assets, readme, STYLEGUIDE, and mobile terminal shortcut bar).
9796
docs/**
9897
!docs/
9998
# The deployable docs app is source, not local engineering notes.
@@ -117,40 +116,6 @@ docs/**
117116
!docs/audits/crashpad-read-limit/source-hashes.json
118117
!docs/agent-skill-sharing-implementation-checklist.md
119118
!docs/mobile-terminal-shortcut-bar.md
120-
!docs/reference/
121-
!docs/reference/agent-pty-transcript-capture.md
122-
!docs/reference/agent-session-search-query-tuning.md
123-
!docs/reference/agent-session-search-contract.md
124-
!docs/reference/agent-status-store.md
125-
!docs/reference/antigravity-readiness-evidence.md
126-
!docs/reference/antivirus-prerelease-clearance.md
127-
!docs/reference/cline-and-prime-agent-readiness-evidence.md
128-
!docs/reference/git-compatibility.md
129-
!docs/reference/headless-linux-server.md
130-
!docs/reference/ime-regression-checklist.md
131-
!docs/reference/jcode-hook-events.md
132-
!docs/reference/linux-glibc-compatibility.md
133-
!docs/reference/macos-press-and-hold.md
134-
!docs/reference/orcad-operations.md
135-
!docs/reference/pnpm-install-policy.md
136-
!docs/reference/relay-grace-time-reconfiguration.md
137-
!docs/reference/windows-cmd-shim-resolution.md
138-
!docs/reference/windows-daemon-host-relocation.md
139-
!docs/reference/windows-edr-posture.md
140-
!docs/reference/windows-msys-job-breakaway.md
141-
!docs/reference/windows-process-enumeration.md
142-
!docs/reference/wsl-runner-verification.md
143-
!docs/reference/remote-wire-compatibility.md
144-
!docs/reference/renderer-agent-status-performance.md
145-
!docs/reference/ssh-execution-boundary.md
146-
!docs/reference/ssh-host-key-verification.md
147-
!docs/reference/ssh-reconnect-source-recovery.md
148-
!docs/reference/windows-setup-shell.md
149-
!docs/reference/windows-terminal-shell-selection.md
150-
!docs/reference/worktree-scan-fingerprint.md
151-
!docs/reference/wsl-command-execution.md
152-
!docs/reference/wsl-probe-failure-semantics.md
153-
!docs/reference/xterm-patch-regeneration.md
154119

155120
# Stably CLI (only docs/ are tracked)
156121
.stably/*

0 commit comments

Comments
 (0)