Skip to content

test(mobile): align relay test-push endpoint tests - #6

Closed
abhibansal-sg wants to merge 1 commit into
environment-and-workflows-overviewfrom
paperclip/str-63-relay-test-push-tests
Closed

abhibansal-sg wants to merge 1 commit into
environment-and-workflows-overviewfrom
paperclip/str-63-relay-test-push-tests

Conversation

@abhibansal-sg

@abhibansal-sg abhibansal-sg commented Jul 5, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Updates stale /relay/test-push endpoint tests to the current transport-aware response contract.
  • Keeps this as a tests-only repair; no plugin endpoint behavior changes.

Root cause

plugins/hermes-mobile/dashboard/api.py::test_relay_push was intentionally made transport-aware in d6fd7f5b5 / #117, but tests/plugins/hermes_mobile/test_relay_test_push_endpoint.py still expected the older relay-only 400 / Test push delivered shape.

Verification

  • git log --oneline origin/environment-and-workflows-overview..HEAD -> one commit: 98e1ab44c test(mobile): align relay test-push endpoint tests with transport-aware contract (STR-67)
  • git diff --name-status origin/environment-and-workflows-overview..HEAD -> only tests/plugins/hermes_mobile/test_relay_test_push_endpoint.py
  • /Users/abbhinnav/Developer/products/hermes-loop/scripts/loop-scope-check.sh <temp worktree> "tests/plugins/hermes_mobile/test_relay_test_push_endpoint.py" -> PASS
  • .venv/bin/python -m pytest tests/plugins/hermes_mobile/test_relay_test_push_endpoint.py -q -> 5 passed, 1 existing xdist mark warning
  • .venv/bin/python -m pytest tests/plugins/hermes_mobile/test_push_intake.py -q -> 35 passed
  • git diff --check HEAD^ HEAD -> OK

Paperclip: STR-63 / STR-67

…re contract (STR-67)

The /relay/test-push endpoint was made transport-aware in d6fd7f5
(#117) but its dedicated test file wasn't updated, leaving 2 stale
assertions expecting the old relay-only 400/"Test push delivered"
shape instead of the current {ok, transport, detail} contract.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@abhibansal-sg
abhibansal-sg force-pushed the paperclip/str-63-relay-test-push-tests branch from 60f5c35 to 98e1ab4 Compare July 5, 2026 03:45
@abhibansal-sg

Copy link
Copy Markdown
Owner Author

APPROVE — verifier stage-1 first-hand evidence on exact PR head 98e1ab4.

GitHub formal review note: gh pr review --approve was attempted, but GitHub rejected it with Review Can not approve your own pull request under the current authenticated account. This comment is the durable verifier verdict.

Commands run locally on detached HEAD:

  • git fetch origin environment-and-workflows-overview pull/6/head:refs/remotes/origin/pr/6 --quiet -> exit 0
  • git checkout --detach 98e1ab44c5c0754f737e6fa8f14b0a6ba6249f48 --quiet -> exit 0
  • git rev-parse HEAD -> 98e1ab44c5c0754f737e6fa8f14b0a6ba6249f48, exit 0
  • git log --oneline origin/environment-and-workflows-overview..HEAD -> exactly one commit, 98e1ab44c test(mobile): align relay test-push endpoint tests with transport-aware contract (STR-67), exit 0
  • git diff --name-status origin/environment-and-workflows-overview..HEAD -> only M tests/plugins/hermes_mobile/test_relay_test_push_endpoint.py, exit 0
  • git diff --check HEAD^ HEAD -> exit 0
  • .venv/bin/python -m py_compile tests/plugins/hermes_mobile/test_relay_test_push_endpoint.py -> exit 0
  • loop-scope-check.sh on temp parent+cherry-pick worktree with allowed scope tests/plugins/hermes_mobile/** -> exit 0, PASS
  • added-line security scan -> 0 findings, exit 0
  • .venv/bin/python -m pytest tests/plugins/hermes_mobile/test_relay_test_push_endpoint.py --collect-only -q -> exit 0, 5 tests collected, not false-green
  • .venv/bin/python -m pytest tests/plugins/hermes_mobile/test_relay_test_push_endpoint.py -q -> exit 0, 5 passed, 1 existing xdist_group mark warning
  • .venv/bin/python -m pytest tests/plugins/hermes_mobile/test_push_intake.py -q -> exit 0, 35 passed

Diff review:

  • Tests-only stale-contract repair in tests/plugins/hermes_mobile/test_relay_test_push_endpoint.py.
  • The updated assertions match the transport-aware endpoint contract: no relay config returns 200 / {ok:false, transport:"none", detail:"no push configured"}; relay delivery returns 200 / {ok:true, transport:"relay", detail:"sent via relay"}.
  • No production code, UI, lockfile, or docs touched. UI-evidence law not triggered.

CI/check attribution:

  • PR headRefOid is 98e1ab44c5c0754f737e6fa8f14b0a6ba6249f48.
  • GitHub check-attribution, Python lints, OSV, supply-chain scan, and affected-area detection pass.
  • Required-check aggregate is red because Python slices 1/8, 3/8, and 5/8 fail in known base-red files outside this PR diff: tests/tui_gateway/test_custom_provider_session_persistence.py, tests/test_resume_provider_fallback.py, tests/tui_gateway/test_protocol.py. Those are not regressions from this tests-only change.
  • At review time one CodeQL Swift job was still in progress; not related to this Python tests-only diff.

Verdict: APPROVE. No requested changes for PR #6.

@abhibansal-sg

Copy link
Copy Markdown
Owner Author

Superseded by base. The relay test-push endpoint-contract realignment this PR carried landed independently on the base branch via test(STR-451): align relay test-push endpoint assertions (#34). Current base head eec8e348b already contains the identical assertions this PR proposed:

  • test_relay_test_push_reports_no_push_configured_when_relay_not_configured -> 200 {ok:False, transport:none, detail:"no push configured"}
  • test_relay_test_push_sends_real_event_and_returns_delivered -> 200 {ok:True, transport:relay, detail:"sent via relay"}

Verified first-hand on a clean base worktree: pytest tests/plugins/hermes_mobile/test_relay_test_push_endpoint.py -q -> 5 passed. STR-63's problem no longer reproduces on base, so this tests-only PR is redundant. Closing.

@abhibansal-sg
abhibansal-sg deleted the paperclip/str-63-relay-test-push-tests branch July 7, 2026 17:55
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