Nora
07ea7ca1d6
fix(sp38): restore per-kind control_number in find_ack_orphans + review cleanups
...
Three pr-reviewer followups from the 2026-07-07 review of commit ad14b56 :
1. BUG: find_ack_orphans refactor routed 277ca/ta1 through
_ack_control_number which only knew 999 — restored per-kind source
(999 reads raw_json.envelope.control_number, 277ca/ta1 read the ORM
control_number column). Added regression test pinning all three
kinds.
2. DOCSTRING DRIFT: reconcile_orphan_st02s said 'remaining columns
take their defaults' but explicitly passes parsed_at and
transaction_set_control_number — added both to the explicit list
and clarified the rest take schema defaults.
3. WASTED SORT: _iter_orphan_999_st02s yielded sorted() but the
caller re-sorts by (-ack_count, st02) — yielding unsorted now.
Plus three cleanups the reviewer flagged:
* Hoisted 'json' / 'uuid' / 'datetime' imports to module top of
store/__init__.py (replaced in-method imports).
* Added two missing tests: sentinel grep-discoverability via
LIKE '<synthetic:%>' + 999-walk tolerance for non-dict raw_json
(None / list shapes — bytes is unreachable through the ORM).
* Aligned spec/plan exit codes to the cyclone-cli convention
(exit 1 on DB error, not 2 — matches the existing CLI
sys.exit(1) and the cyclone-cli skill documentation).
36/36 SP38 tests pass.
2026-07-07 13:11:29 -06:00
..
2026-07-07 10:50:48 -06:00
2026-07-02 17:08:09 -06:00
2026-06-20 18:29:28 -06:00
2026-06-24 17:51:44 -06:00
2026-06-29 10:09:10 -06:00
2026-07-07 13:11:29 -06:00
2026-07-07 12:53:51 -06:00
2026-07-07 10:34:46 -06:00
2026-07-06 09:53:53 -06:00
2026-07-06 09:52:51 -06:00
2026-07-06 09:53:53 -06:00
2026-07-02 09:00:54 -06:00
2026-06-20 23:45:43 -06:00
2026-06-21 09:43:51 -06:00
2026-06-22 11:01:58 -06:00
2026-07-02 12:22:29 -06:00
2026-06-20 19:37:38 -06:00
2026-06-24 22:05:55 -06:00
2026-06-29 11:00:37 -06:00
2026-06-20 08:22:31 -06:00
2026-07-02 14:18:55 -06:00
2026-06-20 19:35:17 -06:00
2026-06-22 11:01:58 -06:00
2026-06-20 08:03:37 -06:00
2026-06-20 18:58:56 -06:00
2026-06-29 14:32:10 -06:00
2026-07-06 14:01:37 -06:00
2026-06-24 22:05:55 -06:00
2026-06-20 20:34:44 -06:00
2026-06-20 16:57:30 -06:00
2026-07-07 12:19:42 -06:00
2026-07-06 09:53:53 -06:00
2026-06-21 10:46:10 -06:00
2026-07-06 09:51:27 -06:00
2026-06-20 23:41:01 -06:00
2026-07-02 21:07:07 -06:00
2026-07-07 13:11:29 -06:00
2026-06-22 15:34:18 -06:00
2026-06-20 23:45:43 -06:00
2026-06-22 15:59:08 -06:00
2026-06-23 17:24:23 -06:00
2026-06-22 15:34:05 -06:00
2026-06-22 15:59:08 -06:00
2026-07-07 12:17:14 -06:00
2026-06-22 15:59:08 -06:00
2026-06-22 15:59:08 -06:00
2026-06-22 15:59:08 -06:00
2026-07-02 17:16:59 -06:00
2026-06-21 09:43:51 -06:00
2026-06-21 09:43:51 -06:00
2026-06-21 09:43:51 -06:00
2026-06-20 17:17:09 -06:00
2026-07-07 10:30:23 -06:00
2026-07-07 10:22:32 -06:00
2026-06-20 07:44:41 -06:00
2026-06-24 22:05:55 -06:00
2026-06-19 17:07:54 -06:00
2026-06-21 09:43:51 -06:00
2026-06-22 15:34:18 -06:00
2026-06-21 10:46:10 -06:00
2026-06-19 16:00:47 -06:00
2026-06-19 17:01:57 -06:00
2026-07-02 21:50:23 -06:00
2026-07-02 20:23:56 -06:00
2026-06-29 12:51:28 -06:00
2026-06-21 00:33:37 -06:00
2026-07-07 10:13:00 -06:00
2026-07-02 14:59:49 -06:00
2026-06-19 21:03:21 -06:00
2026-06-24 16:09:19 -06:00
2026-07-02 12:22:29 -06:00
2026-06-19 15:31:06 -06:00
2026-06-22 15:59:08 -06:00
2026-06-24 23:23:46 -06:00
2026-06-29 10:46:29 -06:00
2026-06-29 12:08:47 -06:00
2026-07-02 08:52:20 -06:00
2026-06-29 10:38:32 -06:00
2026-06-29 11:30:00 -06:00
2026-06-20 19:43:43 -06:00
2026-06-20 23:41:01 -06:00
2026-07-02 13:16:38 -06:00
2026-06-20 18:25:25 -06:00
2026-06-22 17:46:47 -06:00
2026-06-21 00:13:47 -06:00
2026-06-20 19:29:21 -06:00
2026-06-29 13:22:42 -06:00
2026-06-21 09:59:34 -06:00
2026-06-21 09:59:34 -06:00
2026-06-21 09:59:34 -06:00
2026-07-07 12:21:27 -06:00
2026-07-07 12:21:27 -06:00
2026-06-20 08:22:31 -06:00
2026-06-20 08:22:31 -06:00
2026-06-19 17:01:57 -06:00
2026-06-20 08:03:37 -06:00
2026-06-19 15:39:08 -06:00
2026-06-21 10:46:10 -06:00
2026-06-20 08:22:31 -06:00
2026-06-20 08:22:31 -06:00
2026-06-20 23:41:01 -06:00
2026-07-02 16:56:01 -06:00
2026-07-02 21:50:23 -06:00
2026-06-25 00:26:13 -06:00
2026-06-20 18:58:56 -06:00
2026-06-20 23:41:01 -06:00
2026-06-20 23:07:31 -06:00
2026-06-21 00:13:47 -06:00
2026-07-02 21:50:23 -06:00
2026-07-02 21:07:07 -06:00
2026-06-20 20:27:48 -06:00
2026-07-02 16:23:42 -06:00
2026-06-24 22:05:55 -06:00
2026-06-20 16:57:30 -06:00
2026-06-20 19:33:02 -06:00
2026-07-02 17:08:09 -06:00
2026-07-07 12:31:11 -06:00
2026-06-24 15:36:19 -06:00
2026-06-29 11:53:56 -06:00
2026-06-24 23:23:46 -06:00
2026-06-20 18:30:05 -06:00
2026-06-24 15:29:52 -06:00
2026-06-24 16:06:54 -06:00
2026-06-20 23:07:31 -06:00
2026-06-21 10:21:01 -06:00
2026-06-19 15:36:01 -06:00
2026-06-20 08:22:31 -06:00
2026-06-22 11:01:58 -06:00
2026-06-20 08:03:37 -06:00
2026-06-20 19:27:24 -06:00
2026-07-07 12:24:35 -06:00
2026-06-29 11:43:58 -06:00
2026-06-24 23:23:46 -06:00
2026-06-24 22:05:55 -06:00
2026-07-02 08:47:03 -06:00
2026-06-29 14:32:10 -06:00
2026-06-29 12:21:34 -06:00
2026-06-29 14:32:10 -06:00
2026-07-02 08:45:19 -06:00
2026-06-24 22:05:55 -06:00
2026-06-20 18:10:07 -06:00
2026-07-07 12:17:50 -06:00
2026-07-07 12:19:42 -06:00
2026-06-20 23:07:31 -06:00
2026-06-19 17:01:57 -06:00
2026-06-21 10:46:10 -06:00
2026-06-19 15:56:09 -06:00