Skip to content

tests: refresh People writer inventory after purge_user_subtree change (SCA-4276) - #26289

Merged
Git-on-my-level merged 1 commit into
mainfrom
agent/people-writer-inventory-1125
Nov 25, 2026
Merged

Git-on-my-level merged 1 commit into
mainfrom
agent/people-writer-inventory-1125

Conversation

@Git-on-my-level

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

Copy link
Copy Markdown
Member

Root cause

#26259 (0b8fb21) added a customer data-plane sweep for late speaker-evidence children to purge_user_subtree. The People generation inventory hashes the function's full AST because the function calls generation_ref. The existing fingerprint was still the exact digest of the pre-#26259 body. Running the changed-file selector with the paths from 0b8fb21 omitted test_people_generation_inventory.py. The selector returns zero backend test files for this JSON-only refresh, so the focused commands below explicitly include the People inventory guard.

Refresh the single purge_user_subtree fingerprint in backend/docs/people-generation-writers.json. The People subtree deletion still batches People rows with a same-owner generation bump, then drops the generation head after deleting those rows. The speaker-evidence writer store_evidence.persist reads the account deletion marker and the parent conversation in the write transaction. The account purge sweeps its speaker_evidence child collection on the same data plane, including when a parent is already missing on retry. The audit found no writer without an erasure path.

Verification

On rebased main (f719b0564036), bash backend/test.sh test_people_generation_inventory.py reported 1 failure and 4 passes:

tests/unit/test_people_generation_inventory.py::test_current_people_scopes_match_the_reviewed_writer_enumeration
AssertionError: People writer scope needs generation re-audit: {'new': [], 'removed': [], 'changed': ['backend/database/user_data_deletion.py:purge_user_subtree']}

The separate lifecycle inventory and its direct and transitive test consumers passed on main (2,502 passed, 1 skipped, 86 expected failures). After refreshing the People fingerprint, the following run reported 3,278 passed, 1 skipped, and 86 expected failures, including all 5 People inventory cases:

timeout -k 10s 300s /Users/david/workspace/omi-workspace/bin/omi-heavy run -- \
  env REDIS_DB_HOST=127.0.0.1 REDIS_DB_PORT=1 OMI_ENV_STAGE=offline \
  bash backend/test.sh \
    test_people_generation_inventory.py test_lifecycle_state_table_writers.py \
    test_batch_census_registry.py test_lifecycle_properties_wiring.py test_summary_refusal_writers.py \
    test_backfill_clear_refused_summary_due.py test_lifecycle_invariants.py test_batch_held_contract.py \
    test_fsr_people_generation.py test_speaker_evidence_storage.py test_retired_list_projection.py \
    test_batch_pipeline_privacy.py test_batch_account_authority_writers.py test_held_content_deletion.py \
    test_memory_retraction_source_index.py test_action_item_port_fence.py

With an owned loopback Firestore emulator, ran the following from backend/ inside timeout -k 10s 180s /Users/david/workspace/omi-workspace/bin/omi-heavy run --:

  • PYTHONPATH=. .venv/bin/python scripts/fsr_people_generation_emulator_test.py passed all 31 People generation checks.
  • BACKEND_PYTEST_MARK_EXPR=integration bash test.sh tests/integration/test_speaker_evidence_erasure.py passed all 3 cases.

make preflight passed 16 checks. scripts/pr-preflight --pr-body-file /tmp/sca-4276-pr.md passed. Both ran through bounded omi-heavy invocations.

Refs SCA-4276

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-25T11:40:25.053061Z d1dcb40 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Git-on-my-level

Copy link
Copy Markdown
Member Author

SHIP at d1dcb40109ec08729b0547cf56e76825fa96231d (Shipping, independent of the implementer).

The diff is one line in backend/docs/people-generation-writers.json: the purge_user_subtree fingerprint changes from 3fad1f8b… to 523f8f5a…. I checked it against the change that caused the drift, 0b8fb210f0 (#26259). In purge_user_subtree, that commit renamed cohort_client to data_plane and added a late-evidence sweep, which deletes users/{uid}/conversations/*/speaker_evidence on the data-plane client after the parent delete. Both are erasure deletes. Neither adds a People generation writer, so a fingerprint refresh is the correct repair and no erasure path is left uncovered. Coverage is not loosened: the inventory test still pins the function body.

Implementer's run (rebased main): the People inventory failed on that fingerprint before the change and passes after it; the focused suite reports 3,278 passed, 1 skipped and 86 expected failures; all 34 loopback Firestore checks pass.

@Git-on-my-level
Git-on-my-level merged commit 9850a2b into main Nov 25, 2026
71 checks passed
@Git-on-my-level
Git-on-my-level deleted the agent/people-writer-inventory-1125 branch November 25, 2026 13:08
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