Skip to content

feat(idempotency): add idempotency support for multi-call detection#24

Merged
ronaldtse merged 1 commit intomainfrom
feature/idempotency-support
Feb 12, 2026
Merged

feat(idempotency): add idempotency support for multi-call detection#24
ronaldtse merged 1 commit intomainfrom
feature/idempotency-support

Conversation

@ronaldtse
Copy link
Copy Markdown
Contributor

Summary

  • Add IdempotencyManager class to detect and skip redundant installations
  • Add state file (.metanorma-setup-state.json) to track installation state
  • Add checksum-based configuration change detection
  • Add idempotent output to indicate skip vs reinstall
  • Add integration test workflow for idempotency scenarios
  • Add unit tests for IdempotencyManager

Details

When the action is called multiple times with the same configuration, it now detects the existing installation and skips the redundant setup. Configuration changes (version, method, platform) trigger reinstallation.

New Files

  • src/idempotency/ - Idempotency module
    • index.ts - Public API exports
    • types.ts - Type definitions
    • idempotency-manager.ts - Main idempotency logic
  • __tests__/idempotency.test.ts - Unit tests
  • .github/workflows/idempotency-test.yml - Integration test workflow

Modified Files

  • src/main.ts - Added idempotency check before installation
  • action.yml - Added idempotent output

Test Plan

  • Unit tests pass locally
  • Integration test workflow passes on all platforms (Linux, macOS, Windows)
  • Idempotency test verifies second call skips installation
  • Config change test verifies reinstallation happens

@ronaldtse ronaldtse force-pushed the feature/idempotency-support branch 2 times, most recently from 663985d to 8132a46 Compare February 12, 2026 08:07
@ronaldtse ronaldtse force-pushed the feature/idempotency-support branch from 6d1cb54 to 37537cb Compare February 12, 2026 08:35
@ronaldtse ronaldtse merged commit 964bdff into main Feb 12, 2026
39 checks passed
@ronaldtse ronaldtse deleted the feature/idempotency-support branch February 12, 2026 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant