Status: proposal for community and maintainer discussion.
The official repository's current contribution policy states that external pull requests are not accepted. This document is therefore discussion material, not a prewritten core PR. Any upstream implementation should begin only after maintainer direction.
Add an official diagnostic path that can reduce a failing Harness profile to a 1-minimal set of out-of-tree bundles. The current external prototype demonstrates the workflow without changing Harness core. This RFC asks first for stable, machine-readable seams and documentation; adopting the whole implementation is optional.
Harness profiles compose ordered bundle layers. With many community bundles, a failure report often says only "it works after I disable some plugins." Manual one-by-one checks are slow and miss pair/trio interactions. Running the diagnostic inside the normal plugin tree is unreliable when that tree cannot load.
The prototype creates a shadow DSH_HOME, keeps installation-owned bundles
fixed, and reduces only names present in both the profile bundle list and
dependency map. A real rc.7 test found an A+B duplicate-tool interaction in six
configurations while A and B each passed alone. The source profile fingerprint
did not change.
One possible first-party surface:
dsh plugin --profile web reduce --probe web --report reducer-report.jsonExpected guarantees:
- full set must fail and empty out-of-tree baseline must pass;
- inconsistent probes are unresolved, never removal evidence;
- output is 1-minimal and says explicitly that this is not global minimality;
- no package installation or source-profile rewrite, and a fresh shadow home for every probe attempt;
- report is local by default and scrubbed before sharing.
The external tool currently reads the documented profile manifest directly. The most useful low-risk upstream changes would be:
- A machine-readable profile inspection command that reports ordered bundles, which bundles are installation-owned, and dependency/package metadata.
- A documented way to launch a profile against an alternate
DSH_HOMEwith a random loopback port and machine-readable readiness output. - A versioned diagnostic report envelope shared by doctors, repro exporters, and reducers: Harness version, profile, platform, redaction declaration, source-unchanged evidence, and tool-specific results.
- A documentation link from troubleshooting to external reducers while usage evidence accumulates.
These seams reduce coupling even if dsh-plugin-reducer remains a community
tool.
A minimal failure set establishes evidence and ownership; it does not prove which member is wrong or whether removing one is semantically safe. Repair and quarantine should stay separate, explicit actions handled by existing guard tools or by the user.
The report is never uploaded automatically. Known credential forms and absolute paths are scrubbed, but users must still review it. Plugins and probes execute with normal user permissions; the shadow home is configuration isolation, not a security sandbox.
- Is
dependencies ∩ dsh.profile.bundlesthe intended stable definition of an out-of-tree reducible bundle? - Should ordered layer failures eventually support prefix/order reduction in addition to set reduction?
- Which readiness signal can be considered stable and machine-readable?
- Would maintainers prefer an official subcommand, a supported library API, or a documented external-tool contract?
- Is a shared diagnostic report envelope useful across the existing doctor, guard, and repro ecosystem?