docs(adr): design 0016's four deferrals — array summarization, raw redaction, enhanced result object (0017-0019, Proposed)#337
Closed
rejifald wants to merge 1 commit into
Closed
Conversation
ADR 0016 deferred four items in its "Future work / Out of scope". This is a design pass — ADRs only, no implementation — landing them as three ADRs (one merge), all Status: Proposed. - 0017 — Array drift summarization in classifyDiff. Refines merged 0015. Sharpens the existing change|path dedup, which silently drops heterogeneous per-element drift (a correctness gap). Group-then-summarize with a detail-equality homogeneity test; adds DriftFinding.sample. - 0018 — Opt-in `redact` option for .inspect()'s raw. Refines 0016 (#334). Per-call, default off, reuses the isSecretKey denylist; name-based only, scoped as safe-sharing convenience not a leak guarantee. No engine change. - 0019 — Enhanced result object (.report()/RunReport) + the `source` discriminator (folds in item 1). Extends 0016 (#334). source lands on Inspection (it interprets raw); heavier diagnostics on RunReport, built from the existing event spine — only per-attempt latency is deferred. Numbered 0017-0019 to dodge 0013/0014 (#328) and 0016 (#334), both in flight; renumber at PR time if a lower number lands first, as 0015/0016 did. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Owner
Author
|
Superseding this in favour of three stacked implementation PRs that each carry their ADR flipped to Accepted (per the decision to land docs alongside code): 0017 (array drift summarization), 0018 ( |
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.
A design pass — ADRs only, no implementation — for the four items ADR 0016 deferred in its Future work / Out of scope. All three land as Status: Proposed.
What's here
Four deferred items → three ADRs (one merge):
classifyDiffredactoption for.inspect()'sraw.report()/RunReport) +sourcediscriminatorThe one merge: the
sourcediscriminator (item 1) folds into 0019. ADR 0016 guessedsourcebelonged on the enhanced object; 0019 reverses that —sourceexplains whyrawisnull, andrawlives onInspection, sosourcelands onInspectionitself (it's free; the engine already knows the branch). The heavier diagnostics go on a separateRunReport<T> extends Inspection<T>.Decisions, in brief
change|pathdedup already collapses homogeneous array drift, but with a silent correctness gap: first-wins drops heterogeneous problems at the same[]path. Decision: group-then-summarize; homogeneity = identicaldetailstring; homogeneous →"all N elements: …"+sampleindex; heterogeneous → one finding per distinct variant. One new optionalDriftFinding.sample.diff.tsstays index-precise.InspectOptions.redact, default off, reusing the existing secret-key denylist (isSecretKey, renamed fromisSecretQueryKey) + a newredactSecretsDeep. Name-based only, scoped as a safe-sharing convenience, not a leak guarantee — which is exactly why it stays opt-in. No engine change.sourceonInspection;RunReportvia.report()carryingattempts,timing, redactedconfig,cache. The plumbing audit is the heart: everything except per-attempt latency is derivable from the existing event spine, so v1 needs no new engine events.configecho is the redacted__config, never__rawConfig.Numbering
Numbered 0017–0019 to dodge
0013/0014(#328) and0016(#334), both in flight. Each carries the renumber-at-PR-time note, as 0015/0016 did.Verification
Pre-commit hook clean: Prettier unchanged, full workspace typecheck passed (docs are Markdown only — no code touched).
🤖 Generated with Claude Code