Skip to content

feat: implement key content gate config REST endpoint (#1150) - #1166

Open
cold-13 wants to merge 16 commits into
accesslayerorg:mainfrom
cold-13:feat/1035-session-activity-anomaly-detection
Open

cold-13 wants to merge 16 commits into
accesslayerorg:mainfrom
cold-13:feat/1035-session-activity-anomaly-detection

Conversation

@cold-13

@cold-13 cold-13 commented Oct 20, 2026

Copy link
Copy Markdown

Summary

Implements GET /keys/:key_id/gate endpoint returning content gate configuration for a creator key.

Changes

  • Add key gate config contract reader (get_gate_config pattern) with decoding for gate types and params
  • Add key gate config service with 60s Redis caching and key resolution
  • Add route GET /keys/:keyId/gate returning gate_type, requirement_params, is_gated
  • Add gate config cache key and TTL (60s) in config and redis constants
  • Add gate config change event handling in indexer for cache invalidation
  • Support gate types: HOLDER, SUBSCRIBER, THRESHOLD; returns is_gated false when not configured

Acceptance Criteria

  • Gate config endpoint returns accurate gate_type and params
  • is_gated: false returned correctly for ungated keys
  • Cache invalidates correctly on gate config change events
  • All four gate types returned correctly (including 'none' case)
  • Response time under 150ms for cached requests

Closes #1150

@cold-13
cold-13 force-pushed the feat/1035-session-activity-anomaly-detection branch from e02c4e6 to 106cb24 Compare October 20, 2026 11:02
@drips-wave

drips-wave Bot commented Oct 20, 2026

Copy link
Copy Markdown

@cold-13 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@cold-13
cold-13 force-pushed the feat/1035-session-activity-anomaly-detection branch from 734d31a to 31ea251 Compare October 20, 2026 12:10
@Chucks1093

Copy link
Copy Markdown
Member

⚠️ Merge Conflict Detected

This PR currently has a merge conflict and cannot be merged until it is resolved.

Please rebase or merge the latest changes from the base branch into your branch and push again.

@Chucks1093

Copy link
Copy Markdown
Member

✅ PR Ready for Review

Due to a recent malware incident affecting our repositories, all PRs are required to pass automated security checks before being reviewed for merging.

This PR has passed all automated checks:

  • ✅ Security scan — no malicious code detected
  • ✅ No merge conflicts
  • ✅ CI checks passed

Next step: Please share this PR link in our Telegram group so a maintainer can review and merge it: https://t.me/c/accesslayerorg/8514

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.

Implement key content gate config REST endpoint

3 participants