Skip to content

fix(staging): preserve staged benchmark runs / 修复预发布基准测试运行持久化 - #643

Merged
cquil11 merged 1 commit into
masterfrom
agent/persist-staged-runs
Jul 29, 2026
Merged

fix(staging): preserve staged benchmark runs / 修复预发布基准测试运行持久化#643
cquil11 merged 1 commit into
masterfrom
agent/persist-staged-runs

Conversation

@cquil11

@cquil11 cquil11 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Preserve previously staged benchmark runs when /stage-results ingests another run.
  • Keep staging requests globally serialized so database writes cannot overlap.
  • Continue using the existing idempotent run-keyed ingestion, so staging the same run ID updates that run without removing other staged runs.
  • Add a manual-only reset-staging-database option for intentionally restoring Neon staging from production before an ingest.

Why

The staging workflow currently restores the Neon staging branch from production before every ingest. That makes staging a single replaceable slot: staging run B deletes staged run A. Staging is intended to accumulate independently addressable runs, with replacement scoped to the same run ID.

Companion PR

InferenceX PR #2412 updates /stage-results acknowledgment and completion messages to describe the persistent behavior.

Validation

  • actionlint .github/workflows/stage-results.yml
  • bun run fmt
  • bun run lint
  • bun run typecheck
  • bun run test:unit — 3,441 tests passed

中文说明

变更概述

  • /stage-results 写入新运行时,继续保留此前已发布的基准测试运行。
  • 保留全局串行机制,避免多个预发布数据库写入并发执行。
  • 继续使用现有的按运行键幂等写入逻辑;重复发布同一运行 ID 时只更新该运行,不会移除其他已发布运行。
  • 新增仅供手动触发的 reset-staging-database 选项,需要明确选择后才会在写入前从生产环境恢复 Neon staging。

背景

当前预发布工作流会在每次写入前将 Neon staging 分支恢复到生产数据库状态,因此预发布环境实际上只有一个可替换槽位:发布运行 B 会删除此前发布的运行 A。预发布环境应能累积多个可独立访问的运行,且替换范围仅限相同的运行 ID。

配套 PR

InferenceX PR #2412 会更新 /stage-results 的请求确认与完成提示,使其准确说明运行持久化语义。

验证

  • actionlint .github/workflows/stage-results.yml
  • bun run fmt
  • bun run lint
  • bun run typecheck
  • bun run test:unit — 3,441 项测试通过

Note

Medium Risk
Changes shared staging DB semantics (data persistence vs full reset) and keeps a destructive Neon restore path behind an explicit flag; ingest concurrency is unchanged.

Overview
Staging no longer wipes the Neon staging database on every /stage-results ingest. The job formerly named refresh-staging-database is now prepare-staging-database: by default it skips the Neon restore and relies on idempotent, run-keyed ingestion so new runs accumulate and re-staging the same run ID only updates that run.

Opt-in reset: workflow_dispatch gains a reset-staging-database boolean (default false). When true, behavior matches the old path—restore staging from production before ingest—and validation passes the flag through job outputs. The report job’s success gate and needs list were updated for the renamed prepare job.

Reviewed by Cursor Bugbot for commit 4170af0. Bugbot is set up for automated code reviews on this repo. Configure here.

Keep normal staging ingests cumulative and expose an explicit manual reset that restores the Neon branch from production. Re-staging remains idempotent for the selected workflow run.

中文:修复预发布流程,使常规写入累积保留已发布的基准测试运行;仅在显式手动重置时从生产环境恢复 Neon 分支。重复发布同一工作流运行仍保持幂等更新。
@vercel

vercel Bot commented Jul 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
inferencemax-app Ready Ready Preview Jul 29, 2026 8:08pm

Request Review

@cquil11
cquil11 marked this pull request as ready for review July 29, 2026 20:14
@cquil11
cquil11 requested a review from adibarra as a code owner July 29, 2026 20:14
@cquil11
cquil11 merged commit 09ebdaa into master Jul 29, 2026
14 checks passed
@cquil11
cquil11 deleted the agent/persist-staged-runs branch July 29, 2026 20:14
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