A fork of mtelver's day10 project

Write universes.json for blessed packages

After a successful doc swap for blessed packages, write universes.json
containing the universe hash. This enables universe GC to determine
which universes are still referenced by blessed packages.

Format: {"universes": ["<32-char-hex-hash>"]}
Location: html/p/{package}/{version}/universes.json

The universes.json file moves atomically with the docs (same swap
mechanism), so failed rebuilds keep the old references alive.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

+6
+6
bin/linux.ml
··· 746 746 if !swap_ok then begin 747 747 if has_existing && Sys.file_exists old_dir then 748 748 Os.sudo_rm_rf old_dir; 749 + (* Step 4: For blessed packages, write universes.json for GC tracking *) 750 + if blessed then begin 751 + let universes_json = Path.(final_pkg_dir / "universes.json") in 752 + let json_content = Printf.sprintf {|{"universes": ["%s"]}|} universe in 753 + Os.write_to_file universes_json json_content 754 + end; 749 755 Os.log "atomic swap: successfully committed docs for %s/%s" pkg_name pkg_version; 750 756 Some (Odoc_gen.doc_result_to_yojson (Odoc_gen.Doc_success { html_path = final_html_output_dir; blessed })) 751 757 end else begin