Browse the documentation

Docs Guides

Fix a problem and keep the check

A problem you can repeat exactly is a problem you can fix and check again. This guide follows one problem from replay to a kept check that your CI runs.

On this page

Replay the problem#

  1. Press the Broke cell on the board. The problem opens beside it. Keep this check stays disabled until Check my fix has passed.
  2. Read it: the consequence first, the rule with what was expected and what was observed, and the numbered steps. The replay player shows the same run in lanes. Under What the broken runs had in common you find what the broken runs shared.
  3. Press Replay. Geometer repeats the run from a clean start, with the model's recorded answers. When it finishes, the button reads Replay again. If you have already changed your code, the run can no longer be repeated on it: the replay says Cannot replay on this version, and Check my fix is how you compare your change with the original run.

The same from a terminal, using the finding's identifier:

Terminal
geo replay <finding>
geo replay <finding> --clean-worker

--clean-worker replays the portable recipe on a second clean worker, with a fresh records folder and fresh containers from a copy of the project at the pinned revision.

If the buttons are disabled, the page says why in words. Some problems cannot be repeated live, for example when the task they came from is no longer in the project. A smaller run can sometimes be found with geo shrink <finding>, which tries to minimize the finding and replays the result before accepting it. A flaky result is reported, not accepted.

Change your code#

Change your agent in your own editor. The problem page's Fixing this problem, step by step reminds you of the order: read what happened, change your code, check your fix, keep the check. A typical fix for a lost reply is to look up the first attempt before trying again, or to send an idempotency key so a repeat is ignored.

Edit the code where it is. You do not need to keep a copy of the old version or press anything first: when a check finds a problem, Geometer saves a recording of the run that broke the rule, while your code is still unchanged. Check my fix compares your edited code with that recording.

Check your fix#

Press Check my fix. Geometer replays the recorded run on your code as it is now, confirms the run reached the same point, and tries a bounded set of nearby cases. The answer is one of Still happens, Fixed within what was checked, Could not tell or Cannot check on this version. See Checking a fix.

Terminal
geo verify <finding>
geo verify <finding> --path /path/to/changed/checkout

If your code changed before Geometer saved a recording of the problem (for example, a problem found by an older version), there is nothing to compare with. Check my fix then says so in a sentence, and does not say anything about your fix either way. Run the check again to see whether the problem still happens.

It exits with 0 when the problem no longer reproduces, 1 when it still does, and 2 when the result is inconclusive or the version is incompatible.

Keep the check#

Press Keep this check on the problem page. Geometer stores the check in its records and writes a reviewable file under .geometer/regressions/ in your project. Keeping the same problem twice does no harm.

Terminal
geo regression keep <finding>
geo regression list

Commit the new file together with your fix. It is a plain file you can read in review. It is the only change to your project that Geometer makes for you.

If your fix refuses a duplicate request with an error instead of ignoring it, a kept check can explicitly allow that outcome:

Terminal
geo regression keep <finding> --allow retry=rejection

The example allows the node retry an outcome of rejection that it did not show when the problem was recorded. Allowing an outcome is your explicit decision.

Run the kept checks#

Terminal
geo regression run

This re-executes your kept checks on the current checkout. It exits with 1 when any is reproduced, and 2 when any is inconclusive or incompatible. geo ci runs the same kept checks after its automatic plan. See Run kept checks in CI.

After a kept check#

Keeping a check changes your project's files, so the project's version changes. Geometer treats the version without kept checks as the same version for a certificate, so keeping a check does not flip an issued certificate to "changed".

Something unclear, wrong or missing on this page? Report a problem with these docs.