Skip to content

hitl: attribute HITL requests to PR-AF via sender manifest#46

Merged
AbirAbbas merged 1 commit into
mainfrom
feat/hitl-sender-attribution
Jun 19, 2026
Merged

hitl: attribute HITL requests to PR-AF via sender manifest#46
AbirAbbas merged 1 commit into
mainfrom
feat/hitl-sender-attribution

Conversation

@AbirAbbas

Copy link
Copy Markdown
Contributor

Problem

PR-AF creates hax-sdk HITL review requests via the hax SDK's create_request, but never passed a sender. As a result the Response Hub displayed these requests as "Unknown sender" with no indication they originated from PR-AF.

Change

In src/pr_af/hitl/client.py (create_hax_form_request_with_timeout, where the create_request kwargs are built), add a sender manifest:

_sender_name = os.getenv("HAX_SENDER_NAME") or os.getenv("NODE_ID", "pr-af")
kwargs["sender"] = {
    "key": os.getenv("HAX_SENDER_KEY", _sender_name),
    "display_name": _sender_name,
}
  • Defaults to the node's own identity (NODE_ID, falling back to "pr-af").
  • Env-overridable via HAX_SENDER_NAME (display name) and HAX_SENDER_KEY (stable key).
  • A plain dict is normalized to the wire SenderManifest by the hax SDK, so no extra import is required.

The hub will now attribute these requests to PR-AF instead of "Unknown sender".

Scope

One file, +7 lines. No behavior change beyond adding the sender field. import os was already present.

Gates

  • ruff check src/ scripts/ (CI gate) — pass
  • mypy src/pr_af/hitl/client.py — pass
  • pytest — 69 passed

🤖 Generated with Claude Code

PR-AF created hax-sdk HITL requests with no sender, so the Response Hub
displayed them as "Unknown sender". Pass a sender={key, display_name}
defaulting to NODE_ID, overridable via HAX_SENDER_KEY / HAX_SENDER_NAME.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@AbirAbbas AbirAbbas merged commit 62f3264 into main Jun 19, 2026
3 of 4 checks passed
@AbirAbbas AbirAbbas deleted the feat/hitl-sender-attribution branch June 19, 2026 21:52
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