Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ categories = ["network-programming", "web-programming::http-server"]

# 二进制走 CalVer,crate 走 SemVer —— 两者是两回事,卖给不同的人。
# 这里是 crate 的版本。
version = "0.48.0"
version = "0.49.0"

[workspace.dependencies]
# ── 内部 crate ───────────────────────────────────────────
Expand Down
16 changes: 16 additions & 0 deletions release-notes/0.49.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
This release states how far back the route and rule hit counts reach, and reports the signed-in account in the status of a ChatGPT sign-in. Release pages now begin with a summary of the release and list the downloads for each platform with the commands for a server installation.

**Upgrade notes**

- The control-plane protocol version (`CONTROL_API_VERSION`) is now 22. ThinkWatch Lite connects only to a core with the same protocol version, so a server has to run the core version that the app includes. ThinkWatch Lite 2026.9.16 includes 0.47.0 (protocol 20) and does not connect to 0.49.0: a server used with it stays on 0.47.0 until the app is updated to a release that includes 0.49.0. `sudo twcore upgrade --version 0.47.0 --restart` switches a server back to 0.47.0.
- `GET /summary/routes` returns an object, `RouteStats { covered_since_ms, routes }`, instead of an array of `RouteHits`; `routes` holds what the array held.
- `ChatgptLoginStatus.plan` is removed. `ChatgptLoginStatus.account` carries the email and the plan.
- The request store's schema is unchanged (20), so 0.48.0 and 0.49.0 keep each other's request history. Upgrading from 0.47.0 or an earlier version empties the request history on the first start, as 0.48.0 does.

**How far back the hit counts reach.** `GET /summary/routes` counts the stored requests, so its counts reach back only as far as the stored history. On a new installation, after an upgrade that emptied the request history, or when requests are kept for fewer days than the window, the oldest stored request is later than the start of the window, and before it a rule without hits is unknown rather than unused. `covered_since_ms` is the later of the window's start and the time the oldest stored request started; when it is set, it lies within the window. It is `null` when the stored history covers no part of the window: the store holds no request, or the oldest one started at or after the end of the window.

**The account after a ChatGPT sign-in.** The status of a ChatGPT sign-in (`GET /chatgpt/login/{id}`) reports the account it signed in to in `account`, with the email and the plan. It is the same block as `ProviderView.oauth.account` and is read from the same access token, the one the sign-in saves in the configuration, so the sign-in and the upstream report the same account.

**Release pages.** A release is titled "ThinkWatch Core" followed by its version. Its page begins with a summary of the release when one is written, followed by a table of the files for each platform, the commands that install the version on a Linux server and switch an existing installation to it, how to verify a download against its `.sha256`, and the list of pull requests. The pages of 0.47.0 and 0.48.0 carry the same sections.

**Documentation.** The README describes installing the prebuilt binaries, the Linux install script and running `twcore` as a service on a server, and lists all of the crates, grouped by dependency order, including the three that ThinkWatch Enterprise depends on (`tw-dialect`, `tw-guard` and `tw-breaker`).
Loading