Determinism Tier 3: capture LLM reasoning and evidence trail in attestations, logs, and reports
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Start with the attestation predicate at packages/darnit-baseline/src/darnit_baseline/attestation/predicate.py:82-102 and trace how CheckResult data reaches it through the harness-to-attestation path. Then inspect LLMConsultationResponse and the markdown/SARIF formatters named in the issue; identify their existing tests before changing behavior. Done means the specified pass and LLM evidence can be recorded and surfaced, with INFO logging and the remediation review checkpoint behaving as scoped.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Which sieve pass fired (
LLM consultation response shape
packages/darnit/src/darnit/sieve/models.py:81-88--
LLMConsultationResponsecarriesstatus,confidence, a single
reasoning: str, andevidence_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_handlerandpass_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 anllm_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:
resolving_pass_handlerandresolving_pass_index.pass_history(already in CheckResult; propagate through).- For
llm_evalresolutions:llm_reasoning,llm_model, and
llm_confidence. Prompt inclusion is opt-in per attestation
profile (large; may be redacted for privacy). error_classwhen present (from #419).
- Extend
LLMConsultationResponseto carrymodeland (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
- #418 (Determinism Tier 1) and #419 / #420 (Tier 2) -- companions.
- Feature 025 / RFC-0001 Stage 1 -- introduced
authority;
attestation already carries it. This issue extends the same file
with additional per-control fields. - Feature 026 / harness driver -- LLM dispatch lives there; the
reasoning-capture wiring goes on the harness->attestation path.
- Ngôn ngữ chính
- Python
- Star
- 22
- Fork
- 27
- Merge trung bình
- 1 ngày 23 giờ
- Pull request đã merge (30 ngày)
- 48
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của darnitdevorg/darnit
-
ci needs triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
darnitdevorg/darnit#607 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
dependencies module-baseline needs triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
darnitdevorg/darnit#606 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
A test starts real Sigstore signing (interactive OIDC login) when the attestation extra is installedĐang mởmodule-baseline needs triage testing
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
darnitdevorg/darnit#604 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
`darnit validate` crashes on openssf-baseline.toml summarising levelsCó thể đã có người làm @i-am-paradox đã nhận 4 ngày trước. Đang mởinterface-cli module-core
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
darnitdevorg/darnit#589 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Plugins hard-code version "0.1.0" while the packages are at 0.1.1Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởgood first issue maintenance
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
darnitdevorg/darnit#587 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của darnitdevorg/darnit
Issue tương tự
-
`lvm_compact` has no self-hosted twin, and `docs/158` §5 says every language-face component mustĐang mởbug sev-3 vm
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
sierra-research/tau2-bench#635 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
The add-ssm-model skill requires a Cython simulator; the contributing guide allows Python onesCó thể đã có người làm @fmuia đã nhận hôm nay. Đang mởdocumentation skill
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
lnccbrown/ssm-simulators#406 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100
btclib-org/btclib-ecc#309 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
autowarefoundation/autoware_carla_scenario#281 ·
Maintainer thường phản hồi trong vòng 1 ngày