Skip to content

fix(hitl): normalize clone-pool suffix in agent_id comparison (SMCP-37) - #60

Merged
TadMSTR merged 2 commits into
mainfrom
feature/smcp-37-alias-normalization
Jul 18, 2026
Merged

fix(hitl): normalize clone-pool suffix in agent_id comparison (SMCP-37)#60
TadMSTR merged 2 commits into
mainfrom
feature/smcp-37-alias-normalization

Conversation

@TadMSTR

@TadMSTR TadMSTR commented Jul 18, 2026

Copy link
Copy Markdown
Owner

Summary

  • hitl_pending's agent_id query-param check hard-rejected any non-exact match against the deployed AGENT_ID, even though its own comment already calls the param advisory.
  • Every scoped-mcp process deploys with a forward-compat numeric suffix (e.g. sysadmin-01), which previously forced matrix-hitl-bot's config to track that exact suffix instead of a stable bare alias.
  • Strip a trailing -\d+ suffix on both sides before comparing, so a bare alias (sysadmin) and a suffixed deployed id (sysadmin-01) both resolve — while a genuinely different agent still correctly does not match. Exact-match path is unchanged (regression-tested).

Companion PR: matrix-hitl-bot feature/smcp-37-alias-normalization (same fix, client side).

Test plan

  • pytest tests/test_hitl_http.py — 8 passed (5 existing + 3 new: exact-match regression, normalized-suffix match, cross-agent rejection)
  • Full suite: pytest — 721 passed, 11 skipped (pre-existing, unrelated)
  • ruff check clean

🤖 Co-authored with Claude Sonnet 5

developer-agent added 2 commits July 18, 2026 13:22
hitl_pending's agent_id query-param check hard-rejected any non-exact match
against the deployed AGENT_ID, even though the code's own comment already
called that param advisory. Every scoped-mcp process deploys with a
forward-compat numeric suffix (e.g. sysadmin-01), which required
matrix-hitl-bot's config to track the exact suffix instead of a stable bare
alias. Strip a trailing -\d+ suffix on both sides before comparing, so a bare
alias and a suffixed deployed id both resolve — while a genuinely different
agent still correctly does not match. Exact-match path is unchanged.

agent-id: developer
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

agent-id: developer
@TadMSTR
TadMSTR merged commit 5f52217 into main Jul 18, 2026
6 checks passed
@TadMSTR
TadMSTR deleted the feature/smcp-37-alias-normalization branch July 18, 2026 17:43
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