Give the addresses an address version of their own, raised to a1

Every season poster changed with the joined picks, but the Kometa file kept handing out
?v=r3, an address clients keep for good: they would never load the new season posters. Raising
the render version instead would draw every kept layer and finished picture again, though only
the season posters changed.

poster_options.ADDRESS_VERSION ("a1") sits beside RENDER_VERSION: the Kometa file writes it into
every poster address, and only an address carrying it is sent the immutable Cache-Control; an
address with ?v=r3 is now any other address (a day, then its ETag). Layers and finished pictures
stay keyed by RENDER_VERSION, still r3, so nothing kept is drawn again except the season posters
whose photo changed. The API's option text, the Kometa docstring and the README say "address
version".

The options test: ?v=a1 is kept for good, ?v=r3 no longer (on master it fails: no
ADDRESS_VERSION, and ?v=r3 is still the immutable address).

Builds: docs/posters.md at f6b9f937d0 (Finished images: what clients keep, the address version)

Claude-Session: https://claude.ai/code/session_01JG73KFhbaNj3tyJ8tKmE3W
This commit is contained in:
2026-11-30 11:33:56 +01:00
parent ab0c4b9244
commit 25fee9ca85
5 changed files with 18 additions and 12 deletions
+4 -1
View File
@@ -183,7 +183,10 @@ class OptionsTest(unittest.TestCase):
# Any option given overrides the style; equal pictures share one canonical form, whatever their address
self.assertEqual(self.parse("style=minimal&checker=on").checker, True)
self.assertEqual(self.parse("bg=aerial&v=r1").canonical(), self.parse("").canonical())
self.assertTrue(self.parse(f"v={po.RENDER_VERSION}").versioned)
# Kept for good: an address with the address version, never one with the render version it carried before
self.assertTrue(self.parse(f"v={po.ADDRESS_VERSION}").versioned)
self.assertNotEqual(po.ADDRESS_VERSION, po.RENDER_VERSION)
self.assertFalse(self.parse("v=r3").versioned)
self.assertFalse(self.parse("v=r2").versioned)
def test_an_unknown_option_or_value_is_named(self):