Repository navigation
Description
Finding (unaddressed PR review comment)
Codex P2 on open PR #8624 — comment #8624 (comment) by chatgpt-codex-connector[bot], 2026-11-11T09:30:07Z, at pm-stack/aggregator/src/server.ts:1487:
Verify the Access JWT once per batch request — When Access is configured and the JWKS endpoint times out, a 100-entry
/api/actions/batchrequest performs 100 sequential verification attempts against the same JWT.fetchJwkscaches only successful responses and gives each fetch a five-second timeout, so rejecting this single request can take roughly 500 seconds. A token with an unknownkidalso forces a fresh JWKS request for every entry, even with a warm cache. Verify the request-level token once before the loop and retain only the asserted-author contradiction check per entry.
No-response evidence
- PR feat(pm-stack): derive authors from Access JWT (#1253) — salvage of archive PR #7383 #8624 is still open; head is unchanged at the reviewed commit 2809e82 (verified 2026-11-12) — no fix commit followed the comment.
- Fresh re-read (2026-11-12, this run): the PR's only inline comment is this Codex original, with no replies; no conversation comment addresses it.
- GraphQL
reviewThreadscheck (2026-11-12): the thread is unresolved, 1 comment. - Grace rule: the comment is more than 24 hours old (2026-11-11T09:30:07Z; grace expired 2026-11-12T09:30:07Z) with no fix or reply — carried over from the 2026-11-11 23:54 CST pr-comment-review run, which held it under grace.
- Searched open and closed issues for "8624", "4536166816", "Access JWT batch", and "JWKS batch verify" — no existing issue covers this finding (parent design issue design(pm-stack): one identity across the stack — SSO propagation from the public entry into every layer, roles replace asserted authorship #1253 does not cover the per-entry verification cost).
Still live on the PR head (verified 2026-11-12, two gh api reads)
pm-stack/aggregator/src/server.ts at head 2809e82: the /api/actions/batch handler (route at line ~1455) loops over up to 100 entries and calls await enforceAccessAuthor(req, parsed.value.author) per entry at line ~1487. pm-stack/aggregator/src/access-identity.ts at the same head: fetchJwks (lines ~77–95) caches only successful responses and fetches with AbortSignal.timeout(5_000); verifyAccessJwt (lines ~116–123) forces a fresh JWKS fetch on an unknown kid on every verification. So a JWKS outage makes one batch request run up to 100 sequential 5-second verification attempts (~500s), and an unknown-kid token forces a fresh JWKS request per entry even with a warm cache.
Acceptance criteria
- The batch handler verifies the request-level Access token once before the entry loop and retains only the asserted-author contradiction check per entry — or the finding is resolved by a documented decision on this issue.
- Regression coverage exists showing a 100-entry batch performs a single JWT verification (and does not re-fetch JWKS per entry on failure or unknown
kid).
Activity
developing-today commentedon Nov 12, 2026
CODE-2696
dezren39 commentedon Nov 12, 2026
🤖 Agent note · filed
dezren39 commentedon Nov 12, 2026
Conductor dispatch binding (2026-11-12 04:10 CST): queue task 15107 is claimed by repo-worker-code and assigned to OpenChamber session ses_e5e30c32bd4ffe3vzdgy90GpGc on opencode-route/workhorse. Worktree: /home/user/git/fleet/queue-15107-8907-jwks-per-entry; branch: queue/15107-8907-jwks-per-entry. Verified the session assistant engaged the task and acknowledged the verification-first scope; it will not touch the source PR review thread. Task progress records the binding.
dezren39 commentedon Nov 12, 2026
Triage verified the finding against current code.
server.tsalready constructscreateAccessAuthorEnforcer(req)once before the/api/actions/batchentry loop;access-identity.tsmemoizes the request's successful identity or 401 failure, while applyingderiveAuthorFromAccess(including the asserted-drewcontradiction check) on each entry. The remaining coverage gap was 100-entry failure/unknown-kidbehavior. Added regression tests for 100 entries on a JWKS outage (one fetch attempt), 100 entries with unknownkid(initial fetch plus one forced refresh total), and per-entry contradiction checks. Targeted test passes (10 tests). Typecheck was attempted but this worktree lacks@types/bun(TS2688). See follow-up PR #8909: #8909. The source PR review thread was not replied to or resolved.dezren39 commentedon Nov 12, 2026
Queue task 15107 is parked awaiting PR checks/baseline disposition. PR #8909 remains OPEN/MERGEABLE at head
07bd761bc6ff7f2889a43c636b15531c4479b044; targetedbun test test/access-identity.test.tspassed (10 tests). Typecheck remains unavailable in this worktree because Bun types are missing (TS2688). Current CI includes unrelated fleet-search parity and mcpx-test lint failures; mcpx unit/E2E are still in progress/queued, so do not merge. Resume consideration: local branch was verified ahead 1 / behind 2 fromorigin/main; sync consideration is deferred until checks/baseline disposition, and no update/push was made. No source changes in this follow-up; PR #8624 review thread remains untouched.32 remaining items
dezren39 commentedon Nov 12, 2026
Agent note — lane code-b, task 15113 (resumes task 15107)
dezren39 commentedon Nov 12, 2026
Agent note — lane code-b, task 15113: done