Skip to content

feat(limits): raise Staryl's free limits and add Reddit - #129

Merged
kodiakhq[bot] merged 1 commit into
mainfrom
feat/staryl-limits
Nov 17, 2026
Merged

kodiakhq[bot] merged 1 commit into
mainfrom
feat/staryl-limits

Conversation

@RedStar071

@RedStar071 RedStar071 commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

🔗 Linked issue

No issue. Staryl starts reading these limits in a pull request of its own.

🧭 Context

Staryl is about to enforce per-guild limits on its subscriptions, read from Ring. The free values change to 10 YouTube, 15 Twitch live and 30 Reddit subscriptions, and the paid tiers move above them.

📚 Description

Limit Free (before → after) /config set range Tier $3 Tier $5
maximumYouTubeSubscriptions 3 → 10 10 to 30 20 30
maximumTwitchSubscriptions (Twitch live) 5 → 15 15 to 35 25 35
maximumRedditSubscriptions (new) 30 30 to 60 45 60
  • LimitDefinitions and the @default of each column change together, as the schema comment asks.
  • The Reddit limit is a new field of StarylLimits, so Staryl's token reads it from GET /guilds/:id. /config show and /config set pick it up from LimitDefinitions.

📝 Migration

20261117180000_raise_staryl_limits sets the new column defaults and adds maximum_reddit_subscriptions. It also raises every stored guild below the new free value to that value. A guild stored with more keeps its value.

Checked on a throwaway Postgres. After the old migrations, three guilds were stored: one with the old free values, one at YouTube 5 and Twitch 10, and one at YouTube 10 and Twitch 20. After this migration they read 10/15/30, 10/15/30 and 10/20/30. prisma migrate diff from that database to the schema is empty.

Nothing applies migrations in the image. Run prisma migrate deploy against Ring's database before or with the deploy.

⚠️ Ring's Continuous Delivery has failed since 23 October. pnpm install runs the prepare script, which needs .husky/install.mjs, and the Dockerfile does not copy it. This change does not reach production until #130 fixes it.

🤖 AI disclosure: Wolfstar Agent Kit modified this description. AI open source policy.

Staryl now enforces its per-guild limits through Ring. The free values
become 10 YouTube, 15 Twitch live and 30 Reddit subscriptions, and the
paid tiers move above them.

The migration sets the new column defaults, adds the Reddit limit, and
raises a guild stored with less than the new free value. A guild stored
with more keeps it.
@coldtea-pr-lens

coldtea-pr-lens Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Architecture

Walkthrough of Raise Staryl subscription limits and add Reddit limit, in three steps

Read this PR faster


Data flow

Data flow diagram for wolfstar-project/ring at 2ddab80

Follow each request


Data model

Data model diagram for wolfstar-project/ring at 2ddab80

Open the canvas


Review

✨ Nothing flagged · reviewed 2ddab80


Tip

The diagrams are links. Click one to open it on the canvas, then press W or click play to walk through the change

🪧 More tips
  • Run npx skills add coldteadotai/pr-lens, then tell your coding agent: "Diagram the change you just made with PR Lens and attach it to the pull request."
  • Run npx @coldtea/pr-lens-cli analyze --base origin/main on a branch, then npx @coldtea/pr-lens-cli render .pr-lens/graph.json. Same lenses, your own model key, before the pull request exists
  • Click the link under each diagram to open it on a canvas you can zoom, pan and step through
  • Open a diagram on the canvas, then press W or click play to walk through the change one step at a time
  • The CLI's render reads .github/pr-lens.yml and applies your renames, exclusions and lane pins at draw time
  • Set github.comment.collapsed: true in .github/pr-lens.yml to fold the comment behind one View architecture… row. Drawing still runs as before
  • Set github.draw: on-demand in .github/pr-lens.yml and PR Lens stops drawing pull requests on its own. Comment @pr-lens draw on a pull request when you want that one drawn
  • Add .github/workflows/pr-lens.yml with coldteadotai/pr-lens/packages/action@v0 and your model provider's key as its api-key to run PR Lens from your own CI. Any /chat/completions endpoint works
  • After a push, tick Redraw to draw the latest commit
  • Switch GitHub to dark mode and the diagrams follow. The moving dots are this pull request's data in motion
  • Set github.description: false in .github/pr-lens.yml to stop PR Lens adding buttons to your PR descriptions

Thanks for using PR Lens! It's free for OSS. If it helped, a star helps other teams find it.  Star PR Lens on GitHub

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes: the full diff of the single commit, checked for consistency between the schema, the migration and LimitDefinitions.

  • Migration 20261117180000_raise_staryl_limits: sets the new column defaults, adds maximum_reddit_subscriptions, and raises stored YouTube and Twitch values below the new free floor. Guilds stored above it keep their value.
  • Schema prisma/schema.prisma: new defaults (10/15/30) and @tier comments (20/30, 25/35, 45/60) match the PR table.
  • Limit definitions src/lib/common/limits.ts: default, min and max agree with the schema defaults, and maximumRedditSubscriptions is added for staryl.
  • Types src/lib/types/limits.ts: StarylLimits gains maximumRedditSubscriptions. Mappings, getAllDefaults, GuildLimitFields and /config all derive from LimitDefinitions, so nothing else needs updating.

Two operational points from the PR description still apply. prisma migrate deploy has to run against Ring's database, and the failing Continuous Delivery (the Dockerfile missing .husky/install.mjs) has to be fixed before this reaches production.

Pullfrog  | View workflow run | Using claude-sonnet-5-5 | 𝕏

@kodiakhq
kodiakhq Bot merged commit a8fe438 into main Nov 17, 2026
13 of 15 checks passed
@kodiakhq
kodiakhq Bot deleted the feat/staryl-limits branch November 17, 2026 17:30
kodiakhq Bot added a commit that referenced this pull request Nov 17, 2026
### 🔗 Linked issue

No issue. Found while adding Staryl's limits (#129), which need Ring
deployed and answering.

### 🧭 Context

Ring has not shipped since 23 October, and the code on `main` would not
answer if it did. Staryl and WolfStar read their per-guild limits from
`GET /guilds/:id`.

### 📚 Description

Two fixes, one commit each:

- **The image build.** `tsconfig.base.json` extends
`.stars/tsconfig.app.json`, which `stars prepare` writes and git
ignores. CI runs that step, but the Dockerfile did not, so `prisma
generate` stopped at "File './.stars/tsconfig.app.json' not found" and
every Continuous Delivery run failed. The builder stage now runs `pnpm
exec stars prepare` first.
- **The routes.** Every route sets its own `name`. plugin-api takes the
path and the method of a named route from its options, not from its file
name. With none given, all ten routes matched nothing and answered 404.
Each now sets `route` and `methods` to what its file implied.

Checked by hand, with the image built locally and a throwaway Postgres:

| Request | Before | After |
| --- | --- | --- |
| `GET /` | 404 | 200 |
| `GET /guilds/:id` without a token | 404 | 401 |
| `GET /guilds/:id` with Staryl's token, a stored guild | 404 | 200, its
stored limits |
| `GET /guilds/:id` with Staryl's token, an unknown guild | 404 | 200,
the defaults |
| `GET /guilds/:id` with WolfStar's token | 404 | 200, WolfStar's fields
only |
| `GET /experiments` | 404 | 500 locally, which had no Redis |

> 🤖 AI disclosure: [Wolfstar Agent
Kit](https://github.com/wolfstar-project/wolfstar-agent-kit) modified
this description. [AI open source
policy](https://harlanzw.com/blog/ai-in-open-source).


<!-- pr-lens:description -->
<br>
<p align="center"><a
href="https://prlens.dev/s/wolfstar-project/ring/130?utm_source=github&amp;utm_medium=pr_description#architecture&amp;s=1"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://prlens.dev/comment/cta/read-pr-faster-outline-dark.svg"><img
alt="Read this PR faster"
src="https://prlens.dev/comment/cta/read-pr-faster-outline-light.svg"></picture></a></p>
<!-- /pr-lens:description -->

<!-- greptile_comment -->

<!-- greptile_summary -->

<h2><a
href="https://app.greptile.com/api/retrigger?id=110078889&amp;sig=dc558ab398cf56e29a84be4ae90428d3f55708933b68da0bf69c53a4a72b3b1d"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/RetriggerDark.svg?v=2"><source
media="(prefers-color-scheme: light)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2"><img
alt="Retrigger"
src="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2"
align="right"></picture></a><a
href="https://app.greptile.com/-/switch-tenant?tenant=wolfstar-project&amp;next=%2Fwolfstar-project%2Fring%2Fpull%2F130&amp;utm_source=greptile_review&amp;utm_medium=github&amp;utm_campaign=view_in_greptile"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptileDark.svg?v=2"><source
media="(prefers-color-scheme: light)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptile.svg?v=2"><img
alt="View in Greptile"
src="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptile.svg?v=2"
align="right"></picture></a>Confidence Score: 5/5</h2>

<!-- greptile-impact-verdict --> The PR appears safe to merge; no
actionable defects were found.

<!-- greptile_confidence_score:5 -->

<sub>Reviews (1) · Last reviewed commit: ["fix(routes): give each named
route its
p..."](7fbd7ef)
· [Reviewed by
Greptile](https://www.greptile.com/?utm_source=greptile_review&utm_medium=github&utm_campaign=review_public&utm_content=wolfstar-project/ring)</sub>

<!-- /greptile_comment -->

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
RedStar071 added a commit that referenced this pull request Nov 23, 2026
### Context

Weekly AGENTS.md review of PRs merged into `main` in the last 7 days
(#128–#131).

### What changed and why

- **`.github/copilot-instructions.md`** — the "Internal API" key pattern
and
"API Route Structure" section said plugin-api infers a route's path and
method from its file location. That's no longer accurate (if it ever
was):
#130 found all ten existing routes were missing explicit
`route`/`methods`
  options and were 404ing in production as a result. Corrected the
  description, the code example, and added a second "non-obvious gotcha"
entry for it, since this is exactly the kind of silent failure the
existing
  gotcha about route `name` collisions already warns about.
- Noted that the Dockerfile's builder stage also runs `pnpm exec stars
prepare` before `prisma:generate`/`build` now (#130), next to the
existing
  Troubleshooting entry about that same step in CI.
- Noted the new `semantic-pull-requests.yml` workflow (#128): PR titles
follow Conventional Commits with a lowercase subject, and CI
posts/removes
  a sticky comment on failures. Added a one-line mention to both
  `AGENTS.md`'s quick reference and `copilot-instructions.md`'s commit
  message section.

#129 (raising Staryl's free limits, adding a Reddit limit) and #131
(dropping
an unused Kodiak config block) didn't need any documentation changes —
the
existing `limits.ts` file reference already covers #129, and #131 is
internal
CI config with no agent-facing convention.

---
_Generated by [Claude Code](https://claude.ai/code)_

<!-- greptile_comment -->

<!-- greptile_summary -->

<h2><a
href="https://app.greptile.com/api/retrigger?id=116062713&amp;sig=607b14af4cc34dd06434b097ba641b2e1f1ae80f4fc53e0f305f1670fcc962a3"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/RetriggerDark.svg?v=2"><source
media="(prefers-color-scheme: light)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2"><img
alt="Retrigger"
src="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2"
align="right"></picture></a><a
href="https://app.greptile.com/-/switch-tenant?tenant=wolfstar-project&amp;next=%2Fwolfstar-project%2Fring%2Fpull%2F136&amp;utm_source=greptile_review&amp;utm_medium=github&amp;utm_campaign=view_in_greptile"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptileDark.svg?v=2"><source
media="(prefers-color-scheme: light)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptile.svg?v=2"><img
alt="View in Greptile"
src="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptile.svg?v=2"
align="right"></picture></a>Confidence Score: 5/5</h2>

<!-- greptile-impact-verdict --> This documentation-only PR appears safe
to merge.

<!-- greptile_confidence_score:5 -->

<sub>Reviews (1) · Last reviewed commit: ["docs: update AGENTS.md to
reflect
recent..."](3446e3b)
· [Reviewed by
Greptile](https://www.greptile.com/?utm_source=greptile_review&utm_medium=github&utm_campaign=review_public&utm_content=wolfstar-project/ring)</sub>

<!-- /greptile_comment -->
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