dsh plugin add re-registers plugins already loaded by cordis.patch.yml, crashing web boot with duplicate loader entry id
#2889
Replies: 1 comment
|
Verified on rc.7 ( 1. Confirmed at source. 2. Family lineage — this is trigger class #2, now with the fullest evidence. The reconcile family now has 5 reports across 3 mechanisms:
3. Your suggested fix #2 is the correct one — loader-level dedupe by
4. Your workaround is exactly right — install manually (package.json dep + cordis.patch.yml row + 5. Tie-in with #2854: your fix #2 (dedupe by id at compose) and #2854's fix (clone insert objects at Excellent evidence bundle — the before/after |
Uh oh!
There was an error while loading. Please reload this page.
Environment
dsh web), Windows 11, web profile.package.jsondependencies(GitHub refs) plus an explicit- insert:row incordis.patch.yml(e.g.id: session-cleaner,id: dsh-pdf,id: dsh-skin, ...).dsh.bundle.patch(package.json→dsh.bundle.patch→./cordis.patch.yml).Symptom (100% reproducible)
Running
dsh plugin --profile web add dsh-vision-router(or evendsh plugin list, per later diagnosis) rewritespackage.jsonso that every dependency that declaresdsh.bundle.patchis appended todsh.profile.bundles. On the next boot, those plugins are registered twice — once from the new bundle layer, once from the pre-existingcordis.patch.ymlrows — and the whole web backend fails to start:Removing just
session-cleanerdoes not help; the next plugin (dsh-pdf,dsh-skin, …) then collides in turn. The web server never reacheslisten— the profile appears "completely down" (no login page).Root cause
dsh plugin add/list/updatecollects every dependency with adsh.bundle.patchintodsh.profile.bundleswithout knowing that those same plugins are already inserted viacordis.patch.yml. The two loading mechanisms (bundle layer vs. manual patch layer) are not deduplicated byid, so the loader throwsduplicate loader entry idinstead of "last layer overrides first".Workaround (keeps existing plugins intact)
Do not use the
dsh plugincommand at all on a profile that already loads plugins manually. Install the new plugin the same way as the existing ones:"<plugin>": "^<version>"topackage.jsondependencies;- id: .../name: ...row under the existing- insert:list incordis.patch.yml;pnpm install.This installed
dsh-vision-router@1.5.2cleanly;dsh --dump-configconfirms each plugin appears exactly once.Suggested fix
Any of the following would prevent this class of outage:
dsh pluginshould detect rows already present incordis.patch.yml(or already composed by an earlier layer) and skip/warn instead of appending a duplicate bundle.idacross bundle layers and patch layers — later layers override earlier ones (which the bundle patch comments already claim is the intended semantics).dsh plugin add/listshould print a clear warning when it is about to add bundles that duplicate manually-declared plugin rows.Evidence bundle
package.jsonbefore/afterdsh plugin add(the command appended the 8dsh.bundle.patchpackages intodsh.profile.bundles).cordis.patch.yml(unchanged, already containing the same plugin ids).duplicate loader entry id: session-cleaner).*.pre-vision-rollback-20260818-000422) from the rollback.Available on request.
All reactions