Skip to content

chore: triage backfill — 5 small fixes the broken /triage routine should have shipped - #4615

Merged
bokelley merged 8 commits into
mainfrom
bokelley/triage-unassigned-issues
May 17, 2026
Merged

bokelley merged 8 commits into
mainfrom
bokelley/triage-unassigned-issues

Conversation

@bokelley

Copy link
Copy Markdown
Contributor

Summary

The Claude triage routine (.github/workflows/claude-issue-triage.yml) is failing with HTTP 429 from the Anthropic Routines API. Every /triage execute dispatched today is queued and not running. This PR ships the 5 small fixes the routine would have produced.

Closes

Commits

Each commit is self-contained and closes one issue. Bisectable.

Notes per commit

#4209 — Adds a constantTimeEqual helper exported for testability. Uses Buffer.from(..., 'latin1') to make the ASCII-only ADMIN_API_KEY assumption explicit. Includes a 5-case unit test.

#3695 — Single config change. Disables file parallelism so the module-level pool singleton in db/index.ts isn't nulled by one file's afterAll(closeDatabase) while a sibling is mid-query.

#3216 — Schema documentation only. Documents generate: uuid_v4|opaque_id as a sibling of path on context_outputs[] entries. Worked example covers deterministic task_id threading.

#3731 — The prior triage analysis was stale: @adcp/sdk 7.x already ships transport.maxResponseBytes with the exact mid-stream-abort pattern Path A wanted. Passing it on the three AdCPClient constructors covers get_adcp_capabilities (1 MB) today. The 4 MB cap on discoverMCPTools / discoverA2ATools is dormant for tools/list body until the SDK wraps getAgentInfo (filed upstream: adcontextprotocol/adcp-client#1799). Issue thread updated with correction.

#3689 (partial) — Workflow YAML adds 2.5-maintenance to release.yml.on.push.branches and changeset-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

  • CI green
  • Manual: confirm the transport.maxResponseBytes is honored on the SDK paths (will exercise via discovery against a known-large agent)

bokelley and others added 6 commits May 16, 2026 13:46
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]>
bokelley added 2 commits May 17, 2026 05:58
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.
@bokelley
bokelley merged commit e3cc683 into main May 17, 2026
19 checks passed
@bokelley
bokelley deleted the bokelley/triage-unassigned-issues branch May 17, 2026 15:44
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.
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