P202 · Workflow control

Feedback-Loop-Before-Hypothesis Gate

Establish a runnable failure signal before investing in root-cause hypotheses.

Editorially reviewed

These examples and illustrative results are independently authored teaching materials, not measured model results.

Use case

A validator intermittently accepts blank emails without a repeatable check. Teaching inputs are empty text, three spaces and a@example.test; the first two must reject and the last accept. Observe the actual path before investing in a cause.

Mechanism

Build one command invoking the real validator and asserting the symptom, reading minimal context needed to construct it. Run and retain actual failure; record inputs/revision/conditions for flakes, pinning a seed only when one exists. Form falsifiable hypotheses afterward and reuse the signal after changes with a valid-input regression. Missing reproduction remains a gap.

Bad example

Read unrelated files, guess a trim issue and patch without driving the reported inputs. Treat a command that does not crash as a pass.

Good example

Create and run node --test tests/email-validation.test.mjs in the teaching project, invoking the actual validator. Reject empty text/three spaces and accept a@example.test. Preserve revision/output and establish symptom-catching before hypotheses/predictions. Record flaky conditions without invented rates. Re-run the same signal after changes; report unavailable reproduction/execution.

Why the change matters

Without feedback, plausible explanations are indistinguishable. A symptom assertion yields observable predictions; red/green changes address the report instead of merely avoiding exceptions.

Observable expectation

The designed check fails when spaces are accepted and passes only when all three contracts hold. Fill run/verdict records after actual execution only.

Inspect original-symptom coverage and no rejected valid address. One quiet flaky run does not establish permanent repair.

Limits

Some reproduction needs human/device/service input; identify it. Minimal code reads needed to build feedback are preparation, not forbidden. Source-specific loop templates are not universal host capabilities.

Sources and evidence

Read the editorial criteria

Related methods