Skip to content

chore(comply): #1612 review follow-ups (parse-site parity, raceWithSignal security note, second-call coverage) - #1619

Merged
bokelley merged 2 commits into
mainfrom
fix/1612-followups
May 9, 2026
Merged

bokelley merged 2 commits into
mainfrom
fix/1612-followups

Conversation

@bokelley

@bokelley bokelley commented May 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Three small follow-ups from the parallel expert review of #1613 (which shipped in @adcp/[email protected]). Larger follow-ups from the same review round are tracked separately as #1617 (tasks/cancel integration) and #1618 (SSRF denylist).

Changes

  1. bin/adcp.js — parse-site 3 trailing-flag validation. The third --protocol / --transport parse site now matches the validation pattern at the other two: a trailing --transport no longer slips through as protocolFlag === undefined. Pre-existing parity bug surfaced by the code-review of fix(a2a/comply): three-layer A2A timeout fix — pollTaskCompletion + comply signal + discovery (#1612) #1613.

  2. src/lib/testing/client.ts — raceWithSignal security warning. The orphan-promise resolver's v argument carries an authenticated agent response after the buyer has moved past the abort. New JSDoc warning + inline // INTENTIONAL: no-op … Do NOT log v comment so a future maintainer doesn't add a logging hook there. Behavior unchanged.

  3. test/lib/discover-agent-profile-signal.test.js — second-call coverage. Existing tests covered abort during the first getAgentInfo call only. New test exercises an abort firing while the second raceWithSignal-wrapped getAdcpCapabilities call is in flight, asserts capabilities_probe_error records the abort reason, and bounds the wait.

Out of scope (filed as separate issues)

Test plan

🤖 Generated with Claude Code

Three small follow-ups from the parallel expert review of #1613:

- bin/adcp.js: parse-site 3 now validates the trailing-flag case for
  --protocol/--transport, matching the other two parse sites. Pre-existing
  parity bug where a trailing --transport produced protocolFlag=undefined
  that snuck past the truthiness gate downstream.

- src/lib/testing/client.ts: raceWithSignal gains a security warning in
  its JSDoc and an inline comment on the orphan-promise resolver. Do not
  log v there — the orphaned promise still carries an authenticated agent
  response after the buyer has moved on past the abort. Behavior unchanged.

- test/lib/discover-agent-profile-signal.test.js: new test exercises an
  abort firing during the second getAdcpCapabilities call (existing
  coverage was first getAgentInfo only). Asserts capabilities_probe_error
  records the abort reason and that the wrapper exits fast.

Two larger follow-ups tracked separately:
  #1617 — wire A2A tasks/cancel on comply abort
  #1618 — SSRF denylist on detectProtocol/discoverAgentProfile

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Two low-severity nits from the parallel review of #1619:

- src/lib/testing/client.ts (code-reviewer): extend the "do not log"
  warning to the error branch. Error.message from a transport rejection
  can carry an echoed response body, same trust-boundary concern.

- bin/adcp.js (security-reviewer): parse-site 3 now hard-fails with
  exit 2 + clear error when --protocol/--transport has no value, matching
  sites 1 and 2. Was a UX asymmetry where the same typo silently fell
  through to auto-detect on this site only.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@bokelley

bokelley commented May 9, 2026

Copy link
Copy Markdown
Contributor Author

Pre-merge expert reviews — both converged on approve.

  • code-reviewer: "Ready to push." Two nits: extend the do-not-log warning to the e (error) branch (carries echoed transport response bodies), and confirmed the new test exercises the second-call path (getAgentInfo cannot short-circuit it because tools includes get_adcp_capabilities).
  • security-reviewer: "No High or Medium findings. Ship it." One Low: parse-site 3 silently fell through where sites 1/2 hard-fail.

Both nits folded in as commit 40983f57. CI red-X is the same pre-existing fast-uri GHSA failing on main; no other failures. Admin-merging.

Larger follow-ups from the same review round tracked separately: #1617 (tasks/cancel), #1618 (SSRF denylist — triage flagged it as breaking, so it'll go into a minor not a patch).

@bokelley
bokelley merged commit 5e796c6 into main May 9, 2026
9 of 10 checks passed
@bokelley

bokelley commented May 9, 2026

Copy link
Copy Markdown
Contributor Author

Acknowledged. Merged clean with both reviewer sign-offs folded in; #1617 and #1618 are queued for the next sweep.


Generated by Claude Code

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