[fix] Harden hosted subscription release paths - #6751
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (13)
Disabled knowledge base sources:
📝 SummarySummary by CodeRabbit
WalkthroughThe change adds path-triggered refresh coverage to the release gate, canonical subscription-secret conflict handling, rotating publisher credentials with retry support, and best-effort subscription recovery during sandbox acquisition. ChangesRelease gate coverage
Subscription secret storage
Runner subscription authentication
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant SubscriptionPublisher
participant PlatformCredentialLease
participant SubscriptionAPI
SubscriptionPublisher->>PlatformCredentialLease: Resolve current credential
SubscriptionPublisher->>SubscriptionAPI: Publish login with authorization
SubscriptionAPI-->>SubscriptionPublisher: Return 401 or 403
SubscriptionPublisher->>PlatformCredentialLease: Refresh credential
SubscriptionPublisher->>SubscriptionAPI: Retry login with refreshed authorization
SubscriptionPublisher->>PlatformCredentialLease: Release on stop
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
|
Agenta Product Agent seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
Railway Preview Environment
|
Problem
Hosted ChatGPT sessions can lose a rotated login after the initial Agenta run credential expires. A
401or403currently marks the rotated login as acknowledged even though the vault never stored it. Acquire-time recovery can also skip environment cleanup when recovery throws, and concurrent ChatGPT connection creation can escape the application precheck and fail as an unhandled database conflict.This is a follow-up to #6674.
Result
401and403responses without acknowledging the login.chatgptstorage slug and translate the database uniqueness tie-breaker into the existing subscription409conflict.refreshjourney mandatory when release changes touch subscription storage or publication, even when the release command uses--only.How to review
publisher.ts: verify each API request reads the lease's current credential, authentication failures remain unacknowledged, andstop()releases the lease.environment.ts: a recovery exception is logged and execution reachesenvironment.destroy().services.pyand the secrets DAO: the provider owns the storage slug and the unique-index race becomesSubscriptionProviderConflict.path_triggers.pyandqa_product.py: subscription paths select H1/H2 and force therefreshjourney.Validation
pnpm exec vitest run --project unit tests/unit/subscription-login-publish.test.ts tests/unit/subscription-recovery-throws.test.ts(25 passed)pnpm run typecheck(passed)pytest -q oss/tests/pytest/unit/secrets(167 passed)pytest -q .agents/skills/agent-release-gate/resources/test_qa_product_concurrency.py -k subscription_change(1 passed)build:extensionin a fresh checkout and pass after building it. The remainingAGENTA_API_URLexpectation failure reproduces unchanged onorigin/release/v0.117.0.