Fix Results tab Metric display names containing replacement syntax - #607
Merged
Merged
Conversation
Gate check details were rewritten with String.replaceAll, which interprets $&, $', and $ in authored Metric names as replacement patterns. Use a replacer function so the display name stays byte-for-byte. Issue: SPL-587 Co-authored-by: Isaac Suttell <isaac@zaks.io>
|
Important Review skippedAuto reviews are disabled on this repository. To trigger a review, include ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
isuttell
marked this pull request as ready for review
September 16, 2026 17:20
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Gate check details on the Results tab rewrite raw Metric ids through
withMetricNames.String.replaceAlltreats$&,$', and$in authored Metric display names as JavaScript replacement patterns, so a name likeRevenue $&rendered asRevenue metric_x. This change treats the authored display name as literal text.Changes
replaceAllso Metric display names are substituted byte-for-byte.$&,$',$, an ordinary display name, and the deleted-Metric id fallback.Risk: LOW
Test plan
Issue-required checks on head
05a8225a483176d2ecd732cd3448ccadf46fd6fc:pnpm --filter @splitch/control-panel exec vitest run --config vitest.config.ts src/lib/experiments/metric-names.test.ts— 1 file / 7 tests passed (2026-09-16 17:24:15Z)pnpm verify:ci --forceequivalent):pnpm audit --audit-level=high && pnpm exec turbo run //#depcruise //#knip //#format:check //#spec:lint //#docs:lint //#check:cli-mcp-parity //#test:scripts lint typecheck test test:connect-snippet stats:golden stats:property build --force --concurrency=4— 106/106 successful, 0 cached, 8m42s. Audit: no high/critical findings.Supporting evidence:
Verifyon this head: SUCCESS (https://github.com/zaks-io/splitch/actions/runs/35127581221)@splitch/control-panelpackage tests: 163 files / 1400 passedverify:commitandverify:pushpassed before pushIssue: SPL-587
Linear Issue: SPL-587
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.