diff --git a/infra/systemd/README.md b/infra/systemd/README.md index 5e36631..068872e 100644 --- a/infra/systemd/README.md +++ b/infra/systemd/README.md @@ -15,3 +15,22 @@ systemctl --user list-timers monag-urtlog-triage@production.timer ``` The journal contains a JSON triage report on each run. Inspect its recommendations for the episode, deadline and retry status. A missing journal or an unobserved producer also yields a recommendation. A successful systemd exit means the scan ran. Read the recommendations to determine the health of the route. The timer reruns a minute after the service finishes. + +## Continuation snapshot + +For an existing `monag-worktree-continuation.service`, install the +`atomic-snapshot.conf` drop-in from the adjacent directory. Bind the following +environment variables in the user unit to absolute paths from the installation. + +| Variable | Value | +| --- | --- | +| `MONAG_EXECUTABLE` | Installed Monag supporting `resume --snapshot-file` | +| `MONAG_ROOT` | Workspace scanned by this timer | +| `MONAG_RESUME_SNAPSHOT` | Scheduled JSON file read by the continuation consumer | + +Use the same pinned runtime for the scan and its history command. After +`systemctl --user daemon-reload`, let the timer run and wait for its oneshot +service to finish. Parse the snapshot, verify its `monag.resume/v1` schema, +workspace root and fresh observation timestamp, then inspect the expected +project. Monag replaces the complete document atomically. The unit sends +standard output to null so subsequent service commands cannot truncate it. diff --git a/infra/systemd/monag-worktree-continuation.service.d/atomic-snapshot.conf b/infra/systemd/monag-worktree-continuation.service.d/atomic-snapshot.conf new file mode 100644 index 0000000..8ce0270 --- /dev/null +++ b/infra/systemd/monag-worktree-continuation.service.d/atomic-snapshot.conf @@ -0,0 +1,4 @@ +[Service] +StandardOutput=null +ExecStart= +ExecStart=/usr/bin/env -- ${MONAG_EXECUTABLE} --root ${MONAG_ROOT} --json resume --sort changes --snapshot-file ${MONAG_RESUME_SNAPSHOT} diff --git a/project/TICKETS.md b/project/TICKETS.md index b33e406..33cb00b 100644 --- a/project/TICKETS.md +++ b/project/TICKETS.md @@ -152,4 +152,5 @@ | **ticket-163** | [`README.md`](./ticket-163/README.md) | - | - | - | - | - | | **ticket-164** | [`README.md`](./ticket-164/README.md) | - | - | - | - | - | | **ticket-165** | [`README.md`](./ticket-165/README.md) | - | - | - | - | - | +| **ticket-166** | [`README.md`](./ticket-166/README.md) | - | - | - | - | - | diff --git a/project/ticket-166/README.md b/project/ticket-166/README.md new file mode 100644 index 0000000..e76e097 --- /dev/null +++ b/project/ticket-166/README.md @@ -0,0 +1,36 @@ +# Ticket 166: PLF-29792 Deliver atomic output from the scheduled Monag continuation service + +- **ID**: ticket-166 +- **Owner**: unresolved:human +- **Status**: IN_PROGRESS +- **Workflow state**: EDIT +- **Created**: 2026-11-24 + +## Goal and scope + +Use the reviewed snapshot writer under a systemd oneshot that also has ExecStartPost. Supply a reusable drop-in and verify an actual scheduled cycle on the user-approved existing service. + +## Acceptance criteria + +- [ ] A scheduled continuation scan leaves fresh JSON after its history command. + +## Tracking boundary + +This directory contains the minimal reviewed intent. Optional participant prose +and raw command logs are not required delivery output. + + +## Ticket Radar + +Initial planned-scope estimate; advisory only, not execution or merge approval. + +| Measure | Initial assessment | +| --- | --- | +| Impact score | 48/100 | +| Complexity | M | +| Estimated effort | 47 min | +| Planning budget | 30 min | +| Split recommended | yes | + +Diagnostics: RADAR-ACCEPTANCE-MISSING, RADAR-BUDGET-EXCEEDED. + diff --git a/project/ticket-166/intent.json b/project/ticket-166/intent.json new file mode 100644 index 0000000..e71ec1b --- /dev/null +++ b/project/ticket-166/intent.json @@ -0,0 +1,25 @@ +{ + "schema": "new-project.intent/v3", + "ticket": "ticket-166", + "summary": "PLF-29792 Deliver atomic output from the scheduled Monag continuation service", + "workstream": "infrastructure", + "classification": { + "kind": "BUG", + "priority": "P1", + "origin": "requested" + }, + "allowedPaths": [ + "project/ticket-166/**", + "TODO.md", + "project/TICKETS.md", + "infra/systemd/README.md", + "infra/systemd/monag-worktree-continuation.service.d/atomic-snapshot.conf" + ], + "forbiddenPaths": [ + "project/ticket-*/user-*.md" + ], + "stacks": [], + "dependsOn": [], + "conflictsWith": [], + "integrationTicket": null +}