Audit credential redaction removal and simplification
This commit is contained in:
@@ -2,14 +2,16 @@
|
||||
|
||||
**Reviewed baseline:** `faba8ab` (2026-11-15). **Status:** assessment complete;
|
||||
remediation not implemented. D1 was resolved on 2026-11-15 and the architecture
|
||||
policy updated; its implementation cleanup awaits the focused audit below.
|
||||
policy updated; the focused cleanup audit is complete and implementation remains
|
||||
pending.
|
||||
This document owns classification, recommended
|
||||
scope, and pending decisions for the [catalog](catalog.md). The source audits
|
||||
retain their evidence; their suggested remedies are not approved requirements.
|
||||
|
||||
The catalog covers 103 source findings in 62 entries. Every catalog entry is
|
||||
The catalog covers 110 source findings in 65 entries. Every catalog entry is
|
||||
assessed below. The application implementation remains at the audited baseline
|
||||
`c4ccd78`; later documentation includes the D1 policy revision. This review used
|
||||
`c4ccd78`; later documentation includes the D1 policy revision and the focused
|
||||
[removal audit](14-redaction.md), reviewed at `a68a951`. This review used
|
||||
the source audits, current contracts and ADRs, and targeted implementation
|
||||
inspection. It did not independently rerun all audit probes, benchmarks, or the
|
||||
test suite. Reproductions reported by the audits remain attributed to them;
|
||||
@@ -68,8 +70,8 @@ behavior from proposed extensions.
|
||||
| --- | --- | --- | --- |
|
||||
| [1. Bind output writes to the checked destinations](catalog.md#1-bind-output-writes-to-the-checked-destinations) | C, A | Ready | The wrong-file reproduction and repeated report-path resolution substantiate application defects. Resolve paths with filesystem semantics, carry checked parent/destination information through publication, and share staging ownership. Preserve symlinks and intentional in-place replacement. No hostile-directory race-proof guarantee, cross-file transaction, or custom filesystem machinery is selected. |
|
||||
| [2. Keep model requests within the configured transport boundary](catalog.md#2-keep-model-requests-within-the-configured-transport-boundary) | — | Closed: WONTFIX | Accepted Go HTTP redirect and credential-forwarding behavior. The source audit's proposed redirect restrictions do not authorize implementation. |
|
||||
| [3. Protect credentials inside nested debug responses](catalog.md#3-protect-credentials-inside-nested-debug-responses) | A, M, T | Superseded remedy; D1 cleanup audit | The encoded-secret observation tested the withdrawn redaction guarantee. Do not implement nested sanitization or discard malformed response bodies for that purpose. Audit and remove local credential discovery, sanitization, and their supporting abstractions and tests; retain useful diagnostic evidence and native upstream behavior. |
|
||||
| [4. Make debug artifact permissions private by default](catalog.md#4-make-debug-artifact-permissions-private-by-default) | M; P | Reassess under D1 scope | The permission observation is factual, but hostile local filesystem access is outside the maintainer's threat model and operators own artifact access. The prior mandatory private-root/security remediation is withdrawn. The follow-up audit should distinguish ordinary file-creation mechanics from machinery justified only by local-adversary protection; any remaining default-location or permission proposal needs its own justification. |
|
||||
| [3. Protect credentials inside nested debug responses](catalog.md#3-protect-credentials-inside-nested-debug-responses) | A, M, T | Ready under resolved D1; original remedy superseded | The encoded-secret observation tested the withdrawn guarantee. The focused audit confirms removal of the local substitution package in favor of direct serialization, plus retirement of masking-only tests/docs. Keep malformed response evidence and native behavior; no nested sanitizer or response-omission policy. Discovery and repair/CLI consumers are separately tracked in #63–65. |
|
||||
| [4. Make debug artifact permissions private by default](catalog.md#4-make-debug-artifact-permissions-private-by-default) | M | No remediation under D1 scope | The permission observation is factual, but hostile local filesystem access is outside the selected threat model. The focused audit found ordinary directory creation and filename handling to retain, not a redundant private-root mechanism. Leave defaults unchanged in D1 cleanup; any future location or permission proposal needs an independent justification. This does not close #1’s wrong-file correctness work. |
|
||||
| [5. Define the trust boundary for discovered configuration](catalog.md#5-define-the-trust-boundary-for-discovered-configuration) | M; P | Ready for documentation; extension excluded | Automatic companions are intentional configuration composition, not a discovery bug. Explain that the searched locations, selected bundle, imports, and companions are trusted configuration, and keep uploaded transcripts separate. Disabling discovery or adding a new isolation mode is outside this remediation; no ConfigKit replacement loader. |
|
||||
| [6. Make blocking transcript input and delivery cancellation-aware](catalog.md#6-make-blocking-transcript-input-and-delivery-cancellation-aware) | C; — | Ready in part; WONTFIX in part | Honor cancellation before regular-file publication and when blocked delivery returns; produce failure status even if bytes have escaped. Do not promise interruption of already-blocked standard I/O. Do not ban FIFOs, add detached writer goroutines, or revive the source audits' context-aware stream machinery. |
|
||||
| [7. Publish truthful failure reports and preserve initialized evidence](catalog.md#7-publish-truthful-failure-reports-and-preserve-initialized-evidence) | C, A, T | Ready | Publishing completed reports after a known delivery failure contradicts their meaning. Select failed status before the first report write; preserve initialized evidence if rendering fails. Carry rendering errors explicitly and retain bounded best-effort finalization. Cross-file atomicity remains outside the contract. |
|
||||
@@ -90,13 +92,13 @@ behavior from proposed extensions.
|
||||
| [22. Preserve failure phase and origin in run reports](catalog.md#22-preserve-failure-phase-and-origin-in-run-reports) | C, A, T | Ready | Required phase and available operation origin are lost between owners. Carry structured facts and assemble run records once, keeping primary failure separate from canceled peers and secondary delivery failures. Preserve documented counts and serialized identities. |
|
||||
| [23. Classify provider attempt timeouts separately from operation deadlines](catalog.md#23-classify-provider-attempt-timeouts-separately-from-operation-deadlines) | C, T | Ready | The attempt-timeout probe and classifier order establish misclassification. Prefer native PromptKit classifications and parent cancellation precedence. Use the existing transport-failure reason for an HTTP-only timeout; a new public reason code is unnecessary for this fix. |
|
||||
| [24. Use input diagnostics for operator-correctable failures](catalog.md#24-use-input-diagnostics-for-operator-correctable-failures) | C, T | Ready; technical ownership check | Processing readiness and chunk infeasibility should follow the existing input-error contract while I/O and cancellation remain runtime failures. Delegated inspection has a demonstrated classification mismatch, but locate responsibility in Audita's loader versus ckprompt/CommandKit before editing. Fix or request a fix at that owner; do not create a local replacement command surface. |
|
||||
| [25. Identify missing required credentials in safe diagnostics](catalog.md#25-identify-missing-required-credentials-in-safe-diagnostics) | C, M | Ready | The missing-credential cause is available but obscured. Surface a safe requirement and role/profile context from typed metadata, preserving the native cause. Keep PromptKit responsible for credential validation; do not move provider preparation or secret inspection into a new local subsystem. |
|
||||
| [25. Identify missing required credentials in safe diagnostics](catalog.md#25-identify-missing-required-credentials-in-safe-diagnostics) | C, M | Ready | The missing-credential cause is available but obscured by generic setup presentation. Surface actionable native setup detail with available role/profile context, preserving typed causes and classification. D1 removes the blanket restriction on cause presentation; compact ordinary report projections remain useful. Keep PromptKit responsible for credential validation; do not introduce local secret inspection or a replacement preparation subsystem. |
|
||||
| [26. Render input and output paths as plain Markdown text](catalog.md#26-render-input-and-output-paths-as-plain-markdown-text) | C, T | Ready | Input paths are data; rendered Markdown currently gives some filenames unintended syntax. Escape them as literal text without altering structured path values. This restores report presentation rather than imposing filename restrictions. |
|
||||
| [27. Keep the validator execution class used by the runner](catalog.md#27-keep-the-validator-execution-class-used-by-the-runner) | C, A | Ready | Runtime and ledger can disagree for supported injected validator classes. Record the effective execution class with decisions and project it into the ledger. Preserve existing output fields and fallback behavior; no new validator registration policy. |
|
||||
| [28. Verify signal and exit handling in the production executable](catalog.md#28-verify-signal-and-exit-handling-in-the-production-executable) | T | Ready | The startup helper duplicates the production boundary, so coverage does not prove actual executable signal wiring. Exercise representative startup and cancellation through the real executable or shared production entry point; keep narrower tests for other CLI behavior. |
|
||||
| [29. Fail the release bootstrap when cleanliness cannot be established](catalog.md#29-fail-the-release-bootstrap-when-cleanliness-cannot-be-established) | C, T | Ready | The shell probe establishes that a failed status command can appear clean. Check its exit result explicitly and test that boundary. ReleaseKit already owns the independent delivery validation; do not add another local release validator or publication gate. |
|
||||
| [30. Bound pending proposal work before backend admission](catalog.md#30-bound-pending-proposal-work-before-backend-admission) | E, A, T; P | Investigate implementation; D3 for policy | Fan-out and retained results scale with chunks; finite native admission rejection is itself working as configured. Design bounded local preparation/dispatch and concurrent result draining without changing backend ownership, stable identities, cancellation joins, or configured rejection semantics. Measure representative memory/contention to size the implementation. Guaranteeing a turn despite capacity rejection or adding a new scheduling control requires D3. |
|
||||
| [31. Reduce peak memory for large transcript input and output](catalog.md#31-reduce-peak-memory-for-large-transcript-input-and-output) | E, A; P | Ready in part; D4 | Remove the generic JSON round trip and release whole-input representations after their last use. Share typed output projection; streaming into regular-file staging is an implementation option. Preserve encoding-failure and stream-delivery semantics. An application input-size limit or regular-file-only restriction is not an optimization; D4 covers size limits, and FIFO exclusion is not selected. |
|
||||
| [31. Reduce peak memory for large transcript input and output](catalog.md#31-reduce-peak-memory-for-large-transcript-input-and-output) | E, A; P | Ready in part; D4 | Remove generic JSON round trips and release whole-input representations after their last use. The D1 audit additionally identifies source-debug reconstruction: write the acquired bytes directly and retain parsed/normalized views separately, without reopening the input. Share typed output projection; preserve encoding-failure and stream-delivery semantics. An input-size limit remains D4, and FIFO exclusion is not selected. |
|
||||
| [32. Retain only the run evidence required by enabled outputs](catalog.md#32-retain-only-the-run-evidence-required-by-enabled-outputs) | E, A | Ready | The production consumers establish that much completed evidence is unused without its corresponding output. Retain only required live repair state, compact counts, and selected report/debug detail. Derive not-started counts without a full eager grid where possible; keep complete matrices when enabled and preserve fatal-origin evidence. |
|
||||
| [33. Limit debug retention costs within a run](catalog.md#33-limit-debug-retention-costs-within-a-run) | E, A; P | Ready in part; D5 | Reduce duplicate event representations and serialization; coalesce equivalent warnings while retaining failure counts and affected evidence. Those are efficiency improvements. Quotas, automatic deletion, stopping future capture, or replacing self-contained interactions with reference-based artifacts change retained evidence and need D5. |
|
||||
| [34. Account for cumulative correction-repair history and work](catalog.md#34-account-for-cumulative-correction-repair-history-and-work) | E; P | Investigate costs; D6 | Repeated full context follows the deliberately selected repair architecture, so growth alone is not a defect. Measure cumulative requests, bytes, revalidation, and debug costs using existing observations or development instrumentation. Avoid duplicate local representations. New aggregate stopping budgets or reduced model context require D6; do not add ordinary-report fields merely to perform this analysis. |
|
||||
@@ -108,7 +110,7 @@ behavior from proposed extensions.
|
||||
| [40. Use one validator contract and one owner for decision semantics](catalog.md#40-use-one-validator-contract-and-one-owner-for-decision-semantics) | A, C, M | Ready | Duplicate ports and runner-specific verdict rewriting obscure one existing validation contract. Consolidate types, applicability, and decision meaning with their owner; remove unused envelope fields. Preserve zero-budget shortlisting, independent repair feedback, cardinality, and unavailable outcomes. No broad plugin framework or new validator policy is needed. |
|
||||
| [41. Carry structured failure facts through model operations and reporting](catalog.md#41-carry-structured-failure-facts-through-model-operations-and-reporting) | A, C | Ready | Failure class and reason already exist but are discarded and reconstructed. Carry typed facts through role-specific handling and report counts. Use a consistent internal-failure reason fallback for missing reasons while retaining the original failure class and cause. Avoid reclassifying an operation from its display reason. |
|
||||
| [42. Keep required output publication separate from optional debug retention](catalog.md#42-keep-required-output-publication-separate-from-optional-debug-retention) | A, C | Ready | Required publication and optional retained evidence have distinct lifecycles. Separate their APIs and share regular-file staging where behavior is common. Preserve transcript-before-report ordering, nontransactional finalization, private staging, and nonfatal debug errors. Coordinate with #1, #7, #16, and #22. |
|
||||
| [43. Inject one interaction diagnostics contract](catalog.md#43-inject-one-interaction-diagnostics-contract) | A, M | Ready; simplify after D1 audit | Common interaction writing still has an ownership benefit, but the writer should not acquire redaction-only contracts, credential discovery, or combined-role secret plumbing. Audit those paths before choosing the smallest remaining writer interface. Preserve role-owned evidence, artifact association, and nonfatal write failures; D5 still governs retention changes. |
|
||||
| [43. Inject one interaction diagnostics contract](catalog.md#43-inject-one-interaction-diagnostics-contract) | A, M | Ready under resolved D1 | The focused audit identifies removable secret-source assertions, lazy discovery closures, combined-role lists, and preflight/writer credential arguments. Complete common interaction writing without those dependencies. Preserve role-owned payloads, artifact association, and nonfatal write callbacks and synchronization; coordinate with #42/#48. D5 still governs retention changes. |
|
||||
| [44. Simplify structured-call completion and remove obsolete record fields](catalog.md#44-simplify-structured-call-completion-and-remove-obsolete-record-fields) | A, M, T | Ready | Ordinary calls and coordinator turns share completion responsibilities; obsolete payload copies have no production reader. Use explicit once-only completion and remove superseded state after moving meaningful assertions. Preserve native terminal counts, typed causes, and undelivered diagnostic evidence. |
|
||||
| [45. Retire the test-only direct continuation branch](catalog.md#45-retire-the-test-only-direct-continuation-branch) | M, T | Ready | Direct continuation is test-only; production uses coordination. Move sibling-isolation and structural-repair coverage onto the coordinator before removing the branch. Removing the redundant adapter surface does not remove PromptKit capability or production repair. |
|
||||
| [46. Use a single proposal handoff and test real runner indexing](catalog.md#46-use-a-single-proposal-handoff-and-test-real-runner-indexing) | A, E, M, T | Ready | Generator enrichment is discarded and real indices are assigned by the runner. Keep one proposal handoff with original local references, and assert actual deterministic runner indices under observed out-of-order completion. Review emitted diagnostic start_index separately before dropping it; move useful tests before removing their harness. |
|
||||
@@ -125,21 +127,24 @@ behavior from proposed extensions.
|
||||
| [57. Clarify what the inherited progress flag does in processing](catalog.md#57-clarify-what-the-inherited-progress-flag-does-in-processing) | M; P | Ready for clarification; D7 | The standard flag is exposed without processing events. Accurate help/documentation can proceed, preserving standard command acceptance. Adding a processing progress stream is a user-visible feature: D7 selects scope. Any standard help/capability gap belongs in CommandKit rather than local replacement routing. |
|
||||
| [58. Test registered validator roles and embedded assets through their behavior](catalog.md#58-test-registered-validator-roles-and-embedded-assets-through-their-behavior) | T, M | Ready | Registry tests duplicate representation assertions and prompt-count checks can miss substitutions. Check required identities, effective roles, preparability, schema identity, and protective copies at their actual owners. Do not replace them with prompt wording or private implementation assertions. |
|
||||
| [59. Consolidate overlapping normalization fixtures](catalog.md#59-consolidate-overlapping-normalization-fixtures) | T, M | Ready | Two fixtures protect the same nonmerge outcome. Consolidate their meaningful assertions, keeping distinct normalization behavior and independent input expectations. Coordinate with #51 so copied parser conversion is not retained in the tests. |
|
||||
| [60. Focus integration tests on decoded artifacts and independent output choices](catalog.md#60-focus-integration-tests-on-decoded-artifacts-and-independent-output-choices) | T | Ready | Decoded artifact identities and evidence associations are the contract; escaping and repeated large fixtures are incidental. Keep one full repair/filter/later-failure attribution scenario and use smaller independent-output fixtures. Preserve real role selection, successive text, and output-choice coverage. |
|
||||
| [61. Remove abandoned test support and unused fixture inputs](catalog.md#61-remove-abandoned-test-support-and-unused-fixture-inputs) | M, T | Ready | The reachability audit found abandoned helpers and unused fixture inputs after checking registrations and serialization. Delete them, retaining compile-time interface fixtures and active behavior assertions. Recheck callers when implementing if the code has advanced. |
|
||||
| [60. Focus integration tests on decoded artifacts and independent output choices](catalog.md#60-focus-integration-tests-on-decoded-artifacts-and-independent-output-choices) | T | Ready | Decoded artifact identities and evidence associations are the contract; escaping and repeated large fixtures are incidental. Keep one full repair/filter/later-failure attribution scenario and use smaller independent-output fixtures. Remove masking assertions identified in the D1 audit without losing role selection, successive text, output-choice, and failure coverage. |
|
||||
| [61. Remove abandoned test support and unused fixture inputs](catalog.md#61-remove-abandoned-test-support-and-unused-fixture-inputs) | M, T | Ready | The reachability audit found abandoned helpers and unused fixture inputs. Delete them, including unused secret scanners; the D1 audit also identifies credential-echo fixture machinery to retire when its masking-only consumers disappear. Retain compile-time interface fixtures and useful behavioral assertions, rechecking callers when implementing. |
|
||||
| [62. Remove unreachable merge and file helpers](catalog.md#62-remove-unreachable-merge-and-file-helpers) | M | Ready | Unreachable merge and file helpers duplicate or bypass live owners. Remove them after a current reference check, retaining live normalization, input diagnosis, and output-session behavior. |
|
||||
| [63. Remove redaction-only credential discovery and tracking](catalog.md#63-remove-redaction-only-credential-discovery-and-tracking) | A, E, M, T | Ready under resolved D1 | Profile/backend enumeration, environment reads, name caches, and role tracking exist solely for substitution. Remove them after their consumers, preserving native authentication, inspection, prepared snapshots, call IDs, and terminal synchronization. |
|
||||
| [64. Preserve validator explanations in repair feedback](catalog.md#64-preserve-validator-explanations-in-repair-feedback) | A, M, T | Ready under resolved D1 | Secret substitution affects live repair feedback even without debug. Use domain repair findings directly, retaining proposal association and unavailable-assessment semantics. Keep repair budgets, withdrawal, revalidation, and sibling independence unchanged. |
|
||||
| [65. Remove credential substitution from CLI presentation](catalog.md#65-remove-credential-substitution-from-cli-presentation) | A, E, M, T | Ready under resolved D1 | Remove preparation/finalization sanitizers and obsolete arguments; present existing warnings, errors, and actual paths through CommandKit. Preserve typed causes, reporting modes, exit behavior, and output failure ownership. Coordinate with #25 for separately obscured setup detail. |
|
||||
|
||||
## Implementation planning implications
|
||||
|
||||
Group related work by owner rather than implementing catalog numbers as 62
|
||||
Group related work by owner rather than implementing catalog numbers as 65
|
||||
independent tasks. Fixes and their supporting ownership changes belong together:
|
||||
|
||||
- Output publication and diagnostic integrity: #1, #3–9, #16, #22, #26,
|
||||
#42–43, incorporating the resolved D1 cleanup and keeping D2/D5 policy
|
||||
#42–43, #63, #65, incorporating the resolved D1 cleanup and keeping D2/D5 policy
|
||||
portions separate.
|
||||
- Transcript and glossary correctness: #11–13, #17–21, #35–39, #51–54.
|
||||
- Runner and model-operation lifecycle: #10, #14–15, #23–25, #27, #30,
|
||||
#32, #40–41, #44–49, #55–56.
|
||||
#32, #40–41, #44–49, #55–56, #64.
|
||||
- Verification and obsolete machinery: #28–29, #58–62 and the tests attached
|
||||
to each other change.
|
||||
|
||||
@@ -164,7 +169,8 @@ validator responses remain [separate deferred features](../future.md).
|
||||
|
||||
## Resolved D1: withdraw application-wide credential redaction
|
||||
|
||||
**Accepted:** 2026-11-15. **Policy update:** complete. **Implementation:** pending.
|
||||
**Accepted:** 2026-11-15. **Policy update and focused audit:** complete.
|
||||
**Implementation:** pending.
|
||||
|
||||
The maintainer withdrew the application-wide credential-redaction requirement
|
||||
and approved removing machinery whose sole purpose is serving it, plus
|
||||
@@ -180,38 +186,22 @@ the premises of #3 and #4 and the remedies for #9 and #43. Ordinary publication
|
||||
correctness, authentication, and required output behavior still have independent
|
||||
purposes. The remaining six decisions retain their IDs.
|
||||
|
||||
### Focused follow-up audit
|
||||
### Focused follow-up audit: complete
|
||||
|
||||
Perform a read-only audit before implementation, tracing both callers and data
|
||||
flow. Its deliverable is an inventory of **remove**, **simplify**, and **retain**
|
||||
items, with locations, remaining consumers, rationale, affected tests/docs, and
|
||||
dependencies on catalog entries. It should cover:
|
||||
The [removal and simplification audit](14-redaction.md) records seven findings,
|
||||
traced consumers, retained responsibilities, tests/docs, and implementation
|
||||
sequencing. It adds #63–65 and refines #3–4, #9, #25, #31, #43, and the related
|
||||
test cleanup. It confirms that credential discovery, generic substitution,
|
||||
serialization round trips, cross-role secret plumbing, repair-feedback rewriting,
|
||||
and CLI substitution can be removed without replacing native library behavior.
|
||||
|
||||
1. Credential discovery performed solely for redaction, including profile/backend
|
||||
enumeration, environment reads, caches, role tracking, and secret-provider
|
||||
interfaces. Separate this from credentials needed by native authentication.
|
||||
2. Generic redactors, encoded-secret handling, serialization round trips,
|
||||
sanitizing copies, and fallback/error paths in report and artifact writers.
|
||||
3. Redaction-related parameters, callbacks, adapters, and data structures across
|
||||
proposal, validation, repair, CLI output, and execution reporting. Simplify
|
||||
remaining responsibilities instead of replacing removed code with no-op seams.
|
||||
4. Error presentation that hides actionable native information only to satisfy
|
||||
the old guarantee. Preserve useful error classifications, attribution, and
|
||||
stable output contracts while examining whether messages can be clearer.
|
||||
5. Tests, fixtures, documentation, comments, and outstanding audit recommendations
|
||||
that perpetuate the withdrawn requirement. Retain independent coverage of
|
||||
serialization, evidence fidelity, output failures, and upstream integration.
|
||||
|
||||
For each item, establish whether it serves an independent application requirement
|
||||
or is supplied natively upstream. Preserve actual authentication and the standard
|
||||
inspection surfaces. Evaluate implementation complexity and data loss, not merely
|
||||
occurrences of the word "redaction." Do not execute live providers or print real
|
||||
credential values during this audit.
|
||||
|
||||
Use the inventory to plan coherent removal/refactoring units. Update implemented
|
||||
behavior documentation alongside those code changes, so documentation does not
|
||||
claim cleanup has already landed. The source audit files remain historical
|
||||
evidence; this assessment controls the revised remediation scope.
|
||||
Use that inventory to plan coherent removal/refactoring units. Preserve native
|
||||
authentication and inspection, evidence fidelity, typed failure classification,
|
||||
Markdown escaping, ordinary output correctness, and nonfatal debug failures.
|
||||
No new product decision is required for these removals; D2–D7 remain unchanged.
|
||||
The static audit did not run providers or tests or inspect real credentials.
|
||||
Update implemented-behavior documentation alongside code changes. The source
|
||||
audits remain historical evidence; this assessment controls remediation scope.
|
||||
|
||||
## Open Decisions
|
||||
|
||||
|
||||
Reference in New Issue
Block a user