Allow Cosmic Daily publication of credited APOD images - #43
Merged
Conversation
Co-authored-by: dapiced <15859528+dapiced@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix false copyright detection in Cosmic Daily workflow
Allow Cosmic Daily publication of credited APOD images
Sep 7, 2026
dapiced
marked this pull request as ready for review
September 7, 2026 16:19
There was a problem hiding this comment.
🟡 Changes recommended
The updated documentation and generator gating logic should be aligned with the actual “unsupported_media” behavior and made robust to any future non-allowed rights statuses.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR updates Cosmic Daily’s media-rights policy so that APOD still images are always eligible for automatic publication even when the APOD “copyright/credit” field is externally credited, while continuing to reject non-image media.
Changes:
- Simplifies
evaluate_media_rights()to allow all still-image entries and reject non-image media. - Removes the
review_requiredexit path from the generator CLI flow. - Updates rights-policy tests and adjusts documentation to reflect the new policy.
File summaries
| File | Description |
|---|---|
| tools/cosmic-daily/tests/test_rights_policy.py | Updates the unit test to assert externally credited images are allowed. |
| tools/cosmic-daily/README.md | Updates user-facing docs to remove “external copyright requires review” guidance. |
| tools/cosmic-daily/cosmic_daily/rights_policy.py | Removes external-copyright gating and always allows still images. |
| tools/cosmic-daily/cosmic_daily/cli.py | Removes handling for the now-removed review_required status in generate(). |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
88
to
92
| decision = evaluate_media_rights(apod.media_type, apod.copyright) | ||
| if decision.status == "unsupported_media": | ||
| _emit_github_output(apod_date=apod.date, result="unsupported_media", post_path="", image_path="") | ||
| print(decision.reason) | ||
| return EXIT_ERROR |
| - `generate` creates a Jekyll post and the corresponding WebP image when the media is eligible. | ||
| - `check` validates front matter and image references for a generated article. | ||
| - Video entries and external-copyright cases are treated as human review only. | ||
| - Video entries are treated as human review only. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cosmic Daily failed when an APOD image carried an external copyright credit, preventing the scheduled post from being generated. This removes that false-positive publication gate.
Publication policy
Generator flow
review_requiredexit path.Coverage and docs