Skip to content

chore(ai-proxy): remove expired isActiveReviewPromo and related code#1688

Merged
chrarnoldus merged 3 commits intomainfrom
chore/remove-review-promo
Mar 30, 2026
Merged

chore(ai-proxy): remove expired isActiveReviewPromo and related code#1688
chrarnoldus merged 3 commits intomainfrom
chore/remove-review-promo

Conversation

@kilo-code-bot
Copy link
Copy Markdown
Contributor

@kilo-code-bot kilo-code-bot bot commented Mar 28, 2026

Summary

Remove all Sonnet 4.6 free review promo logic (isActiveReviewPromo, REVIEW_PROMO_* constants) since the promotion (Feb 18–25, 2026) has ended. This cleans up:

  • The promo function & constants in code-reviews/core/constants.ts
  • Balance gate bypass in the OpenRouter API route (previously let zero-balance users through for the promo model)
  • Cost zeroing for promo requests in processUsage.ts
  • Response cost-stripping for the promo model in the API route
  • Admin getReviewPromotionStats tRPC endpoint
  • UI "(free)" badge on the promo model in ReviewConfigForm
  • Promo logging in prepare-review-payload.ts
  • Two scripts: the promo integration test and the post-promo migration script

Verification

  • grep -r confirms zero remaining references to isActiveReviewPromo, REVIEW_PROMO_MODEL, REVIEW_PROMO_START, or REVIEW_PROMO_END
  • Typecheck blocked by missing node_modules/tsgo in CI sandbox — no type errors introduced (pure deletions and import removals)

Visual Changes

N/A

Reviewer Notes

Pure deletion PR — no behavior changes for any active code path since the promo already expired (end date was 2026-02-25T14:00:00Z). The migration script (d2026-03-03_migrate-promo-users-to-minimax.ts) was a one-off that has already been run.

The Sonnet 4.6 free review promo (Feb 18-25, 2026) has ended. Remove
all promo logic: the isActiveReviewPromo function, REVIEW_PROMO_*
constants, balance gate bypass, cost zeroing, response rewriting,
admin stats endpoint, UI '(free)' badge, promo logging, and the
test/migration scripts.
@kilo-code-bot
Copy link
Copy Markdown
Contributor Author

kilo-code-bot bot commented Mar 28, 2026

Code Review Summary

Status: 3 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 3
SUGGESTION 0

Fix these issues in Kilo Cloud

Issue Details (click to expand)

N/A — no new issues were found on lines that are part of the current gh pr diff output.

Other Observations (not in diff)

Issues found in merged changes since a0d9f5ef9dd3e6ccd7e4416515242bae48b26b3c that are not part of the current PR diff, so they cannot receive inline comments:

File Line Issue
src/routers/kiloclaw-router.ts 1061 Live status polling is keyed only by userId, so polling an older run after a newer run starts can persist the newer controller output/status onto the older DB row.
src/routers/kiloclaw-router.ts 1096 Cancel also ignores runId, so cancelling a stale row can terminate a different active run and mark the wrong DB record as cancelled.
kiloclaw/controller/src/routes/kilo-cli-run.ts 236 The controller marks a run cancelled before the child exits, which lets /start launch another run while the first process is still alive.
Files Reviewed (43 files)
  • kiloclaw/controller/src/bootstrap.test.ts
  • kiloclaw/controller/src/bootstrap.ts
  • kiloclaw/controller/src/config-writer.ts
  • kiloclaw/controller/src/index.ts
  • kiloclaw/controller/src/kilo-cli-config.test.ts
  • kiloclaw/controller/src/kilo-cli-config.ts
  • kiloclaw/controller/src/routes/kilo-cli-run.test.ts
  • kiloclaw/controller/src/routes/kilo-cli-run.ts - 1 issue
  • kiloclaw/src/durable-objects/gateway-controller-types.ts
  • kiloclaw/src/durable-objects/kiloclaw-instance.test.ts
  • kiloclaw/src/durable-objects/kiloclaw-instance/index.ts
  • kiloclaw/src/durable-objects/kiloclaw-instance/kilo-cli-run.ts
  • kiloclaw/src/routes/platform.ts
  • packages/db/src/migrations/0064_add_kiloclaw_cli_runs.sql
  • packages/db/src/migrations/meta/0064_snapshot.json
  • packages/db/src/migrations/meta/_journal.json
  • packages/db/src/schema.ts
  • src/app/(app)/claw/components/InstanceControls.tsx
  • src/app/(app)/claw/components/StartKiloCliRunDialog.tsx
  • src/app/(app)/claw/components/changelog-data.ts
  • src/app/(app)/claw/kilo-cli-run/[id]/page.tsx
  • src/app/admin/api/kiloclaw-analytics/hooks.ts
  • src/app/admin/api/kiloclaw-analytics/route.ts
  • src/app/admin/components/KiloclawCliRuns/KiloclawCliRunsTab.tsx
  • src/app/admin/components/KiloclawDashboard.tsx
  • src/app/admin/components/KiloclawInstances/KiloclawInstanceDetail.tsx
  • src/app/api/openrouter/[...path]/route.ts
  • src/components/cloud-agent-next/ChatSidebar.tsx
  • src/hooks/useKiloClaw.ts
  • src/lib/drizzle.ts
  • src/lib/kilo-auto-model.ts
  • src/lib/kiloclaw/credit-billing.ts
  • src/lib/kiloclaw/kiloclaw-internal-client.ts
  • src/lib/kiloclaw/types.ts
  • src/lib/llm-proxy-helpers.ts
  • src/lib/notifications.ts
  • src/lib/promoCreditCategories.ts
  • src/lib/user.test.ts
  • src/lib/user.ts
  • src/routers/admin-code-reviews-router.ts
  • src/routers/admin-kiloclaw-instances-router.ts
  • src/routers/kiloclaw-router.ts - 2 issues
  • src/scripts/encrypt-promo-codes.ts

Reviewed by gpt-5.4-20260305 · 2,309,080 tokens

@chrarnoldus chrarnoldus merged commit 33dd48d into main Mar 30, 2026
19 checks passed
@chrarnoldus chrarnoldus deleted the chore/remove-review-promo branch March 30, 2026 12:01
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.

2 participants