CodeArchaeologist AILEGACY PRICING EXAMPLE
Trusted fixture workspace EXAMPLE INVESTIGATION
EXAMPLE INVESTIGATION / LEGACY PRICING

Find the rules
hidden in the code.

Trace undocumented pricing behavior to exact source lines, then compare hypotheses with isolated execution results.

01 TRUSTED FIXTURE03 MODEL STEPS MAX00 AUTOMATIC EXECUTIONS
CONTROL DESK

Legacy pricing investigation

AI reads only the checked-in pricing fixture. Verification runs separately through the operator CLI.

01 / SOURCE MATERIAL

Original fixture

READ ONLY
JSpricing.jstests/fixtures/legacy-pricing
01// A deliberately compact legacy pricing policy with branch order that matters.
02export function invoiceTotal(subtotalCents, customerYears, promoCode) {
03 if (!Number.isInteger(subtotalCents) || subtotalCents < 0) throw new Error("Invalid subtotal");
04 let discountPercent = 0;
05 if (customerYears >= 5) discountPercent = 15;
06 else if (promoCode === "WELCOME") discountPercent = 10;
07 const discounted = Math.round(subtotalCents * (100 - discountPercent) / 100);
08 const shipping = discounted >= 5000 ? 0 : 799;
09 return discounted + shipping;
10}
Evidence references resolve to these exact lines. Source is displayed as data.
02 / FINDINGS

Business rules

—
⌁

No investigation loaded

Run a live investigation to inspect source-backed hypotheses, or load a report created by the trusted operator workflow.

01 Inspect→02 Review→03 Report