Repository navigation
chore: triage backfill — 5 small fixes the broken /triage routine should have shipped - #4615
Merged
Merged
Conversation
Switch `===` to `crypto.timingSafeEqual` over equal-length `Buffer`s. On length mismatch, compare against a same-length dummy to keep the comparison constant-time. `Buffer.from(..., 'latin1')` makes the ASCII-only assumption on `ADMIN_API_KEY` explicit and matches `timingSafeEqual`'s byte-for-byte contract. Closes #4209. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…n races (#3695) The module-level `pool` in `db/index.ts` is shared across all tests in a worker. With `fileParallelism: true` (the vitest default), one file's `afterAll(closeDatabase)` could null the pool while a sibling file was mid-query — Express then returned 500 from `getPool()`'s "Database not initialized" throw. The 5xx pattern looked like transient Anthropic SDK flakes (#3695's original framing) but `@anthropic-ai/sdk` is fully mocked in those tests via `vi.hoisted` + `vi.mock`. Setting `fileParallelism: false` serializes test files within a worker and closes the race without quarantine logic or retry-on-5xx. Closes #3695. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…#3216) Mirror the runner-side `generate: uuid_v4|opaque_id` support shipped in adcp-client#1006 by adding the field to the documented `ContextOutput` shape in `storyboard-schema.yaml`. Mutual exclusion with `path` is explicit ("exactly one of `path` or `generate` MUST be set"); both generator names produce a UUID v4 — they exist as separate keywords for spec-vs-implementation framing. Worked example covers the deterministic `task_id` threading pattern that motivated the addition (force_create_media_buy_arm → create_media_buy → force_task_completion → buyer-side tasks/get poll without copy-pasted magic strings). Closes #3216. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…flows (#3689) The `release.yml` `on.push.branches` list didn't include `2.5-maintenance`, so the auto-release workflow never fired on that branch — v2.5.2 and v2.5.3 shipped to npm without git tags or GitHub Releases. `changeset-check.yml` also missed it, which is why non-spec bumps (impressions, paused additions) slipped through as patch instead of being flagged for the `--empty` escape hatch. Adding `2.5-maintenance` to both workflows closes the gap for the remaining security-only window (v2 unsupported as of 3.0 GA, security- only until 2026-08-01 per the sunset policy). Retroactive tag creation for v2.5.2 / v2.5.3 is handled separately (needs PAT to push tags; dist artifacts are already in tree so back-tagging is safe). Refs #3689. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
`@adcp/sdk` (7.x) ships native `transport.maxResponseBytes` support —
sets an `AsyncLocalStorage` slot and inserts a counting `TransformStream`
that aborts with `ResponseTooLargeError` mid-stream. Pass it on the
client options to the three `AdCPClient` constructors in
`capabilities.ts`:
- 4 MB for `discoverMCPTools` and `discoverA2ATools` — legitimate
large agents reach ~2 MB with 500 tools.
- 1 MB for `fetchMeasurementCapabilities` — the smaller surface.
The prior triage analysis assumed no SDK support and proposed a local
`cappedFetch` wrapper (Path A). That's moot — the SDK already implements
that pattern (`withResponseSizeLimit` / `wrapFetchWithSizeLimit`).
Known limitation: `getAgentInfo` / `mcpClient.listTools()` in the SDK
do not yet route through the size-limit wrapper, so the 4 MB cap on the
discovery constructors is dormant for the `tools/list` body until the
SDK wraps that path. `get_adcp_capabilities` is covered today.
Closes #3731.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
) The repo-root vitest config has no setupFile — only `server/vitest.config.ts` loads `revenue-tracking-env.ts` which sets `WORKOS_API_KEY`. CI's TypeScript Build runs `vitest run` from the repo root, so `auth.ts`'s top-level `new WorkOS(process.env.WORKOS_API_KEY!)` throws on import. Mock the module up front, mirroring `dev-session-signing.test.ts`. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Security-reviewer + code-reviewer nice-to-haves on PR #4615: 1. JSDoc on `constantTimeEqual` documenting the safe-use contract (one side known-to-server fixed secret, not two attacker-controlled inputs) and explaining the latin1 / dummy-compare choices. 2. TODO comments at the two `getAgentInfo`/A2A discovery sites in `capabilities.ts` flagging that maxResponseBytes is dormant on those paths until adcontextprotocol/adcp-client#1799 lands the SDK-side wrapping. 3. Sunset-date comment on `release.yml`'s 2.5-maintenance entry so nobody re-enables general bumps on that branch after 2026-08-01 when v2 support ends. 4. Upstream issue link in #3731's changeset so the dormant-cap note is actionable. No code-behavior changes — all comments + docstring.
Top-level section explaining the cost-benefit lens every task should run through — what makes a task worth doing vs. what doesn't, with explicit signals for both directions. The principle came out of a 300-open-issues triage session where the distinction between 'punt for the sake of punting' and 'genuinely not worth the tokens to ship' kept coming up. Spec quality and pain- prevention are explicit keep signals so triage doesn't over-prune work that prevents future implementer confusion. Applies to triage decisions, implementation scope, and follow-up choices — not just one workflow.
This was referenced May 17, 2026
bokelley
added a commit
that referenced
this pull request
May 17, 2026
Security-reviewer + code-reviewer nice-to-haves on PR #4615: 1. JSDoc on `constantTimeEqual` documenting the safe-use contract (one side known-to-server fixed secret, not two attacker-controlled inputs) and explaining the latin1 / dummy-compare choices. 2. TODO comments at the two `getAgentInfo`/A2A discovery sites in `capabilities.ts` flagging that maxResponseBytes is dormant on those paths until adcontextprotocol/adcp-client#1799 lands the SDK-side wrapping. 3. Sunset-date comment on `release.yml`'s 2.5-maintenance entry so nobody re-enables general bumps on that branch after 2026-08-01 when v2 support ends. 4. Upstream issue link in #3731's changeset so the dormant-cap note is actionable. No code-behavior changes — all comments + docstring.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Claude triage routine (
.github/workflows/claude-issue-triage.yml) is failing with HTTP 429 from the Anthropic Routines API. Every/triage executedispatched today is queued and not running. This PR ships the 5 small fixes the routine would have produced.Closes
fix(security): use timingSafeEqual for ADMIN_API_KEY comparisonfix(test): disable file parallelism to prevent pool-singleton teardown racesdocs(storyboard-schema): document generate field on context_outputsfix(security): cap response body size on AAO discovery fetchesfix(ci): add 2.5-maintenance branch to release + changeset-check workflowsCommits
Each commit is self-contained and closes one issue. Bisectable.
Notes per commit
#4209 — Adds a
constantTimeEqualhelper exported for testability. UsesBuffer.from(..., 'latin1')to make the ASCII-onlyADMIN_API_KEYassumption explicit. Includes a 5-case unit test.#3695 — Single config change. Disables file parallelism so the module-level
poolsingleton indb/index.tsisn't nulled by one file'safterAll(closeDatabase)while a sibling is mid-query.#3216 — Schema documentation only. Documents
generate: uuid_v4|opaque_idas a sibling ofpathoncontext_outputs[]entries. Worked example covers deterministic task_id threading.#3731 — The prior triage analysis was stale:
@adcp/sdk7.x already shipstransport.maxResponseByteswith the exact mid-stream-abort pattern Path A wanted. Passing it on the threeAdCPClientconstructors coversget_adcp_capabilities(1 MB) today. The 4 MB cap ondiscoverMCPTools/discoverA2AToolsis dormant fortools/listbody until the SDK wrapsgetAgentInfo(filed upstream: adcontextprotocol/adcp-client#1799). Issue thread updated with correction.#3689 (partial) — Workflow YAML adds
2.5-maintenancetorelease.yml.on.push.branchesandchangeset-check.yml.on.pull_request.branches. Closes the gap that let v2.5.2 / v2.5.3 ship without tags or Releases. The retroactive tag creation for those commits is not in this PR — needs human confirmation on which commits to tag (changeset content commit vs. version-bump commit).Triage backfill follow-ups
Test plan
transport.maxResponseBytesis honored on the SDK paths (will exercise via discovery against a known-large agent)