📝 Checkpoint_chkindexaudio_2026-11-25.mdv4.7.4 · 2026-11-20

Checkpoint: chkindexaudio (AudioProcessor progress report)

Date: 2026-11-25, 03:34 to 04:40 Sydney time Area: DM2S/NX, ISEmedia audio (AudioProcessor on Clone) Another collaboration between Andrew.human and Claude.ai


1. Where things stand

Working on Clone, confirmed at 04:39:04. During sh AudioIndexer.sh --attachid 8630 --force, chkindexaudio --watch 20 showed:

Audio_Progress_Report.py v1.1.1 (2026-11-25)  04:39:04  (every 20s, Ctrl-C to stop)
processing The different levels of how Claude thinks [rKV5JcALQoQ].mp3 (pid 14719)
currently on 1 of 1
Module Version Installed Notes
AudioProcessor.py 1.3.2 Clone (seen running 04:29) Live/Dev: not known
Audio_Progress_Report.py 1.1.1 Clone (seen working 04:38 and 04:39) new this session
Audio_Progress_Report.md 1.1.1 with the .py manual: behaviour rules R1 to R14 and pseudocode map
chkindexaudio 1.0.0 Clone /bin python3 /var/www/html/The_ISE_Project/Audio_Progress_Report.py "$@"

Zips delivered (keep all):

2. What chkindexaudio prints

The version line comes first. With --watch SECS it also shows the clock and the interval, and the screen redraws every SECS seconds until Ctrl-C. After it comes exactly one of these:

Output Meaning
processing <file> (pid n) + currently on a of b working on that file; a of b is the same as AudioProcessor's own [a/b]
AudioProcessor is not running no AudioProcessor process
AudioProcessor is running (pid n), not on an item yet start-up (about 1 minute on Clone), between items, or --prune / --features-only
AudioProcessor vX is running ... v1.3.2 or later is needed ... the AudioProcessor.py file is older than v1.3.2
AudioProcessor is running (pid n) -- it started before AudioProcessor.py was replaced ... an old run still going after a new file was installed

3. Facts established this session

4. Change reports

4.1 AudioProcessor.py v1.3.1 to v1.3.2

Problem and resolution. The operator wanted to see which file AudioProcessor is on, and "n of m". Nothing recorded either. audio_checkpoint.json named only the last finished item, and it was written only when an item finished. The fix adds two keys to the checkpoint:

The checkpoint is now also written when each item starts, after CLAP is loaded.

Risk analysis. Low.

Code change:

--- AudioProcessor.py v1.3.1
+++ AudioProcessor.py v1.3.2
@@ -4,12 +4,20 @@
========================================================
Module: AudioProcessor.py

-@version 1.3.1
+@version 1.3.2
@date 2026-11-25

Another collaboration between Andrew.human and Claude.ai
========================================================

+v1.3.2 (2026-11-25) -- audio_checkpoint.json now names the item in progress, for chkindexaudio
+(Audio_Progress_Report.py v1.0.0). Two keys are ADDED at the end; every existing key is unchanged:
+ "pid" -- this run's process id;
+ "current" -- {"n", "of", "id_attach", "filename", "started"} for the item being processed, the
+ same n / of as the "[n/of]" on the per-item line; null once an item has been stored.
+The checkpoint is now also written when each item STARTS (after CLAP is loaded), not only when one
+finishes. Nothing else changed: the store, encoding, the lock and all output are as in v1.3.1.
+
v1.3.1 (2026-11-25) -- --force now also overrides the Clone-only host check (Andrew's request), so a
wrapper that passes "$@" through can run this on Live (host 'forum') with --force. --any-host still
works as before. --force keeps its old meaning as well: every stored item is re-encoded (and with
@@ -183,7 +191,8 @@
caption}}} # long mixes only
Resume correctness comes from "items" presence (an item is written only
when fully done). ISE_Data/audio_checkpoint.json is a human-readable
-progress snapshot, same pattern as MediaProcessor's.
+progress snapshot, same pattern as MediaProcessor's (v1.3.2: also names the
+item in progress -- see the v1.3.2 entry).

Changing --long-threshold / --stride / --samples / window length / model
after a store exists is refused unless --force (full rebuild) -- a store
@@ -194,7 +203,7 @@
line for each non-zero failure count. Silence means clean.
"""

-VERSION = "1.3.1"
+VERSION = "1.3.2"

RUNTIME_VERSION = f"AudioProcessor v{VERSION} (2026-11-25)"

@@ -758,7 +767,7 @@
store["_meta"]["writer"] = RUNTIME_VERSION
atomic_write_json(self.store_path, store, ensure_ascii=False)

- def write_checkpoint(self, done_this_run, last_id, total_done, total_items, eta_s):
+ def write_checkpoint(self, done_this_run, last_id, total_done, total_items, eta_s, current=None):
atomic_write_json(self.checkpoint_path, {
"timestamp": datetime.datetime.now().astimezone().isoformat(timespec="seconds"),
"writer": RUNTIME_VERSION,
@@ -768,6 +777,8 @@
"total_items": total_items,
"remaining": max(total_items - total_done, 0),
"eta_this_run": fmt_hms(eta_s) if eta_s is not None else None,
+ "pid": os.getpid(), # v1.3.2
+ "current": current, # v1.3.2: item in progress, None once it is stored
}, indent=2)

# -- v1.1.0 measurements ------------------------------------------------
@@ -1069,8 +1080,15 @@
enc_seconds = 0.0
remaining_windows = sum(len(t[5]) for t in todo)
last_id = None
+ eta = None # v1.3.2: carried into the item-start checkpoint
for n, (attach_id, meta, path, duration, cls, starts) in enumerate(todo, 1):
self.ensure_engine()
+ # v1.3.2: name the item in progress (read by chkindexaudio)
+ self.write_checkpoint(done, last_id, sum(1 for a in items if a in store["items"]), len(items), eta,
+ current={"n": n, "of": len(todo), "id_attach": attach_id,
+ "filename": meta.get("filename"),
+ "started": datetime.datetime.now().astimezone()
+ .isoformat(timespec="seconds")})
if self.args.verbose:
self.verbose_start(n, len(todo), attach_id, meta, path, duration, cls, len(starts))
t0 = time.time()

4.2 Audio_Progress_Report.py v1.0.0 and /bin/chkindexaudio v1.0.0 (new)

Problem and resolution. The operator wanted a progress report for AudioIndexer, like chkindeximages. He then narrowed it to two lines: processing XYZ.mp3 (pid nnn) and currently on n of m. The new read-only report:

It also says so when the AudioProcessor file is older than v1.3.2, or was replaced after the run started. That check uses the file's change time (ctime), which unzip and cp -p can't set back.

Risk analysis. None to the data.

Code change: new files; the full source is in the zips. Separate Python report plus a /bin wrapper, the same pattern as chkindeximages.

4.3 Audio_Progress_Report.py v1.0.0 to v1.1.0: --watch SECS

Problem and resolution. The operator pointed out that --watch nn was missing, since chkindeximages has it. It was added the same way as in Classification_Progress_Report.py: clear the screen, redraw every SECS seconds, exit cleanly on Ctrl-C. In watch mode the version line also shows the clock and the interval (this was listed as unrequested at delivery). The operator ruled out any check on the value ("i control that").

Risk analysis. Display only. --watch 0 (the default) gives output identical to v1.0.0.

Code change:

--- Audio_Progress_Report.py v1.0.0
+++ Audio_Progress_Report.py v1.1.0
@@ -3,7 +3,7 @@
* ========================================================
* Module: Audio_Progress_Report.py
*
- * @version 1.0.0
+ * @version 1.1.0
* @date 2026-11-25
*
* Another collaboration between Andrew.human and Claude.ai
@@ -26,14 +26,18 @@
*
* Manual: Audio_Progress_Report.md (behaviour rules + pseudocode map).
*
+ * v1.1.0 (2026-11-25) -- --watch SECS, same as Classification_Progress_Report.py: clears the
+ * screen and redraws every SECS seconds until Ctrl-C (which exits cleanly). In watch mode the
+ * version line also shows the clock and the interval, so a static screen visibly refreshes.
+ * --watch 0 (the default) is one look, exactly as v1.0.0. The interval is the operator's call.
* v1.0.0 (2026-11-25) -- first version.
*
- * Usage: python3 Audio_Progress_Report.py [--data-dir DIR]
+ * Usage: python3 Audio_Progress_Report.py [--watch SECS] [--data-dir DIR]
* python3 Audio_Progress_Report.py --version
"""
import sys

-VERSION = "1.0.0"
+VERSION = "1.1.0"
DATE = "2026-11-25"
VERSION_LINE = "Audio_Progress_Report.py v%s (%s)" % (VERSION, DATE)
if __name__ == "__main__" and sys.argv[1:] in (["--version"], ["-V"]):
@@ -44,6 +48,7 @@
import json # noqa: E402
import os # noqa: E402
import re # noqa: E402
+import time # noqa: E402

DEFAULT_DATA_DIR = "/var/www/html/ISE_Data"
NEEDS = (1, 3, 2) # first AudioProcessor that records "pid" and "current"
@@ -146,10 +151,25 @@
ap.add_argument("--version", "-V", action="version", version=VERSION_LINE)
ap.add_argument("--data-dir", default=DEFAULT_DATA_DIR,
help="ISE_Data folder holding audio_checkpoint.json (default %(default)s)")
+ ap.add_argument("--watch", type=int, default=0, metavar="SECS",
+ help="redraw every SECS seconds (Ctrl-C to stop)")
a = ap.parse_args()
- print(VERSION_LINE)
- for line in report(a.data_dir):
- print(line)
+ if not a.watch:
+ print(VERSION_LINE)
+ for line in report(a.data_dir):
+ print(line)
+ return
+ try:
+ while True:
+ lines = report(a.data_dir) # gather first, then clear: no blank flicker
+ sys.stdout.write("\033[H\033[2J")
+ print("%s %s (every %ds, Ctrl-C to stop)" % (VERSION_LINE, time.strftime("%H:%M:%S"), a.watch))
+ for line in lines:
+ print(line)
+ sys.stdout.flush()
+ time.sleep(a.watch)
+ except KeyboardInterrupt:
+ print()


if __name__ == "__main__":

4.4 Audio_Progress_Report.py v1.1.0 to v1.1.1: FIX, "not running" during a real run

Problem and resolution. At 04:32:00 on Clone, during --attachid 8630 --force, the report said AudioProcessor is not running. AudioProcessor had started at about 04:31:49 and was loading. ps showed the process's program was /opt/glibc-2.17/lib/ld-2.17.so, with python3.8.real later in the command line. v1.1.0 required the program itself to be python. v1.1.1 counts a process when AudioProcessor.py is in its command line and python* appears anywhere before it. Confirmed on Clone: 04:38:04 found pid 14719 (not on an item yet while the vocabulary was being prepared), and 04:39:04 showed the item.

Risk analysis. The match is slightly wider. A process with both python... and AudioProcessor.py in its command line would count even if it wasn't AudioProcessor, for example python3.8 -c ... AudioProcessor.py. That's unlikely. tail, vi and grep on the file are still excluded (tested).

Lesson for the lemon library: don't assume a process's program name. On Clone, python3.8 is the glibc 2.17 loader running python3.8.real.

Code change:

--- Audio_Progress_Report.py v1.1.0
+++ Audio_Progress_Report.py v1.1.1
@@ -3,7 +3,7 @@
* ========================================================
* Module: Audio_Progress_Report.py
*
- * @version 1.1.0
+ * @version 1.1.1
* @date 2026-11-25
*
* Another collaboration between Andrew.human and Claude.ai
@@ -26,6 +26,12 @@
*
* Manual: Audio_Progress_Report.md (behaviour rules + pseudocode map).
*
+ * v1.1.1 (2026-11-25) -- FIX: said "AudioProcessor is not running" during a real run on Clone
+ * (2026-11-25 04:32, --attachid 8630). Clone's python3.8 starts Python through the glibc 2.17
+ * loader, so the process's program is /opt/glibc-2.17/lib/ld-2.17.so and python3.8.real only
+ * comes later in the command line; v1.1.0 required the program itself to be python. A process
+ * now counts when AudioProcessor.py is in its command line with python* anywhere before it.
+ * Nothing else changed.
* v1.1.0 (2026-11-25) -- --watch SECS, same as Classification_Progress_Report.py: clears the
* screen and redraws every SECS seconds until Ctrl-C (which exits cleanly). In watch mode the
* version line also shows the clock and the interval, so a static screen visibly refreshes.
@@ -37,7 +43,7 @@
"""
import sys

-VERSION = "1.1.0"
+VERSION = "1.1.1"
DATE = "2026-11-25"
VERSION_LINE = "Audio_Progress_Report.py v%s (%s)" % (VERSION, DATE)
if __name__ == "__main__" and sys.argv[1:] in (["--version"], ["-V"]):
@@ -64,8 +70,9 @@

def audioprocessor_procs():
"""
- Running AudioProcessor.py processes: a python interpreter with
- AudioProcessor.py as an argument (so vi/tail/grep on the file don't count).
+ Running AudioProcessor.py processes: AudioProcessor.py in the command line
+ with python* somewhere before it -- as the program itself, or after a loader
+ such as Clone's ld-2.17.so (v1.1.1). vi/tail/grep on the file don't count.
Returns [(pid, script path or None, start time as epoch seconds)], lowest pid first.
"""
found = []
@@ -76,11 +83,12 @@
argv = [x.decode("utf-8", "replace") for x in fh.read().split(b"\0") if x]
except OSError:
continue
- if not argv or not os.path.basename(argv[0]).startswith("python"):
- continue
- script = next((x for x in argv[1:] if os.path.basename(x) == "AudioProcessor.py"), None)
- if script is None:
+ # v1.1.1: python may come after a loader, e.g. on Clone:
+ # /opt/glibc-2.17/lib/ld-2.17.so --library-path ... /usr/local/bin/python3.8.real .../AudioProcessor.py
+ idx = next((i for i, x in enumerate(argv) if os.path.basename(x) == "AudioProcessor.py"), None)
+ if idx is None or not any(os.path.basename(x).startswith("python") for x in argv[:idx]):
continue
+ script = argv[idx]
if not os.path.isabs(script):
try:
script = os.path.join(os.readlink("/proc/%s/cwd" % pid), script)

5. Tests

33 automated tests, all passing with v1.1.1. They ran in a throwaway sandbox under Python 3.8, using the operator's real AudioProcessor.py, core_utils.py and ise_noindex.py. Only CLAP/torch, MySQL, ffprobe/ffmpeg and audio_features were stand-ins.

The test rig wasn't shipped. By design it deletes and rebuilds /var/www/html, so it must never go near Live, Clone or Dev. A new session can rebuild it from this description.

6. Open items

  1. AudioProcessor's manual doesn't yet mention the two new checkpoint keys. Send the manual and it comes back as a whole updated file.
  2. Packaging. These were plain zips. ISE lives under the SMF Package Manager, and /bin scripts have their own install system. Send the ISE package to fold these in, built with the legacy zipper.
  3. Code levels across boxes. AudioProcessor and AudioIndexer.sh differ between machines: Clone was on v1.2.3, and the uploaded v1.3.1 and one-line wrapper came from another box. Live/Dev levels are not known.
  4. 30 stale audio_store.json entries (1789 windows): --prune removes them whenever the operator chooses.
  5. Image/video report (Classification_Progress_Report v2.4) shows SELF-CHECK FAILED: 950 store IDs aren't in its inventory (519 thumbnails, 401 "no post (avatar?)", 30 not in the database). Its totals can't be trusted until that's looked at.
  6. AudioProcessor's docstring still has two out-of-date notes (Live "2 GB", venv path). They were noted in v1.3.1 and not changed.

7. To resume

Paste this checkpoint into the new session. For further code work, also attach Audio_Progress_Report_v1.1.1.zip and AudioProcessor.py v1.3.2.