Skip to content

feature install: refuse when the definitions of the feature are in the tenant but differ #1332

Closed

Description

@vscheuber

Problem

frodo feature install -i <id> decides whether to install from the registry alone (hasIdmFeature: the feature reads installed or not). The registry is derived: it reads "installed" only when every definition of the feature in the tenant equals the original byte for byte. When the definitions are there but differ (a trailing newline, a changed title, an extra mapping property), the registry reads "not installed" although the feature is present, and feature install goes on: it asks "This cannot be undone. Continue?" (or, with -y, does not ask) and requests the install.

The library's diagnosis says what that does in this state: "it must not run the enable action, which installs the feature internally, until they are aligned" (finding definitions-cosmetic-drift of frodo feature validate -i aiagent), and the repair plan aligns the definitions first "so that the enable action does not add the feature a second time". The same drift was the cause of a broken AI agents feature on a Cloud development tenant on 2026-11-12, found while investigating frodo-cli#1300.

Not reproduced with an install on a tenant: an install cannot be undone, so only the diagnosis text and the earlier investigation support the claim that definitions are added a second time.

Proposal

  • For a feature the library can diagnose (today aiagent; see FEATURES_WITH_DIAGNOSIS in src/ops/FeatureOps.ts, which is to be replaced by the library's own answer, frodo-lib#1100), feature install runs the diagnosis before it asks. If the diagnosis reports that definitions of the feature are already in the tenant but differ from the original (cosmetic or structural drift), feature install refuses, prints the finding, and names the command that fixes it: frodo feature validate -i <id> to look and frodo feature validate -i <id> --repair to repair. Exit code 1; nothing is requested from the install endpoint.
  • A feature the library cannot diagnose behaves as it does today and sends the same requests.
  • Unit tests with the library stubbed: drift refused (no install request), no drift installs as before, a feature without diagnosis unchanged, a diagnosis that fails (reported, no install).

Acceptance

  • feature install on a tenant whose registry reads not installed because of drift does not install and says what to do.
  • Nothing changes for a tenant on which the feature is absent, or present and unchanged.

Related: frodo-cli#1300 (feature validate diagnosis and --repair), frodo-lib#1100, frodo-lib#1101.

Activity

  1. added
    enhancementNew feature or request
    no-auto-processingConcierge never touches this item; remove the label to hand it over
    on Nov 15, 2026
  2. added a commit that references this issue on Nov 16, 2026
    0f2a77c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestno-auto-processingConcierge never touches this item; remove the label to hand it over

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions