Skip to content

test(relay): isolate admission diagnostics from listener callbacks - #293

Merged
abruption merged 1 commit into
mainfrom
abruption/fix-relay-admission-logs-20261009
Oct 9, 2026
Merged

abruption merged 1 commit into
mainfrom
abruption/fix-relay-admission-logs-20261009

Conversation

@abruption

@abruption abruption commented Oct 9, 2026 •

Copy link
Copy Markdown
Owner

Summary

Closes #292. Related: #291.

Stabilize the admission diagnostics test after merged-main CI 37892897777 failed on macOS Python 3.13 with 2 != 1 warnings.

Setup's server-side waiting-room check does not establish completion of the client's background lifecycle observer. That observer logs on the same logger as admission diagnostics, so a delayed callback can contaminate the exact warning count. Cancel and join it with the existing eight-second timeout before enabling diagnostics in this arithmetic/sanitization test.

Add a deterministic observer that yields during cancellation and emits a real lifecycle event. Its regression exercises the existing exact-count, counter, schema, secret-exclusion, minute-boundary and empty-resource assertions without filtering or suppressing logs. It fails against the old test and if the join is removed.

Only tests/relay/test_receiver_admission.py changes. Product logging, receiver limits, CLI/runtime code, generated standalone, package version and configuration are unchanged.

Type

  • chore / refactor / test / perf

Checklist

  • Conventional Commit.
  • No credentials, real session identifiers or private evidence in the diff.
  • All existing safety assertions retained; no product log suppression or timing-limit relaxation.
  • Generator check and whitespace check pass.
  • Live local/SSH agent delivery: intentionally not performed for a test-only correction.
  • Human merge approval: pending.

The template's legacy CLI/live-message checks are not applicable; no legacy source, native agent, remote host or production service is modified or contacted.

Verified against

Head 5b006fb54f73aca0e327b3dd413a99f7005be187, base 00c027064084f780cdd6e1e4a6442ca1cd3a7175; macOS arm64, CPython 3.13.7, websockets 17.2, cryptography 50.0.2. Local tests use development mode and treat ResourceWarning as errors where specified.

  • Controlled scheduling of a real owned WebSocket handshake callback reproduces 2 != 1 before the fix, with receiver_admission and websocket_open warning kinds. The identical reproduction succeeds after the fix. No native agent messages are sent.
  • The new permanent delayed-observer regression fails before the barrier is added. A negative control removing only the join also fails. The corrected file is restored byte-identically afterward (SHA-256 76054677709db53fbbddb44870e116892186fe73293dd90089822c7b25ba12cf).
  • Original and regression tests repeated 50 times each: 100 tests pass in 5.576 seconds.
  • Receiver admission module: 18 tests pass in 12.042 seconds.
  • Entire Relay suite: 236 tests pass in 34.985 seconds, exit 0. The previously observed asynchronous Server._attach assertion and unraisable socket/transport ResourceWarnings recur in other Relay fixture teardown. This run is not warning-free; these diagnostics are distinct from the fixed exact-log-count failure and are not suppressed or claimed fixed.
  • Documentation: 55 tests pass in 2.762 seconds.
  • Canonical generator check, unchanged product-source diff, clean worktree and whitespace checks pass.
  • A separate read-only source/diff review found no blocker; this does not replace current-head CI or human approval.
  • Final-head CI: all 28 checks pass at 5b006fb54f73aca0e327b3dd413a99f7005be187, including CI 37894353356, CodeQL and the release gate.
  • Automatic code and security reviews completed on that same head with no inline findings (review summary). No manual review mention was sent.

Notes

The controlled reproduction establishes a matching asynchronous contamination path, not the identity of the original CI's second log record: that failure output omitted the records. Production rate limiting was not weakened. Final-head CI and automatic reviews have passed; human merge approval remains pending. The original merged-main run remains failed until a correction is merged and new main CI is checked.

No merge, tag, release, workflow dispatch, package publication, fleet installation or operational change is performed by this PR. The candidate stays 1.1.0; public PyPI remains separate. Human approval is the merge gate.

@abruption abruption added this to the v1.1.0 milestone Oct 9, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-09T06:37:31.677799Z 5b006fb PR opened
🔒 Security Review ✅ Completed 2026-10-09T06:37:50.853513Z 5b006fb 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.

@abruption
abruption merged commit 8ca77cf into main Oct 9, 2026
28 checks passed
@abruption
abruption deleted the abruption/fix-relay-admission-logs-20261009 branch October 9, 2026 06:40
@abruption

abruption commented Oct 9, 2026 •

Copy link
Copy Markdown
Owner Author

v1.1.0 publication evidence — 2026-10-09

  • Owner authorized protected merge and publication; test(relay): isolate admission diagnostics from listener callbacks #293 merged normally at 8ca77cf31254c8287a2593fe484bb30a7dba2727. Issue test(relay): stabilize admission diagnostics under delayed lifecycle callbacks #292 is closed.
  • Exact main CI 37894804192: 23 jobs successful; exact main CodeQL 37894803919 successful. PR test(relay): isolate admission diagnostics from listener callbacks #293 had 28 successful checks and completed automatic code/security reviews without inline findings.
  • Preparation 37895116454, attempt 1: all five jobs successful, reproducible build, isolated wheel/sdist installation and current runtime dependency audits. Seven assets attached to an empty draft; no overwrite.
  • All seven candidate assets pass GitHub attestation verification bound to the repository, prepare-release.yml, refs/heads/main, exact commit, GitHub OIDC issuer and hosted runners. The separately downloaded locked release assets are byte-identical to the candidates.
  • GitHub release v1.1.0 published 2026-10-09T06:46:41Z, stable/Latest, immutable=true, exact target/tag commit above.
  • Browser inspection confirmed the current PyPI Trusted Publisher is abruption/session-peer / publish.yml / pypi. Current GitHub environment retains required owner review, self-review allowed and v* tag policy. Tag ruleset is active with update/deletion blocked and no bypass. No protections or environment approvals were bypassed.
  • Fresh independent wheel and sdist installs both pass isolated installed-import/version checks, initialized-home empty JSON listing, explicit-empty-home refusal with state_db_missing, Relay/MCP extras imports and pip check. An initial local copied-interpreter venv could not resolve its macOS libpython; using interpreter symlinks corrected this environment setup issue. No release artifact was changed.

Locked hashes

File SHA-256
session_peer-1.1.0-py3-none-any.whl 8ff2ae18365557ef5519a7b61109313f6511f21ca4af3384c8892fda27def98a
session_peer-1.1.0.tar.gz b37d3aa9089e53a722bea8290e8da9aa263be9e092a6fdcd355bfc3ba1a8de08
SHA256SUMS 048f4c555d49067f3895b6dcb8a6133d4371e6a7352cd54abbf58c2c96465db4
release-provenance.json 402c8a0fe205458cab7aa131b941c7c0ff2936e82f0953c6e4179b677a87f24d

PyPI status

Publish run 37895320597, attempt 1, exact tag/commit: all six jobs succeeded after the required human environment review, including Trusted Publishing and verification of the published PyPI artifacts. The waiting deployment was observed before approval; no approval/protection bypass was used.

Both published PyPI files were independently downloaded and their hashes compared with the locked candidates above. Fresh separate installs of the actual downloaded wheel and sdist again passed isolated import/version, initialized-home JSON listing, explicit-empty-home refusal with state_db_missing, Relay/MCP extras import and pip check. GitHub stable/Latest/immutable remains confirmed. Publication is complete; operational rollout remains excluded.

No fleet installation, Control/Relay deployment, service restart or live agent acceptance was performed. Experimental unsupported capabilities and #161 remain open; publication is not their completion. Existing Relay fixture teardown diagnostics are not claimed fixed. One Low development-only Paramiko alert remains separate from the successful runtime audits. The runbook's main-advance wording is stronger than the ancestry implementation; exact remote main was explicitly rechecked unchanged before dispatch and GitHub publication.

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.

test(relay): stabilize admission diagnostics under delayed lifecycle callbacks

1 participant