Practice interviews

Did the parser fix preserve the supported behavior?

A malformed document can crash the parser. An AI-generated patch stops the crash by rejecting every version-one document.

The question

Larkspur Systems and all parser results are fictional. Both version-one and version-two documents are supported. The security rule is to reject the malformed input without crashing; valid documents must still work. The exercise includes no malformed payload.

Valid-document checks after the first patch
DocumentsAccepted
Version one80
Version two1212

The malformed-input check no longer crashes. The original parser accepted all twenty valid documents.

Additional fixture requirement

A named bulk-import fixture must complete in at most 100 milliseconds on the same isolated test machine. This is a single controlled fixture requirement, not a production latency percentile.

“Choose your next action and explain the evidence behind it.”

A strong answer, step by step

Open each step in turn. This is one strong answer, not the only one.

Step 1: What did the first patch achieve?

What would you do here? Open the move you’d make.

  • Check the fix and supported inputs

    The strong move. A security improvement can still introduce a functional regression.

  • Approve the patch because the crash disappeared.

    Tempting, but it misses something. Eight previously valid documents no longer work.

See how a strong candidate says it

“It stops this crash, but breaks supported version-one input. That is not a complete fix.”

What a strong candidate could say

Why it works: A security improvement can still introduce a functional regression.

Step 2: What does the compatibility result show?

What would you do here? Open the move you’d make.

  • Require a narrower repair

    The strong move. The denominator is all supported valid documents.

  • Remove version one from the product specification to make the test pass.

    Tempting, but it misses something. A patch does not authorise silently withdrawing supported behavior.

See how a strong candidate says it

“Only 12 of 20 valid documents pass, or 60%. Ask for a narrower fix and rerun both the malformed and valid-input checks.”

What a strong candidate could say

Why it works: The denominator is all supported valid documents.

Step 3: Does the next patch restore behavior?

A revised patch rejects the malformed input without crashing and accepts all eight version-one and twelve version-two documents.

What would you do here? Open the move you’d make.

  • Keep the other requirements visible

    The strong move. Passing functional checks does not test every property.

  • Treat 21 passing functional outcomes as complete release proof.

    Tempting, but it misses something. The fixture also has a stated performance requirement.

See how a strong candidate says it

“These checks now establish the required rejection and twenty valid successes. Review the changed code and the other release requirements.”

What a strong candidate could say

Why it works: Passing functional checks does not test every property.

Step 4: What does the performance check change?

On the same isolated machine, the named bulk-import fixture took 40 ms before the change and now takes 200 ms. The limit remains 100 ms.

What would you do here? Open the move you’d make.

  • Hold for the failed fixture requirement

    The strong move. A measured regression cannot be averaged into functional passes.

  • Approve it because all document checks pass.

    Tempting, but it misses something. The separate performance gate still fails.

See how a strong candidate says it

“The bulk fixture takes 200 ms against a 100 ms limit, twice the allowed duration. Keep release open for a performance repair or an explicit requirement decision.”

What a strong candidate could say

Why it works: A measured regression cannot be averaged into functional passes.

The answer, in short

Decision
Keep the patch out of release until the supported-behavior and fixture requirements pass.
Because
The revised patch fixes compatibility but fails the independent performance gate.
What would change it
A measured performance repair, or an explicit approved requirement change, could permit release.

Common traps

  • Stopping one crash is not enough if supported work breaks.
  • Functional pass counts do not erase a failed performance check.

Check your answer

  • I checked the original flaw.
  • I preserved supported input.
  • I tested the revised patch.
  • I kept the performance requirement separate.

Last reviewed Nov 10, 2026