Skip to content

fix(notify): load config JWT secret and improve delivery diagnostics - #1137

Merged
eous merged 1 commit into
devfrom
fix/1136-notify-auth-logging
Sep 9, 2026
Merged

fix(notify): load config JWT secret and improve delivery diagnostics#1137
eous merged 1 commit into
devfrom
fix/1136-notify-auth-logging

Conversation

@eous

@eous eous commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Nodes configured with [auth].jwt_secret could receive channel traffic while outbound
notifications sent no Authorization header and failed with HTTP 401. Read the configured
secret as a fallback to the environment for tool and completion notifications.

Add per-gateway delivery diagnostics with retry, workstream, and tool-call context, safe
delivery-status summaries, and explicit gateway authentication rejection reasons. Keep
credentials and notification content out of the new diagnostics, and document troubleshooting.

Validation:

  • 240 tests passed across test_notify_tool.py, test_notify_http.py,
    test_notify_completion.py, and test_coordinator_tools.py on the dev base.
  • The config-only gateway regression fails with the original helper and passes with this change.
  • Ruff lint/format checks and package-wide mypy passed.

Refs #1136. The issue remains open for the reporter to confirm the fix or provide new logs.

Nodes configured with `[auth].jwt_secret` could receive channel traffic while outbound
notifications sent no Authorization header and failed with HTTP 401. Read the configured
secret as a fallback to the environment for tool and completion notifications.

Add per-gateway delivery diagnostics with retry, workstream, and tool-call context, safe
delivery-status summaries, and explicit gateway authentication rejection reasons. Keep
credentials and notification content out of the new diagnostics, and document troubleshooting.

Validation:

- 240 tests passed across `test_notify_tool.py`, `test_notify_http.py`,
  `test_notify_completion.py`, and `test_coordinator_tools.py` on the dev base.
- The config-only gateway regression fails with the original helper and passes with this change.
- Ruff lint/format checks and package-wide mypy passed.

Refs #1136. The issue remains open for the reporter to confirm the fix or provide new logs.
Comment thread tests/test_notify_tool.py
@pytest.fixture(autouse=True)
def auth_config(self, tmp_path, monkeypatch):
import turnstone.core.config as config
import turnstone.core.session as session
Comment thread tests/test_notify_tool.py
@pytest.fixture(params=["tool", "completion"])
def notify_caller(self, request, monkeypatch):
"""Exercise both outbound paths with the same gateway failures."""
import turnstone.core.session as session_module
@eous
eous merged commit d334cc3 into dev Sep 9, 2026
15 of 16 checks passed
@eous
eous deleted the fix/1136-notify-auth-logging branch September 9, 2026 12:01
eous added a commit that referenced this pull request Sep 9, 2026
…1137)

Nodes configured with `[auth].jwt_secret` could receive channel traffic while outbound
notifications sent no Authorization header and failed with HTTP 401. Read the configured
secret as a fallback to the environment for tool and completion notifications.

Add per-gateway delivery diagnostics with retry, workstream, and tool-call context, safe
delivery-status summaries, and explicit gateway authentication rejection reasons. Keep
credentials and notification content out of the new diagnostics, and document troubleshooting.

Validation:

- 240 tests passed across `test_notify_tool.py`, `test_notify_http.py`,
  `test_notify_completion.py`, and `test_coordinator_tools.py` on the dev base.
- The config-only gateway regression fails with the original helper and passes with this change.
- Ruff lint/format checks and package-wide mypy passed.

Refs #1136. The issue remains open for the reporter to confirm the fix or provide new logs.
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