Skip to content

cleanup --json: a pre-upgrade control session in the project's own registry is reported in sessions.legacy_leftovers #917

Open

Description

@dracic

bmad-loop cleanup --json reports a pre-upgrade bmad-loop-ctl-<16 hex> control session found in the project's own registry inside sessions.legacy_leftovers. #912 added that scan (runs.legacy_registry_leftovers merges superseded_ctl_sessions into the same grouped map the legacy-registry pass fills, and cmd_cleanup flattens it into legacy_leftovers).

The schema-2 description of that field is narrower: "session NAMES … that a legacy multiplexer registry still holds and that cleanup deliberately did not remove" (documents.cleanup_document). The project's current registry is not a legacy one. The machine.py contract says a change in what a value means needs a CLEANUP_SCHEMA_VERSION bump, and CLEANUP_SCHEMA_VERSION is still 2.

Impact

A consumer that reads only legacy_leftovers (and not the additive legacy_kill_commands beside it) can no longer tell a migration remainder from a control session standing in the current registry. The text mode is not affected: it labels each group with its registry, and the pre-upgrade session gets its own stderr line.

Options

  • Report the own-registry session in a new additive field (for example sessions.superseded_ctl_sessions) and keep it out of legacy_leftovers. No version bump.
  • Or keep it where it is, document the wider meaning, and bump CLEANUP_SCHEMA_VERSION to 3.

The first keeps existing consumers' reading of legacy_leftovers intact and is the smaller change for them. It touches the cleanup text mode, the TUI toast and the tests #912 and #916 added for this session.

Raised in the review of #916. Refs #912, #916, #733

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions