Repository navigation
feat(relay): report lane service times, 503 causes, per-site hold p99 and a director-vs-cell lock-wait split - #25645
Conversation
… and lock-wait split Adds the step-1 observability: drain-return and sticky slot service times, every /v1/assign 503 by cause with a non-drain total, a p99 per lock hold site (drain-return regional rows get their own site), a director-side pg_stat_activity sample that splits lock waiters by director vs cell, and a log line for each reserved_requests drift reconciliation corrects. Log-based metrics for the new fields are declared in Terraform, not applied.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 📝 WalkthroughWalkthroughReservation reconciliation now logs corrected reservation counts after its transaction. Cell-lock measurements distinguish the isolated-replacement site and report per-site p99 values. Assignment handling records sticky and drain-return service times and classifies unavailable outcomes. Assignment-maintenance roles sample PostgreSQL lock waiters. Runtime metrics, Terraform mappings, tests, and operations documentation cover these observations. Priority: ➖ Normal Merge Risk: 🔵 Low · up to Lock-wait telemetry cannot distinguish combined-role sessions from other sessions, making diagnosis less precise. This is bounded and does not block merging, but the role mapping should be corrected. 🚥 Pre-merge checks | ✅ 2 | ❌ 2 | ❓ 1❌ Failed checks (2 warnings, 1 inconclusive)
✅ Passed checks (2 passed)
Full details: Linked Issues checkExplanation
Full details: Out of Scope Changes checkExplanation The drift log and its test relate to Full details: Docstring CoverageExplanation Docstring coverage is 14.29% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 14 functions across 15 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
f0a84d51-97cf-4844-9737-bafe49ec88d7
📒 Files selected for processing (17)
cloud/apps/relay/src/app.tscloud/apps/relay/src/assignment-isolated-cell-replacement.test.tscloud/apps/relay/src/assignment-store.test.tscloud/apps/relay/src/assignment-store.tscloud/apps/relay/src/cell-inventory-hold-samples.test.tscloud/apps/relay/src/cell-inventory-hold-samples.tscloud/apps/relay/src/drain-return-admission.test.tscloud/apps/relay/src/drain-return-admission.tscloud/apps/relay/src/index.tscloud/apps/relay/src/postgres-lock-wait-sample-postgres.test.tscloud/apps/relay/src/postgres-lock-wait-sample.tscloud/apps/relay/src/public-assignment-drain-return-lane.test.tscloud/apps/relay/src/relay-observability.test.tscloud/apps/relay/src/relay-observability.tscloud/apps/relay/src/relay-server.tscloud/docs/orca-relay-operations.mdcloud/infra/terraform/relay-observability.tf
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.
| @@ -7495,8 +7497,18 @@ export class RelayAssignmentStore { | |||
| `UPDATE relay_cells SET reserved_requests = ?, updated_at = ? WHERE cell_id = ?`, | |||
| [expected, now, cellId] | |||
| ) | |||
| corrected.push({ | |||
| cellId, | |||
| reservedRequests: integer(row, 'reserved_requests'), | |||
| leaseUnits: expected | |||
| }) | |||
| } | |||
| return corrected | |||
| }) | |||
| // Logged after COMMIT so a retried transaction reports each correction once. | |||
| for (const sample of drift) { | |||
| console.warn(JSON.stringify({ event: 'orca_relay_reservation_drift', ...sample })) | |||
| } | |||
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
sed -n '7370,7520p' cloud/apps/relay/src/assignment-store.ts
git diff 2a68ea94967caf926aa60ebbd2bb32797bebb146 c62ece3a77883d7eb45712c77e0a65fe5dc5cf51 -- cloud/apps/relay/src/assignment-store.tsRepository: stablyai/orca
Length of output: 9846
🏁 Script executed:
printf '%s\n' '--- full PR changed paths ---'
git diff --name-status 2a68ea94967caf926aa60ebbd2bb32797bebb146 c62ece3a77883d7eb45712c77e0a65fe5dc5cf51
printf '%s\n' '--- base reconciliation block ---'
git show 2a68ea94967caf926aa60ebbd2bb32797bebb146:cloud/apps/relay/src/assignment-store.ts | sed -n '7368,7510p'
printf '%s\n' '--- relevant references/tests ---'
rg -n -i 'reconcileReservationAccounting|reservation accounting|reserved_requests|concurrent.*(placement|reconcil)|reconcil.*concurr|lockCellRows|lease units|leaseUnits' cloud/apps/relay --glob '*.{ts,sql,md}' || test "$?" -eq 1
printf '%s\n' '--- transaction/locking definitions ---'
rg -n 'queryLocked|class .*Transaction|transaction\(' cloud/apps/relay/src --glob '*.{ts}' | head -120Repository: stablyai/orca
Length of output: 41997
🏁 Script executed:
printf '%s\n' '--- reconciliation callers ---'
sed -n '2340,2450p' cloud/apps/relay/src/assignment-store.ts
sed -n '3240,3305p' cloud/apps/relay/src/assignment-store.ts
sed -n '3390,3450p' cloud/apps/relay/src/assignment-store.ts
sed -n '5070,5140p' cloud/apps/relay/src/assignment-store.ts
printf '%s\n' '--- placement / lease insertion and reservation update ---'
sed -n '760,845p' cloud/apps/relay/src/assignment-store.ts
sed -n '1200,1290p' cloud/apps/relay/src/assignment-store.ts
sed -n '6230,6305p' cloud/apps/relay/src/assignment-store.ts
sed -n '8450,8510p' cloud/apps/relay/src/assignment-store.ts
printf '%s\n' '--- reconciliation tests and relevant PR test diffs ---'
sed -n '620,815p' cloud/apps/relay/src/postgres-transaction-recovery.test.ts
git diff 2a68ea94967caf926aa60ebbd2bb32797bebb146 c62ece3a77883d7eb45712c77e0a65fe5dc5cf51 -- cloud/apps/relay/src/assignment-store.test.ts cloud/apps/relay/src/assignment-isolated-cell-replacement.test.ts cloud/apps/relay/src/postgres-transaction-recovery.test.ts
printf '%s\n' '--- database lock/query implementation ---'
rg -n 'queryLocked|READ COMMITTED|REPEATABLE READ|isolation|FOR UPDATE|beginTransaction|BEGIN' cloud/apps/relay/src/database.ts cloud/apps/relay/src/*database* cloud/apps/relay/src --glob '*.{ts}' | head -180Repository: stablyai/orca
Length of output: 42108
🏁 Script executed:
printf '%s\n' '--- activity acquisition declarations and callers ---'
rg -n 'async acquireActivity|acquireActivity\(|INSERT INTO relay_assignment_activity_leases|lockAssignmentActivities|assignStickyOnce|async assign\\(' cloud/apps/relay/src/assignment-store.ts
printf '%s\n' '--- placement/activity implementation candidates ---'
sed -n '500,760p' cloud/apps/relay/src/assignment-store.ts
sed -n '3600,3900p' cloud/apps/relay/src/assignment-store.ts
sed -n '4350,4445p' cloud/apps/relay/src/assignment-store.ts
printf '%s\n' '--- exact reconciliation concurrency test ---'
rg -n -C 12 'assignment-first lock order|while activity waits|reconcil' cloud/apps/relay/src/postgres-transaction-recovery.test.ts
printf '%s\n' '--- postgres queryLocked and transaction methods ---'
sed -n '1000,1095p' cloud/apps/relay/src/database.ts
printf '%s\n' '--- assignment lock-order contract ---'
sed -n '350,425p' cloud/apps/relay/src/assignment-store.ts
printf '%s\n' '--- changed concurrency tests in PR ---'
git diff 2a68ea94967caf926aa60ebbd2bb32797bebb146 c62ece3a77883d7eb45712c77e0a65fe5dc5cf51 -- cloud/apps/relay/src/assignment-store.test.ts cloud/apps/relay/src/assignment-isolated-cell-replacement.test.ts cloud/apps/relay/src/cell-inventory-hold-samples.test.ts cloud/apps/relay/src/postgres-lock-wait-sample-postgres.test.ts | rg -n -C 8 'reconcil|concurr|activity waits|assignment-first|leaseUnits|cell row|placement'Repository: stablyai/orca
Length of output: 42362
🏁 Script executed:
printf '%s\n' '--- assignOnce implementation ---'
rg -n 'private async assignOnce|async assignOnce|INSERT INTO relay_assignment_activity_leases|control-pending:' cloud/apps/relay/src/assignment-store.ts | head -80
sed -n '870,1275p' cloud/apps/relay/src/assignment-store.ts
printf '%s\n' '--- assignmentRow and lockAssignmentActivities helpers ---'
rg -n 'private async assignmentRow|private assignmentRow|assignmentRow\\(|lockAssignmentActivities\\(' cloud/apps/relay/src/assignment-store.ts | tail -45
sed -n '8570,8675p' cloud/apps/relay/src/assignment-store.ts
printf '%s\n' '--- exact PostgreSQL reconciliation lock-order test candidates ---'
rg -n 'assignment-first|activity waits|reconcil.*activity|activity.*reconcil' cloud/apps/relay/src/postgres-transaction-recovery.test.ts cloud/apps/relay/src/assignment-store.test.ts || test "$?" -eq 1
sed -n '630,810p' cloud/apps/relay/src/postgres-transaction-recovery.test.ts
printf '%s\n' '--- PostgreSQL transaction isolation configuration ---'
rg -n 'default_transaction_isolation|SET TRANSACTION|isolation level|BEGIN ISOLATION|READ COMMITTED' cloud/apps/relay/src cloud/infra --glob '*.{ts,sql,tf,md}' || test "$?" -eq 1Repository: stablyai/orca
Length of output: 31757
🏁 Script executed:
printf '%s\n' '--- new-assignment final write sequence ---'
sed -n '1230,1375p' cloud/apps/relay/src/assignment-store.ts
printf '%s\n' '--- pending-control lease writer ---'
rg -n -F 'private async insertPendingControlLease' cloud/apps/relay/src/assignment-store.ts
printf '%s\n' '--- cell reservation locking helpers ---'
sed -n '8455,8505p' cloud/apps/relay/src/assignment-store.ts
printf '%s\n' '--- reconciliation current head exact order ---'
sed -n '7373,7515p' cloud/apps/relay/src/assignment-store.ts
printf '%s\n' '--- PR diff for reconciliation only ---'
git diff --unified=3 2a68ea94967caf926aa60ebbd2bb32797bebb146 c62ece3a77883d7eb45712c77e0a65fe5dc5cf51 -- cloud/apps/relay/src/assignment-store.ts | sed -n '/reconcileReservationAccounting/,/private async lockCellInventory/p' | head -100Repository: stablyai/orca
Length of output: 14439
🏁 Script executed:
sed -n '8105,8155p' cloud/apps/relay/src/assignment-store.ts
nl -ba cloud/apps/relay/src/assignment-store.ts | sed -n '7415,7510p'
nl -ba cloud/apps/relay/src/assignment-store.ts | sed -n '994,1048p;1260,1330p'
nl -ba cloud/apps/relay/src/postgres-transaction-recovery.test.ts | sed -n '719,797p'Repository: stablyai/orca
Length of output: 16933
Refresh cell lease units after locking the cells.
If a new assign() holds the target cell row while reconciliation reads leases, its assignment and pending-control lease are not in that result. Reconciliation can then wait for the cell lock and overwrite reserved_requests using the earlier snapshot, omitting the committed placement. The new drift sample can also report stale leaseUnits. Keep the locked lease read for assignment counters, but re-read the source and target cell lease units after lockCellRows with a non-locking query.
Suggested fix
const cells = await this.lockCellRows(
transaction,
[sourceCellId, targetCellId],
'pool-default'
)
+ const reservationLeases = await transaction.query(
+ `SELECT cell_id, request_units FROM relay_assignment_activity_leases
+ WHERE cell_id IN (?, ?)`,
+ [sourceCellId, targetCellId]
+ )
const assignmentKeys = new Set(
assignments.map((row) =>
assignmentKey(text(row, 'user_id'), text(row, 'relay_host_id'))
@@
const kind = activityKind(lease)
current.counts[kind]++
current.leaseExpiresAt = Math.max(current.leaseExpiresAt, integer(lease, 'expires_at'))
assignmentCounts.set(key, current)
- cellUnits.set(cellId, (cellUnits.get(cellId) ?? 0) + integer(lease, 'request_units'))
+ }
+ for (const lease of reservationLeases) {
+ const cellId = text(lease, 'cell_id')
+ cellUnits.set(cellId, (cellUnits.get(cellId) ?? 0) + integer(lease, 'request_units'))
}
for (const row of assignments) {…irector hold alert change Every waiter after the first in a row-lock convoy is blocked by the first waiter, so the sample now walks pg_blocking_pids to the root, reading it once per waiter. The sampler is single-flight. Drain-return regional holds feeding the non-paging director hold policy is documented as expected.
…minutes, and seal the canary's pace verdict Review of #25639 replayed the shadow gate: it read 10-01 c29 as unverified (the log read stopped at 20k entries), false-blocked 10-02 c22, and was blind on four cells whose 24 h/48 h baseline held an incident. - Director 503s now come from Cloud Run's request_count, aligned per minute by Cloud Monitoring, so volume cannot truncate the count. - The background is the median of the 10 same-day minutes before the drain; the 24 h/48 h baselines are gone. - Scheduled 503s come out: drain-return deferrals and sticky/placement answers to a host's own early retry (host-rate-limited, host-in-flight), each split across the minutes its 30 s sample covers. - The rung budget counts only sustained breaches: two straight minutes over max(1.5x, +20) warn, over max(2x, +40) would-block. - The report carries a paceVerdict over the three pace checks. seal_canary downloads the canary cell's report and seals that verdict; a batch below the default pace needs PASS, from a report on the same cell that drained at that pace. - Docs: the step-down rule reads paceVerdict, 30 s waits for the lane service time (#25645), and the staging step is dropped since staging drains unpaced. Replayed read-only: 10-01 c29 would-block (9 minutes over 41.5/min); all nine 10-02 cells and 10-01 c25 paceVerdict PASS.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
The new commits since the prior review (c62ece3) rework the lock-wait sampler and document the director hold-alert change:
- Root-holder attribution.
postgres-lock-wait-sample.tsnow walkspg_blocking_pidswith a recursive CTE to the root of each wait chain, so every waiter in a row-lock convoy is attributed to the transaction actually holding the row rather than the waiter directly in front of it.pg_blocking_pidsis read once per waiter through aMATERIALIZEDCTE, and the chain is depth-capped so a cycle cannot run away. - Single-flight sampling.
index.tsguards the 5 s lock-wait sampler with a module-level flag so a slow database cannot stack samples on the pool, and clears it infinally;runRelayBackgroundOperationswallows failures, so the flag always resets. - Real-Postgres convoy test. The Postgres test now queues three directors behind a cell-held
relay_cellsrow and asserts all three reportholderRole: 'cell'— the first-blocker query reported two of them as director-held, so the test fails without the fix. - Docs and Terraform. The operations and incident-monitor docs describe the root-holder semantics and the expected director hold-alert change; the Terraform reorders
reservation_driftalongside the other incident metrics.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
…hen the pool is full
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.
🟡 Minor · Keep combined distinct in lock-wait samples. · postgres-lock-wait-sample.ts:40-48
cloud/apps/relay/src/postgres-lock-wait-sample.ts:40-48
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winKeep
combineddistinct in lock-wait samples.The default
combinedrole enables the sampler, and the SQL selects its sessions.relayRolemaps that valid role toother, sodbLockWaitersByKeyDeltacannot distinguish combined waiters or holders from operator sessions or finished holders. AddcombinedtoRELAY_ROLES. The per-key dimension will then retain it; the director- and cell-only scalar fields remain unchanged.Suggested fix
-const RELAY_ROLES = new Set(['director', 'cell']) +const RELAY_ROLES = new Set(['director', 'cell', 'combined'])
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
cdd42d5c-a8ba-4dbf-b7f4-2e25a4761473
📒 Files selected for processing (2)
cloud/apps/relay/src/postgres-lock-wait-sample.tscloud/docs/orca-relay-operations.md
🚧 Files skipped from review as they are similar to previous changes (2)
- cloud/apps/relay/src/postgres-lock-wait-sample.ts
- cloud/docs/orca-relay-operations.md
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.
…in-aware 503 gates (#25639) * feat(relay): drain pace window as a reviewed same-cap input, with drain-aware 503 gates The same-cap roll drained every cell over a fixed 300 s window, so a US roll re-placed hosts at ~2/s and spent ~10 minutes draining and waiting for quiet. The window is now a dispatch input from a closed set (300000, 60000, 30000), defaulting to today's 300000. - Below the default is refused for anything but US general cells; Asia drains are bound by their targets' accept rate, and migration-only cells hold no hosts. - A non-default window must be named in the confirmation, the canary authority records it (v2), and a batch may run at its canary's window or slower only. - Each cell job re-checks the window, scales the restart-safe timeout with it (15-min lease + window, unchanged at the default), and records what the cell applied and when it settled. - The report-only shadow gate takes the director's drain-return deferrals out of the 503 count (window and baselines), adds the rung's 5-min non-drain 503 budget and a Retry-After check, and reports the measured re-placement rate. - relay-workflows.md documents the pace ladder and what each rung records. * fix(relay): judge paced drains on counted 503s against the pre-drain minutes, and seal the canary's pace verdict Review of #25639 replayed the shadow gate: it read 10-01 c29 as unverified (the log read stopped at 20k entries), false-blocked 10-02 c22, and was blind on four cells whose 24 h/48 h baseline held an incident. - Director 503s now come from Cloud Run's request_count, aligned per minute by Cloud Monitoring, so volume cannot truncate the count. - The background is the median of the 10 same-day minutes before the drain; the 24 h/48 h baselines are gone. - Scheduled 503s come out: drain-return deferrals and sticky/placement answers to a host's own early retry (host-rate-limited, host-in-flight), each split across the minutes its 30 s sample covers. - The rung budget counts only sustained breaches: two straight minutes over max(1.5x, +20) warn, over max(2x, +40) would-block. - The report carries a paceVerdict over the three pace checks. seal_canary downloads the canary cell's report and seals that verdict; a batch below the default pace needs PASS, from a report on the same cell that drained at that pace. - Docs: the step-down rule reads paceVerdict, 30 s waits for the lane service time (#25645), and the staging step is dropped since staging drains unpaced. Replayed read-only: 10-01 c29 would-block (9 minutes over 41.5/min); all nine 10-02 cells and 10-01 c25 paceVerdict PASS. * fix(relay): a partial count already past a block line blocks, in the shadow gate's Cloud SQL and pool checks A truncated FATAL count is a floor, and one runtime sample over the SQL-failure line is a fact, so neither waits for a complete read. The waiter-run rule still needs a complete run, since holes can join two runs into one. * fix(relay): a canary pace PASS needs a real cohort and whole telemetry; one median-based 503 check From the final review of #25639: - canaryPaceVerdict seals PASS only from a report that drained at least 400 hosts (about half a 10-02 US cell), so a near-empty canary cannot authorize a fast batch. - A director-metrics sub-window with fewer samples than one instance emits is unverified, so an empty or short Logging answer is never a calm drain. - seal_canary names the shadow artifact, report path and cell from the gate's normalized cell list, as cell_1 uploads it. - director503 folds into nonDrain503Budget as a single-minute spike rule, max(10x median, 200), dropping the pre-drain peak statistic. All 30 replayed windows keep their verdicts.

ELI5
We are about to decide whether drains, reconnect herds and the relay database lock are the bottleneck. Today the director cannot answer those questions: it does not report how long each admission lane holds a slot, it lumps scheduled "come back in N seconds" drain answers together with real failures, and nothing can tell a director's database lock wait from a cell's. This adds those numbers to the existing 30-second runtime metrics line.
What Changed
All new fields ride the existing
orca_relay_runtime_metricsline; no new metrics line.drainReturnServiceMsP50/P95reports the raw sample the drain-return lane already fed its pacing estimate (drain-return-admission.ts), unclamped.stickyServiceMsP50/P99is how long a sticky slot is held, verification read included. Both are omitted when the lane served nothing, like the accept percentiles./v1/assign503 records a cause (sticky-lane,placement-lane,drain-return-deferred,relay_capacity_exhausted,relay_assignment_row_busy,database, …) inassign503sByCauseDelta.assignNonDrain503sDeltais the total excluding scheduled drain-return deferrals.CellInventoryHoldSamplesnow reportsinventoryHoldMsP99,rehomeTargetRowHoldMsP99andisolatedReplacementHoldMsP99. The drain-return path's regional row lock (lockIsolatedReplacementCells) was not sampled at all; it now records under its ownisolated-replacementsite.pg_stat_activityfor relay backends in aLockwait (single-flight).relay_cells/relay_assignments/ other), and the role of the root of its wait chain. Roles come fromapplication_name(orca-relay/<role>/<cell>).pg_blocking_pids, calling it once per waiter.dbLockWaitersByKeyDeltawithdbLockWaitSamplesDelta, plus flatdbCellRowLockWaiters{Director,Cell}Delta.orca_relay_reservation_drift {cellId, reservedRequests, leaseUnits}for each cell whose counter it corrects, after COMMIT.relay-observability.tf): 12 new entries in therelay_snapshotlog-metric map and onerelay_incidentcounter (reservation_drift). Not applied.docs/orca-relay-operations.md.Why
These are the inputs the next steps are gated on (drain-pace ladder, the conditional drain-return lock change, the step-2 one-round-trip commit):
pg_stat_statementsand Query Insights (user / client address) cannot split them. I checked this read-only in production: every relay backend shows client addresslocaland userorca_relay, withapplication_namethe only role marker.Alternatives considered for the lock-wait split:
The director-side sample works with a director-only deploy and reads shared state without locking any relay row. It calls
pg_blocking_pidsonce per waiting backend. The reviewer timed it at 0.37 ms with 20 waiters and 97 backends. The cost is 1 query/s fleet-wide (5 directors at 5 s).Linked Issue
N/A (internal relay observability)
Visual Proof
N/A: server-side metrics and logs, no UI.
Testing
pnpm lint(tsc, all cloud packages),pnpm testatcloud/on a fresh local Postgres 16: relay 114 files / 1013 tests, all other workspaces, and bothnode --testsets (189 + 681) pass.terraform fmt -checkpasses.New tests: per-site p99; drain-return service samples reported once and unclamped; 503 cause split and non-drain total; lane service fields omitted when empty; lock-waiter sums; app-level causes for a drain deferral, a sticky rejection and a capacity-exhausted placement; sticky slot timing including the drained host's verification hold; the drain return's regional lock recorded under its own site; drift logged once and only after commit; a real-Postgres test where 3 directors queue behind a cell-held
relay_cellsrow and the sample reports all 3 asdirector:relay_cells:cell. With the first-blocker query this test reports 2 of them as held by a director.I manually tested these changes locally
Automated tests added/updated, or explained why not below
Review
Operational notes for whoever ships this:
cloud/infra/terraform/relay-observability.tfis in the evidence-code set (relay-evidence-code-provenance.mjs). Merging it invalidates any in-flight or sealed monitor dry-run, so merge between rolls and run a fresh monitor afterwards.The log metrics need a targeted apply. A root plan rolls the fleet. The targets:
google_logging_metric.relay_snapshot["<key>"]forinventory_hold_ms_p99,rehome_target_row_hold_ms_p99,isolated_replacement_hold_ms_p99,isolated_replacement_holds,drain_return_service_ms_p50,drain_return_service_ms_p95,sticky_service_ms_p50,sticky_service_ms_p99,assign_non_drain_503s,db_lock_wait_samples,db_cell_row_lock_waiters_director,db_cell_row_lock_waiters_cell;google_logging_metric.relay_incident["reservation_drift"].These are additions only; existing metric instances are untouched. The fields are in the logs from the deploy on, with or without the apply.
Expected alert change (documented, not suppressed). Drain-return regional holds now feed the shared
cellInventoryHoldMsMax/P95andcellInventoryHoldMaxSite, as every other site already does.cellInventoryHoldMaxSite: isolated-replacementnames it, and it needs no action.cellInventoryLockUnavailable/cellInventoryLockTimeoutsalso now include that lock. Compare them across this deploy only with the site subtracted. The DECISION item-1 gate should readorca_relay_cloud_sql_lock_timeouts, which is unaffected.docs/relay-incident-monitor.mdunder "Relay lock contention alert policies".The inventory log line (
[orca-relay] regional rehome inventory …), which the enable workflow parses, is untouched.Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
No wire, schema, lock-order or placement-decision change. Cells pick up the drift log and hold-site fields with their next image; everything else is director-side. Rebased on
mainafter #25638 merged, so the drift log reports the post-lock units. Sessions from thecombinedrole (staging's single-service mode, where the sampler also runs) are labelledcombined, notother; they were never misread as director or cell.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)