Skip to content

fix(development-pr-workflow): backtest-change also triggers for NEW monitors/gates - #555

Open
dylanschmittle-uniswap wants to merge 3 commits into
nextfrom
dylanschmittle/backtest-change-new-monitor-trigger
Open

fix(development-pr-workflow): backtest-change also triggers for NEW monitors/gates#555
dylanschmittle-uniswap wants to merge 3 commits into
nextfrom
dylanschmittle/backtest-change-new-monitor-trigger

Conversation

@dylanschmittle-uniswap

Copy link
Copy Markdown
Contributor

Description

  • The /backtest-change command's description only advertised itself for changes to existing data-driven config ("Before opening a PR for a data-driven change…"), so authoring a brand-new monitor with a backtest-derived threshold never triggered it — even though the methodology is identical. Concrete miss: the INF-335 EGW-Go blue/green gate PR (Uniswap/backend#11307, 2026-07-30) ran the exact backtest-change workflow (21d live-history replay, threshold headroom statement) manually because the command's trigger language didn't cover new-monitor authoring.
  • Adds new-monitor/gate/alert trigger language plus a mention of joint rate-AND-floor replay for gate composites (raw per-group maxes are inflated by floor-masked drain-tails).
  • Blast radius: one frontmatter description string; command body untouched.

Testing

  • Frontmatter parses (single-line description string, no structural change)

…onitors/gates

The command only advertised itself for CHANGES to existing data-driven
config, so authoring a brand-new gate monitor with a backtest-derived
threshold (the INF-335 EGW-Go blue/green gate) didn't trigger it even
though the methodology is identical. Add new-monitor/gate trigger
language and mention joint rate-AND-floor replay for gate composites.
@vercel

vercel Bot commented Jul 30, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
ai-toolkit-slack-oauth-backend Ready Ready Preview Aug 7, 2026 8:22pm

Request Review

@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

📚 Documentation Check ✅

Verdict: Passed

The only plugin touched (development-pr-workflow) had its version bumped in both packages/plugins/development-pr-workflow/.claude-plugin/plugin.json and the root CLAUDE.md version table (2.4.0 → 2.4.1), satisfying the blocking requirement. No other docs are stale as a result of this change.


Findings\n\nVersion bump: done. packages/plugins/development-pr-workflow/.claude-plugin/plugin.json and the version table in root CLAUDE.md were both updated from 2.4.0 to 2.4.1 in the same diff — the mandatory-bump rule in CLAUDE.md is satisfied and the two sources of truth agree.\n\nBump size is a judgment call, not a blocker. The diff does two things to backtest-change/SKILL.md: (1) collapses the verbose description: frontmatter into a single line (matches the style(development-pr-workflow): single-line skill description commit already in git log), and (2) adds new operational guidance — replay composite conditions (rate AND floor) jointly rather than independently. Item (2) changes what the skill actually tells the agent to do for composite gates, which arguably leans closer to a backward-compatible enhancement (minor) than a patch under the repo's own semver guidance. It's not blocking since a bump did occur and the distinction is genuinely borderline for a 4-line addition to existing instructions — flagged as info only.\n\nNo other docs need updating. Checked packages/plugins/development-pr-workflow/CLAUDE.md and README.md for backtest-change references — both describe the skill at a level of abstraction (replay old-vs-new, refuse to ship on disproof) that the composite-condition addition doesn't invalidate. No stale content found.\n\nPlugin structure unaffected. No skills/agents/commands were added, removed, or renamed, and plugin.json's skills array doesn't need changes — this is a content edit to an existing skill file, not a structural change.

Suggestions (1)

💡 Inline suggestions have been posted as review comments. Click "Commit suggestion" to apply each fix directly.

  • ℹ️ CLAUDE.md: The added guidance (joint replay of composite conditions) changes the skill's behavior for a new class of inputs (composite gates), which fits the repo's own 'Minor bump: ... backward-compatible enhancements' criterion better than 'Patch: bug fixes, minor documentation updates.' Not blocking — a bump was made — but consider minor instead of patch if this is treated as a new capability rather than a fix.

🤖 Generated by Claude Documentation Validator | Mode: suggest

@dylanschmittle-uniswap
dylanschmittle-uniswap marked this pull request as ready for review July 30, 2026 20:38
@dylanschmittle-uniswap
dylanschmittle-uniswap requested a review from a team as a code owner July 30, 2026 20:38
@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

● Reviewed · against 660019f · 2026-08-07 20:27 UTC · view run ↗

Caution

Changes requested — the skill's YAML frontmatter no longer parses, so backtest-change stops loading entirely.

Broadens the backtest-change skill description to also fire for brand-new monitors/gates/alerts, and adds joint-replay guidance for composite gate conditions to step 4.

Assessment

The scope expansion is consistent with the skill body — step 4 already handles "old is 0" for new monitors, and the composite joint-replay paragraph matches it. But collapsing description: > into an unquoted single line exposes three : sequences to the YAML parser, and the frontmatter fails to parse at HEAD (mapping values are not allowed here, line 3 col 292 — reproduced with PyYAML; every other SKILL.md in the repo parses). The result is the inverse of the PR's goal: the skill fires for neither new nor existing monitors, and the description's "Frontmatter parses" checkbox does not hold.

Must address

  • Frontmatter fails to parse. The unquoted description contains : three times; single-quote the value (no apostrophes inside, so no escaping needed) or restore the description: > folded block. view inline thread →

Suggestions

  • The step-4 joint-replay addition is a new capability under this repo's semver guidance — 2.5.0 fits better than 2.4.1. The PR body's "command body untouched" is also inaccurate; step 4 gained four lines. view inline thread →

Tip

Teach the reviewer. React 👍 on findings that helped, 👎 on false positives. Reply to push back or add context — we aggregate this weekly to tune the bot.

Comment @request-claude-review to re-run.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📋 Review verdict: COMMENT

👆 The main review comment above is the source of truth for this PR review. It is automatically updated on each review cycle, so always refer to it for the most current feedback.

This formal review submission is for the verdict only.

…kill

The base branch converted the backtest-change command into a thin wrapper
over a skill, so the trigger wording this branch broadened now belongs on
the skill's description — that is what auto-triggers.

- Take next's command description (no longer drives triggering)
- Skill description: fires for brand-new monitors/gates, not just edits
- Replay step: composite gates must be replayed jointly, since
  per-condition counts overstate what the gate does
- Bump development-pr-workflow 2.4.0 -> 2.4.1 (+ root CLAUDE.md table)
Comment thread packages/plugins/development-pr-workflow/skills/backtest-change/SKILL.md Outdated
Matches the dominant repo convention (40 of 43 SKILL.md files use a
single-line description; only 3 used the folded scalar). Addresses
review feedback on the mid-sentence line breaks. Text unchanged.
throughput target. A proposed number is a hypothesis, not a decision: backtest
it and let the data override it. Always report old N vs new M with the window
and data source. The /backtest-change command loads this same skill.
description: Validate a data-driven change against LIVE historical data before it ships — replay old-vs-new over a real window, report whether it achieves its goal, and refuse to ship when the data disproves the premise. Fires whenever someone proposes a measurable change and names a number: "add a monitor at 700MB", "set the threshold to N", "warn at X / critical at Y", "alert when it exceeds N", "raise the timeout to 5s", "change the sampling rate", "bump the cache TTL", "tighten this alert", "loosen the threshold", "this should reduce the noise", "that will fix the p95" — and before opening any PR for a monitor threshold, alert routing or renotify cadence, metric/log/trace query, sampling rate, rate limit, autoscaling parameter, or a perf change with a latency or throughput target. Fires for a brand-new monitor, deploy gate, or alert just as it does for an edit to an existing one — a threshold invented for a gate that has never run needs the same historical replay, including the joint replay of every condition in a composite (e.g. rate AND floor together, not each in isolation). A proposed number is a hypothesis, not a decision: backtest it and let the data override it. Always report old N vs new M with the window and data source. The /backtest-change command loads this same skill.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

correctness · frontmatter no longer parses

Collapsing the description: > folded block into an unquoted plain scalar puts : inside the value (names a number: "add a monitor…"), which YAML rejects — yaml.safe_load fails with mapping values are not allowed here at line 3, col 292. The skill's name/description/allowed-tools/model are all unreadable, so it won't register or auto-trigger for anything — the inverse of this PR's goal. Single-quoting fixes it (the text contains no apostrophes); restoring description: > also works.

Suggested change
description: Validate a data-driven change against LIVE historical data before it ships — replay old-vs-new over a real window, report whether it achieves its goal, and refuse to ship when the data disproves the premise. Fires whenever someone proposes a measurable change and names a number: "add a monitor at 700MB", "set the threshold to N", "warn at X / critical at Y", "alert when it exceeds N", "raise the timeout to 5s", "change the sampling rate", "bump the cache TTL", "tighten this alert", "loosen the threshold", "this should reduce the noise", "that will fix the p95" — and before opening any PR for a monitor threshold, alert routing or renotify cadence, metric/log/trace query, sampling rate, rate limit, autoscaling parameter, or a perf change with a latency or throughput target. Fires for a brand-new monitor, deploy gate, or alert just as it does for an edit to an existing one — a threshold invented for a gate that has never run needs the same historical replay, including the joint replay of every condition in a composite (e.g. rate AND floor together, not each in isolation). A proposed number is a hypothesis, not a decision: backtest it and let the data override it. Always report old N vs new M with the window and data source. The /backtest-change command loads this same skill.
description: 'Validate a data-driven change against LIVE historical data before it ships — replay old-vs-new over a real window, report whether it achieves its goal, and refuse to ship when the data disproves the premise. Fires whenever someone proposes a measurable change and names a number: "add a monitor at 700MB", "set the threshold to N", "warn at X / critical at Y", "alert when it exceeds N", "raise the timeout to 5s", "change the sampling rate", "bump the cache TTL", "tighten this alert", "loosen the threshold", "this should reduce the noise", "that will fix the p95" — and before opening any PR for a monitor threshold, alert routing or renotify cadence, metric/log/trace query, sampling rate, rate limit, autoscaling parameter, or a perf change with a latency or throughput target. Fires for a brand-new monitor, deploy gate, or alert just as it does for an edit to an existing one — a threshold invented for a gate that has never run needs the same historical replay, including the joint replay of every condition in a composite (e.g. rate AND floor together, not each in isolation). A proposed number is a hypothesis, not a decision: backtest it and let the data override it. Always report old N vs new M with the window and data source. The /backtest-change command loads this same skill.'

{
"name": "development-pr-workflow",
"version": "2.4.0",
"version": "2.4.1",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 info · plugin-conventions — The diff also adds a workflow requirement to step 4 (joint replay of composite conditions), which reads as a backward-compatible capability under this repo's minor-bump criteria; consider 2.5.0 instead of 2.4.1. The PR body's "command body untouched" is also inaccurate — SKILL.md step 4 gained four lines.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

⚠️ Changes requested — see full review in the sticky comment ↑

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