Choose boundary tests before accepting generated code
A fictional helper divides a total by a count.
Read the situation
A fictional helper divides a total by a count. The proposed generated test checks only total10 and count2. The stated contract must also handle zero count and a missing count by returning an explicit validation error. Select the additional boundary cases rather than judging the implementation by its happy-path example. A and B exercise contract boundaries that the existing test does not cover. Another positive count can be useful, but it cannot replace zero and missing-value checks. Tests should derive from the requirement and include ways the proposed implementation could be wrong. Work from the exact fixture rather than a familiar-looking pattern. The editable answer is an analysis record: entering a value does not change a real service. Keep the original evidence and identify a legitimate alternative or boundary case before trusting the conclusion.
Supplied fictional evidence{
"contract": "Return quotient for positive count; reject zero or missing count",
"existingTests": [
{
"total": 10,
"count": 2
}
],
"candidateTests": [
{
"id": "A",
"total": 10,
"count": 0
},
{
"id": "B",
"total": 10,
"count": null
},
{
"id": "C",
"total": 10,
"count": 5
}
]
}- 1Revise your answerUse the supplied evidence
- 2Check every decisionRun the local checks
- 3Explain and save0 / 3 questions answered
Work through the evidence.
Return one JSON object containing requiredBoundaryTests, existingHappyPathCount, invalidCountPolicy. Derive the values from this artifact and keep data types intact. Derive tests from the contract before trusting generated implementation.
- Read the artifact and write a prediction for requiredBoundaryTests before changing the answer. Identify which supplied fields justify that prediction.
- Calculate or select each named answer field. Derive tests from the contract before trusting generated implementation. Keep excluded records and uncertainty visible in your working note.
- Run the local checks, inspect any failed requirement, then perform this counterexample review: Run the test set against a deliberately unchecked division implementation and verify the boundary failures are caught. Answer all three questions only after the scenario passes.
Edit the complete JSON answer
The fields above and this editor update the same answer. Editing either requires a fresh check.
Read the evidence above, then revise the answer fields. Your starting answer is intentionally incomplete.
This evaluator checks the supplied fictional evidence and exercise rules. It does not call a model, execute your code or place a trade.
Get a nudge, then verify it.
Manual method and guided solution
Do it manually
- Copy this fictional artifact into your own practice notebook and preserve its identifiers, units and stated boundary.
- Work out requiredBoundaryTests, existingHappyPathCount, invalidCountPolicy independently with a small table, calculator or a local script you can explain.
- Compare the local check output with your handwritten prediction. Run the test set against a deliberately unchecked division implementation and verify the boundary failures are caught. Record what this exercise cannot establish about a real service.
Passing means every named condition in this local fixture and every knowledge question was satisfied. A and B exercise contract boundaries that the existing test does not cover. Another positive count can be useful, but it cannot replace zero and missing-value checks. Tests should derive from the requirement and include ways the proposed implementation could be wrong. It does not independently verify a real deployment, live model, trading result or professional qualification.
Score starts at 100: each hint costs 5, each failed question attempt costs 2, minimum 50. Opening the solution counts as three hints and assisted practice.
Explain the result.
You can review these questions now. Pass the current fixture checks above to unlock saving.
Local records are editable self-study data. They do not prove independent professional competence or constitute an accredited qualification. Resetting this attempt does not delete a previously saved completion.
Challenge your reasoning.
Try the manual steps first. If using a separate approved model, ask for a hint or alternative explanation, then verify it against the artifact.
Act as a tutor for the fictional AgentX lab Choose boundary tests before accepting generated code. I will supply the artifact and my proposed answer. Ask me to explain requiredBoundaryTests and then challenge my reasoning using this rule: Derive tests from the contract before trusting generated implementation. Suggest one counterexample, but do not fabricate a model run, external fact or permission. Help me compare the answer with original evidence and explain remaining uncertainty.