My aggregated monorepo of OCaml code, automaintained
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Generate status.json after batch runs in print_batch_summary

After history entries are recorded and the batch summary is printed,
call Status_index.generate and write to produce status.json. Also
prints a summary of any status changes and new packages detected.

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

+17 -1
+17 -1
day10/bin/main.ml
··· 1485 1485 Printf.printf " Solutions found: %d (failed to solve: %d)\n%!" (List.length solutions) total_failed; 1486 1486 Printf.printf " Build layers: %d success, %d failed\n%!" !build_success !build_fail; 1487 1487 Printf.printf " Doc layers: %d success, %d failed (blessed only)\n%!" !doc_success !doc_fail; 1488 - Printf.printf " HTML versions: %d\n%!" html_versions 1488 + Printf.printf " HTML versions: %d\n%!" html_versions; 1489 + (* Generate status.json *) 1490 + let previous = Day10_lib.Status_index.read ~dir:(Path.(config.dir / os_key)) in 1491 + let status = Day10_lib.Status_index.generate ~packages_dir ~run_id ~previous in 1492 + Day10_lib.Status_index.write ~dir:(Path.(config.dir / os_key)) status; 1493 + (* Print changes summary *) 1494 + if status.changes <> [] then begin 1495 + Printf.printf "\nStatus changes:\n%!"; 1496 + List.iter (fun (c : Day10_lib.Status_index.change) -> 1497 + let marker = if c.to_status = "success" then "+" else "-" in 1498 + let blessed_marker = if c.blessed then " [blessed]" else "" in 1499 + Printf.printf " %s %-40s %s → %s%s\n%!" 1500 + marker c.package c.from_status c.to_status blessed_marker 1501 + ) status.changes 1502 + end; 1503 + if status.new_packages <> [] then 1504 + Printf.printf " New packages: %d\n%!" (List.length status.new_packages) 1489 1505 in 1490 1506 match config.fork with 1491 1507 | Some 1 | None ->