Read PR description, comments, commits, and changed files.
UnderstandChecked for linked issues and analyzed them.
UnderstandVerified function usage and callers.
UnderstandValidated changelog entry and attribution.
VerifyYou are given one or more GitHub PR URLs: https://github.com/badlogic/pi-mono/pull/795/changes
For each PR URL, do the following in order:
packages/*/CHANGELOG.md files. Report whether an entry exists. If missing, state that a changelog entry is required before merge and that you will add it if the user decides to merge. Follow the changelog format rules in AGENTS.md. Verify:
### Breaking Changes, ### Added, ### Fixed, etc.)Fixed foo ([#123](https://github.com/badlogic/pi-mono/pull/123) by [@user](https://github.com/user))### Breaking Changes, not just ### FixedOutput format per PR: PR: Changelog:
If no issues are found, say so under Bad and Ugly.
Let me read the current source files on main to compare:
Let me check for any usages of the removed functions and verify the callers of convertToPng:
Let me check how convertToPng is called in the codebase:
Let me check if there are any linked issues and also verify that the PR modifies the caller:
Let me verify the changelog entry format and check for attribution:
PR: https://github.com/badlogic/pi-mono/pull/795
Changelog:
### Fixed) but missing PR attribution for external contributionFixed photon module failing to load in ESM context with "require is not defined" error ([#795](https://github.com/badlogic/pi-mono/pull/795) by [@dannote](https://github.com/dannote))Good:
require() with async import() solves the ESM context issueloadPromise is a clean pattern that prevents race conditions on concurrent loadsBad:
convertToPng return type changed from Promise<{ data, mimeType } | null> to Promise<{ data, mimeType }> (throws instead of returning null). The caller in tool-execution.ts (line ~290) uses .then((converted) => { if (converted) { ... } }) without a .catch() handler, causing unhandled promise rejection when photon is unavailable or conversion fails.tool-execution.ts to handle the new throwing behaviorisPhotonAvailable(), getPhotonLoadError()) without deprecation, though they're internal-only and unusedUgly:
Questions or Assumptions:
convertToPng (null → throw) intentional? If so, tool-execution.ts needs a corresponding update with .catch() handler.Change summary:
photon.ts: Replace sync getPhoton() with async loadPhoton(), remove isPhotonAvailable() and getPhotonLoadError()image-convert.ts: Use await loadPhoton(), change from returning null to throwing on errorsimage-resize.ts: Use await loadPhoton(), preserves null-return behavior (returns original image on photon unavailable)Tests: