Repository navigation
fix: 0.12.2 batch 6 (update fix, SageMaker option) and the 0.12.2 version - #35596
Conversation
…34031) On Windows hosts with on-access antivirus, a file open or stat can take seconds, and the loop watchdog kills the gateway once the event loop is silent for its exit budget. Three request paths parked the loop on disk: - RevokedNonceStore held its dict lock across the denylist write (mkdir, open, owner-only lockdown, write, replace). The write runs on a worker thread, but is_revoked takes the same lock on the loop for every cookie request, so one slow sign-in write stalled the loop until the watchdog killed the gateway. The dict lock now covers dict operations only and a second lock serializes the writes; each writer snapshots under it, so the last write still carries every nonce. - RefreshStateManager held its dict lock the same way across the refresh store write (staging, synced write, rename, directory sync). Rotation and revocation write on a worker, but GET /api/auth/me and POST /api/auth/refresh take that lock on the loop through validate_refresh_token and the refresh handler's checks. The lock now covers the snapshot and the degraded mark only. Every writer already holds _write_sequence_lock across its mutation and its write, so the writes stay ordered and the last one carries the newest state. - status_snapshot read config.json (a stat and two opens) for the background-turn cap on every /api/status poll and WS or SSE status frame until the first unattended turn sized the cap's semaphore. The shared cached_status_snapshot funnel takes those stats in a worker, as it already does for the counts and the bundle id. (cherry picked from commit 3eff86a)
Backports main's SageMaker picker to release/0.12.0, then #34982 at its head ae6e747 on top, so a user can pick a SageMaker endpoint as the Decision model in Settings and a ceiling hides what it refuses. Carried from main (not on release): - handlers/decisions_sagemaker.py as its own module, so decisions.py stays under the line cap: PRESET_SAGEMAKER, the sagemaker body and address builder, ProviderRefused, and the connection test route (POST /api/decisions/provider/sagemaker-test, registered in routes/system.py and the handlers facade) - GET fields sagemaker and sagemaker_available, active "sagemaker" - impl_sagemaker: build_endpoint, SageMakerAddressFieldError, boto3_installed, profile_exists, typed credential-provider and answer-stream errors, 63 character name and region bounds - picker: SageMaker option and its name, region and profile inputs, Test connection, refusal sentences; client saveDecisionsSageMaker and testDecisionsSageMaker; DecisionsCard passes consent that stands for the configured endpoint - i18n keys decisions_provider_sagemaker* in every locale - user and spec docs, tests and picker vitest From #34982 (ae6e747): - hosted_permitted includes the ceiling endpoints list, and sagemaker_permitted probes the configured region, botocore sagemaker-runtime regions, then the static tuple with ca-west-1 - hosted Jev and SageMaker are hidden when refused - the provider PUT answers 403 decisions_capability_denied for a refused hosted or regional host, and so does the consent PUT ON - a refused or unset hosted default reads as active "none" - capability.targets_denied point is str | None Left out: the PR screenshots and capture script, and every unrelated main change in the touched files.
Applies the delta between the earlier #34982 head and its merged content (a54ae2d, head d599402): unaudited offer probes, the configured_refused payload field and its picker and card reading, the botocore region cache, the malformed-address 403, and the decisions_hosted_refused string in 13 locales. Release keeps its own wording in capability.py (Enterprise, not LTS).
#35088) Backport of #35088 (head e655adb) onto release/0.12.0 for the 0.12.2 hotfix. A click arms the update; the apply runs at the next start, before the gateway serves, and nothing restarts a running gateway. Release adaptations: kept release surrounding code in the docs, locale JSONs, FeaturePreviewsSection and AboutPanelUpdateFlow (no ended phase), dropped files deleted on release, re-derived the sandbox pin numbers.
Backport of #35091 (head e858992) onto release/0.12.0 for the 0.12.2 hotfix, on top of the backport of #35088 whose decision entry its docs link to. Release adaptations: dropped the main-only relay Crew opener option, chromium sandbox, find-bin and launch-services imports and the client-only launch fallback probe site; kept sessionCookieHeader import in main.js; dropped the desktopRestart test deleted on release.
Move the three version files to the bare 0.12.2 and add the [0.12.2] CHANGELOG section for the hotfix backports merged on release/0.12.0 since v0.12.1, written from git log v0.12.1..release/0.12.0. The gate build v0.12.2-rc.1 is tagged on this commit, as for 0.12.1-rc.3, so the bare v0.12.2 can name it. website/electron/package-lock.json stays as it is.
Sensitive Change ReviewSensitive files changed:
How to clear this check:
Only the author's comment counts this way. A reviewer can instead |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS The update change rewrites what a clicked Update does by default. Whether Notes
What this change shipsInventory (9 items) — 7 justifiedIntent: ship the 0.12.2 hotfixes so that updating 0.12 never kills live work, then tag rc.1 (FIX, a backport batch).
[FIRST-PRINCIPLES-REVIEWED] 3dbc9db Description read[DESCRIPTION-READ] 49d9eadd7acdaa54df5d9b03866f30f7010c2d375237ec7965ed6d09260a64c1 That sha256 names the PR description this verdict read. Recompute it with |
Security Scope Review -- 🔴 could not complete (fails closed)No scope verdict for |
GPT 6.1 Review — 🔴 changes requested (blocking)GPT 6.1 found at least one blocking issue that must be resolved before merging This comment is updated in place on each push. BLOCKING -- src/kiro_crew/update_boot_apply.py:199 -- Policy-governed desktop updates never consume their arm
BLOCKING -- website/src/hooks/useInstallDispatch.ts:42 -- Desktop Restart now interrupts running work without confirmation
BLOCKING -- website/electron/runtime/update/managed-lane.js:243 -- Cancelling a mirrored update leaves Electron armed
[BLOCK-MERGE] 3dbc9db Adjudication (Opus 5.5) — is blocking on each finding proportionate?F1: MEDIUM. A feature is broken on a whole class of installs. I confirmed boot skips an armed update when the desktop hosts the gateway ( F2: MEDIUM. Running work is lost without confirmation. F3: HIGH. An update the owner cancelled is installed anyway, and nothing on screen says so. False positive or not applicable? A repository writer can comment: |
Problem / Motivation
Goal: Land the last 0.12.2 batch on
release/0.12.0(the update fix that never restarts a running gateway, the Decisions model SageMaker option and three more fixes from main) together with the bare0.12.2version and CHANGELOG, sov0.12.2-rc.1can be tagged on the version commit.These are our own fixes from main. Each is adapted to release's code and leaves out what needs code only on main; the adaptations are listed below.
Why it matters
0.12 users lose work today when an update restarts a running gateway (sessions between turns read as idle, and a clicked Update restarts at once). This batch makes an update take effect only when the person quits or restarts Kiro Crew. It also ships the Decisions model SageMaker option the internal edition needs, and the version commit the gate build tags.
Not a goal
main; the 0.12.2 CHANGELOG section is ported tomainwhen 0.12.2 reaches stable.What changed (motivation → approach → change)
On
release/0.12.0atf8a8175029, in this order (rebase-merge keeps each commit):0.12.2in the three version files and the## [0.12.2]CHANGELOG sectionRelease adaptations: release's code is kept around each patch; main-only code the patch does not need is left out (for example main's
endedAbout phase, main's upcoming-update notice, main-only locale keys, main-only imports inmain.jsandipc-registrar.js). The sandbox pin numbers moved by the newupdate_next_start.jsonread-only leaf are re-derived for release (protected-name counts 328/335/336, package line budget 35,116) and the error-code baseline is regenerated on release. The only carried helper is thesessionCookieHeaderimport inwebsite/electron/main.js, which release already exports.Backwards compatibility
No config key, CLI flag or API is removed or renamed.
POST /api/updatenow arms the update for the next start instead of applying it; a legacyforce=truearms too. Every earlier CHANGELOG section is byte-identical.Tests
The no-interrupt update smoke passed on the main heads of #35088 and #35091: Linux (AL2023) scenarios 1 to 7f and 9 to 9c, and the macOS desktop app built by CI (95 of 95 checks: D-a to D-d, 8e, 8f, 8g). On this branch, on a DevSpace: compileall and flake8 on the 102 changed Python files, an import of all 46 changed modules, locale JSON parse,
node --checkon the changed Electron files, and one run each of the pin filestest_security_gate_liveness.py,test_sandbox_governance_mask.pyandtest_sandbox_protected_name_holds.py. The full suites run on thev0.12.2-rc.1release run ("Test Release Candidate SHA") before any stable tag.Proof: not provable -- other: a backport batch of main fixes, each proven in its own main PR
Manual verification
N/A: each fix was verified in its own main PR and by the update smoke above.
Screenshots / video
N/A: no visual change beyond what the main PRs showed.
Related Issues
0.12.2 hotfix, batch 6: #34031, #34643, #34749, #34982, #35088, #35091.
Pattern harvest
Not generalizable: a release backport batch, not a new defect fix.
Checklist
Contribution License Agreement
Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.