Call the function and retain the route.
This page calls executeInspection and reads its outputs and traces. The original route ignores the sum request and selects multiplication; the candidate uses an explicit operation to select the operator. The code executes in TypeScript. Its requests, candidate and assessment rules are all written in advance by a person.
const request = { left: 3, right: 5, operation: "sum" };
const original = executeInspection(request, "original");
const candidate = executeInspection(request, "candidate");
const product = executeInspection(
{ ...request, operation: "product" }, "candidate"
);
const interventions = inspectInterventions(request);
The records below are returned by these illustrative function calls. They are execution records from the example, not an invented run or a model's thinking process.
Actual trace of the original route
[
{
"part": "requirement",
"input": "{\"left\":3,\"right\":5,\"operation\":\"sum\"}",
"output": "3 + 5 = 8"
},
{
"part": "resolver",
"input": "{\"left\":3,\"right\":5}",
"output": "product"
},
{
"part": "arithmetic",
"input": "3 × 5",
"output": "15"
},
{
"part": "check",
"input": "actual=15; reference=8",
"output": "mismatch"
}
]
Actual trace of the candidate route
[
{
"part": "requirement",
"input": "{\"left\":3,\"right\":5,\"operation\":\"sum\"}",
"output": "3 + 5 = 8"
},
{
"part": "resolver",
"input": "{\"left\":3,\"right\":5,\"operation\":\"sum\"}",
"output": "sum"
},
{
"part": "arithmetic",
"input": "3 + 5",
"output": "8"
},
{
"part": "check",
"input": "actual=8; reference=8",
"output": "match"
}
]
Actual outputs for the same input
- Original operator
- product
- Original output
- 15 Does not match the sum request
- Candidate operator
- sum
- Candidate output
- 8 Matches the request
- Candidate control: product request
- 15 product
- Ablation: remove request-aware routing
- 15 product
The original route calculates 3 × 5 = 15 correctly, but the request is for a sum. The candidate does not hard-code 8: a product request still executes multiplication. Ablating the single routing replacement returns to fixed multiplication and reproduces the sum error. These conclusions cover only this human-written program and the specified conditions.
Actual trace returned by the ablation
[
{
"part": "requirement",
"input": "{\"left\":3,\"right\":5,\"operation\":\"sum\"}",
"output": "3 + 5 = 8"
},
{
"part": "resolver",
"input": "{\"left\":3,\"right\":5}",
"output": "product"
},
{
"part": "arithmetic",
"input": "3 × 5",
"output": "15"
},
{
"part": "check",
"input": "actual=15; reference=8",
"output": "mismatch"
}
]