Skip to content

feat: upgrade krm-stream, enforce shared rate limits, and reconcile docs - #31

Merged
sunib merged 2 commits into
mainfrom
fix/repository-review-and-shared-rate-limit
Oct 4, 2026
Merged

sunib merged 2 commits into
mainfrom
fix/repository-review-and-shared-rate-limit

Conversation

@sunib

@sunib sunib commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Shared-watch traffic could exceed -shared-watch-qps: Kubernetes clients had separate rate budgets, and client-go bypasses its limiter when opening watches. Charge access reviews, watch openings, fallback lists and retries to one transport-level budget, with cancellation and request-body cleanup tested.

This also upgrades krm-stream to 0.7.0, removes the superseded lazy-watch workaround, and records refusals once with the user and refusing component. Documentation now distinguishes implemented behavior from planned features, labels historical investigations, corrects deployment/security/streaming guarantees, and orders the remaining work around deployment, capacity, a second application, refresh, shared storage and release maintenance. CI now runs the existing vendor check alongside lint.

This PR includes the prerequisite upgrade from #29 so the complete reviewed result can be tested and merged against main. It overlaps that PR; the separate Helm chart work is excluded.

Validation: task verify (tidy/vendor checks, lint, unit/race tests, fuzzing, browser-helper tests, container smoke tests and Kubernetes/Dex/browser e2e). Seven pre-existing pending e2e specifications remain pending and are documented as gaps.

sunib and others added 2 commits October 4, 2026 17:50
…ith its user

krm-stream 0.7.0 took asks 9, 10 and 13 of docs/investigations/krm-stream-shared-watches.md.

- Ask 9: a shared watch opens outside the gateway's backend-wide lock, under a context its
  waiting streams share. krm-foyer's workaround, which opened it on the first Next, is
  gone; TestAStuckOpeningHoldsUpNoOtherScope stays, fails against 0.6.0, and now fails
  rather than hangs.
- Ask 10: krm-stream refuses timed rechecks without a write timeout. krm-foyer always set
  one; a server test checks that every route in front of a stream lets it flush and set
  write deadlines, over HTTP/1.1 and HTTP/2.
- Ask 13: the decision cache's key cites the review attributes krm-stream now documents,
  and the guard test also checks the subresource.

The hello example vendors the 0.7.0 browser bundle, which differs only in its version.

Every refusal is now one "refused" log line with by (krm-foyer or kubernetes), the user as
the issuer named them, route, method, path and reason: krm-foyer's interruptions below
500, the API server's 401, 403, 409 and 422 on /k8s, and a stream's FORBIDDEN,
UNAUTHENTICATED and SCOPE_INVALID with the scope. An interruption from 500 stays an
"interruption" line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 4, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 10 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e56b387d-f576-463e-8dd3-67c4c7aa50b3
📥 Commits

Reviewing files that changed from the base of the PR and between 4b95da1 and c8f267b.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (34)
  • .github/workflows/ci.yml
  • CONTRIBUTING.md
  • README.md
  • SECURITY.md
  • Taskfile.yml
  • docs/alternatives.md
  • docs/bounds.md
  • docs/design.md
  • docs/frontend.md
  • docs/heritage.md
  • docs/ingress.md
  • docs/investigations/choosing-an-issuer.md
  • docs/investigations/krm-stream-feedback.md
  • docs/investigations/krm-stream-shared-watches.md
  • docs/roadmap.md
  • docs/testing.md
  • docs/vision.md
  • docs/watches.md
  • examples/hello/web/krm-stream.js
  • go.mod
  • internal/auth/auth.go
  • internal/auth/credentials_test.go
  • internal/gate/gate.go
  • internal/pages/templates/start.html
  • internal/proxy/interruption_test.go
  • internal/proxy/lifecycle_test.go
  • internal/proxy/proxy.go
  • internal/proxy/proxy_test.go
  • internal/server/server.go
  • internal/server/server_test.go
  • internal/stream/shared.go
  • internal/stream/shared_test.go
  • internal/stream/stream.go
  • internal/stream/stream_test.go
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@sunib
sunib merged commit 50e79c6 into main Oct 4, 2026
10 checks passed
@sunib
sunib deleted the fix/repository-review-and-shared-rate-limit branch October 4, 2026 18:51
@github-actions github-actions Bot mentioned this pull request Oct 4, 2026
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