Skip to content

[notme-18450e] revert to @agentic-research/dpop on GitHub Packages + [notme-3bc238] stable error codes#46

Merged
jamestexas merged 2 commits into
mainfrom
revert/dpop-back-to-gh-packages
Jul 23, 2026
Merged

[notme-18450e] revert to @agentic-research/dpop on GitHub Packages + [notme-3bc238] stable error codes#46
jamestexas merged 2 commits into
mainfrom
revert/dpop-back-to-gh-packages

Conversation

@jamestexas

Copy link
Copy Markdown
Contributor

Two commits, deliberately separate.

1. [notme-18450e] Revert the registry move — correctness, not preference

main was declaring notme-dpop on npmjs.org while the only artifact that actually exists is @agentic-research/dpop@0.1.0 on GitHub Packages. Any consumer wiring against main would have pointed at a package published nowhere.

The npmjs.org move solved the right problem — GitHub Packages requires auth to install even public packages (401 anonymous, verified against the endpoint) — but paid for it with an npm account and a long-lived NPM_TOKEN.

Every current consumer is same-org, so the cost lands cheaper here:

  • publishing needs no created credential — the automatic GITHUB_TOKEN
  • CI reads with packages: read
  • a developer machine needs one gh auth refresh -s read:packages, once

That grant is now in place and verified against the registry (HTTP 200), which is what unblocked this.

If the SDK ever needs adoption outside the org — plausible, since notme is a public identity provider — the trade inverts and the move is a rename plus a registry swap. Kept deliberately small, and the reasoning now lives in the workflow header rather than being rediscovered a third time.

2. [notme-3bc238] Stable error codes

DPoPVerificationError with a machine-readable code on every failure the verifiers and validateClaims can throw.

The implementation was already in the working tree, uncommitted, from in-flight work on that bead. I preserved and tested it rather than discarding it while reverting the rename in the same tree — hence the separate commit and separate bead attribution.

Why it matters: message is for humans and may be reworded; code is the contract. Downstream verifiers had already started matching on message substrings — cloister's bundle-auth built an entire reason-mapper out of msg.includes(...), which degrades silently the moment a message changes, losing exactly the audit granularity it exists to preserve. cloister-195e47 will consume these codes.

+12 tests, because it shipped with none: the error is a DPoPVerificationError rather than a bare Error, instanceof survives the prototype chain across extends Error, and every validateClaims branch cloister's mapper cared about is pinned to its code — audience, issuer, not-yet-valid, sub, exp.

Verification

  • worker — 23 files / 351 pass (+12)
  • worker tsc --noEmit — clean
  • package build — clean

🤖 Generated with Claude Code

https://claude.ai/code/session_01UNahXs8dda3vttpWrVwVaA

jamestexas and others added 2 commits July 22, 2026 22:34
Adds DPoPVerificationError with a machine-readable `code` on every failure
the verifiers and validateClaims can throw.

The implementation was already in the working tree, uncommitted, from
in-flight work on this bead. I preserved and tested it rather than
discarding it while reverting an unrelated rename in the same tree.

Why it matters: `message` is for humans and may be reworded; `code` is the
contract. Downstream verifiers had already started matching on message
SUBSTRINGS — cloister's bundle-auth built a whole reason-mapper out of
`msg.includes(...)`, which degrades silently the moment a message changes,
losing exactly the audit granularity it exists to preserve. These codes are
the fix for that, and cloister-195e47 will consume them.

Tests added (+12): the error is a DPoPVerificationError not a bare Error,
`instanceof` survives the prototype chain across `extends Error`, and every
validateClaims branch cloister's mapper cared about is pinned to its code —
audience, issuer, not-yet-valid, sub, exp. A contract with no test is a
comment, and this one has two consumers about to depend on it.

worker 351 pass (+12), tsc clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… Packages

main was declaring notme-dpop on npmjs.org while the only artifact that
actually exists is @agentic-research/dpop@0.1.0 on GitHub Packages. Any
consumer wiring against main would have pointed at a package published
nowhere, so this is a correctness fix, not a preference.

The npmjs.org move solved the right problem — that registry requires auth
to INSTALL even for public packages (401 anonymous, verified) — but paid
for it with an npm account and a long-lived NPM_TOKEN. Since every current
consumer is same-org, the cost lands cheaper here: publishing needs no
created credential (automatic GITHUB_TOKEN), CI reads with
`packages: read`, and a developer machine needs one
`gh auth refresh -s read:packages`, once. That grant is now in place and
verified against the registry (HTTP 200).

If this SDK ever needs adoption outside the org — plausible, since notme is
a public identity provider and any external resource server verifying its
tokens is a potential consumer — the trade inverts and the move is a rename
plus a registry swap. Deliberately small for that reason, and the reasoning
is recorded in the workflow header rather than left to be rediscovered a
third time.

worker 351 pass, tsc clean, package build clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@jamestexas
jamestexas merged commit 987e713 into main Jul 23, 2026
3 checks passed
@jamestexas
jamestexas deleted the revert/dpop-back-to-gh-packages branch July 23, 2026 04:35
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