feat: bypass stake — default mcp_status='active' (GHB-196)#98
Merged
Gastonfoncea merged 6 commits intoMay 17, 2026
Conversation
Diseño aprobado en brainstorming: cambiar el default de profiles.mcp_status de 'pending_stake' a 'active' via DB migration, migrar los users existentes en pending_stake al mismo SQL, redirect /app/stake → /app/credentials, remover el banner stakeRequired + prop disabled del flow de credentials. Stake infra (StakeClient, /api/stake, gas-station validator) queda congelada para reactivar via GHB-195 cuando se redeploy el programa Anchor. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
18 tareas en 6 fases: schema + migration → redirect /app/stake → cleanup UI credentials → workspace typecheck/test/build → PR (con consent humano) → migration aplicada por humano post-merge. Cada commit del PR es self-contained (3 commits: db migration, redirect, UI cleanup) para revert quirúrgico si algo se rompe. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Migration 0025_bypass_stake: change the DEFAULT of profiles.mcp_status from 'pending_stake' to 'active' and backfill existing pending_stake rows. Unblocks new signups from the broken on-chain init_stake_deposit step (the Anchor program deployed on devnet predates that instruction). The stake feature is parked, not removed: StakeClient, /api/stake, and the gas-station validator are frozen for reactivation via GHB-195. Migration must be applied by a human (pnpm db:migrate against prod Supabase) per CLAUDE.md — CI does not run migrations. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The implementer used a 2025 timestamp (1747526400000) by mistake; should be current (2026-05-17). Updated to 1779057697000. Drizzle does not use `when` for ordering, but consistent timestamps help humans reading the journal. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Stake feature parked per GHB-195 (Anchor program redeploy pending). StakeClient.tsx preserved as frozen code; only page.tsx changes to a thin redirect so users with old bookmarks land somewhere sensible instead of hitting a 404. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
CredentialsClient.tsx: remove the 'Activá tu cuenta de MCP' banner and the stakeRequired derivation. ApiKeysSection: drop the 'disabled' prop and its consumers (Button disabled + tooltip). Audit ConnectedAppsSection for the same prop (no-op if absent). Public /agents landing: collapse the 'Paso 2 — Activá tu cuenta' stake step; renumber 'Paso 3 — Conectá tu agente' as the new Paso 2. Update hero text from '3 pasos' to '2 pasos' and metadata description. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes GHB-196. Related: GHB-195 (re-enable stake when Anchor program redeployed).
Summary
The on-chain
init_stake_depositinstruction is missing from the Anchor program deployed in devnet (the binary predates the stake commits). Every new signup hitsAnchorError: InstructionFallbackNotFoundand cannot mint an API key.Until the program is redeployed (tracked separately in GHB-195), this PR parks the stake feature in the product: new profiles default to
mcp_status='active'so they skip the stake step entirely.Changes
packages/db/drizzle/0025_bypass_stake.sql) — change the DEFAULT ofprofiles.mcp_statusfrom'pending_stake'to'active'and backfill existing'pending_stake'rows.frontend/app/app/stake/page.tsx) —/app/stakeredirects to/app/credentials.StakeClient.tsxpreserved as frozen code.CredentialsClient.tsx,ApiKeysSection.tsx,agents/page.tsx) — drop thestakeRequiredbanner,disabledprop, and collapse the stake step in the/agentslanding (renumber Paso 3 → Paso 2, update meta/hero to "2 pasos").Frozen for reactivation (NOT touched)
frontend/lib/stake-route-core.tsandfrontend/app/api/stake/route.tsfrontend/app/app/stake/StakeClient.tsxfrontend/app/api/gas-station/sponsor/route.tsandpackages/shared/src/gas-station/apps/mcp/lib/auth/middleware.ts(still rejects non-active, protectingsuspended)mcp_status === 'active'Migration status
Already applied manually to prod via Supabase SQL Editor (the standard pattern in this repo for migrations 0017-0024 per GHB-190's tech-debt note). Verified post-apply:
column_defaultonprofiles.mcp_statusis now'active'::agent_statusactivestate, zero inpending_stakepnpm db:migratewas NOT used because the Drizzle journal in this repo has known gaps (0023, 0024 entries missing) and the tooling currently fails silently when applying against prod. Cleaning up the migration workflow is tracked in GHB-190. The0025_bypass_stake.sqlfile + journal entry are committed for documentation and future automation; the actual schema change is already live.Test plan
pnpm typecheck(workspace-wide) passespnpm test(workspace-wide) passespnpm --filter frontend buildsucceeds/app/stakereturns 307 →/app/credentials/agentsshows 2 "Paso" sections (was 3)'active', zeropending_stakerows/app/credentialsdirectly → mint API key →whoamiagainstmcp.ghbounty.comreturnsmcp_status: 'active'Spec & plan
docs/superpowers/specs/2026-05-17-bypass-stake-mcp-status-design.mddocs/superpowers/plans/2026-05-17-bypass-stake-mcp-status.mdReversal plan
When GHB-195 reactivates stake:
ALTER TABLE profiles ALTER COLUMN mcp_status SET DEFAULT 'pending_stake'🤖 Generated with Claude Code