Skip to content

perf(batch): retune batch worker HPA targets so pods follow real work - #24481

Merged
Git-on-my-level merged 6 commits into
mainfrom
lane/hpa-retune
Nov 3, 2026
Merged

Git-on-my-level merged 6 commits into
mainfrom
lane/hpa-retune

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

What changed and why

Raise batch-worker HPA defaults from ready 32 / flight-wall 0.5 to 40 / 0.6. The planscost lead accepts a staged apply at current (today's) volume, with production min 4 / max 16, one worker process, the deduplicated 10m adapter rule and stockout scale-down policy unchanged.

The full-volume model remains unqualified. At 40/0.6 it models mean 10.99 / max 16 replicas and seven hot minutes; the old 32/0.5 targets need more pods on average (11.79 / max 16), so the ceiling gap is not introduced by this retune. Seven hot minutes versus five before remain an expansion risk. Before streaming retirement doubles batch volume, the lead decides whether to raise maxReplicas above 16 as a separate capacity step: the replay needs 18 for zero hot minutes. This PR does not change maxReplicas.

The metric includes executor wait and host work after the exclusive GPU slot is acquired; pipeline depth 2 does not double-count slot wait. No env names or runtime bindings are added, so no flag registry or co-host env declaration changes are needed.

Rollback: restore autoscaling.targetQueuedUnitsPerWorker=32,autoscaling.targetChainBusyPerWorker=0.5, preserving the pinned image, other bindings and floor, or use a reviewed Helm rollback. The targets ship on with values as the kill switch. There is no admission-cohort expansion in this PR.

Lead apply steps:

  1. Capture current release values/manifest privately. Verify the previously reported live 6/12 drift; prepare min 4 / max 16 and targets 40/0.6, preserving the pinned image, bindings, 1500s drain and unrelated overrides. Keep one OD deployment, no Spot companion, processes=1 and profiling enabled.
  2. Verify the installed deduplicated 10m adapter rule, fresh samplers and both external metrics. backend/scripts/diff_prod_adapter.py compares separately captured live YAML; it does not fetch live state. No adapter redeploy is included.
  3. Confirm both timeliness Firestore indexes READY and all three pending timeliness rules active through the inventory/contract/provisioning steps in backend/charts/monitoring/batch-projection/README.md. Confirm fresh successful samples and an operator watching: agent-tier rules are Telegram-muted and alert-only. Confirm the current T3 observer, backtest and rollback authority; ADR-0001's T3 backstops are distinct from the custody/proven-loss-only automatic guard.
  4. Apply 40/0.6 in a staged apply at current volume. The lead watches timeliness and T3/hard-3 signals for one shed cycle plus 24h, along with throughput, latency, GPU duty, pull backoff and obligation age, and rolls back to 32/0.5 on regression. The shed model takes 60 minutes with fresh HPA history; allow roughly 90 minutes with retained high recommendations. Arm any retune guard only after a full new-state lookback.
  5. Before streaming retirement doubles batch volume, the lead decides whether to raise maxReplicas above 16 (18 needed in the replay for zero hot minutes). Keep the ceiling at 16 in this PR and qualify any later increase separately.

Open risks: neither the synthetic replay nor this local-only change establishes live latency, throughput, savings, alarm/index readiness or current release drift. Processes=2 still needs paired L4 throughput/memory qualification and a 24h contention/age soak. Partial stale pod filtering can undercount fleet demand even though a missing metric blocks scale-down.

Product invariants affected

none

How it was verified

Merged origin/main d673bb46deb51ae137411323e0ecf1b509fcc2f3 without rebasing or forcing. Final local HEAD: 0fb8b8c864bd0e7e119ddddfc497f13d08206143. No push, PR creation, deployment, kubectl, production/API calls or GCP tier was used.

  • /Users/dazheng/workspace/omi/bin/omi-heavy run -- bash -c 'cd backend && BACKEND_UNIT_TEST_FILE_LIST=/Volumes/Ephemeral/scratch/hpa-retune-tests.txt nice bash test.sh': PASS, 7 replay tests and 69 chart tests (76 total). The selector contains tests/unit/test_batch_pipeline_hpa_retune_replay.py and tests/unit/test_batch_pipeline_chart.py. All Helm render cases ran; the replay duration warning stayed below the enforced failure budget.
  • OMI_PR_BODY_FILE=PR_BODY.md /Users/dazheng/workspace/omi/bin/omi-heavy run -- nice make preflight: PASS, all 36 checks on the unchanged committed HEAD, including source closure for 19 images.
  • scripts/pr-preflight --metadata-only --pr-body-file PR_BODY.md: final PR metadata validation; no locked invariant IDs are required.
  • The supplied Luna HOLD review was read in full. P2's missing result assertions are implemented; P1's rollout scope follows the planscost lead's explicit current-volume decision.

Tests

Replay assertions lock current-volume mean 4.34 within +/-0.01 replicas, max 5 and zero hot minutes; the 3.7x full-volume model locks mean 10.99 within +/-0.01, max 16 and at most seven hot minutes. The baseline comparison, floor, shed-from-12 and sustained-step checks remain. Chart renders assert 40/0.6 and latent non-prod balanced targets 80/1.2.

The full-volume step models 5.06 minutes worst wait and 22 minutes catch-up; these are modeled results, not live acceptance. The arithmetic test retains the 18-worker headroom requirement without changing the chart's ceiling.

UI evidence

UI-Evidence: none -- infrastructure sizing, tests and operator documentation only.

Failure class (fixes)

Failure-Class: none

Scoped cleanups (optional)

Keep worker documentation and the pipeline note aligned with the lead's current-volume rollout decision. The Luna HOLD review's P2 assertion gap is closed; P1 is addressed by the lead's scoped rollout decision and explicit future capacity decision.

🤖 Generated with Claude Code

View guided diff Turn on auto-fix

Git-on-my-level and others added 6 commits November 3, 2026 12:45
Raise ready and flight-wall targets to 40/0.6, preserve measured replay safety checks, and document the scaled-load qualification limits and operator prerequisites.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Capture the planscost lead decision to apply 40/0.6 at current volume with timeliness and T3/hard-3 observation and a separate capacity decision before streaming retirement. Lock current- and full-volume replay means, peaks and hot-minute limits without changing maxReplicas.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Main dropped two query consumers without refreshing the committed inventory,
which fails test_committed_inventory_is_current on every pre-push.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

2 issues found across 7 files

Confidence score: 4/5

  • values.yaml implies 0.6 generally preserves headroom, but the replay shows full-volume hot minutes increasing from 5 to 7 and a 16-pod ceiling against an 18-pod need. Scope the headroom claim to reflect that limit.
  • 2026-11-03-batch-hpa-retune.md says 64/0.8 failed step-response checks, while the worker doc only reports a measured-load headroom failure. Cite the step-response result or remove that claim.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="backend/charts/batch-pipeline-worker/values.yaml">

<violation number="1" location="backend/charts/batch-pipeline-worker/values.yaml:174">
P3: This comment reads as if 0.6 keeps headroom in general. The PR's own replay shows full-volume hot minutes rising from 5 to 7 at 40/0.6, and the 16-pod ceiling cannot meet the 18-pod need. Add that limit here, scoped to today's volume, so a later volume increase does not inherit this default unexamined.</violation>
</file>

<file name="backend/docs/listen_pusher_pipeline/changes/2026-11-03-batch-hpa-retune.md">

<violation number="1" location="backend/docs/listen_pusher_pipeline/changes/2026-11-03-batch-hpa-retune.md:5">
P3: The note says 64/0.8 failed the step-response checks, but the worker doc reports only a measured-load headroom failure for that pair. Either cite the 64/0.8 step-response result or drop the claim.</violation>
</file>

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

# pipelineDepth 2 does not double-count the second lane's slot wait. Deep-only
# flights use worker_flight_deep and do not contribute to this chain signal.
# 40 damps brief ready-count bursts; ready remains the fast path for sustained
# steps. 0.6 preserves the measured replay headroom below 0.85 and the measured

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P3: This comment reads as if 0.6 keeps headroom in general. The PR's own replay shows full-volume hot minutes rising from 5 to 7 at 40/0.6, and the 16-pod ceiling cannot meet the 18-pod need. Add that limit here, scoped to today's volume, so a later volume increase does not inherit this default unexamined.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At backend/charts/batch-pipeline-worker/values.yaml, line 174:

<comment>This comment reads as if 0.6 keeps headroom in general. The PR's own replay shows full-volume hot minutes rising from 5 to 7 at 40/0.6, and the 16-pod ceiling cannot meet the 18-pod need. Add that limit here, scoped to today's volume, so a later volume increase does not inherit this default unexamined.</comment>

<file context>
@@ -163,25 +163,21 @@ autoscaling:
+  # pipelineDepth 2 does not double-count the second lane's slot wait. Deep-only
+  # flights use worker_flight_deep and do not contribute to this chain signal.
+  # 40 damps brief ready-count bursts; ready remains the fast path for sustained
+  # steps. 0.6 preserves the measured replay headroom below 0.85 and the measured
+  # per-worker wall ceiling (0.93). The scaled-load replay is a model, not a
+  # production throughput qualification; retain the prod floor 4 / ceiling 16.
</file context>
Suggested change
# steps. 0.6 preserves the measured replay headroom below 0.85 and the measured
# steps. 0.6 preserves the measured replay headroom below 0.85 at today's volume;
# at full volume the same pair shows more hot minutes than 32/0.5 and needs 18 pods,
# so do not raise streaming volume until maxReplicas is separately qualified.


The dedicated batch worker raises its ready-unit target from 32 to 40 and
flight-wall target from 0.5 to 0.6. The proposed 64/0.8 pair failed the existing
measured-load headroom and step-response checks; the corrected pair preserves

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P3: The note says 64/0.8 failed the step-response checks, but the worker doc reports only a measured-load headroom failure for that pair. Either cite the 64/0.8 step-response result or drop the claim.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At backend/docs/listen_pusher_pipeline/changes/2026-11-03-batch-hpa-retune.md, line 5:

<comment>The note says 64/0.8 failed the step-response checks, but the worker doc reports only a measured-load headroom failure for that pair. Either cite the 64/0.8 step-response result or drop the claim.</comment>

<file context>
@@ -0,0 +1,20 @@
+
+The dedicated batch worker raises its ready-unit target from 32 to 40 and
+flight-wall target from 0.5 to 0.6. The proposed 64/0.8 pair failed the existing
+measured-load headroom and step-response checks; the corrected pair preserves
+them. The production floor/ceiling remain 4/16, and worker processes remain 1.
+
</file context>

@Git-on-my-level
Git-on-my-level merged commit f4bbd80 into main Nov 3, 2026
65 checks passed
@Git-on-my-level
Git-on-my-level deleted the lane/hpa-retune branch November 3, 2026 08:32
Git-on-my-level added a commit that referenced this pull request Nov 3, 2026
## What changed and why

Revert the batch worker HPA retune from #24481 (40/0.6 back to 32/0.5,
plus its docs and replay tests). On main,
`tests/unit/test_batch_pipeline_hpa_max_replay.py::test_max_of_two_dominates_ready_only_when_backlog_binds_and_never_starves`
fails with the new targets: the replay finds 35 minutes where ready-only
sizing starves the backlog. The new targets were never applied to the
cluster.

The regenerated GMP query inventory that #24481 also carried stays as
is.

## Product invariants affected

None. It restores the chart values that are live today.

## How it was verified

On origin/main e24fa48, `test_batch_pipeline_hpa_max_replay.py` fails.
With this revert it passes, as do `test_batch_pipeline_chart.py`,
`test_batch_pipeline_hpa_retune_replay.py` and
`test_monitoring_gmp_shadow.py`.

## Tests

`BACKEND_UNIT_TEST_FILE_LIST=<those 4 files> bash test.sh`: 1, 4, 35 and
69 passed.

## UI evidence

None (no UI change).

## Failure class (fixes)

Failure-Class: none

🤖 Generated with [Claude Code](https://claude.com/claude-code)


<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/BasedHardware/omi/pull/24493?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="View guided diff"
src="https://www.cubic.dev/buttons/review-in-cubic-light.svg"></picture></a>
<a
href="https://www.cubic.dev/action/auto-fix/pr/BasedHardware/omi/24493?returnTo=https%3A%2F%2Fgithub.com%2FBasedHardware%2Fomi%2Fpull%2F24493&source=description"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"><img
alt="Turn on auto-fix"
src="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->
Git-on-my-level added a commit that referenced this pull request Nov 3, 2026
…arvation replay (#24499)

## What changed and why

Replace reverted #24481 (40/0.6; 35 starved minutes in the existing
max-of-two
replay, reverted by #24493 before cluster apply) with backlog target
**41** and
chain-wall occupancy target **0.56**. Preserve production min 4/max 16,
worker
processes 1, the adapter, and stockout-aware downscale 1800s / one pod
per 600s.
Production's existing enabled HPA consumes the new defaults; restoring
32/0.5
is the values kill switch. No new env name or flag registry entry is
required.

Local HEAD: `e419fccd85ef19b6c3db51d3bd893215e06f402d` on
`lane/hpa-retune-v2`,
from `origin/main` at `9b6a20abbb9c01de3e936ca33b49546dfe171b9a`.

The offline search evaluated **2,918 distinct configurations**, with 751
passing
its unchanged-model acceptance conditions. This is a bounded grid, not a
global
continuous optimum. Full details and the reproducer are in
`backend/docs/batch-pipeline-hpa-frontier.md`.

| Targets / window | Current mean/max; hot min | Synthetic 3.7x full
mean/max; hot min | Older measured24h mean/max; starved min |
|---|---|---|---|
|32/0.5 /1800s baseline|4.878/6;0|11.790/16;5|7.198/16;0|
|40/0.6 /1800s reverted|4.343/5;0|10.994/16;7|6.306/16;35|
|41/0.56 /60s numerical minimum|4.050/5;0|10.326/16;9|5.552/15;0|
|41/0.555 /780s sensitivity|4.116/5;0|10.829/16;6|6.006/15;0|
|41/0.56 /1320s sensitivity|4.166/5;0|11.254/16;6|6.211/15;0|
|**41/0.56 /1800s chosen**|**4.343/5;0**|**11.459/16;6**|**6.371/15;0**|

The chosen 0.56 target is exactly the older replay's measured capacity
boundary,
with no modeled headroom.

The chosen setting is the lowest current mean found with the existing
stockout
window/policy and the lead's prior full-model hot budget retained, with
ties
broken by full-model mean then older 24h mean. At 0.56 occupancy, ready
42 fails
the unchanged step wait bound; 0.561 already starves in the older 24h
replay.
Current step wait/catch-up: 3.355/10 min; synthetic full step: 4.302/20
min.

**Plan corrections and limits:** `worker_flight` is serialized chain
wall time,
including executor wait and host work, rather than ASR/GPU duty. The
pump takes
its GPU slot before timing, so pipelineDepth 2 does not double-count
slot wait.
The separate historical 24h fixture is not observed full-volume
qualification.
The 3.7x full scenario is synthetic. Zero-hot full-volume operation
cannot fit
max 16 at its 15.0/s peak: 18 workers are necessary at the 0.85 hot line
(not proof
that a cap raise alone suffices). The older max replay also downscales
per 60s
despite its stated 600s policy and omits current-sized recommendations
from the
window. Its unchanged assertions remain required, but do not qualify
shorter
stockout protection. Lower-window and faster-policy candidates are
reported,
not shipped. No existing replay file or assertion was changed or
loosened.

## Product invariants affected

none (confirmed by `scripts/pr-preflight --lane local --suggest`).

## How it was verified

Offline numeric search:

```bash
backend/.venv/bin/python backend/scripts/batch_pipeline_hpa_frontier.py --grid all --output /Volumes/Ephemeral/scratch/hpa-retune-v2-frontier.json
```

All selected backend tests passed: 112 tests, zero failures/skips, via
the exact
harness command below. The two existing replay files have no diff
against
origin/main. Full preflight passed all 36 checks in 979.86 seconds at
`e419fccd85ef19b6c3db51d3bd893215e06f402d`, with HEAD held stable. Luna
review
passed after clarifying the rollback floor. No production, cluster, or
GCP
access was used.

Lead apply steps (staged at **current volume only**):

1. Confirm actual current batch volume; hold the apply if already at
full
volume. Before streaming retirement doubles batch volume, decide whether
to
   qualify `maxReplicas` above 16. This PR does not change that ceiling.
2. Confirm both composite Firestore indexes READY and the pending
batch-timeliness
2h/no-terminal, stale-sample and scan-blind alarms applied/observing per
the
projection runbook. Confirm separate T3/hard-3 observer/response
authority:
in-cluster custody/proven-loss guards do not automatically roll back
latency.
3. Privately capture live Helm values/manifest/image and the adapter
rule.
Reconcile any min 6/max 12 overrides against the tree's min 4/max 16
ruling.
Render the merged chart with production values, remove stale target
overrides,
and inspect 41/0.56, 1800s, 1/600s, OD placement, profiling-on and 1500s
drain.
Preserve the image and all runtime bindings; perform the reviewed Helm
upgrade. No adapter redeploy is needed;
`backend/scripts/diff_prod_adapter.py`
   compares separately captured live rules, it does not fetch them.
4. Watch one complete shed cycle plus 24h: useful completed audio per
pod-hour,
throughput, admission-to-terminal timeliness/pending age, pull backoff
and
T3/hard-3 signals. The fresh-history test sheds 12 to 5 within 60 min;
retained
live recommendations can delay the cycle. Roll back on regression.
Respect
ADR-0001's obligation>900s/job>1800s cohort floors and hard-3 backstops:
p95 >30 min sustained 30 min; admitted unit 2h without terminal state;
wedged >5% for 30 min with >=20 admitted. Confirm current operator
authority before
   use because in-cluster wedge/latency signals are alert-only.

Rollback: use the same reviewed Helm upgrade with
`--set autoscaling.targetQueuedUnitsPerWorker=32 --set-string
autoscaling.targetChainBusyPerWorker=0.5`,
keeping min 4/max 16, window 1800, 1/600s, profiling and the pinned
image; or restore
the captured known-good Helm revision after checking its values/image.
No
adapter change is needed. Nothing was pushed, deployed, or applied here.

## Tests

The list contains every `test_batch_pipeline_*hpa*` /
`test_batch_pipeline_*chart*`
file plus `test_monitoring_gmp_shadow.py` (5 files):

```bash
cd backend && BACKEND_UNIT_TEST_FILE_LIST=/Volumes/Ephemeral/scratch/hpa-retune-v2-tests.txt nice bash test.sh
```

Executed through the workspace heavy runner. Results: chart 69, max
replay 1,
retune replay 4, new capacity replay 3, GMP shadow 35: **112 passed**.
The existing
max replay is the regression that would have caught #24481. The new
capacity
replay pins mean/max/current hot minutes, retains full hot <=7, and
bounds the
full-step wait/catch-up. The chart's exact assertions change only to
reflect
41/0.56 and latent doubled targets 82/1.12; its 1800s and 1/600s
assertions remain.

Required full check:

```bash
OMI_PR_BODY_FILE=$PWD/PR_BODY.md nice make preflight
```

**PASS: 36/36 checks in 979.86 seconds**, exit 0. Executed through the
workspace heavy runner with committed HEAD held stable. Final PR
metadata
validation is recorded separately after updating this untracked body.

## UI evidence

UI-Evidence: none -- HPA configuration, replay tooling/tests, and
operator docs.

## Failure class (fixes)

Failure-Class: none

## Scoped cleanups (optional)

Correct HPA metric comments and qualification claims; retain worker
processes 1
until the g2-standard-8 L4 throughput, cgroup-memory and 24h soak gate
is met.
No unrelated runtime, adapter, environment registry, capacity or
production edit.

🤖 Generated with [Claude Code](https://claude.com/claude-code)


<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/BasedHardware/omi/pull/24499?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="View guided diff"
src="https://www.cubic.dev/buttons/review-in-cubic-light.svg"></picture></a>
<a
href="https://www.cubic.dev/action/auto-fix/pr/BasedHardware/omi/24499?returnTo=https%3A%2F%2Fgithub.com%2FBasedHardware%2Fomi%2Fpull%2F24499&source=description"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"><img
alt="Turn on auto-fix"
src="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->
Dimank92 pushed a commit to Dimank92/omi that referenced this pull request Nov 3, 2026
The 40/0.6 targets fail test_batch_pipeline_hpa_max_replay on main: the
max-of-two replay finds 35 minutes where ready-only sizing starves the
backlog. The regenerated GMP inventory from BasedHardware#24481 stays.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Git-on-my-level added a commit that referenced this pull request Nov 8, 2026
…4943)

<!-- claude-projects-attribution: {"github_login":"Git-on-my-level"} -->
_Requested by **David**_

## What changes

Retro P6 adds `batch-pipeline-tuning-disclosure` to the shared manifest
in both local and CI lanes. Numeric capacity assignments and concurrency
environment defaults in the batch config, pipeline source, worker/pusher
charts, and `backend/utils/pusher_*.py` require numeric disclosures in
one PR-body section naming a matched knob: before/after, from/to, or a
nearby numeric arrow (`6 -> 4` or `6 → 4`). A knob with no removed
numeric assignment may instead use `new: <num>` or `initial <num>`.
Newly added literals directly assigned or compared to state-like names,
or passed as state/status/phase/disposition/outcome/reason kwargs, must
name an exit, terminal, dead-letter, re-entry, clear, or recovery path;
literals already anywhere in the merge-base tree are exempt.
`Numbers-waived: <reason>` and `State-exit-waived: <reason>` waive their
respective requirement and echo the reason.

HTML comments, fenced code blocks and inline code are stripped before
validating disclosures, state exits or waivers. Logging arguments and
literals merely near state-related words do not count as new states.

The same single manifest entry runs hermetic regression tests before
checking the body. Only changed lines trigger detection; flags,
comment-only lines, and unchanged context do not count. The detector
deliberately misses indirect/formula tuning: this is a disclosure
ratchet.

David approved this exact manifest and script/test change on
**2026-11-08 at 16:13Z**. No workflow file changed. The change is
limited to `.github/checks-manifest.yaml` and the two P6 files under
`.github/scripts/`.

## Why this check

The retro's #24481 HPA retune is the design precedent; the sweep below
exercises HPA bounds changes such as #24742. Its from/to wording is
supported, but its knob names are only in inline code, which the
requested prose-only rule excludes. Existing product-invariant and
failure-class checks validate different author declarations; neither
detects capacity knobs or new lifecycle literals. This check reuses the
manifest's existing diff/metadata plumbing without changing workflow
wiring or inventing another PR orchestration layer.

## Product invariants affected

none

Failure-Class: none

## Merged-PR false-positive sweep (2026-11-08T20:01:42.025036+00:00)

**200 merged PRs screened; 69 trigger-touching diffs checked; 16 would
fail and 53 would pass.** 14 failing PRs require numeric disclosures; 2
require state declarations (3 state literals total). The prior sweep
reported 18 failures; the refreshed capped corpus also advances its
merge cutoff.

Method: `gh pr list --repo BasedHardware/omi --state merged --search
'merged:>=2026-10-09' --limit 200 --json
number,title,body,mergeCommit,mergedAt,files`, followed by `gh pr diff
<number> --repo BasedHardware/omi` for matching paths. Full paginated
file lists were checked whenever the initial listing reached 100 files.
Each diff was checked against its PR body and reconstructed PR
merge-base: merge-parent merge-base for normal merges;
PR-head/merge-parent merge-base cross-checked with the recorded PR base
for one-parent merges. State candidates use a whole-tree lookup at that
merge-base.

The capped corpus spans **2026-11-04T12:58:21Z through
2026-11-08T19:20:24Z**: a sample within the requested 30-day window, not
full-month coverage. No production reads or GCP tier were used.

The stricter state association passes #24743 (the prior proximity-only
candidate). #24733 and #24729 now pass the expanded numeric wording. The
required inline-code stripping means #24742 still fails: its from/to
numbers are supported, but its matched knob names appear only in inline
code. #24884 and #24725 also fail when their state names are excluded as
inline code. These are explicit effects of the requested prose-only
policy, not claims that those historical PRs omitted all semantic
explanation.

Sample of would-fail PRs:

| PR | Detected change | Missing disclosure |
| --- | --- | --- |
| [#24889](#24889) | Tuning:
`max_count` | Initial/new numeric value naming a matched knob in prose,
before/after disclosure, or Numbers-waived |
| [#24884](#24884) | New state:
`record_barrier_aged` | State literal and exit declaration in prose, or
State-exit-waived (inline code is excluded) |
| [#24799](#24799) | Tuning:
`MIN_STORAGE_PCM_BUDGET_MB` | Initial/new numeric value naming a matched
knob in prose, before/after disclosure, or Numbers-waived |
| [#24742](#24742) | Tuning:
`maxReplicas`, `minReplicas` | Matched knob name in prose alongside the
existing from/to numbers |
| [#24736](#24736) | Tuning:
`PAGE_SIZE` | Initial/new numeric value naming a matched knob in prose,
before/after disclosure, or Numbers-waived |
| [#24725](#24725) | New state:
`marker_retry_overflow`, `marker_write_failed` | State literal and exit
declaration in prose, or State-exit-waived (inline code is excluded) |
| [#24716](#24716) | Tuning:
`limit` | Initial/new numeric value naming a matched knob in prose,
before/after disclosure, or Numbers-waived |
| [#24712](#24712) | Tuning:
`MAX_OWNER_DRAINS` | Numeric before/after, from/to or arrow disclosure
naming a matched knob in prose, or Numbers-waived |
| [#24710](#24710) | Tuning:
`MAX_DELAYED_OWNERS` | Initial/new numeric value naming a matched knob
in prose, before/after disclosure, or Numbers-waived |
| [#24707](#24707) | Tuning:
`MAX_HEAD_REQUEUES` | Numeric before/after, from/to or arrow disclosure
naming a matched knob in prose, or Numbers-waived |

All would-fail PRs: #24889, #24884, #24799, #24742, #24736, #24725,
#24716, #24712, #24710, #24707, #24703, #24697, #24689, #24680, #24643,
#24601.

## Validation

- **26 focused regression tests passed** on head
`1788dd10315e7a709dcaf6150838907638386ad0`, covering fenced/inline
examples, direct state association (including the logging regression),
from/to and arrows, and first-time versus changed numeric values.
- **`make preflight` passed all 14 selected local checks**, including 26
P6 tests and 78 manifest-contract tests, with `OMI_PR_BODY_FILE` and
`BACKEND_UNIT_FILE_BUDGET_SECONDS=900`. The normal bounded pre-push gate
also passed all 14 checks using the final body and the same budget, with
`GOOGLE_APPLICATION_CREDENTIALS` and every `CLOUDSDK_*` variable
removed.
- `scripts/pr-preflight --suggest` required no invariant citations;
`Failure-Class: none` is declared above.
- No workflow file changed; only the manifest and two P6 scripts differ
from the merge base.
- No production reads or GCP tier used. Full-month coverage beyond the
200-PR cap, indirect/formula tuning and product/runtime behavior are not
established by this check.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
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