Skip to content

Upgrade to v0.2.0 - #29

Merged
Kzoeps merged 14 commits into
devfrom
main
Sep 24, 2026
Merged

Kzoeps merged 14 commits into
devfrom
main

Conversation

@Kzoeps

@Kzoeps Kzoeps commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • New Features
    • Added optional AT Protocol service authentication for feed requests. Authenticated requests use the verified issuer as the viewer; anonymous requests must provide a viewer DID.
    • Added a DID discovery document for supported did:web service identifiers.
    • Added configuration for the service DID, token age limit, and DID resolution timeout.
  • Documentation
    • Updated setup and deployment guidance, including the minimum Node.js version (22.19+).

@changeset-bot

changeset-bot Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: b6c9e7f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 2fa74b22-aba4-4006-bb8b-5e342642907e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 1a192705-863c-461e-bec1-69efe68aeca9

📥 Commits

Reviewing files that changed from the base of the PR and between 3fc2d50 and cd4ba58.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (27)
  • .changeset/optional-service-auth.md
  • .env.example
  • AGENTS.md
  • README.md
  • lexicons/org/hypercerts/feed/defs.json
  • lexicons/org/hypercerts/feed/getFeed.json
  • lexicons/org/hypercerts/feed/getFeedSkeleton.json
  • package.json
  • src/api/feed-procedure.ts
  • src/api/get-feed-skeleton.ts
  • src/api/get-feed.ts
  • src/app.ts
  • src/auth/input.ts
  • src/auth/service-auth.ts
  • src/config.ts
  • src/feed/query.ts
  • src/feed/types.ts
  • src/feed/validation.ts
  • src/server.ts
  • test/app.unit.test.ts
  • test/auth.unit.test.ts
  • test/config.unit.test.ts
  • test/database.unit.test.ts
  • test/feed.integration.test.ts
  • test/lexicon.unit.test.ts
  • test/query.unit.test.ts
  • test/release-workflow.unit.test.ts

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The feed service adds optional AT Protocol service authentication. Authenticated requests use the verified issuer as the viewer and consume bounded, process-local replay entries. The app also publishes a configured did:web document and accepts authorization headers in feed CORS preflights.

Changes

Service Authentication and Feed Requests

Layer / File(s) Summary
Viewer contract and runtime configuration
lexicons/org/hypercerts/feed/*, src/feed/*, src/config.ts, .env.example, package.json, test/config.unit.test.ts, test/lexicon.unit.test.ts, test/query.unit.test.ts, test/database.unit.test.ts, test/feed.integration.test.ts, test/release-workflow.unit.test.ts, README.md
viewerDid is optional in the feed request contract. Configuration requires a valid SERVICE_DID and adds JWT-age and DID-resolution timeout settings. The Node.js minimum changes to 22.19.0.
JWT verification and replay protection
src/auth/service-auth.ts, package.json, test/auth.unit.test.ts, AGENTS.md, README.md, .changeset/optional-service-auth.md
Optional bearer tokens are verified and bound to an endpoint. The verifier validates jti, rejects replays, and limits live entries to 512 per issuer and 4,096 total. A full replay store returns HTTP 503.
Authenticated viewer and feed procedure wiring
src/auth/input.ts, src/api/*, src/server.ts, src/app.ts, test/app.unit.test.ts, AGENTS.md, README.md
Authenticated requests use the verified DID as viewerDid and reject a mismatched supplied value. Anonymous requests still require viewerDid. Both feed procedures use the shared registration helper and configured verifier.
DID discovery and HTTP request handling
src/app.ts, test/app.unit.test.ts, README.md, .changeset/optional-service-auth.md
The app serves a DID document for a configured hostname-level did:web identifier. Feed CORS preflights permit authorization; buffered requests no longer forward the original abort signal.

Priority: ➖ Normal

Estimated code review effort: 4 (Complex) | ~45 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant Client
  participant FeedApp
  participant OptionalServiceAuth
  participant ServiceAuthVerifier
  participant ReplayProtector
  participant FeedProcedure
  participant FeedService
  Client->>FeedApp: POST feed request with optional bearer token
  FeedApp->>OptionalServiceAuth: Authenticate request
  OptionalServiceAuth->>ServiceAuthVerifier: Verify token claims and signature
  ServiceAuthVerifier-->>OptionalServiceAuth: Return verified credentials
  OptionalServiceAuth->>ReplayProtector: Consume issuer DID and jti
  ReplayProtector-->>OptionalServiceAuth: Accept token or report replay
  OptionalServiceAuth-->>FeedApp: Return credentials or authentication error
  FeedApp->>FeedProcedure: Forward input and credentials
  FeedProcedure->>FeedProcedure: Apply authenticated viewer rules
  FeedProcedure->>FeedService: Execute feed request
  FeedService-->>FeedProcedure: Return feed result
  FeedProcedure-->>Client: Return parsed response
Loading

Merge Risk: ⚪ Minimal · up to cd4ba

The feed service now accepts optional AT Protocol service authentication. For authenticated requests, the verified caller becomes the viewer, and each token can be used only once per running process. The service also publishes a did:web discovery document. Operators must set SERVICE_DID before upgrading, as the release notes state. No concrete defect remains, so the change appears ready to merge.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title identifies a version upgrade, which is consistent with the release-oriented changes. It is broad and does not name the main service-authentication feature, but it remains related to the chan…
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@socket-security

socket-security Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​atproto-labs/​did-resolver@​0.3.7 ⏵ 0.3.999 +131006697 +2100
Added@​atproto-labs/​fetch-node@​0.3.7861006796100
Updated@​atproto/​lex-server@​0.1.9 ⏵ 0.1.1977 +110010099 +1100
Updated@​atproto/​crypto@​0.5.4 ⏵ 0.5.599 +81008598 +2100
Updated@​atproto/​syntax@​0.7.5 ⏵ 0.7.6100 +110094 +199 +1100

View full report

@Kzoeps Kzoeps changed the title Upgrade to v0.1.2 Upgrade to v0.2.0 Sep 24, 2026
@greptile-apps

greptile-apps Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

The PR appears safe to merge based on this review; no new actionable issue remains.

Summary

The PR adds optional AT Protocol service authentication to both feed procedures, binds authenticated viewers to verified issuers, publishes a did:web discovery document, and updates configuration and runtime guidance. Since the previous review, it aligns the stated Node.js minimum with the new dependency and documents the accepted replay-store capacity risk.

Reviews (2) · Last reviewed commit: "Merge pull request #30 from hypercerts-o..."

Comment thread src/auth/service-auth.ts
Comment thread package.json
@Kzoeps

Kzoeps commented Sep 24, 2026

Copy link
Copy Markdown
Collaborator Author

@greptileai review

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
3.2% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@Kzoeps
Kzoeps merged commit b168b86 into dev Sep 24, 2026
8 of 9 checks passed
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