Whole file

hongdangmoo49/Trinity

The author described this change as fix: avoid missing workflow events traceback. It counts as a record because the checks below fail on the code as it stood at 5add4aead and pass on e7588cd5b, with nothing else changed between the two runs.

Fix saved2026-06-17
Sharing licenceMIT · LICENSE
Change size+4 0

What the code was meant to do, written into the code itself as a save note

fix: avoid missing workflow events traceback

The change

455455 if limit == 0:
456456 return []
457457 selected = selected[-limit:]
458+ if not selected:
459+ return []
458460 events = self._read_indexed_events(selected)
459461 if events is None:
460462 return None
464466 self,
465467 entries: list[dict[str, Any]],
466468 ) -> list[dict[str, Any]] | None:
469+ if not entries:
470+ return []
467471 events: list[dict[str, Any]] = []
468472 try:
469473 with self.events_path.open("rb") as fh:

The check that tells the two apart

failpass·tests/test_workflow_persistence.py::test_workflow_persistence_ignores_index_when_live_log_was_removed
failpass·tests/test_workflow_persistence.py::test_workflow_persistence_returns_empty_events_without_live_log

Check file tests/test_workflow_persistence.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.

Origin and history

The code before it5add4aeaddf3f576a8e8b530f90ccecdef54638c
Broken version dated2026-06-17
Moduletrinity.workflow.persistence
Units changedWorkflowPersistence
Fingerprint34da1eaa2c1a7e91
Checked2026-08-18 by goldset/0.1

Every field above is generated by our program. None of it is written by hand.

Other bugs found in hongdangmoo49/Trinity