DSH / PLUGIN COMPAREPlugin comparison report
MEASURED EVIDENCE / NOT A LEADERBOARD

标准模式 vs dsh-expert-mode

A · Baseline

标准模式

Preset: 标准模式 · standard

deepseek-official / deepseek-v4-flash

Plugin identity not recorded · showing preset/session
Execution: completed · Check: pass
B · Candidate

dsh-expert-mode

v0.9.2

Preset: 专家模式 v0.9.2 · expert-mode

deepseek-official / deepseek-v4-flash

Preset registration · declared metadata
Execution: completed · Check: pass
Both variants passed the success check1 paired trial(s) · Single observation, not a stable plugin ranking.
Agent time25.0 sA 21.8 s → B 25.0 s+14.5% vs A
Tool calls7A 9 → B 7-22.2% vs A
Recorded tokens112,644A 87,294 → B 112,644+29.0% vs A

Token totals include input, output, cache reads and cache writes. Token change is not a cost saving.

Privacy check required before sharing. Automatic redaction is best-effort, not a privacy clearance. Review prompts, paths, code, command output, account data, private URLs, and Session ids.

Metric details A → B

MetricA · BaselineB · Candidate
Executioncompletedcompleted
Task outcomepasspass
Recorded tokens · including cache87,294112,644
Input tokens13,1525,434
Output tokens3,2303,658
Cache read tokens70,912103,552
Cache write tokens00
Active time21.8 s25.0 s
Steps65
Tool calls97
Tool failures00
Retries00
Changed files11

1 paired trial(s)

One pair cannot estimate run-to-run uncertainty.

Active timemean paired Δ +3.2 s · 95% CI not estimable
Tokensmean paired Δ +25,350 · 95% CI not estimable

Success checks

These checks verify their covered cases, not every possible requirement.

A · Baseline · pass

node --test

Exit code: 0 · 91 ms

Test output
✔ rejects negative subtotal (0.447125ms)
✔ SAVE10 applies a ten-percent discount (0.0605ms)
✔ VIP and coupon do not stack; the better discount wins (0.042667ms)
✔ small subtotals never become negative (0.045ms)
✔ rounds the final value to two decimals (0.043292ms)
ℹ tests 5
ℹ suites 0
ℹ pass 5
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 44.6455

B · Candidate · pass

node --test

Exit code: 0 · 89 ms

Test output
✔ rejects negative subtotal (0.416667ms)
✔ SAVE10 applies a ten-percent discount (0.0645ms)
✔ VIP and coupon do not stack; the better discount wins (0.048625ms)
✔ small subtotals never become negative (0.049208ms)
✔ rounds the final value to two decimals (0.042708ms)
ℹ tests 5
ℹ suites 0
ℹ pass 5
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 44.654208

Recorded file evidence

Git snapshots show final workspace changes. Missing write/edit metadata does not mean no files were changed.

A · Baseline Git snapshot · 1 changed file(s)Status
 M src/checkout.mjs
Tracked diff
diff --git a/src/checkout.mjs b/src/checkout.mjs
index bc18238..5528d52 100644
--- a/src/checkout.mjs
+++ b/src/checkout.mjs
@@ -1,13 +1,23 @@
 export function checkout(subtotal, options = {}) {
-  let total = subtotal
+  if (typeof subtotal !== 'number' || !Number.isFinite(subtotal) || subtotal < 0) {
+    throw new RangeError('subtotal must be a finite, non-negative number')
+  }
+
+  // Coupon and VIP discounts do not stack; pick the better (larger) one.
+  const SAVE10_DISCOUNT = 0.1
+  const VIP_DISCOUNT = 0.15
 
+  let discount = 0
   if (options.coupon === 'SAVE10') {
-    total -= 10
+    discount = SAVE10_DISCOUNT
   }
-
   if (options.vip) {
-    total *= 0.85
+    discount = Math.max(discount, VIP_DISCOUNT)
   }
 
-  return Math.round(total * 100) / 100
+  const total = subtotal * (1 - discount)
+
+  // Round to two decimal places; clamp so the result is never negative.
+  const rounded = Math.round(total * 100) / 100
+  return Math.max(0, rounded)
 }
A · Tool-recorded edits · 1 record(s)example-run/trial-1/baseline/src/checkout.mjs
- export function checkout(subtotal, options = {}) {
  let total = subtotal

  if (options.coupon === 'SAVE10') {
    total -= 10
  }

  if (options.vip) {
    total *= 0.85
  }

  return Math.round(total * 100) / 100
}
+ export function checkout(subtotal, options = {}) {
  if (typeof subtotal !== 'number' || !Number.isFinite(subtotal) || subtotal < 0) {
    throw new RangeError('subtotal must be a finite, non-negative number')
  }

  // Coupon and VIP discounts do not stack; pick the better (larger) one.
  const SAVE10_DISCOUNT = 0.1
  const VIP_DISCOUNT = 0.15

  let discount = 0
  if (options.coupon === 'SAVE10') {
    discount = SAVE10_DISCOUNT
  }
  if (options.vip) {
    discount = Math.max(discount, VIP_DISCOUNT)
  }

  const total = subtotal * (1 - discount)

  // Round to two decimal places; clamp so the result is never negative.
  const rounded = Math.round(total * 100) / 100
  return Math.max(0, rounded)
}
B · Candidate Git snapshot · 1 changed file(s)Status
 M src/checkout.mjs
Tracked diff
diff --git a/src/checkout.mjs b/src/checkout.mjs
index bc18238..b24ec7f 100644
--- a/src/checkout.mjs
+++ b/src/checkout.mjs
@@ -1,13 +1,21 @@
 export function checkout(subtotal, options = {}) {
-  let total = subtotal
+  if (typeof subtotal !== 'number' || !Number.isFinite(subtotal) || subtotal < 0) {
+    throw new RangeError('subtotal must be a finite, non-negative number')
+  }
 
+  // Pick the single best discount: SAVE10 is 10%, VIP is 15%.
+  // Coupon and VIP discounts never stack — the larger one wins.
+  let discount = 0
   if (options.coupon === 'SAVE10') {
-    total -= 10
+    discount = 0.1
   }
-
   if (options.vip) {
-    total *= 0.85
+    discount = 0.15
   }
 
-  return Math.round(total * 100) / 100
+  const total = subtotal * (1 - discount)
+
+  // Round to two decimal places. The result can never be negative
+  // because subtotal is non-negative and only proportional discounts apply.
+  return Math.round((total + Number.EPSILON) * 100) / 100
 }
B · Tool-recorded edits · 1 record(s)example-run/trial-1/candidate/src/checkout.mjs
- export function checkout(subtotal, options = {}) {
  let total = subtotal

  if (options.coupon === 'SAVE10') {
    total -= 10
  }

  if (options.vip) {
    total *= 0.85
  }

  return Math.round(total * 100) / 100
}
+ export function checkout(subtotal, options = {}) {
  if (typeof subtotal !== 'number' || !Number.isFinite(subtotal) || subtotal < 0) {
    throw new RangeError('subtotal must be a finite, non-negative number')
  }

  // Pick the single best discount: SAVE10 is 10%, VIP is 15%.
  // Coupon and VIP discounts never stack — the larger one wins.
  let discount = 0
  if (options.coupon === 'SAVE10') {
    discount = 0.1
  }
  if (options.vip) {
    discount = 0.15
  }

  const total = subtotal * (1 - discount)

  // Round to two decimal places. The result can never be negative
  // because subtotal is non-negative and only proportional discounts apply.
  return Math.round((total + Number.EPSILON) * 100) / 100
}