• exec/load/mailbox_summary.js exec/tests/mailbox/summary.js

    From Rob Swindell (on Debian Linux)@1:103/705 to Git commit to main/sbbs/master on Friday, November 20, 2026 18:20:17
    https://gitlab.synchro.net/main/sbbs/-/commit/e1a997ca9d009389416e39f5
    Modified Files:
    exec/load/mailbox_summary.js exec/tests/mailbox/summary.js
    Log Message:
    Mailbox library: a modify that changed nothing leaves the files' dates alone

    7845d4b8bc (audit-3-foul, 2026-11-20) set the date of the private
    base's files after every Summary.modify(). When the function it runs
    reported no change and made none, the new date itself read as a change
    once the clock had moved to the next second, and the cache was rebuilt: "no-change modify reads nothing: expected 0 got 50" in summary.js on
    the slow freebsd-amd64 valgrind job.

    The dates are now set only when the function reported what it wrote, or
    when the files' date or size show a write. The test waits for the next
    second before its no-change modify, so it fails with the earlier code
    on any machine.

    Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
    --- SBBSecho 3.38-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell (on Debian Linux)@1:103/705 to Git commit to main/sbbs/master on Friday, November 20, 2026 22:41:20
    https://gitlab.synchro.net/main/sbbs/-/commit/f3289a5bbdc590c6d2bcc950
    Modified Files:
    exec/load/mailbox_summary.js exec/tests/mailbox/summary.js
    Log Message:
    Mailbox library: keep the summary when a file's date steps back at close

    After its own write, Summary.modify() sets the date of the private
    base's files and records it (#1374). On an SMB share the server can,
    when the base is closed, put a file's date back to the time of the
    write itself. When the write and the date set fell in different
    seconds, the file ended up dated one second before the recorded stamp,
    and the next request read every header again. Measured on a Samba
    share with a 20-message folder: the list after starring a message or
    renaming the folder read 20 headers whenever that happened.

    The recorded stamps now count as current when the sizes match and a
    file's date is the same or up to 2 seconds earlier. A later write moves
    a date forward, never back, so an earlier date does not hide one. The
    dates are also set right after the write, before the changed headers
    are read, to keep the two times close.

    With this, the same measurement reads no headers after a star, a
    read mark, a delete or a folder rename, also when the date stepped
    back.

    Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
    --- SBBSecho 3.38-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)