Skip to content

[codex] Include all unit tests in backend runner#7890

Merged
kodjima33 merged 1 commit into
BasedHardware:mainfrom
tianmind-studio:codex/backend-test-sh-missing-unit-files
Jun 17, 2026
Merged

[codex] Include all unit tests in backend runner#7890
kodjima33 merged 1 commit into
BasedHardware:mainfrom
tianmind-studio:codex/backend-test-sh-missing-unit-files

Conversation

@tianmind-studio

@tianmind-studio tianmind-studio commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add all existing unit test files that were missing from backend/test.sh so the backend CI runner exercises them.
  • Remove the duplicate test_auth_redirect_uri.py invocation.
  • Bring the runner to full current coverage for backend/tests/unit/test_*.py: 0 missing, 0 duplicate entries.

Why

backend/AGENTS.md says new unit test files should be added to test.sh or they will not run in CI. A current local comparison now finds every backend/tests/unit/test_*.py file listed exactly once in backend/test.sh.

Refresh

Validation

  • Local comparison script: MISSING_COUNT=0, DUP_COUNT=0
  • Each newly-added file run in a separate pytest process, matching backend/test.sh's execution model: 175 passed
    • test_audiobuffer_guard.py -> 15 passed
    • test_diarizer_embedding_decoder_bypass.py -> 2 passed
    • test_file_upload_endpoint_security.py -> 13 passed
    • test_file_upload_security.py -> 13 passed
    • test_goals_id_fallback.py -> 9 passed
    • test_high_priority_usage_tracking.py -> 21 passed
    • test_mcp_memory_filters.py -> 8 passed
    • test_memories_user_review.py -> 6 passed
    • test_memories_validation.py -> 11 passed
    • test_memory_category_auto.py -> 7 passed, 1 warning
    • test_new_usage_tracking_gaps.py -> 45 passed
    • test_notification_token_cleanup.py -> 2 passed
    • test_phone_calls.py -> 18 passed, 1 warning
    • test_twilio_service.py -> 5 passed
  • C:\Program Files\Git\bin\bash.exe -n backend/test.sh
  • git diff --check
  • scripts/pre-commit with the backend Windows venv and local Dart SDK on PATH

@greptile-apps

greptile-apps Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR registers 14 existing unit test files that were missing from backend/test.sh and removes one duplicate entry (test_auth_redirect_uri.py), bringing CI coverage from 147 to 160 unique unit tests. The intentionally failing test_goal_extraction_batch.py is left out pending a fix on main.

  • All 14 newly added files (test_audiobuffer_guard.py, test_diarizer_embedding_decoder_bypass.py, test_file_upload_endpoint_security.py, test_file_upload_security.py, test_goals_id_fallback.py, test_high_priority_usage_tracking.py, test_mcp_memory_filters.py, test_memories_user_review.py, test_memories_validation.py, test_memory_category_auto.py, test_new_usage_tracking_gaps.py, test_notification_token_cleanup.py, test_phone_calls.py, test_twilio_service.py) are confirmed to exist in backend/tests/unit/.
  • The duplicate pytest tests/unit/test_auth_redirect_uri.py -v line is cleanly removed; the first occurrence is retained.

Confidence Score: 5/5

Safe to merge — the change only adds pytest invocations to a CI shell script; no application logic is touched.

Every one of the 14 newly referenced test files was verified to exist in backend/tests/unit/. The duplicate removal is correct, and the intentionally failing test_goal_extraction_batch.py is explicitly left out with a noted reason. No application code is modified.

No files require special attention.

Important Files Changed

Filename Overview
backend/test.sh Adds 14 missing unit test files to the CI runner and removes a duplicate test_auth_redirect_uri.py entry; all referenced files are confirmed to exist in the repo.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[backend/test.sh] --> B[set -euo pipefail]
    B --> C[Run 160 unique pytest files]
    C --> D{All pass?}
    D -- Yes --> E[CI passes]
    D -- No --> F[Script exits early]

    subgraph "14 Newly Added Tests"
        G[test_audiobuffer_guard.py]
        H[test_diarizer_embedding_decoder_bypass.py]
        I[test_file_upload_security.py]
        J[test_file_upload_endpoint_security.py]
        K[test_goals_id_fallback.py]
        L[test_high_priority_usage_tracking.py]
        M[test_mcp_memory_filters.py]
        N[test_memories_user_review.py]
        O[test_memories_validation.py]
        P[test_memory_category_auto.py]
        Q[test_new_usage_tracking_gaps.py]
        R[test_notification_token_cleanup.py]
        S[test_phone_calls.py]
        T[test_twilio_service.py]
    end

    C --> G & H & I & J & K & L & M & N & O & P & Q & R & S & T

    subgraph "Excluded (currently failing)"
        U[test_goal_extraction_batch.py]
    end
Loading

Reviews (1): Last reviewed commit: "Include missing unit tests in backend ru..." | Re-trigger Greptile

@kodjima33 kodjima33 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Test-only stabilization (import isolation / stubs); zero product risk, CI not failing.

@tianmind-studio tianmind-studio force-pushed the codex/backend-test-sh-missing-unit-files branch from a0b0d9a to 5eb1bdb Compare June 16, 2026 15:43
@ThomsenDrake

Copy link
Copy Markdown
Collaborator

ClawSweeper local pilot review

Recommendation: keep open; looks suitable for normal maintainer and CI review.

What it found:

  • Current backend/test.sh still omits stable backend unit tests.
  • This PR adds 13 missing unit-test invocations and removes one duplicate auth_redirect test invocation.
  • No blocking correctness or security finding was found.

Related context: #7891 and #7937 cover adjacent missing-test work; neither supersedes this PR. #7937 is the focused path for test_phone_calls.py.

Suggested next step: review and land this narrow runner cleanup if maintainers agree with the test selection.

Posted from a local report-only ClawSweeper pilot by request; no labels, closes, repairs, or merges were performed.

@tianmind-studio tianmind-studio force-pushed the codex/backend-test-sh-missing-unit-files branch from 5eb1bdb to 9cddfcc Compare June 17, 2026 07:44
@tianmind-studio tianmind-studio changed the title [codex] Include missing unit tests in backend runner [codex] Include all unit tests in backend runner Jun 17, 2026

@kodjima33 kodjima33 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Backend test-runner chore (include all unit tests), CI green

@kodjima33 kodjima33 merged commit cd5d734 into BasedHardware:main Jun 17, 2026
1 check 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.

3 participants