Willie
c23daf8ccc
refactor(memory): move guidance plan and apply out of the dashboard handler
...
The guidance rules (status ranking, mixed_modes, multiple_blocks, the plan
token, and check -> backup -> recheck -> write) were methods on *Server, so
they could only be exercised over HTTP with a configured server, and the
recheck after backup depended on callers using the right helper.
internal/memory now owns status, plan, and apply behind GuidanceStatus,
PlanGuidance, and ApplyGuidance. The server resolves targets, assignments,
shared extras, and project reach into a GuidanceInput, syncs shared copies
through a callback after each written file, and maps results to JSON. Only
ApplyGuidance reaches the write steps, so the recheck cannot be skipped.
Note creation and guidance creation shared a copied O_EXCL create with
delete-on-failure; both now use createExclusive. Each keeps its own
behaviour: notes still chmod to 0644, guidance still creates parents.
HTTP routes, shapes, status codes, and error codes are unchanged. The raw
write allowances follow the calls to their new functions.
Refs #450
2026-10-07 00:03:50 +08:00
..
2026-10-05 15:40:19 +08:00
2026-03-18 22:35:02 +08:00
2026-10-05 15:40:19 +08:00
2026-10-05 15:40:19 +08:00
2026-10-04 19:34:24 +08:00
2026-10-05 14:26:09 +08:00
2026-09-19 03:14:03 +08:00
2026-10-05 14:45:41 +08:00
2026-04-10 02:05:13 +08:00
2026-10-05 14:45:41 +08:00
2026-10-02 01:25:29 +08:00
2026-10-02 01:25:29 +08:00
2026-10-05 18:26:12 +08:00
2026-10-05 18:26:12 +08:00
2026-10-02 20:56:55 +08:00
2026-10-05 18:26:12 +08:00
2026-04-10 01:26:40 +08:00
2026-10-05 15:40:51 +08:00
2026-10-01 21:21:53 +08:00
2026-10-02 01:25:29 +08:00
2026-09-19 03:14:03 +08:00
2026-09-30 02:25:42 +08:00
2026-10-06 14:18:20 +08:00
2026-10-05 15:40:19 +08:00
2026-04-14 18:16:11 +08:00
2026-05-30 19:23:12 +08:00
2026-10-03 01:25:44 +08:00
2026-09-30 02:21:11 +08:00
2026-09-30 02:25:42 +08:00
2026-10-03 14:16:58 +08:00
2026-10-03 14:16:58 +08:00
2026-10-01 23:08:43 +08:00
2026-10-01 10:17:47 +08:00
2026-10-01 10:17:47 +08:00
2026-10-02 02:56:54 +08:00
2026-10-05 14:11:57 +08:00
2026-10-05 14:11:57 +08:00
2026-02-23 04:18:01 +08:00
2026-04-10 01:26:40 +08:00
2026-10-01 21:21:53 +08:00
2026-10-01 02:24:24 +08:00
2026-10-02 02:56:54 +08:00
2026-09-19 03:14:03 +08:00
2026-10-05 22:03:47 +08:00
2026-09-28 23:39:19 +08:00
2026-09-30 02:25:42 +08:00
2026-02-23 04:18:01 +08:00
2026-09-30 02:25:42 +08:00
2026-10-05 22:03:47 +08:00
2026-10-05 22:03:47 +08:00
2026-10-02 20:30:27 +08:00
2026-10-05 14:42:09 +08:00
2026-09-28 17:41:33 +08:00
2026-09-30 02:25:42 +08:00
2026-09-28 14:27:53 +08:00
2026-09-30 02:25:42 +08:00
2026-09-28 18:40:15 +08:00
2026-09-30 02:25:42 +08:00
2026-09-28 16:12:59 +08:00
2026-09-27 03:02:51 +08:00
2026-09-30 02:25:42 +08:00
2026-09-30 02:25:42 +08:00
2026-09-29 04:51:24 +08:00
2026-09-30 02:25:42 +08:00
2026-02-23 04:18:01 +08:00
2026-03-17 04:48:42 +08:00
2026-10-01 02:24:24 +08:00
2026-10-01 02:24:24 +08:00
2026-10-01 02:24:24 +08:00
2026-10-05 20:36:39 +08:00
2026-10-01 02:24:24 +08:00
2026-10-06 22:34:27 +08:00
2026-10-07 00:03:50 +08:00
2026-10-07 00:03:50 +08:00
2026-10-03 14:16:58 +08:00
2026-10-03 14:16:58 +08:00
2026-10-03 14:16:58 +08:00
2026-10-04 10:23:47 +08:00
2026-10-05 20:36:39 +08:00
2026-10-05 20:36:39 +08:00
2026-10-05 20:36:39 +08:00
2026-04-19 09:29:18 +08:00
2026-10-03 01:25:44 +08:00
2026-05-20 15:42:53 +08:00
2026-10-05 14:26:09 +08:00
2026-10-04 02:26:59 +08:00
2026-10-03 20:47:20 +08:00
2026-09-27 23:03:21 +08:00
2026-10-04 23:08:33 +08:00
2026-06-03 15:37:57 +08:00
2026-10-06 22:34:27 +08:00
2026-10-06 22:34:27 +08:00
2026-04-09 03:50:28 +08:00
2026-09-27 02:10:00 +08:00
2026-10-03 01:25:44 +08:00
2026-06-02 16:29:25 +08:00
2026-10-05 22:03:47 +08:00
2026-10-05 14:42:09 +08:00
2026-10-05 14:42:09 +08:00
2026-10-05 11:29:39 +08:00
2026-10-05 14:26:09 +08:00
2026-09-30 01:34:58 +08:00
2026-10-05 22:35:00 +08:00
2026-10-05 23:01:50 +08:00
2026-10-05 22:35:00 +08:00
2026-09-20 01:51:59 +08:00
2026-10-05 23:01:50 +08:00
2026-10-05 23:16:58 +08:00
2026-10-05 23:16:58 +08:00
2026-09-30 00:24:51 +08:00
2026-09-21 01:52:34 +08:00
2026-10-05 14:26:09 +08:00
2026-10-02 16:24:03 +08:00
2026-10-05 14:26:09 +08:00
2026-09-29 15:25:06 +08:00
2026-09-30 02:25:42 +08:00
2026-04-14 18:03:41 +08:00
2026-09-29 04:51:24 +08:00
2026-10-05 20:36:39 +08:00
2026-10-06 14:18:20 +08:00
2026-10-04 19:34:24 +08:00
2026-10-05 14:26:09 +08:00
2026-10-04 19:40:44 +08:00
2026-10-05 14:26:09 +08:00
2026-10-05 18:27:12 +08:00
2026-04-08 20:52:29 +08:00
2026-10-05 18:27:12 +08:00
2026-10-05 20:02:58 +08:00
2026-09-30 01:34:58 +08:00
2026-10-05 20:02:58 +08:00
2026-10-05 21:53:12 +08:00
2026-10-05 15:46:04 +08:00
2026-08-27 17:10:29 +08:00
2026-10-05 21:22:47 +08:00
2026-10-03 21:43:35 +08:00
2026-10-03 21:43:35 +08:00
2026-09-30 02:25:42 +08:00
2026-09-30 02:25:42 +08:00
2026-03-18 22:35:02 +08:00
2026-04-19 09:29:18 +08:00
2026-04-19 09:29:18 +08:00
2026-03-17 04:48:42 +08:00
2026-04-09 04:07:35 +08:00
2026-03-18 22:35:02 +08:00
2026-05-05 18:33:07 +08:00
2026-10-05 22:49:25 +08:00
2026-10-05 18:26:12 +08:00
2026-10-05 11:03:39 +08:00
2026-10-05 11:03:39 +08:00
2026-09-27 23:03:21 +08:00
2026-09-27 23:03:21 +08:00