Skip to content

fix(staging): pin website liveness probe to port 4000 - #1111

Closed
think-back wants to merge 3 commits into
mainfrom
feat/subscription-entitlements-v2
Closed

think-back wants to merge 3 commits into
mainfrom
feat/subscription-entitlements-v2

Conversation

@think-back

@think-back think-back commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • keep the staging website Cloud Run liveness probe aligned with container port 4000
  • prevent inherited port 8080 drift from restarting healthy staging instances

Scope

  • one staging deployment workflow line only
  • no frontend UI or copy changes
  • no backend, database, Stripe, entitlement, or production service changes

This PR remains draft; the equivalent fix is already merged and verified on the staging branch.

Publish the new 13/45/170 monthly value contract and remove short-window marketing. Keep actual checkout discounts sourced from backend quotes.

Constraint: Future purchases use new plan and Stripe Price versions while historical entitlements and renewals retain their snapshots

Rejected: Updating existing Go/Pro/Max plan rows | would change grandfathered users and recurring bindings

Confidence: high

Scope-risk: moderate

Directive: Keep historical plan rows and 5h/7d compatibility paths immutable

Tested: Wallet 83 tests; website 48 tests and typecheck; both production builds; local website and console previews; staging entitlement snapshot audit

Not-tested: End-to-end Stripe checkout will run after the staging deployment
@KingCesc

KingCesc commented Sep 7, 2026

Copy link
Copy Markdown

🤖 OpenCodeReview · 评审 commit aa3aa360 · 共 1 条

web/default/src/features/wallet/components/subscription-plans-card.tsx

  • L886-893: [严重] 这里把划线原价和折扣角标的来源完全改成了 discountPreview。如果报价尚未返回、请求失败或被跳过,Go/Pro/Max 这类活动卡片就会直接失去原价/优惠标识,导致页面促销展示与静态配置不一致,用户可能看不到应有的折扣信息。建议保留静态参考价兜底,至少在 discountPreview 不可用时仍能渲染活动价和优惠标签。
const originalPrice =
                  getPlanReferencePrice(plan) ||
                  (discountPreview
                    ? formatPlanPrice(discountPreview.originalTotal, currency)
                    : null)
                const hasCampaignDiscount = Boolean(
                  originalPrice && originalPrice !== displayPrice
                )
                const campaignDiscountLabel =
                  getPlanCampaignDiscountLabel(discountPreview)

Constraint: The staging website listens on port 4000 while its inherited Cloud Run liveness probe had drifted to 8080.
Rejected: Rely on Terraform to repair the probe | The service lifecycle intentionally ignores probe changes.
Confidence: high
Scope-risk: narrow
Directive: Keep the staging deploy probe aligned with the website container port.
Tested: git diff --check; live Cloud Run revision probes / on port 4000 successfully
Not-tested: Full workflow run occurs after merge to staging
Constraint: The user explicitly excluded frontend changes from the new subscription entitlement rollout.
Rejected: Drop the branch entirely | The independent staging liveness repair must remain available for main.
Confidence: high
Scope-risk: narrow
Directive: Keep plan entitlement configuration separate from public pricing and wallet presentation unless explicitly requested.
Tested: all 14 frontend files exactly match the pre-change parent; git diff --check; staging liveness flag remains on port 4000
Not-tested: No production deployment is authorized
@think-back think-back changed the title Version future subscription entitlements without changing legacy users fix(staging): pin website liveness probe to port 4000 Sep 7, 2026
@KingCesc

KingCesc commented Sep 7, 2026

Copy link
Copy Markdown

🤖 OpenCodeReview · 评审 增量 534353c4..668f53c5 · 共 1 条

web/default/src/features/wallet/components/subscription-plans-card.tsx

  • L987-990: [严重] 这里把折扣徽标和 aria/数据属性都固定成 80% off,但上文的原价/现价仍然是按具体套餐与币种动态推导的;当前这些套餐的实际折扣并不都是 80%,后续只要价格配置或货币口径变化,就会继续展示错误的促销文案,容易造成订阅页价格误导。建议继续根据 originalPricedisplayPrice 计算折扣百分比,或直接由后端下发统一的折扣文案。
data-subscription-discount-label={campaignDiscountLabel}
                              className='inline-flex rounded-full border border-rose-200 bg-rose-50 px-2 py-1 text-[11px] font-semibold text-rose-700 dark:border-rose-800/70 dark:bg-rose-950/40 dark:text-rose-300'
                            >
                              {campaignDiscountLabel}

@think-back

Copy link
Copy Markdown
Collaborator Author

Superseded by #1116, recreated cleanly from the latest main branch with only the staging liveness workflow change. All subscription frontend changes have been removed as requested.

@think-back think-back closed this Sep 7, 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.

2 participants