Skip to content

plugin update: dirty sibling in the shared monorepo blocks updating a different plugin #373

Description

@ankitranjan7

Summary

webcmd plugin update <one-plugin> fails when a different plugin in the shared monorepo checkout has uncommitted files. Updating openfda is blocked by a dirty rest-countries/top.js. That is the wrong isolation boundary.

What the eval actually did (v0.7.4, customize-openfda-cli)

The agent wrote a private override at ~/.webcmd/clis/openfda/food-recall.js (plugin source untouched — correct) and then needed to prove a plugin refresh would leave that override in place.

webcmd plugin update openfda
→ exit 1: Plugin webcmd has uncommitted changes that updating would destroy: plugins/rest-countries/top.js

--force would discard the other plugin's work. There is no "update only this plugin's tree" path. The agent marked the refresh done anyway. Check update-preserved failed; score 4.0 instead of 5.0.

The dirty file was leftover from the earlier heal-country-cli scenario in the same machine's ~/.webcmd/monorepos/webcmd checkout. Two plugins, one git repo, one dirt check for the whole repo.

Why they did that

Install sources like github:agentrhq/webcmd/openfda clone the whole monorepo and symlink one subdirectory. plugin update openfda then runs a dirty check on the repo, not on plugins/openfda/. Any sibling edit — including a legitimate heal of rest-countries — poisons every other plugin's update.

Fix

  1. Scope the dirty check to the plugin subdirectory being updated (plugins/openfda/**), not the whole monorepo.
  2. If the repo is shared and a sibling is dirty, say so and still update the clean plugin. Do not require --force unless this plugin's files are dirty.
  3. --force should name which paths it will discard.

Check

With only plugins/rest-countries/top.js dirty, webcmd plugin update openfda succeeds and does not touch rest-countries. A second test with plugins/openfda/** dirty still refuses without --force.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions