DocsFab Diagnosis Reference
Look up diagnosis lines, owner classes, causes, recurrence accounting, and JSON fields. To investigate a failure, follow Diagnose a Failed Run.
Read the Answer
A run diagnosis contains the following lines.
When docsfab why selects more than one run, it prints one block per run,
newest first, and then a BY MODEL section. That section lists each provider
and model with the causes that ended runs and the causes of earlier failed
attempts.
Answer-record progress is read only from a committed checkpoint whose digest,
sequence, and physical attempt match the step pointer and ledger index. Refusal
events are logical-step events, while released rows count current ledger state.
Remaining keys come from the required-key ledger, not the record’s open
capacity. The complete value is the ledger’s recorded state; it does not
claim that the report passed validation or that the workflow succeeded.
Missing or inconsistent checkpoint evidence remains unavailable rather than
appearing as zero.
Owner Classes
Every finding has one owner class. The owner class says whose problem the failure is. The following table lists the owner classes.
Causes
Each cause belongs to exactly one owner class. DocsFab reads the finish reason
and provider evidence before the rejection code, because a reply cut at its
allowance also fails JSON parsing. When a reply is refused as not JSON or as
misshapen and its index row does not give the attempt’s output total, the
finding keeps its shape cause, names the output limit as the second owner, and
carries the attempt-output-total-not-recorded limitation.
During update-documentation, the final evaluate-document-quality step
returns a JSON envelope containing the report and an independent editorial
assessment. If the provider cuts that envelope at its output allowance,
DocsFab retains the prefix and requests a continuation within
inference.maxLengthStopContinuations. It validates the complete envelope
after joining the continuation. If the continuation is also cut after that
budget is spent, the step fails with the output-limit diagnostic. DocsFab
does not replace the missing assessment with a partial report.
For a generic malformed-assessment message, inspect docsfab why <run-id>
before rerunning. A recorded length finish reason establishes an output
cut even when JSON validation also fails. Follow the diagnosis’s next action;
repeating the entire documentation workflow with unchanged settings can
produce the same cut.
A finding for an attempt whose index row carries concludeNow also carries
the answer-asked-early limitation, whatever its cause: the host withdrew the
tools and asked for the answer before the model finished reading, so the
answer came from partial reading.
For a failed governed search step, workflow-search-contract-failed means a
bounded-search or search-progress contract refused host search evidence.
docsfab why assigns that code to host-built-value-refused and gives the
saved run and diagnosis JSON as the next evidence to report. A generic
workflow-search-coordinator-failed code, including one in an older record,
has an unresolved cause. Inspect the saved step error and checkout before
assigning responsibility. Search stops before inference in the failed step;
an earlier step in the run can have made model calls.
The following table lists each cause, its owner class, and where DocsFab reads it from.
Final Editorial Evidence
In plain language: When every step succeeds but DocsFab refuses final
editorial evidence, check the closed failure code before changing a model
setting. For example, editorial-finalization-decision-identity-mismatch
means a DocsFab check of bound evidence failed. docsfab why and the
DIAGNOSIS section classify it as host-built-value-refused under
docsfab-defect. Report the saved run and diagnosis JSON. Do not retry
unchanged inference.
The 19 closed finalization codes for branch coverage, host evidence, and
decision validation with saved failure class contract-shape receive that
reading only on a failed run at the workflow layer. A failed step with the
same code keeps its step diagnosis. The run index retains the code and class,
but it does not retain the refusal location. docsfab runs show uses the
saved record to show the actual location in NEXT and FAILURE.
Two finalization codes remain model-content refusals:
editorial-finalization-host-conflicting-assessment and
editorial-finalization-decision-independent-rejection. Their diagnosis is
reply-content-rejected. Inspect the recorded assessments in the saved run;
do not retry unchanged inference. editorial-finalization-uncoded-error
remains uncatalogued-failure: report the saved run and diagnosis JSON.
Request Policy Refusals
DocsFab checks every outbound payload before it is sent. An installed
composition’s request policy applies most of these checks; the output limit,
payload shape, tool history, and send checks apply on every route. A refusal
ends the attempt with outcome provider-terminal and the failure code below,
at layer inference. docsfab runs query --where failureCode=<code> selects
the attempts, and docsfab why reads the cause from the code before any
finish reason or provider error. The following table lists the failure codes.
The following table lists each failure code, its failure class, and its meaning.
The refusal message names the message index, its role, and the refused key only when the key is one of the standard chat message fields; it never quotes message content.
A policy that turns reasoning off does not refuse reasoning a model streamed
anyway. Pi replays that reasoning on the next request as a
reasoning_content, reasoning, reasoning_text, or reasoning_details
field of the assistant message. The policy omits those fields from assistant
messages before sending, and the turn records how many messages it changed in
replayedReasoningOmitted, beside the digest of the payload it sent.
Recurrence
Recurrence compares the newest runs of the same provider and model, up to and
including the diagnosed run. The window holds at most
diagnosis.recurrenceLookbackRuns runs. When the index holds older runs for
that provider and model, the recurrence line says so, and its query carries a
--since bound that matches the window. The first-seen run is read from the
whole index. It names the DocsFab revision when the index carries one;
otherwise it reads unavailable. An attempt that recorded neither a provider
nor a model gets no recurrence line, because it would pool unrelated runs; the
finding carries the recurrence-model-unavailable limitation instead.
Failed Run Output
When docsfab run, docsfab do, or docsfab runs show prints a failed run,
the NEXT section adds a Why: line with the docsfab why command for that
run, and the output ends with a DIAGNOSIS section. The section is computed
from the run’s own record, projected the way the run index stores it, and
reads recurrence from the index beside the state directory. If that index
cannot be read, the section reports recurrence as unread instead of omitting
it.
JSON Output
docsfab why --json prints a schema version 1 docsfab-why envelope with
the following top-level fields.
Each finding carries role, stepId, attempts, ownerClass, cause,
what, why, nextAction, nextCommand, evidence, signature,
reproduce, recurrence, alsoCause, and limitations. The
evidence.attemptTotals object holds the whole-attempt output figures from
the attempt’s index row, or null when the row carries none of them. New fields are added as optional
or nullable, and new owner classes or causes are added as new values; existing
names do not change within schema version 1.
Limits and Refusals
The following operational limits bound the command.
The command also applies the run index limits runs.indexMaxBytes,
runs.recordMaxBytes, runs.indexImportMaxRecords, and
runs.indexFieldMaxChars. Refer to
Operational Limits for how to inspect and override
limits.
docsfab why refuses with one of the following coded operator errors instead
of guessing.
Moved Topic Links
Earlier section bookmarks lead to the canonical topic below.
Refer to Diagnose a Failed DocsFab Run.
Refer to Diagnose a Failed DocsFab Run.