Skip to content

test: free_tier_local_processing_enabled fixtures take uid (fixes main, follows #14513) - #14528

Merged
Git-on-my-level merged 1 commit into
BasedHardware:mainfrom
Git-on-my-level:fix/free-tier-entrypoint-fixture-uid
Sep 18, 2026
Merged

Git-on-my-level merged 1 commit into
BasedHardware:mainfrom
Git-on-my-level:fix/free-tier-entrypoint-fixture-uid

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Sep 18, 2026 •

Copy link
Copy Markdown
Member

Failure-Class

Failure-Class: new

Summary

Fixes main: #14513 changed free_tier_local_processing_enabled to take (uid) (process_conversation.py L2629) but did not update the test fixtures in test_free_tier_entrypoint_matrix.py, which still monkeypatch it with 0-arg lambdas. Every entrypoint-matrix case fails with TypeError: <lambda>() takes 0 positional arguments but 1 was given — 174 failures, red Backend unit shard 4/4 on every open PR (verified on CI runs 35320292707 and its rerun, and reproduced on a fresh origin/main checkout).

Change

Seven monkeypatch sites: lambda: X → lambda *_: X (arg-tolerant, preserves each site's flag intent). No production code touched.

Verification

  • test_free_tier_entrypoint_matrix.py: 174 passed (was 174 failed on fresh main)
  • test_frame_request_agent_tool.py: 13 passed (was cascade-failing in the same shard)
  • Both files together: 187 passed

Product invariants affected

  • INV-DATA-1

Preserved: test-only change; no production behavior, routing, or project binding touched.

Review in cubic

@Git-on-my-level
Git-on-my-level merged commit 050f928 into BasedHardware:main Sep 18, 2026
41 checks passed
Git-on-my-level added a commit that referenced this pull request Sep 18, 2026
…de to generated client (#14533)

## Failure-Class
Failure-Class: FC-fixture-mock-signature-drift

## Summary
Round-2 completion of the #14513 fixture sweep (first round: #14528, one
file). Remaining 0-arg lambda mocks of
`free_tier_local_processing_enabled(uid)` in
`test_client_processing_finalize.py` (1 site, via `_enable_flag`) and
`test_client_processing_acceptance.py` (2 sites) still raised
`TypeError: <lambda>() takes 0 positional arguments but 1 was given` at
process_conversation.py:2629 — the red `Backend unit shard 3/4` on every
open PR.

Also fixes the schema-inventory ratchet break: #14514 added
`createIntroductionGoal` (app/lib/backend/http/api/goals.dart) decoding
its response via raw `Goal.fromJson(json.decode(...))`; migrated to the
generated-backed decode
(`Goal.fromGenerated(wire.GeneratedGoalResponse.fromJson(_goalJsonWithDefaults(...)))`),
mirroring the adjacent `createGoal` in the same file —
`test_app_client_schema_inventory.py::test_inventory_openapi_route_response_decode_migration_complete`
is green again.

## Change
- 3 lambda sites: `lambda: X` → `lambda *_: X` (same pattern as #14528;
preserves each site's flag intent)
- 1 Dart decode site migrated to the generated client path; no behavior
change (same payload, same model)

## Verification
- All previously red files green from `backend/`:
test_client_processing_finalize, test_client_processing_acceptance,
test_free_tier_entrypoint_matrix, test_app_client_schema_inventory,
test_conversation_discard_parsing/jit_processing/model_split/recordings_purge,
test_frame_request_agent_tool — 400+ passed, 0 failed
- test_frame_request_agent_tool + test_gateway_anthropic_client +
test_geocode_keyless_no_egress +
test_get_app_messages_visible_pagination + test_goal_extraction_batch
also green standalone

## Product invariants affected

- INV-DATA-1

Preserved: the Dart change keeps the identical wire model and endpoint
(`POST /v1/goals/canonical`); it only routes the response through the
generated schema decoder mandated by the inventory contract. Test
changes are mock-arity only.


<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/BasedHardware/omi/pull/14533?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="Review in cubic"
src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->
Git-on-my-level added a commit that referenced this pull request Sep 18, 2026
…t tripwire (round 3) (#14537)

## Failure-Class
Failure-Class: FC-fixture-mock-signature-drift

## Summary
Round-3 completion of the #14513/#14485 CI-green restoration (rounds
1–2: #14528, #14533). Three remaining main-wide shard-2 failures:

1. `test_geocoding_cache.py` (13 failures): #14485's keyless-geocode
guard returns `None` before the API call when `GOOGLE_MAPS_API_KEY` is
unset, so every API-path test now exercises a dead path. Added an
autouse fixture setting a dummy key; the explicit no-key cache-hit test
keeps its own `clear=True` override, preserving its intent.
2.
`test_free_tier_cohort.py::test_coordinator_sites_still_read_the_flag_without_a_uid`:
the test documented its own deletion condition ("if the calls now carry
uid, delete it and the gap note together") — #14513 met it (both call
sites now pass `uid`). Deleted per its docstring, with the now-unused
`re` import.
3. `test_gateway_resilience.py`: passes standalone (3/3) —
shard-pollution follower, expected green once the real failures clear.

## Verification
- All three files: 74 passed from `backend/`
- Full sweep of every previously red file this program touched: green

## Product invariants affected

- INV-DATA-1

Preserved: test-only changes plus one autouse test fixture; no
production behavior, routing, or project binding touched.


<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/BasedHardware/omi/pull/14537?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="Review in cubic"
src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->
Git-on-my-level added a commit that referenced this pull request Sep 18, 2026
…ptance (slice-2 root-cause fix) (#14564)

## Failure-Class
Failure-Class: FC-fixture-mock-signature-drift

## Summary
Root-cause fix for the slice-2 WIF candidate-gate failures. The
#14525/#14557 diagnostics finally named it: **`stage=mint, rc=1`** —
`gcloud auth print-identity-token` cannot mint under a WIF-federated
session because the federated credential holds **no private key** for
the self-signing mint (bake 35340203517 artifact; manual
impersonation-based replays succeeded, which is why every manual control
passed while CI failed).

## Fix
- `run_dev_candidate_acceptance.py`: `mint_cloud_run_identity_token`
gains `--impersonate-service-account` support; new `--mint-impersonate`
CLI flag (env fallback `CLOUD_RUN_IDENTITY_MINT_IMPERSONATE`).
Impersonated mint routes through the IAM `signJwt` API, which the
federated credential CAN call when it holds
`roles/iam.serviceAccountTokenCreator` on the target SA (already
granted: audit-verified 2026-09-16, KB evidence
2026-09-18-iam-grants-and-rows-2-3).
- `deploy-backend-stack/action.yml`: passes `--mint-impersonate ${{
inputs.workload_identity_service_account }}` only when WIF auth is in
play — JSON lane behavior byte-identical.

## Test plan
- Unit suite 9/9 (two fixtures updated for the new kwarg — the very
failure class registered in #14528)
- Behavioral proof: impersonation flag flows into the gcloud command
- JSON lane: flag absent → command unchanged → deploy lanes on
`gcp_backend.yml`/desktop unaffected
- Success signature on the next WIF bake: `Candidate acceptance PASS`
×4, then traffic shift

## Product invariants affected

- INV-DATA-1

Preserved: diagnostics/authentication-only; no routing authority,
endpoint, or project-binding change; JSON lanes untouched.


<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/BasedHardware/omi/pull/14564?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="Review in cubic"
src="https://www.cubic.dev/buttons/review-in-cubic-dark.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