Skip to content

test(reprocess): drive the explicit-app failure through the real processor - #24930

Merged
Git-on-my-level merged 1 commit into
BasedHardware:mainfrom
Git-on-my-level:reprocess-visibility-test-explicit-app
Nov 8, 2026
Merged

Git-on-my-level merged 1 commit into
BasedHardware:mainfrom
Git-on-my-level:reprocess-visibility-test-explicit-app

Conversation

@Git-on-my-level

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

Copy link
Copy Markdown
Member

Requested by David · project thread

What changed and why

Test-only follow-up to #24927 (merged). This responds to cubic comment 4506407770 on #24927, which said the failing-app test in tests/unit/test_reprocess_restore_visibility.py never reached the explicit selected-app path.

That was valid. The test never passed an app_id, and it replaced trigger_conversation_apps with a stub that raised ExplicitAppSelectionFailedError directly. The only raise site of that error is inside if app_id: in the processor, so the test was not exercising the explicit branch.

The test now:

  • passes the selected app through the router (app_id);
  • stubs only the external boundaries: app validation and catalog lookups, the app model call (get_app_result), and the Firestore user timezone read that the app prompt needs;
  • lets the processor's real explicit-selection check raise, and asserts the HTTP error is chained to ExplicitAppSelectionFailedError.

No production code changes.

Product invariants affected

  • INV-MEM-4
  • INV-TASK-2

How it was verified

Tests

tests/unit/test_reprocess_restore_visibility.py, two tests:

  • Successful reprocess of a discarded batch row with a selected app: exactly one restore registration, the row becomes visible, and a record_pending job exists.
  • Selected app returns no summary: the real explicit-selection branch raises; the row stays hidden, with no restore registration and no recording job.

UI evidence

UI-Evidence: none -- backend change only

View guided diff

…essor

The failing-app test raised ExplicitAppSelectionFailedError from a stub of
trigger_conversation_apps and never passed an app_id, so it never reached
the processor's explicit-selection branch.

The test now passes the selected app through the router, stubs only the
external boundaries (app validation and catalog, the app model call, and the
Firestore timezone read the prompt needs), and lets the processor's real
explicit-selection check raise. The failure test asserts the HTTP error is
chained to ExplicitAppSelectionFailedError.

Both tests pass on the fixed code. On the pre-fix code the failure test fails
(the row is left visible); the success test still passes.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 8, 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-08T14:49:34.115229Z 671bddc 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 Git-on-my-level self-assigned this Nov 8, 2026

@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.

No issues found across 1 file

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

You’re at about 98% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact [email protected].

View guided diff | Re-trigger cubic

@Git-on-my-level
Git-on-my-level merged commit 7f6bbc0 into BasedHardware:main Nov 8, 2026
54 checks passed
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