Skip to content

Dev - #10

Merged
rafaga merged 3 commits into
masterfrom
dev
Nov 2, 2026
Merged

Dev#10
rafaga merged 3 commits into
masterfrom
dev

Conversation

@rafaga

@rafaga rafaga commented Nov 2, 2026

Copy link
Copy Markdown
Owner

Summary

Prepares release 0.2.2. It adds a way to read the response headers of an ESI call and uses it to expose the hourly kills per system together with the moment ESI computed them. It also brings the docs up to date: the changelog was missing the 0.2.1 release.

What changes

API

  • Esi::query_with_headers works like query but also returns the response headers (for Last-Modified, ETag). When the answer comes from the response cache, the headers are those stored with it.
  • UniverseGroup::get_system_kills_snapshot returns a SystemKillsSnapshot: the kills per system of the last hour, plus the Last-Modified and ETag of the answer.
    • ESI refreshes this answer once an hour, so Last-Modified marks the end of the hour the data covers. Two hourly answers can be told apart and stored without counting one twice.
    • With the cache enabled (EsiBuilder::enable_cache), calls made before the hour is up cost no request.
    • The existing get_system_kills is unchanged.

Tests

  • tests/cache.rs: the headers survive a cached answer (a single request for two calls), and the snapshot carries Last-Modified and ETag.

Docs

  • CHANGELOG.md: adds the missing 0.2.1 section (2026-10-26, dependency update) and dates 0.2.2.
  • README.md: mentions query_with_headers and the snapshot.
  • TODO.md: adds the 0.2.1 and 0.2.2 items to the release housekeeping.
  • Cargo.toml: version 0.2.2.

Compatibility

  • Additive only: no existing function, type or behavior changes. It is a patch release.
  • SystemKillsSnapshot keeps the date as the string ESI sent (an HTTP date), like the rest of the crate.

Before publishing

  • cargo fmt --check
  • cargo clippy --all-targets -- -D warnings
  • cargo test
  • cargo deny check

Add `Esi::query_with_headers`, like `query` but also returning the
response headers, for the data that only travels there (`Last-Modified`,
`ETag`). When the answer comes from the response cache, the headers are
those stored with it.

Add `UniverseGroup::get_system_kills_snapshot` and `SystemKillsSnapshot`:
the kills per system of the last hour together with the `Last-Modified`
and `ETag` of the answer. ESI refreshes this answer once an hour, so
`Last-Modified` marks the end of the hour the data covers and lets two
hourly answers be told apart and stored without counting one twice.

Tests in `tests/cache.rs` check that the headers survive a cached answer
and that the snapshot carries both of them.

Docs:
* CHANGELOG: add the missing 0.2.1 section (dependency requirements
  relaxed to semver ranges, mitigating CVE-2026-111497 and the eMudhra
  certificate problem) and date 0.2.2.
* README: mention `query_with_headers` and the snapshot.
* TODO: add the 0.2.1 and 0.2.2 items to the release housekeeping.

Bump to 0.2.2.
@rafaga
rafaga merged commit 2eab177 into master Nov 2, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant