Skip to content

Commit a1efba5

Browse files
committed
[Change] trim redundant comments in issue #483 emission + tests
[Change] _lmd_render_json_list() sort-buffer preamble: drop 3 lines that duplicate the ticket + commit-message narrative about the pre-fix misorder; keep the load-bearing canonical-reference and tab-safety invariant in 4 lines. [Change] tests/31-json-report.bats test 31: drop the trailing WHAT comment above the started_epoch regex — the regex already expresses the assertion.
1 parent f6703c6 commit a1efba5

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

files/internals/lmd_alert.sh

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -792,13 +792,10 @@ _lmd_render_json_list() {
792792
# produced a visible hang on large indexes (~20K+ sessions).
793793
local -A _seen_ids
794794

795-
# Buffer each entry as "epoch\tJSON_LITERAL" then sort-desc for global
796-
# ordering across index + legacy passes. Mirrors lmd_session.sh text path
797-
# (see _view_session_list in lmd_session.sh:329-418). Fixes issue #483:
798-
# pre-fix code emitted index entries in append-order, then legacy entries
799-
# after, producing a misordered reports[] array (e.g. Mar 29 legacy after
800-
# Apr 18 TSV). Tab never appears in emitted JSON — _json_escape_var
801-
# replaces real tabs with \t.
795+
# Buffer entries as "epoch\tJSON_LITERAL" then sort-desc for global
796+
# ordering across index + legacy passes (see _view_session_list in
797+
# lmd_session.sh:329-418 for the text-path precedent). Tab safe in
798+
# sort key: _json_escape_var replaces real tabs in path with \t.
802799
local _sortbuf
803800
_sortbuf=$(mktemp "$tmpdir/.jsonlist.XXXXXX")
804801

tests/31-json-report.bats

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,6 @@ EOF
618618
assert_output --partial "\"$sid\""
619619
assert_output --partial '"started"'
620620
assert_output --partial '"started_epoch"'
621-
# started_epoch is an unquoted integer matching the value we wrote.
622621
[[ "$output" =~ \"started_epoch\":[[:space:]]+$_started_epoch ]]
623622
}
624623

0 commit comments

Comments
 (0)