Commit 417e558
committed
[Change] JSON list schema 1.1: scanner/host blocks, renames, quar_enabled, sig_version parity
[New] _lmd_render_json_list top-level scanner {name, version,
sig_version} and host {hostname, host_id} blocks mirror the
per-scan JSON schema so consumers can parse invariants once
instead of per-entry.
[Change] active[]/stopped[] field renames for per-scan JSON parity:
hashtype → hash_type, hits → total_hits, elapsed →
elapsed_seconds. Schema is unreleased (v2.x) so no deprecation
shim needed.
[New] active[]/stopped[] add quarantine_enabled (boolean) from
scan.meta; total_cleaned + total_quarantined emitted as null
(not 0) to signal "not yet determined" mid-scan.
[New] stopped[] adds engine + sig_version for parity with active[].
[New] reports[] adds sig_version + quarantine_enabled; null for
pre-bump 9-field index rows and legacy plaintext sessions.
[Change] scan.meta schema: new quarantine_enabled field written by
_lifecycle_write_meta from global \$quarantine_hits; parser
case added to _lifecycle_read_meta.
[Change] session.index schema bumped 9→11 fields (sig_version +
quarantine_enabled as fields 10/11). _session_index_append
variadic on trailing args (9-arg calls default to "-" / "0").
_session_index_rebuild emits 11 fields from TSV headers.
JSON and text readers tolerate old 8/9-field rows via the
existing backward-compat shim.
[New] tests/31-json-report.bats: 9 new cases (38-46) for scanner/
host blocks, schema-1.1 renames, quarantine_enabled boolean,
null post-scan counters, sig_version parity, 9-field
backward-compat.
[Change] tests/40-session-index.bats: append test updated for 11-field
schema; new test covers default fields 10/11 when caller
omits them.1 parent c33e1d1 commit 417e558
File tree
7 files changed
+534
-41
lines changed- files/internals
- tests
7 files changed
+534
-41
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
140 | 157 | | |
141 | 158 | | |
142 | 159 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
140 | 157 | | |
141 | 158 | | |
142 | 159 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
703 | 703 | | |
704 | 704 | | |
705 | 705 | | |
706 | | - | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
707 | 727 | | |
708 | 728 | | |
709 | 729 | | |
| |||
738 | 758 | | |
739 | 759 | | |
740 | 760 | | |
741 | | - | |
| 761 | + | |
742 | 762 | | |
743 | | - | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
744 | 768 | | |
745 | 769 | | |
746 | | - | |
| 770 | + | |
747 | 771 | | |
748 | 772 | | |
749 | 773 | | |
| |||
763 | 787 | | |
764 | 788 | | |
765 | 789 | | |
766 | | - | |
| 790 | + | |
767 | 791 | | |
768 | 792 | | |
769 | 793 | | |
770 | 794 | | |
| 795 | + | |
| 796 | + | |
771 | 797 | | |
772 | 798 | | |
773 | 799 | | |
| |||
779 | 805 | | |
780 | 806 | | |
781 | 807 | | |
782 | | - | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
783 | 811 | | |
784 | 812 | | |
785 | 813 | | |
786 | | - | |
| 814 | + | |
787 | 815 | | |
788 | 816 | | |
789 | 817 | | |
| |||
812 | 840 | | |
813 | 841 | | |
814 | 842 | | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
815 | 846 | | |
816 | | - | |
| 847 | + | |
| 848 | + | |
817 | 849 | | |
818 | 850 | | |
819 | 851 | | |
| |||
846 | 878 | | |
847 | 879 | | |
848 | 880 | | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
849 | 896 | | |
850 | 897 | | |
851 | 898 | | |
| |||
901 | 948 | | |
902 | 949 | | |
903 | 950 | | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
904 | 955 | | |
905 | 956 | | |
906 | 957 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| 62 | + | |
61 | 63 | | |
62 | 64 | | |
63 | 65 | | |
| |||
98 | 100 | | |
99 | 101 | | |
100 | 102 | | |
| 103 | + | |
101 | 104 | | |
102 | 105 | | |
103 | 106 | | |
| |||
127 | 130 | | |
128 | 131 | | |
129 | 132 | | |
| 133 | + | |
130 | 134 | | |
131 | 135 | | |
132 | 136 | | |
| |||
513 | 517 | | |
514 | 518 | | |
515 | 519 | | |
516 | | - | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
517 | 523 | | |
518 | 524 | | |
519 | 525 | | |
520 | 526 | | |
| 527 | + | |
| 528 | + | |
521 | 529 | | |
522 | 530 | | |
523 | 531 | | |
524 | 532 | | |
525 | 533 | | |
526 | 534 | | |
527 | 535 | | |
528 | | - | |
| 536 | + | |
529 | 537 | | |
530 | 538 | | |
531 | | - | |
| 539 | + | |
| 540 | + | |
532 | 541 | | |
533 | 542 | | |
534 | 543 | | |
| |||
537 | 546 | | |
538 | 547 | | |
539 | 548 | | |
| 549 | + | |
540 | 550 | | |
541 | 551 | | |
542 | | - | |
| 552 | + | |
543 | 553 | | |
544 | 554 | | |
545 | 555 | | |
| |||
563 | 573 | | |
564 | 574 | | |
565 | 575 | | |
566 | | - | |
| 576 | + | |
567 | 577 | | |
568 | 578 | | |
569 | 579 | | |
| 580 | + | |
570 | 581 | | |
571 | 582 | | |
572 | 583 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
336 | 336 | | |
337 | 337 | | |
338 | 338 | | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
339 | 342 | | |
340 | | - | |
| 343 | + | |
| 344 | + | |
341 | 345 | | |
342 | 346 | | |
343 | 347 | | |
| |||
700 | 704 | | |
701 | 705 | | |
702 | 706 | | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
703 | 713 | | |
704 | 714 | | |
705 | 715 | | |
706 | | - | |
| 716 | + | |
| 717 | + | |
707 | 718 | | |
708 | 719 | | |
709 | 720 | | |
| |||
0 commit comments