Qikuyueser.com

Validate Rewrites with Shadow Traffic

Added 2026-10

Validate Rewrites with Shadow Traffic — Chinese original prompt

我们重写了 [旧功能],想在真实流量下验证。请设计影子流量方案:请求如何复制、哪些写操作要拦掉、结果怎么比对、差异如何归类和抽样。输出:流量复制与隔离方案、比对规则(字段级容差)、差异看板要盯的指标、以及判定可以切换的条件。
Site original

Chinese original

Open in ChatGPT

Example

Sample input

我们重写了优惠券计算,想在真实流量下验证,帮我设计影子流量方案和切换条件。

The output should include

  • 请求复制与写操作拦截说清
  • 字段级容差与差异归类规则
  • 给出判定能否切换的条件清单

Replace these placeholders 1

Swap the bracketed parts for your own details before sending.

  • [旧功能]
How to use

影子链路里的写操作必须打住,否则同一笔业务会被做两次。

Try tweaking it

  • Have it restate requirements and constraints before writing code.
  • Ask for the smallest change plus a rollback path, not a full-file rewrite.

What you should get

  • A minimal, runnable change with copy-ready code
  • Impact list: which files and call sites must follow

Common mistakes

  • Asking it to touch ten files at once, then losing track of what broke what.
  • Pasting only the error, with no code or version, and getting an unfixable answer.

How to check the output

  • The change runs, can be rolled back, and touches nothing unrelated.
  • Edge cases (empty, oversized, concurrent) are covered or explained.

Where it works

  • Good for: having it restate requirements and constraints, then propose the smallest runnable change.
  • Watch out: include versions and a minimal reproduction with the error, or the fix may look plausible but not fit.

More in this topic