Feat/v0.2.0 change assessment - #5
Merged
Merged
Conversation
…ocument `explain` is a second, independent step over a report `compare` already wrote. It reads that document, optionally a caller-supplied change context, sends one batched OpenAI-compatible request built from deterministically ranked aggregate groups and a binary-fixed task prompt, validates the response locally against a closed risk enum and the group ids it sent, and writes a separately versioned assessment artifact plus a re-rendered HTML report. `compare` is unchanged: same result document schema, same determinism, same exit codes, same service reach. The v0.1.0 acceptance suite passes unmodified, and both directions of the reach guarantee are asserted by failing the test if the wrong endpoint is contacted. The package split is the disclosure boundary made structural. `internal/assess` decides what may leave the process — group ranking and selection, pseudonymization, fencing, prompt assembly — and `internal/inference` only knows how to send it, with no knowledge of catalogs. The outbound payload is constructed field by field rather than by marshalling a `model.Result`, so what PIACE discloses is a question with an answer someone can read. Two decisions are recorded as ADRs: the assessment stays out of the result document (0002), and the inference service is the one scoped exception to the mTLS-only rule (0003). Writing the second one exposed that `internal/transport` stripped `Authorization` only on redirect; `Client.Do` now deletes it unconditionally, so that scoping is enforced rather than assumed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
- new examples/ directory with a services/targets pair for each documented pattern: PuppetDB baseline (the supported path), frozen snapshot baseline, v3 legacy, and the explain pipeline (change context, policy notes, inference-enabled and explain-only services files) - every file passes the strict loader and carries inline comments covering the traps: per-file path resolution, capture's lack of a destination flag, and v3 silently corrupting a PuppetDB baseline - README points at examples/ from the config section and the doc index
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.