[PR #210] [MERGED] ci: warn about new API fields in the weekly report, alarm only on breaking changes #208

Closed
opened 2026-10-13 19:48:52 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Glitchy-Sheep/boosty-downloader/pull/210
Author: @Glitchy-Sheep
Created: 9/23/2026
Status: ✅ Merged
Merged: 9/23/2026
Merged by: @Glitchy-Sheep

Base: main ← Head: ci/api-changes-warning


📝 Commits (3)

  • 3d25aa8 feat(scripts): list what the live API added since the committed schema
  • b6aaf61 ci: open an issue only on breaking API changes, keep additions for the report
  • 75bd119 ci: show new API fields in the weekly report

📊 Changes

12 files changed (+380 additions, -45 deletions)

View changed files

📝 .github/workflows/canary.yaml (+16 -2)
📝 .github/workflows/weekly-report.yaml (+3 -2)
📝 .gitignore (+3 -0)
📝 Taskfile.yml (+17 -3)
📝 docs/api/README.md (+8 -0)
📝 docs/development/02-testing.md (+1 -1)
📝 docs/development/03-ci.md (+6 -3)
📝 scripts/api_schema/__main__.py (+54 -8)
➕ scripts/api_schema/schema_changes.py (+107 -0)
📝 scripts/weekly_report.py (+60 -10)
📝 test/canary/api_drift_test.py (+4 -16)
➕ test/unit/api_schema/schema_changes_test.py (+101 -0)

📄 Description

📝 Summary

The canary now tells two kinds of API changes apart. An issue opens only when the app breaks. What Boosty adds without breaking anything, like a new key or content type, comes as a warning in the weekly Telegram report.

🔧 What changes

  • task api:changes -- <blog> builds a schema from live answers and lists what docs/api/boosty-api.yaml lacks: new content types, keys, types and vocabulary values. It writes api-changes.json and never fails on a change. Keys missing from the answers are not listed: one page rarely holds every key.
  • The canary runs it anonymously after the probe and uploads the list as the api-changes artifact.
  • The canary issue now opens only on breaking changes: a post that does not parse, or no open post with content. An unknown content type or value no longer opens one: the app keeps working, the change goes to the report.
  • The weekly report gets a 🔭 API changes block: new content types first, then keys, types and values, up to 8, with a hint on how to accept them.
  • To accept the changes: task api:schema -- <blog> and commit the schema. They stop showing up.

🧪 Tests

  • 7 unit tests on made-up schemas: no changes on the same schema, a missing key is not a change, new keys in nested objects and list items, a new type, new values, a new content type.
  • Live on glitchy_sheep: 4 changes found. New keys Post.hasAIContent and Post.forbiddenChangeHasAIContent, and Post.price and Post.subscriptionLevel.price now come as fractional numbers. The canary probe passes: none of this breaks the app.
  • The report block renders for a list, for an empty list and for a run without the artifact.
  • task check and 360 tests pass. The canary workflow passes check-jsonschema.

⏭️ Next

  • After merge: a manual canary run uploads the artifact, a manual report shows the block.
  • Accept the 4 changes found today by regenerating the schema, or keep them in the report as a reminder.

✅ Checklist

  • Tested live on a real blog (feature or fix)
  • Updated CLI --help and README if needed
  • Updated docs/ if the download flow or dev process changed
  • Added a line to ## Unreleased in CHANGELOG.md (or the ci/skip-changelog label if not user-facing)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Glitchy-Sheep/boosty-downloader/pull/210 **Author:** [@Glitchy-Sheep](https://github.com/Glitchy-Sheep) **Created:** 9/23/2026 **Status:** ✅ Merged **Merged:** 9/23/2026 **Merged by:** [@Glitchy-Sheep](https://github.com/Glitchy-Sheep) **Base:** `main` ← **Head:** `ci/api-changes-warning` --- ### 📝 Commits (3) - [`3d25aa8`](https://github.com/Glitchy-Sheep/boosty-downloader/commit/3d25aa8356e4837d5f29a59bd945bc68daa07f53) feat(scripts): list what the live API added since the committed schema - [`b6aaf61`](https://github.com/Glitchy-Sheep/boosty-downloader/commit/b6aaf611ae67a7a54403626d0917975a7767f57f) ci: open an issue only on breaking API changes, keep additions for the report - [`75bd119`](https://github.com/Glitchy-Sheep/boosty-downloader/commit/75bd119e732c40169af98b7857be7629260ed36b) ci: show new API fields in the weekly report ### 📊 Changes **12 files changed** (+380 additions, -45 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/canary.yaml` (+16 -2) 📝 `.github/workflows/weekly-report.yaml` (+3 -2) 📝 `.gitignore` (+3 -0) 📝 `Taskfile.yml` (+17 -3) 📝 `docs/api/README.md` (+8 -0) 📝 `docs/development/02-testing.md` (+1 -1) 📝 `docs/development/03-ci.md` (+6 -3) 📝 `scripts/api_schema/__main__.py` (+54 -8) ➕ `scripts/api_schema/schema_changes.py` (+107 -0) 📝 `scripts/weekly_report.py` (+60 -10) 📝 `test/canary/api_drift_test.py` (+4 -16) ➕ `test/unit/api_schema/schema_changes_test.py` (+101 -0) </details> ### 📄 Description ## 📝 Summary The canary now tells two kinds of API changes apart. An issue opens only when the app breaks. What Boosty adds without breaking anything, like a new key or content type, comes as a warning in the weekly Telegram report. ## 🔧 What changes - `task api:changes -- <blog>` builds a schema from live answers and lists what `docs/api/boosty-api.yaml` lacks: new content types, keys, types and vocabulary values. It writes `api-changes.json` and never fails on a change. Keys missing from the answers are not listed: one page rarely holds every key. - The canary runs it anonymously after the probe and uploads the list as the `api-changes` artifact. - The canary issue now opens only on breaking changes: a post that does not parse, or no open post with content. An unknown content type or value no longer opens one: the app keeps working, the change goes to the report. - The weekly report gets a 🔭 API changes block: new content types first, then keys, types and values, up to 8, with a hint on how to accept them. - To accept the changes: `task api:schema -- <blog>` and commit the schema. They stop showing up. ## 🧪 Tests - 7 unit tests on made-up schemas: no changes on the same schema, a missing key is not a change, new keys in nested objects and list items, a new type, new values, a new content type. - Live on `glitchy_sheep`: 4 changes found. New keys `Post.hasAIContent` and `Post.forbiddenChangeHasAIContent`, and `Post.price` and `Post.subscriptionLevel.price` now come as fractional numbers. The canary probe passes: none of this breaks the app. - The report block renders for a list, for an empty list and for a run without the artifact. - `task check` and 360 tests pass. The canary workflow passes `check-jsonschema`. ## ⏭️ Next - After merge: a manual canary run uploads the artifact, a manual report shows the block. - Accept the 4 changes found today by regenerating the schema, or keep them in the report as a reminder. ## ✅ Checklist <!-- Tick an item that doesn't apply too --> - [x] Tested live on a real blog (feature or fix) - [x] Updated CLI `--help` and README if needed - [x] Updated `docs/` if the download flow or dev process changed - [x] Added a line to `## Unreleased` in CHANGELOG.md (or the `ci/skip-changelog` label if not user-facing) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-13 19:48:52 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Glitchy-Sheep/boosty-downloader#208
No description provided.