Skip to content

deploy(listen): re-pin the reviewed evidence scripts tree (SCA-4091) - #26732

Merged
Git-on-my-level merged 2 commits into
mainfrom
lane/sca4091-scripts-repin
Nov 29, 2026
Merged

Git-on-my-level merged 2 commits into
mainfrom
lane/sca4091-scripts-repin

Conversation

@Git-on-my-level

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

Copy link
Copy Markdown
Member

What changed and why

Re-pin reviewed_scripts_tree in .github/workflows/gcp_backend_listen_helm.yml from 686d4a44e3041439050d65e39c2aca271f562386 to 3562810cd1cfd3a0ca13f71ae0f2bdcb630f781e, the .github/scripts tree of origin/main at 54b8f17e013c84aedddc805e6eac3761afdb7c65 (SCA-4091, SCA-5350).

The step Verify staged evidence scripts before Python runs for image-only evidence requests and refuses unless HEAD:.github/scripts equals the pinned tree. The pin was last set in 06bd2aaf3c4 (2026-11-27). 24 commits have changed .github/scripts on main since then, so the guard now refuses every image-only evidence request, including the one #26730 (image_reference) needs. This PR changes that one line and nothing under .github/scripts.

What the pin now vouches for

The pin covers exactly this diff, git diff --stat 686d4a44e3041439050d65e39c2aca271f562386 3562810cd1cfd3a0ca13f71ae0f2bdcb630f781e (paths relative to .github/scripts):

 check-deployment-concurrency.py              |  88 +++++++++++++++-
 check-mobile-changelog.py                    |   4 +-
 check_firestore_collection_budget.py         |   9 +-
 check_ui_evidence.py                         |  82 ++++++++++++---
 dead_code/backend.allowlist.json             |  20 ----
 failure_class_guard_ratchet_allowlist.json   |   8 +-
 listen_overlay_evidence.py                   |  18 +++-
 notification_dispatch_boundary_baseline.json |   2 +-
 pusher_canary_inverse.py                     |   8 +-
 pusher_image_only.py                         |  68 +++++++-----
 pusher_image_only_detect.py                  |   2 +-
 pusher_image_rehearsal.py                    |  33 ++++--
 test_check_firestore_collection_budget.py    |   3 +-
 test_check_ui_evidence.py                    |  84 ++++++++++++++-
 test_mobile_changelog.py                     |  10 ++
 test_pusher_image_rehearsal.py               |  53 +++++++---
 test_worker_image_only.py                    |  34 +++---
 tests/ui-author-approval.test.cjs            | 149 ++++++++++++++++++++++++++-
 ui-author-approval.cjs                       |  78 +++++++++++---
 19 files changed, 625 insertions(+), 128 deletions(-)

Executed by the Listen evidence and image-only route. The route runs listen_runtime.py reconstruct and then listen_overlay_evidence.py (job, apply-image-only, verify-image-only), which imports listen_runtime and listen_helm_env_overrides. Of those, only one file changed:

  • listen_overlay_evidence.py (+17/-1, deploy(listen): take the Listen image by digest (image_reference) (SCA-4091) #26730). produce() leaves the new image_reference dispatch input out of the bound-inputs equality and instead requires it to be blank or exactly the image the evidence request names (dispatch_binding otherwise). A new image_pin() accepts only gcr.io/<deploy project>/backend:<7-40 hex> or @sha256:<64 hex> and returns the tag or digest. A new --image-reference argument is accepted only in argv mode and only without --image-tag; it feeds the same helm_args() the deploy already used. listen_runtime.py, listen_helm_env_overrides.py and listen_private_env.py are unchanged.

Not executed by the Listen route (in the tree, so covered by the hash):

The pin goes stale again whenever a later merge changes any file under .github/scripts. If main's tree moves before this merges, the PR is rebased and re-pinned, and only the new hunks are reviewed.

Product invariants affected

INV-DATA-1: preserves the existing authority. The change edits one constant in a guard step of gcp_backend_listen_helm.yml; it changes no routing, service ownership, deploy target or admission rule.

How it was verified

  • git rev-parse origin/main:.github/scripts is 3562810cd1cfd3a0ca13f71ae0f2bdcb630f781e at 54b8f17e013c, and HEAD:.github/scripts on this branch equals the pinned value.
  • backend/tests/unit/test_listen_overlay_evidence.py: 121 passed. It includes test_evidence_bootstrap_refuses_added_script_before_python, which runs this guard step's own script against a fixture tree.
  • backend/tests/unit/test_listen_overlay_workflow.py: 40 passed.
  • backend/tests/unit/test_listen_runtime_workflow.py: 2 passed.
  • backend/tests/unit/test_workflow_contracts.py: 141 passed.
  • .github/scripts/test_listen_control_pin.py: 1 passed.

Not verified here: a real image-only evidence run. No workflow was dispatched; the guard can only pass on main after this merges.

Tests

No test change. No test asserts the pinned hash; the guard's behaviour is covered by test_evidence_bootstrap_refuses_added_script_before_python, which substitutes its own fixture tree hash.

UI evidence

UI-Evidence: none -- workflow constant only

Failure class (fixes)

Failure-Class: none

🤖 Generated with Claude Code

View guided diff Turn on auto-fix

Git-on-my-level and others added 2 commits November 29, 2026 15:33
The image-only evidence guard compares HEAD:.github/scripts with a reviewed
tree hash before any Python runs. main's .github/scripts moved from
686d4a4 to
3562810 (19 files, +625/-128), so the guard
refuses every image-only evidence request. Pin the current tree.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@Git-on-my-level
Git-on-my-level merged commit 41996d0 into main Nov 29, 2026
63 checks passed
@Git-on-my-level
Git-on-my-level deleted the lane/sca4091-scripts-repin branch November 29, 2026 22:00
Git-on-my-level added a commit that referenced this pull request Dec 1, 2026
…26839)

## What changed and why

Update the Listen evidence workflow's `reviewed_scripts_tree` from
`fc54ba6c0c1a407b709acf9cf964c4868210cc93` to
`8f7869ce5f401d53040abdac398c2d810ca81f26`, the `.github/scripts` tree
of remote `main` at `2b0a79b82c86f3feeb03923b08fc4d08c2da0c60`. The
stale pin fails the Listen workflow contract test and blocks staged
evidence before Python runs. This one-line re-pin follows
[#26732](#26732) and tracks
SCA-5315.

The initial tree delta to `912027199fa9b50413b9b4a2977e97cfd40a4348`
added `worker_shadow_percent_only.py` and
`test_worker_shadow_percent_only.py`. Both Git blobs match the
independently reviewed
[#26825](#26825) commit
`65dc10b126e7d808bb45b9b3afb5716a70e510e6`. These additions are outside
the Listen evidence execution path.

Since that tree,
[#26835](#26835) changed only
the `BASELINE` image digest in `pusher_image_only.py` and
`pusher_image_only_detect.py` under `.github/scripts`, from `fd5fb969…`
to `b2e9996b…`. Both Pusher script blobs on current `main` match #26835
commit `8b0142795b86c56ea34d5cb96b793540851a4340`. The Pusher scripts
are outside the Listen evidence execution path.

## Product invariants affected

- INV-DATA-1. The workflow continues to enforce the exact reviewed
scripts tree before running staged evidence code.

## How it was verified

- Queried remote `refs/heads/main`, resolved its `.github/scripts` tree,
and compared the old-to-new trees and both added blobs against the
reviewed head.
- On Apple M1 Max, the named Listen regression test failed on the old
pin. All 41 tests in
`backend/tests/unit/test_listen_overlay_workflow.py` passed with the
re-pin.
- `actionlint .github/workflows/gcp_backend_listen_helm.yml` and `git
diff --check` passed.
- Repository preflight and PR metadata validation passed.

## Tests

The existing
`test_evidence_uses_control_sha_and_exact_candidate_not_deploy_for_evidence`
covers the pin against the checkout's scripts tree. Verification used
local tests without dispatching a workflow.

## UI evidence

UI-Evidence: none -- workflow constant only

## Failure class (fixes)

Failure-Class: none


<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/BasedHardware/omi/pull/26839?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/26839?returnTo=https%3A%2F%2Fgithub.com%2FBasedHardware%2Fomi%2Fpull%2F26839&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. -->
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