Skip to content

Migration scorecard is written twice per session on CLI #49

Description

@AlexDeMichieli

.github/MIGRATION-SCORECARD.md gets two near-identical entries for a single session.

Observed during local testing of #45:

## 2026-09-18T02:16:32Z
- session: 2d1efd1c-4e43-4097-b178-32d6a0652e59
- reason: complete
- workflows: total=0, clean=0, with_issues=0

## 2026-09-18T02:16:33Z
- session: 2d1efd1c-4e43-4097-b178-32d6a0652e59
- reason: complete
- workflows: total=0, clean=0, with_issues=0

Same session ID, one second apart.

Cause

plugin/hooks.json registers the scorecard script under both sessionEnd and Stop. Registering both is correct for cross-surface support — CLI uses sessionEnd, VS Code uses Stop — but on CLI both fire, so the entry is written twice.

Suggested fix

Make the script idempotent per session: before appending, check whether the current session ID already has an entry for the same reason and skip if so. Add a case to plugin/hooks.test.sh so it stays fixed.

Cosmetic, not urgent. Worth fixing before anyone tries to read a scorecard as a record of how many migrations ran.

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