Summary
When a control's verdict is decided by an LLM consultation
(llm_eval handler resolving via the harness driver), the LLM's
reasoning is captured in the intermediate CheckResult but is
not serialized into attestations, is not logged, and is
not surfaced in markdown / SARIF report output (JSON contains it
if the caller opts into the full evidence dump).
An attestation without an evidence trail is a bare claim.
Reproducing an LLM verdict later requires re-running the LLM against
the same prompt, which the current system doesn't preserve.
This is Determinism Tier 3: nondeterministic results (LLM outputs
have unavoidable model-side variance) are legitimate, but the
reasoning that produced them must be recoverable.
Concrete gaps
Attestation predicate
packages/darnit-baseline/src/darnit_baseline/attestation/predicate.py:82-102
-- per-control attestation records: id, level, category,
status, message, evidence, source, and (post feature 025)
authority. It does NOT record:
- Which sieve pass fired (
file_must_exist, exec, pattern,
llm_eval, manual).
- For
exec: the command, stdout, exit code.
- For
llm_eval: the prompt sent, the model's reasoning, the
model version, token usage.
pass_history -- the cascade of attempts across phases.
LLM consultation response shape
packages/darnit/src/darnit/sieve/models.py:81-88 --
LLMConsultationResponse carries status, confidence, a single
reasoning: str, and evidence_cited: list[str]. No structured
evidence trace, no model version, no request-id for correlation.
Report formatters
- Markdown / SARIF do NOT surface LLM reasoning. Full JSON does
(via the evidence dict) but the summary JSON strips it.
- Markdown surfaces
resolving_pass_handler and pass_history (per
tools/audit.py:918-931) so operators can see WHICH pass resolved
the control, but not the LLM's reasoning for the resolution.
Logging
packages/darnit/src/darnit/sieve/orchestrator.py -- no per-pass
disposition logging (PASS/FAIL/INCONCLUSIVE transitions across the
cascade are not emitted).
packages/darnit/src/darnit/sieve/builtin_handlers.py -- no
logging of exec command invocation or LLM reasoning at INFO.
LLM-based remediation
packages/darnit-baseline/src/darnit_baseline/remediation/enhancer.py:56-133
-- LLM enhancement is invoked via an llm_fn() callback with no
capture of the request/response, no operator sign-off checkpoint
before applying LLM-suggested changes. This is a Principle IV
concern in addition to a determinism concern.
Scope
- Extend the attestation predicate per-control fields to include:
- Extend
LLMConsultationResponse to carry model and (optionally)
request_id.
- Extend markdown and SARIF formatters to surface LLM reasoning
when present.
- Add INFO-level logs at: LLM request dispatch, LLM response receipt,
per-control final disposition.
- For LLM-based remediation: log request/response at INFO; add an
operator-review checkpoint in the remediation orchestrator before
applying LLM-suggested changes (interactive prompt when TTY;
fail-loud when non-interactive without explicit
--accept-llm-suggestions).
Non-goals for v0
- Persisting the full LLM prompt in every attestation by default
(size concerns; opt-in per profile).
- Storing LLM raw token streams / chain-of-thought (privacy and
size; final reasoning string is sufficient for audit trail).
- Alternative LLM providers or a model-selection UI.
Constitution alignment
- II. Conservative-by-Default: an LLM PASS without recorded
reasoning is not a defensible audit result.
- IV. Never Guess User Values: the LLM-remediation review
checkpoint is a hard implementation of this principle -- LLM
output alone MUST NOT apply changes.
- V. Sieve Pipeline Integrity: the sieve records which pass
resolved a control; the attestation should record the same.
Related
Summary
When a control's verdict is decided by an LLM consultation
(
llm_evalhandler resolving via the harness driver), the LLM'sreasoning is captured in the intermediate
CheckResultbut isnot serialized into attestations, is not logged, and is
not surfaced in markdown / SARIF report output (JSON contains it
if the caller opts into the full evidence dump).
An attestation without an evidence trail is a bare claim.
Reproducing an LLM verdict later requires re-running the LLM against
the same prompt, which the current system doesn't preserve.
This is Determinism Tier 3: nondeterministic results (LLM outputs
have unavoidable model-side variance) are legitimate, but the
reasoning that produced them must be recoverable.
Concrete gaps
Attestation predicate
packages/darnit-baseline/src/darnit_baseline/attestation/predicate.py:82-102-- per-control attestation records:
id,level,category,status,message,evidence,source, and (post feature 025)authority. It does NOT record:file_must_exist,exec,pattern,llm_eval,manual).exec: the command, stdout, exit code.llm_eval: the prompt sent, the model's reasoning, themodel version, token usage.
pass_history-- the cascade of attempts across phases.LLM consultation response shape
packages/darnit/src/darnit/sieve/models.py:81-88--LLMConsultationResponsecarriesstatus,confidence, a singlereasoning: str, andevidence_cited: list[str]. No structuredevidence trace, no model version, no request-id for correlation.
Report formatters
(via the evidence dict) but the summary JSON strips it.
resolving_pass_handlerandpass_history(pertools/audit.py:918-931) so operators can see WHICH pass resolvedthe control, but not the LLM's reasoning for the resolution.
Logging
packages/darnit/src/darnit/sieve/orchestrator.py-- no per-passdisposition logging (PASS/FAIL/INCONCLUSIVE transitions across the
cascade are not emitted).
packages/darnit/src/darnit/sieve/builtin_handlers.py-- nologging of exec command invocation or LLM reasoning at INFO.
LLM-based remediation
packages/darnit-baseline/src/darnit_baseline/remediation/enhancer.py:56-133-- LLM enhancement is invoked via an
llm_fn()callback with nocapture of the request/response, no operator sign-off checkpoint
before applying LLM-suggested changes. This is a Principle IV
concern in addition to a determinism concern.
Scope
resolving_pass_handlerandresolving_pass_index.pass_history(already in CheckResult; propagate through).llm_evalresolutions:llm_reasoning,llm_model, andllm_confidence. Prompt inclusion is opt-in per attestationprofile (large; may be redacted for privacy).
error_classwhen present (from Determinism Tier 2: network / side-effect failures must be distinguishable from real verdicts #419).LLMConsultationResponseto carrymodeland (optionally)request_id.when present.
per-control final disposition.
operator-review checkpoint in the remediation orchestrator before
applying LLM-suggested changes (interactive prompt when TTY;
fail-loud when non-interactive without explicit
--accept-llm-suggestions).Non-goals for v0
(size concerns; opt-in per profile).
size; final reasoning string is sufficient for audit trail).
Constitution alignment
reasoning is not a defensible audit result.
checkpoint is a hard implementation of this principle -- LLM
output alone MUST NOT apply changes.
resolved a control; the attestation should record the same.
Related
authority;attestation already carries it. This issue extends the same file
with additional per-control fields.
reasoning-capture wiring goes on the harness->attestation path.