a0387425e1
Golden-oracle DO: the fragment snapshot (media_fragments.json) was a circular self-snapshot generated from the refactored code. Regenerated it from the pre-refactor BASE post_parser.py (old ladders) so it holds base bytes — byte-identical to base for all 24 cases. The only 2 §3.14 deltas (file_unique_id_none, webpage_without_photo) moved to a new REGISTERED_DELTAS registry in media_fragment_replay.py; the fragment test asserts base bytes for 22 cases and the registered 5b value for 2. Docstrings corrected to describe base-anchoring (no overclaim); a WARNING in generate_snapshot() notes it must run against base code only. Test-coverage DO: added test_exactly_100mb_object_is_collected pinning the §3.13 guard as strictly '>' (exactly 100MB is still collected). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
218 lines
7.8 KiB
JSON
218 lines
7.8 KiB
JSON
{
|
|
"animation": {
|
|
"collected": [
|
|
[
|
|
"testchan",
|
|
3,
|
|
"ani_uid"
|
|
]
|
|
],
|
|
"html": "<div class=\"message-media\">\n<video controls src=\"http://test.example.com/media/testchan/3/ani_uid/ef4319c9\" style=\"max-width:100%; width:auto;height:auto; max-height:400px;\"></video>\n</div>"
|
|
},
|
|
"audio_default_mime": {
|
|
"collected": [
|
|
[
|
|
"testchan",
|
|
5,
|
|
"au_uid"
|
|
]
|
|
],
|
|
"html": "<div class=\"message-media\">\n<audio controls style=\"width:100%; max-width:400px;\"><source src=\"http://test.example.com/media/testchan/5/au_uid/be14c993\" type=\"audio/mpeg\"></audio>\n<br>\n</div>"
|
|
},
|
|
"audio_explicit_mime": {
|
|
"collected": [
|
|
[
|
|
"testchan",
|
|
6,
|
|
"au2_uid"
|
|
]
|
|
],
|
|
"html": "<div class=\"message-media\">\n<audio controls style=\"width:100%; max-width:400px;\"><source src=\"http://test.example.com/media/testchan/6/au2_uid/015e2737\" type=\"audio/flac\"></audio>\n<br>\n</div>"
|
|
},
|
|
"channel_username_none": {
|
|
"collected": [],
|
|
"html": "<div class=\"message-media\">\n</div>"
|
|
},
|
|
"document_normal": {
|
|
"collected": [
|
|
[
|
|
"testchan",
|
|
13,
|
|
"doc_uid"
|
|
]
|
|
],
|
|
"html": "<div class=\"message-media\">\n<img src=\"http://test.example.com/media/testchan/13/doc_uid/4c9075c7\" style=\"max-width:100%; width:auto; height:auto;max-height:400px; object-fit:contain;\">\n</div>"
|
|
},
|
|
"document_pdf_private": {
|
|
"collected": [
|
|
[
|
|
"-1009876543210",
|
|
12,
|
|
"pdf2_uid"
|
|
]
|
|
],
|
|
"html": "<div class=\"message-media\">\n<div class=\"document-pdf\" style=\"padding: 10px;\">\n<a href=\"https://t.me/c/9876543210/12\" target=\"_blank\">[PDF-файл]</a></div>\n</div>"
|
|
},
|
|
"document_pdf_public": {
|
|
"collected": [
|
|
[
|
|
"pubchan",
|
|
11,
|
|
"pdf_uid"
|
|
]
|
|
],
|
|
"html": "<div class=\"message-media\">\n<div class=\"document-pdf\" style=\"padding: 10px;\">\n<a href=\"https://t.me/pubchan/11\" target=\"_blank\">[PDF-файл]</a></div>\n</div>"
|
|
},
|
|
"file_unique_id_none": {
|
|
"collected": [],
|
|
"html": "<div class=\"message-media\">"
|
|
},
|
|
"live_photo": {
|
|
"collected": [
|
|
[
|
|
"testchan",
|
|
14,
|
|
"lp_uid"
|
|
]
|
|
],
|
|
"html": "<div class=\"message-media\">\n<video controls autoplay loop muted src=\"http://test.example.com/media/testchan/14/lp_uid/7cbfcf53\"style=\"max-width:100%; width:auto; height:auto; max-height:400px;object-fit:contain;\"></video>\n</div>"
|
|
},
|
|
"paid_media": {
|
|
"collected": [],
|
|
"html": "<div class=\"message-media\">\n<div class=\"paid-media\">⭐ Paid media (50 stars, 2 item(s)) — available in Telegram</div>\n</div>"
|
|
},
|
|
"photo": {
|
|
"collected": [
|
|
[
|
|
"testchan",
|
|
1,
|
|
"ph_uid"
|
|
]
|
|
],
|
|
"html": "<div class=\"message-media\">\n<img src=\"http://test.example.com/media/testchan/1/ph_uid/08e6b2ef\" style=\"max-width:100%; width:auto; height:auto;max-height:400px; object-fit:contain;\">\n</div>"
|
|
},
|
|
"poll_media_img": {
|
|
"collected": [
|
|
[
|
|
"testchan",
|
|
17,
|
|
"pl_uid"
|
|
]
|
|
],
|
|
"html": "<div class=\"message-media\">\n<img src=\"http://test.example.com/media/testchan/17/pl_uid/492d238c\" style=\"max-width:100%; width:auto; height:auto;max-height:400px; object-fit:contain;\">\n</div>"
|
|
},
|
|
"poll_media_video": {
|
|
"collected": [
|
|
[
|
|
"testchan",
|
|
18,
|
|
"plv_uid"
|
|
]
|
|
],
|
|
"html": "<div class=\"message-media\">\n<video controls src=\"http://test.example.com/media/testchan/18/plv_uid/abb609a3\" style=\"max-width:100%; width:auto;height:auto; max-height:400px;\"></video>\n</div>"
|
|
},
|
|
"sticker_img": {
|
|
"collected": [
|
|
[
|
|
"testchan",
|
|
9,
|
|
"st_uid"
|
|
]
|
|
],
|
|
"html": "<div class=\"message-media\">\n<img src=\"http://test.example.com/media/testchan/9/st_uid/03dc35d2\" alt=\"Sticker 😀\" style=\"max-width:100%;width:auto; height:auto; max-height:200px; object-fit:contain;\">\n</div>"
|
|
},
|
|
"sticker_video": {
|
|
"collected": [
|
|
[
|
|
"testchan",
|
|
10,
|
|
"stv_uid"
|
|
]
|
|
],
|
|
"html": "<div class=\"message-media\">\n<video controls autoplay loop muted src=\"http://test.example.com/media/testchan/10/stv_uid/cedd7494\"style=\"max-width:100%; width:auto; height:auto; max-height:200px;object-fit:contain;\"></video>\n</div>"
|
|
},
|
|
"story_photo": {
|
|
"collected": [
|
|
[
|
|
"testchan",
|
|
16,
|
|
"sp_uid"
|
|
]
|
|
],
|
|
"html": "<div class=\"message-media\">\n<img src=\"http://test.example.com/media/testchan/16/sp_uid/d8a5d9c9\" style=\"max-width:100%; width:auto; height:auto;max-height:400px; object-fit:contain;\">\n</div>"
|
|
},
|
|
"story_video": {
|
|
"collected": [
|
|
[
|
|
"testchan",
|
|
15,
|
|
"sv_uid"
|
|
]
|
|
],
|
|
"html": "<div class=\"message-media\">\n<video controls src=\"http://test.example.com/media/testchan/15/sv_uid/1aba6362\" style=\"max-width:100%; width:auto;height:auto; max-height:400px;\"></video>\n</div>"
|
|
},
|
|
"video": {
|
|
"collected": [
|
|
[
|
|
"testchan",
|
|
2,
|
|
"vid_uid"
|
|
]
|
|
],
|
|
"html": "<div class=\"message-media\">\n<video controls src=\"http://test.example.com/media/testchan/2/vid_uid/e0c6ba2e\" style=\"max-width:100%; width:auto;height:auto; max-height:400px;\"></video>\n</div>"
|
|
},
|
|
"video_note": {
|
|
"collected": [
|
|
[
|
|
"testchan",
|
|
4,
|
|
"vn_uid"
|
|
]
|
|
],
|
|
"html": "<div class=\"message-media\">\n<video controls src=\"http://test.example.com/media/testchan/4/vn_uid/a5ee9944\" style=\"max-width:100%; width:auto;height:auto; max-height:400px;\"></video>\n</div>"
|
|
},
|
|
"voice_default_mime": {
|
|
"collected": [
|
|
[
|
|
"testchan",
|
|
7,
|
|
"vo_uid"
|
|
]
|
|
],
|
|
"html": "<div class=\"message-media\">\n<audio controls style=\"width:100%; max-width:400px;\"><source src=\"http://test.example.com/media/testchan/7/vo_uid/f16627e0\" type=\"audio/ogg\"></audio>\n<br>\n</div>"
|
|
},
|
|
"voice_explicit_mime": {
|
|
"collected": [
|
|
[
|
|
"testchan",
|
|
8,
|
|
"vo2_uid"
|
|
]
|
|
],
|
|
"html": "<div class=\"message-media\">\n<audio controls style=\"width:100%; max-width:400px;\"><source src=\"http://test.example.com/media/testchan/8/vo2_uid/30fed86a\" type=\"audio/wav\"></audio>\n<br>\n</div>"
|
|
},
|
|
"webpage_photo_long_text": {
|
|
"collected": [
|
|
[
|
|
"testchan",
|
|
22,
|
|
"wpl_uid"
|
|
]
|
|
],
|
|
"html": "<div class=\"message-media\">\n</div>"
|
|
},
|
|
"webpage_with_photo": {
|
|
"collected": [
|
|
[
|
|
"testchan",
|
|
20,
|
|
"wp_uid"
|
|
]
|
|
],
|
|
"html": "<div class=\"message-media\">\n</div>\n<div class=\"webpage-preview\">\n<div class=\"webpage-preview\" style=\"border-left: 3px solid #ccc; padding-left: 10px; margin: 10px 0;\">\n<div class=\"webpage-title\" style=\"font-weight:bold; margin:5px 0;\">\n<a href=\"https://example.com\" target=\"_blank\">Example</a></div>\n<div class=\"webpage-url\" style=\"color:#666; font-size:0.9em;margin-bottom:5px;\">https://example.com</div>\n<div class=\"webpage-photo\" style=\"margin-top:10px;\">\n<a href=\"https://example.com\" target=\"_blank\">\n<img src=\"http://test.example.com/media/testchan/20/wp_uid/a3dc7111\" style=\"max-width:100%; width:auto;height:auto; max-height:200px; object-fit:contain;\"></a></div>\n</div>\n</div>"
|
|
},
|
|
"webpage_without_photo": {
|
|
"collected": [],
|
|
"html": "<div class=\"message-media\">\n<div class=\"webpage-preview\">\n<div class=\"webpage-preview\" style=\"border-left: 3px solid #ccc; padding-left: 10px; margin: 10px 0;\">\n<div class=\"webpage-title\" style=\"font-weight:bold; margin:5px 0;\">\n<a href=\"https://example.com\" target=\"_blank\">Example</a></div>\n<div class=\"webpage-url\" style=\"color:#666; font-size:0.9em;margin-bottom:5px;\">https://example.com</div>\n</div>\n</div>"
|
|
}
|
|
} |