Skip to content

v0.2.1 - Testing, Image Changes, and AI Policy

Choose a tag to compare

@sim2kid sim2kid released this 23 Apr 01:44

Release Notes for Version 0.2.1

Version 0.2.1 introduces significant improvements to the bot's reliability through an expanded test suite, enhanced image handling for double-faced cards, and the formalization of our AI usage policy.

🚀 Features & Enhancements

  • Improved Image Handling & Matrix Uploads:
    • Refactored uploadCardImageToMatrix to better handle image parameters and caching.
    • Added explicit support for using existing Matrix Content URIs (MXC) when sending card images, reducing redundant uploads.
    • Improved handling for double-faced cards (DFCs) to ensure both faces can be correctly processed and uploaded.
    • Refined the logic for replacing Scryfall image URLs with Matrix MXC URIs in formatted HTML responses.
  • Documentation & Policy:
    • AI Policy Implementation: Added AI_POLICY.md which outlines guidelines for AI-assisted development, emphasizing human oversight, vetting, and accountability.
    • Updated README.md with an AI disclosure badge and a specific note regarding the project's development process.

🛠️ Testing & Quality Assurance

This release focused heavily on increasing test coverage to ensure long-term stability:

  • Query Parsing & Utilities: Added over 600 lines of comprehensive tests for query-parsing, utilities, and core regex logic.
    • Expanded regex testing to cover edge cases such as multiple prefixes, Unicode card names, and special characters.
    • Verified robust parsing of card names, set codes, collector numbers, and search filters.
  • Image Handling Tests: Introduced specialized tests for image handling, including:
    • Scryfall URL detection and MXC replacement logic.
    • Double-faced card image logic.
    • Cache integrity and parameter handling during Matrix uploads.

🐛 Internal Changes

  • src/index.js: Refactored internal image upload and replacement functions for better modularity and reliability.
  • package.json: Bumped version to 0.2.1.
  • Cleaned up various utility functions and improved error logging for image fetch failures.