What OMA returns when its test gate fails
oh-my-agent (OMA) can rerun a configured test script when an active workflow tries to stop. This example exercises that behavior with manual hook calls and a deliberately broken expiry check. It uses the OMA 15.0.13 source CLI. The fixture defines an item as expired at now === expiresAt . Its implementation used > , so the boundary test failed. The test process exited with code 1. This excerpt…
When the test gate fails in OMA (One Model Agent), it returns a decision block indicating the failure along with a reason stating that the stop gate test has failed. This occurs when the active workflow tries to stop during a configured test script execution. The OMA 15.0.13 source CLI was used for this demonstration. The fixture defines an item as expired when the current time equals the expiresAt value.
In the provided example, the boundary test failed due to a comparison issue in the fixture's code. When a manual call to OMA's Stop hook was made, the test script was rerun, and the response indicated the decision block and reason "Stop gate test FAILED (reinforcement 1/5)." The OMA hook run process itself exited with a code of 0, which should not be treated as a successful test.
After making a change to the comparison in the code, rerunning the tests resulted in all tests passing (# pass 3 # fail 0). Upon a subsequent Stop call, the same gate was run again, and OMA removed the fixture's workflow state while recording gate.passed and session.ended with the reason completion_gate_passed. This demonstration creates a local fixture with manually invoked hooks, not a recorded autonomous agent session or a production incident.
The full commands, timestamps, and output, as well as the reproduction script, are provided in the demo.py file, which needs to be run against an OMA source checkout with the CLI dependencies installed.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.