Skip to main content

Fixes, tests and replay

This page covers the fix loop: get a fix candidate, attach it to an issue, verify it on your own machine against recorded cases, approve it, and keep it from coming back with the regression suite in CI.

zyonix fix suggest --issue 3 --out fixes/ # candidates derived from the evidence (optional)
zyonix fix propose --issue 3 --kind prompt ... # administrator: DIAGNOSED -> FIX_PENDING
zyonix replay --fix 4 # member: runs the cases here, the server judges
zyonix fix show 4 # the verification scorecard
zyonix fix approve 4 # administrator: -> AWAITING_DEPLOY
zyonix deploy --fix 4 --release <git-sha> # after you ship it: -> MONITORING

How verification works​

Zyonix never runs your code on its servers. zyonix replay and zyonix test call your application's replayable step (a function marked @zyonix.step(..., replayable=True)) on your machine with frozen inputs recorded from real runs, then upload what each call returned. The server judges every output with its checks; the CLI only prints the server's verdict. Your provider keys never leave your machine. The outputs do, redacted with your zyonix.yaml settings, so these commands need capture: full and a replay: section (Set up).

A replay runs three case sets, each case k times, under two arms: baseline (your code as it is) and candidate (the fix's configuration override merged into the step's configuration argument):

SetCasesGate
Athe issue's failing casesat least 90% of the reproduced failing cases pass under the candidate
Bevery other regression caseno case that passed on the baseline fails under the candidate
Cthe golden setgolden accuracy does not drop by more than 0.5 percentage points

Each gate is pass, fail or inconclusive. A cost and performance block (latency, tokens, LLM calls) is shown too; it is advisory and never part of the verdict.

zyonix fix suggest​

Fix candidates Zyonix derives from the evidence of an issue or a run. Nothing is applied.

zyonix fix suggest --issue 3
zyonix fix suggest --issue 3 --out fixes/
zyonix fix suggest --run 4be0910c269c
OptionWhat it does
--issue Nsuggestions for this issue (give --issue or --run)
--run RUNsuggestions for one run's findings, uncertain ones included (id or unique prefix)
--out DIRwrite each suggestion as two files: zyonix-fix-issue-3-1.json (a whole fix, for zyonix replay --local) and zyonix-fix-issue-3-1.candidate.json (the candidate only, for zyonix fix propose)

Who may run it: any reader.

How to read it: one numbered block per suggestion: its title, kind, the check it is for, whether it is replay-verifiable or needs a code change in your application, why, the patch, and evidence lines. The Next block gives the exact replay --local and fix propose commands for the first suggestion. With --json and --out, the files are still written and stdout carries only the JSON.

zyonix fix propose​

Attach a fix proposal to a DIAGNOSED (or REOPENED) issue. The issue moves to FIX_PENDING.

zyonix fix propose --issue 3 --kind prompt --title "Always extract the tax line" --candidate-file fix.json
zyonix fix propose --issue 3 --kind config --title "Raise max_tokens" --candidate '{"config": {"max_tokens": 2048}}'
zyonix fix propose --issue 3 --kind rule --title "Tighten the total rule" --spec-file new_spec.yaml
zyonix fix propose --issue 3 --kind code_note --title "Parse dates day-first" --note "use dayfirst=True in parse_date()"

A prompt or config candidate is a JSON object whose config part is merged into the configuration your replayable step receives:

{"config": {"prompt_addendum": "Always extract the tax amount, even when it is labelled VAT."}}
OptionWhat it does
--issue Nthe issue (required)
--kind KINDprompt, config, rule, code_note or runtime_policy (required)
--title TEXTa short title (required)
--description TEXTa longer description
--candidate JSONthe candidate as inline JSON (prompt, config)
--candidate-file FILEthe candidate as a JSON file (prompt, config)
--spec-file FILErule: the new reliability spec (YAML)
--note TEXTcode_note: the change you will make in your code
--strategyruntime_policy: the Guard strategy to enable, R1 to R4
KindWhat it changesVerified by replayApplied by
promptthe prompt your step usesyesyou, then zyonix deploy --fix
configmodel settings or other configurationyesyou, then zyonix deploy --fix
rulewhat Zyonix checks (a new spec)yes (the server judges with the candidate spec)Zyonix, at approval
code_noteyour application codenoyou, then zyonix deploy --fix
runtime_policyturns a Guard strategy onnot on customer installations (see below)Zyonix, at approval

Who may run it: administrator.

Output: fix #4 attached to ISS-3 (proposed) and the zyonix replay --fix 4 command.

note

A runtime_policy fix is verified with the Guard running on your machine, which customer installations do not include; zyonix replay --fix stops with exit code 2 saying so. Talk to whoever runs your Zyonix deployment before using the Guard.

zyonix fix show​

A fix with its candidate and verification report.

zyonix fix show 4
OptionWhat it does
FIXthe fix number

Who may run it: any reader.

How to read it: Fix #4 prompt [verified] for ISS-3, the title, author, who approved or rejected it and the deploy marker; the Candidate; Verification: the replay run and its Set A / B / C scorecard with the server's gate per set, or "running", "not verified yet", or "a code note cannot be verified by replay". The Next block depends on the state: replay it, approve or reject it, or record its deploy.

zyonix fix approve​

Approve a verified fix. This is a human decision and is audit-logged with who made it.

zyonix fix approve 4 --reason "A 5/5, B clean, C 95.0% -> 95.0%"
OptionWhat it does
FIXthe fix number
--reason TEXTwhy (optional, recorded)

Who may run it: administrator.

Output:

  • prompt, config, code_note: fix #4 approved for ISS-3 (approved); the issue is AWAITING_DEPLOY. Ship the change, then run zyonix deploy --fix 4 --release <git-sha>.
  • rule, runtime_policy: Zyonix applies it at once (applied on the server (spec v8); the issue is now MONITORING).

zyonix fix reject​

Send a verified fix back. The issue returns to FIX_PENDING.

zyonix fix reject 4 --reason "Set C dropped on credit notes"
OptionWhat it does
FIXthe fix number
--reason TEXTwhy (required, recorded)

Who may run it: administrator.

zyonix fix promote​

Turn a coding agent's verified draft into a fix proposal. It approves nothing: the fix still goes through zyonix replay --fix and zyonix fix approve. It works in two steps on purpose: look, then promote exactly the revision you looked at.

zyonix fix promote 7 # shows draft D-7 and what blocks promotion; changes nothing
zyonix fix promote 7 --revision 2 # promote revision 2
zyonix fix promote 7 --revision 2 --replace --reason "better than fix #4"
OptionWhat it does
DRAFTthe draft number (D-7 is 7; see zyonix drafts)
--revision Nthe revision you inspected; without it the draft is only shown. A draft that changed since is refused
--replacesupersede a fix that is already proposed (never one that is being verified, approved or deployed)
--reason TEXTwhy (optional, recorded)

Who may run it: administrator.

Output: draft D-7 promoted: fix #9 is proposed for ISS-3 (not verified, not approved). Drafts are described on Coding agents and MCP.

zyonix replay​

Two modes:

  • A real replay (--fix N) verifies a proposed fix: the issue goes to VERIFYING, the cases run here, the server judges them and moves the issue to AWAITING_APPROVAL (passed) or back to FIX_PENDING (failed).
  • A preview (--issue N --candidate-file FILE --local) evaluates a candidate that is not a fix yet against the same gate and records nothing: no fix, no replay run, no issue transition.
zyonix replay --fix 4
zyonix replay --fix 4 --k 5
zyonix replay --issue 3 --candidate-file fixes/zyonix-fix-issue-3-1.json --local
zyonix replay --issue 3 --candidate '{"config": {"prompt_addendum": "..."}}' --kind prompt --local --out preview.json
OptionDefaultWhat it does
--fix Nthe fix proposal to verify (a real replay)
--localoffpreview a candidate; record nothing
--issue Nwith --local: the issue the candidate is for
--candidate-file FILEwith --local: the candidate (JSON), or a whole fix with kind, candidate, title, description (what fix suggest --out writes)
--candidate JSONwith --local: the candidate inline
--kind KINDthe file's kindwith --local: prompt, config, rule, runtime_policy or code_note
--out FILEwith --local: write the preview (candidate, per-case results, the server's evaluation) here, for zyonix drafts create --from-preview
--timeout SECONDS900with --local: stop starting new cases after this long; what did not run makes the preview incomplete, never a pass
--k N3runs per case and arm (1 to 9)
--setup MODULE:FUNCreplay.setupinitialises your application
--config-provider MODULE:FUNCreplay.config_providerreturns your current configuration
--python-path DIRreplay.python_pathextra import folder (repeatable)
--jsonoffprint the verification report (or the preview) as JSON

Who may run it: a real replay, member. A preview, member or an agent key.

How to read it: while cases run, a progress line on stderr (set A regression#12). Then the scorecard: one line per set with its case counts and the server's gate (pass, fail, inconclusive), the overall gate with its reasons, and the advisory performance block. A real replay ends with VERIFICATION PASSED: awaiting human approval or VERIFICATION FAILED: the fix goes back to FIX_PENDING. A preview ends with PREVIEW VERIFIED, FAILED, INCOMPLETE or UNSUPPORTED, and for each gate that did not pass, what to do.

Exit codes:

CodeReal replayPreview
0verification passedevery gate passed (verified)
1verification faileda mandatory gate failed (failed)
2could not run (no capture: full, step not importable, key, connection)the same
3a gate could not be evaluated (incomplete), or a code_note (unsupported). Not a pass

zyonix test​

Run the regression suite against your current code: the CI gate. It pulls the suite's cases, calls your replayable step for each with its frozen input, uploads the outputs, and the server judges them.

zyonix test
zyonix test --suite canary --junit results.xml
zyonix test --suite full --trigger nightly
zyonix test --no-record

A regression is a case whose fix is approved or live that fails, or a case that passed last time and fails now. Cases of issues that are not fixed yet are known failing and do not fail the build.

OptionDefaultWhat it does
--suitecanarycanary (a small set, per commit) or full (every case, nightly or before a release)
--k N1runs per case; with more than one, a case passes at 2 of 3 or better
--junit FILEwrite JUnit XML here
--triggerci when $CI is set, else manualci, nightly or manual
--git-sha SHA$GITHUB_SHA or $GIT_SHAthe commit to store with the run
--release LABELa release label to store with the run
--no-uploadoffrun the cases and send nothing; nothing is judged (each case shows not-judged)
--no-recordoffhave the server judge the outputs and classify regressions, and store nothing
--use-recorded-configoffrun each case with the configuration recorded when it failed instead of requiring replay.config_provider (fixed cases will then keep failing)
--setup, --config-provider, --python-pathfrom zyonix.yamlas for zyonix replay
--jsonoffthe results as one JSON document (zyonix.test/1); the exit code is the same

Who may run it: member (cli key in CI). With --no-upload, any reader.

How to read it: one line per case, starting with its result: PASS, REGRESSION, KNOWN-FAILING, ERROR or NOT-JUDGED, then the case (regression#12 or golden#3), the document id, the issue it belongs to, and the failed checks in brackets. Then a total:

PASS regression#12 INV-1042 issue 3
KNOWN-FAILING regression#15 INV-1077 issue 5 [required:tax_amount]
PASS golden#3 INV-0991 golden
3 case(s), 2 passed, 0 regression(s), 1 known failing, 0 error(s): OK

Exit codes: 0 no regression, 1 at least one regression, 2 could not run. It also exits 2 and records nothing when the run could not exercise your code: the cases carry a recorded configuration but replay.config_provider is not set, or every case failed to run for the same reason (a missing provider key, an uninitialised application, a changed signature). A broken CI environment therefore never shows up as regressions.

zyonix test --json prints schema, suite, k, passed, uploaded, recorded, regression_run_id, counts (cases, passed, regressions, known_failing, errors) and one entry per case. See Using the CLI in CI.

zyonix regression list​

The nightly suite's state and recent suite runs. zyonix regression on its own is the same command.

zyonix regression
zyonix regression list --limit 50
OptionDefaultWhat it does
--limit N20how many runs

Who may run it: any reader.

How to read it: Nightly suite: with its state (for example failing or stale), the last run's time and counts, then a table RUN, WHEN, SUITE, TRIGGER, GIT, CASES, PASSED, REGRESSIONS, KNOWN FAILING, RESULT.

zyonix regression show​

Per-case results of one suite run.

zyonix regression show 41
OptionWhat it does
RUNthe regression run number (the RUN column of zyonix regression)

Who may run it: any reader.

How to read it: the run's suite, trigger, time, result, git sha and release, counts, then CASE, STATUS, FLAG (REGRESSION, must-pass or known failing), FAILED CHECKS, DOC.

zyonix regression cases​

The cases a suite runs and how they last did.

zyonix regression cases
zyonix regression cases --suite canary
OptionDefaultWhat it does
--suitefullcanary or full

Who may run it: any reader.

How to read it: CASE, DOC, FROM (the issue and its state, or the golden set), SUITE, MUST PASS (its fix is approved or live), LAST (last status, or never run), ASSERTS. Issues create regression cases automatically when they are diagnosed.

zyonix golden list​

The golden set: documents with a human-verified correct record. They are ground truth and the yardstick for Set C in every verification. zyonix golden on its own is the same command.

zyonix golden

Who may run it: any reader.

How to read it: how many cases are active, runnable and in the canary suite, then DOC, INPUT (frozen, waiting for a clean run, or BLOCKED with the reason below the table), SUITE, FROM, ACTIVE. A case needs a frozen input from a clean run of that document before it can run.

zyonix golden add​

Add (or replace) a golden case.

zyonix golden add INV-1042 --file expected.json
zyonix golden add INV-1042 --json-record '{"invoice_no": "1042", "total": 1190.0}' --trace 3c70b5c68036
zyonix golden add INV-2001 --control
OptionWhat it does
DOC_IDthe document id
--file FILEa JSON file with the correct record (- reads standard input)
--json-record JSONthe correct record inline
--trace RUNfreeze the input from this run (default: the latest clean run of the document)
--controla healthy control for an agent with no correct record: it only has to keep running without errors under a fix. Takes no record

Who may run it: administrator.

Output: INV-1042 added to the golden set, or with a note when its input could not be frozen yet (it is captured from the next clean run) or is blocked (with the reason).

zyonix golden import​

Add many golden cases from a JSONL file: one object per line with doc_id and the correct record.

zyonix golden import seed.jsonl
zyonix golden import seed.jsonl --field expected
{"doc_id": "INV-1042", "corrected_output": {"invoice_no": "1042", "total": 1190.0}}
OptionDefaultWhat it does
FILE(required)the JSONL file
--field NAMEcorrected_outputthe field holding the correct record

Who may run it: administrator.

Output: 12 golden case(s) added; 3 wait for a clean run to freeze their input. --json gives added and waiting_for_input. A line without doc_id or the record field stops the import with its line number.

zyonix golden remove​

Remove a golden case.

zyonix golden remove INV-1042
OptionWhat it does
DOC_IDthe document id

Who may run it: administrator.