Skip to content

Fail closed when the base plugin manifest is unreadable #167

Description

@devantler

🤖 Generated by the Agentic Engineer

Description

scripts/check-plugin-version-bump.sh treats every failed git show "$base_sha:<plugin>/plugin.json" as an absent base manifest. In a partial clone, a promisor-object fetch failure therefore classifies an existing plugin as new and lets the version gate pass.

This is a fail-open validation path: an unreadable base object is not evidence that the manifest did not exist.

Steps to Reproduce

  1. Create a partial clone containing a plugin change and check out the change head.
  2. Make the base manifest's promised object unavailable to the local git show operation.
  3. Run scripts/check-plugin-version-bump.sh <base> <head>.
  4. Observe that the script reports the existing plugin as new and exits successfully.

Expected Behavior

The gate distinguishes a manifest that is genuinely absent at the base revision from a manifest that could not be read. A read or object-fetch failure exits nonzero with an actionable diagnostic.

Actual Behavior

The failed read produces an empty base_version; the script prints that the plugin is new and returns success. Repeating the same exact-head check after making the promised base object available correctly compares the existing plugin versions instead.

Environment

  • Repository: devantler-tech/agent-plugins
  • Observed head: c48489cf83c77ed7fa544553af080474779aca7a
  • Git object model: partial clone with promisor objects
  • Script: scripts/check-plugin-version-bump.sh

Acceptance Criteria

  • A genuinely absent base manifest remains classified as a new plugin.
  • A base-manifest read or promisor-fetch failure exits nonzero with an actionable error.
  • A hermetic regression test proves a failed base read cannot produce a successful "new plugin" classification.
  • Existing-plugin version bumps and genuine new-plugin additions remain green.

Rough size

Small — narrow shell control-flow fix plus regression coverage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions