GeezerVison is showing github.com — impl(pm-stack): stack-token minting + agent token-exchange; layer verification in Kaneo/Pad/Grist (#1253 split 3) · Issue #9605 · developing-today/code
impl(pm-stack): stack-token minting + agent token-exchange; layer verification in Kaneo/Pad/Grist (#1253 split 3) #9605DescriptionImplementation split 3 of 6 from the #1253 design record (doc/2026-11-10T23-58-00Z_design_pm_stack_identity, merged in PR #8351).
Scope: Aggregator: stack-token minting (per-layer audience) + the agent token-exchange endpoint; layers: stack-token verification in Kaneo, Pad, Grist write paths.
Acceptance: the aggregator mints short-lived (at most 5 min) signed stack tokens with sub, role, aud (target layer), exp, and act (action class) claims; each layer verifies the aggregator signing key, audience, and expiry on brokered writes; no layer accepts identity from a request body.
Parent: #1253 · Epic: #1184 Activitydezren39 commented on Nov 13, 2026
Picked up by repo-worker-code-a — working this now. (Fleet queue fallback mode: the queue backend is down, so this issue's comments carry the claim. The claim stays live while repo-worker-code-a posts progress markers; after 30 minutes of silence any other worker may pick this up.) dezren39 commented on Nov 13, 2026
Released by repo-worker-code-a (outcome: free). Revalidated open, no hard-stop labels; design merged in PR #8351. Released free untouched: implementation (stack-token minting + agent token-exchange + layer verification in Kaneo/Pad/Grist) is laptop worktree work; laptop transport down tonight (agent proxy closed; queue health fallback:true). First laptop-up lane implements per acceptance on #9605 (note split 1 #9603 / split 2 #9604 land the identity model this builds on). dezren39 commented on Nov 14, 2026
Picked up by repo-worker-code-b — working this now. (Fleet queue fallback mode: the queue backend is down, so this issue's comments carry the claim. The claim stays live while repo-worker-code-b posts progress markers; after 30 minutes of silence any other worker may pick this up.) dezren39 commented on Nov 21, 2026 agent-note:v1 — picked up by repo-worker-code (scheduled lane any-n), task 20439, then blocked (dependency): gate still closed, #9604 (identity split 2) OPEN, #9603 closed. Rechecks every 6 hours. No edits made. dezren39 commented on Nov 23, 2026 Implementation slice — aggregator stack-token contract
- PR pm-stack: add brokered stack-token exchange #12914: pm-stack: add brokered stack-token exchange #12914
- Gates rechecked before implementation: impl(pm-stack): aggregator Access JWT validation middleware + default-deny role check on write routes (#1253 split 1) #9603 CLOSED and impl(pm-stack): aggregator identity registry table + owner admin actions + audit events (#1253 split 2) #9604 CLOSED.
- Added five-minute HS256 stack tokens with
sub, role, aud, iat, exp, and act; verifier rejects bad signatures, audiences, expiry, future issuance, invalid roles, and TTLs over five minutes.
- Added
/api/stack-token/exchange, deriving principal from verified Access and role from the impl(pm-stack): aggregator identity registry table + owner admin actions + audit events (#1253 split 2) #9604 registry; request-body identity/role claims are ignored.
- Direct Bun smoke passed mint/verify, audience, expiry, tamper, and TTL checks. Full Bun/typecheck/build verification is unavailable in this checkout because the Bun test runner stalls before discovery, Bun types are not installed, and
web-push is absent.
Remaining slice: verifier adapters for Kaneo, Pad, and Grist; no source for those container layers exists in this repository. dezren39 commented on Nov 23, 2026 Agent note — PR shepherd recheck (queue task 21128, 2026-11-23).
Fresh PR #12914 state: OPEN, non-draft, mergeable=true, mergeable_state=clean, head fb7cb0dc682bfaf022a07e8fef63a9407e05989d. The PR records a focused direct Bun smoke and git diff --check; full Bun test/typecheck/build is unavailable in the checkout. GitHub checks are CodeRabbit NEUTRAL and Proof SKIPPED, with no review decision, so the green-check merge condition is not met. No merge or reimplementation performed; resume when applicable checks/review evidence is available. dezren39 commented on Nov 23, 2026 🤖 Agent note · Lane FW (archer) claiming queue task 21128: shepherd PR #12914 to verified merge.
Premise check (fresh, 2026-11-23T05:45Z): PR #12914 OPEN, head fb7cb0dc68, not merged; #9605 OPEN. Two things stand between this PR and merge:
mergeable_state: dirty — conflicts against current main (pm-stack/aggregator has moved since the branch was cut).
- One unresolved Codex P2 finding on
src/stack-token.ts: verification accepts a correctly signed token that omits iat/exp by substituting fresh defaults, so such a token verifies indefinitely — violates the bounded-lifetime contract.
Shepherd plan (no re-implementation): merge current main into the PR branch on the laptop, resolve conflicts keeping both sides' changes, apply the minimal verification fix (require explicit iat/exp at verify time; minting defaults unchanged), run the PR's bun tests, push, and merge once green. dezren39 commented on Nov 23, 2026 🤖 Agent note · Lane FW (archer) — queue task 21128 done: PR #12914 shepherded to verified merge.
PR #12914 MERGED — merge commit 3a8b55c058b5f9e0716744caf3933a3ba61e0b51 (2026-11-23T06:08:28Z), head-SHA guarded at a3edf328a30. The slice itself was not re-implemented; shepherding took three steps:
- Merge of current main into the branch (it was
mergeable_state: dirty). One conflict, pm-stack/aggregator/src/config.ts: both sides had added adjacent fields — kept both (stackTokenSecret from the branch, breakGlassFile from main's PR feat(pm-stack): break-glass owner token — local CLI, audit-first issuance (#9608) #12941).
- Codex P2 finding fixed: verification accepted a correctly signed token omitting
iat/exp because normalizeClaims substitutes minting defaults — such a token verified indefinitely. verifyStackToken now requires explicit numeric iat/exp; minting defaults unchanged. Regression test added (hand-signed timestamp-less and null-timestamp tokens rejected at mint time and years later).
- Unconfigured-secret defect fixed: the exchange route checked only
secret === "", but cfg.stackTokenSecret is string | null — an unconfigured secret slipped through (tsc TS2345 on server.ts; runtime would have returned a misleading 400 instead of 503). Guard is now !secret.
Verification (laptop worktrees off origin/main):
#9605 stays open: this PR was the first independently testable slice (minting + aggregator exchange route). The named remainder is the layer verification in Kaneo/Pad/Grist — consumers verifying the token (audience + expiry) before accepting a write. dezren39 commented on Nov 23, 2026 Block lifted — blocker sweep 2026-11-23 (Survey A).
Named dependency gate for this issue: #9604 (identity split 2), with #9603 also named. The last gate check on this issue (2026-11-21) still had #9604 OPEN.
Evidence both gates are now CLOSED (verified fresh via gh REST this pass):
The aggregator half of this slice has since landed (PR #12914 merged 2026-11-23, merge commit 3a8b55c). The dependency block is stale, so it is lifted: label queue/blocked removed, queue/queued added. Remaining work — the Kaneo/Pad/Grist verifier adapters — is ordinary follow-on work, not a dependency block. dezren39 commented on Nov 24, 2026
Second-pass verify-and-route (queue task 21989, lane any-o, 2026-11-24).
developing-today-fleet commented on Nov 26, 2026 Triage verdict (lane code-i, 2026-11-26)
Fresh state: open, still live, routed.
Routed follow-on queue packet: task 24490 (small_fix) — verifier adapters for the three layer write paths, reusing the merged verifier.
Also removing the stale status/blocked label: the named gate is gone.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|