aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-07-19 05:05:33 -0500
committerCraig Jennings <c@cjennings.net>2026-07-19 05:05:33 -0500
commit8c0a56bf2d7e81e4876919f120004aa011365327 (patch)
tree5ac5ca06a5fd3a4deef1de05b72c530f9b5788dd
parentc6383e97f7dc1113959a000f6273d30c2f20415e (diff)
downloadrulesets-8c0a56bf2d7e81e4876919f120004aa011365327.tar.gz
rulesets-8c0a56bf2d7e81e4876919f120004aa011365327.zip
chore(sentry): flip spec to IMPLEMENTED and close the build task
Phase 4. All four phases shipped and the suite is green, so the spec keyword moves DOING to IMPLEMENTED with a dated history line and the Metadata Status mirrors it. The build task and its phase sub-tasks close (the sub-tasks become dated event-log entries per the depth rule). The overnight live trial is the one piece an agent can't run, so it's filed as a structured manual-testing task: entry gates with Craig present, one fire observed end to end, the wrap-up guard and stop-sentry, and the morning branch review. Its findings become follow-up tasks rather than gating the flip.
-rw-r--r--docs/specs/2026-07-14-sentry-workflow-spec.org5
-rw-r--r--todo.org98
2 files changed, 68 insertions, 35 deletions
diff --git a/docs/specs/2026-07-14-sentry-workflow-spec.org b/docs/specs/2026-07-14-sentry-workflow-spec.org
index 6de0137..307d0be 100644
--- a/docs/specs/2026-07-14-sentry-workflow-spec.org
+++ b/docs/specs/2026-07-14-sentry-workflow-spec.org
@@ -4,17 +4,18 @@
#+TODO: TODO | DONE
#+TODO: DRAFT READY DOING | IMPLEMENTED SUPERSEDED CANCELLED
-* DOING sentry workflow
+* IMPLEMENTED sentry workflow
:PROPERTIES:
:ID: f6c51f27-d7a2-4b63-9ff9-5ba005a66dfb
:END:
+- 2026-07-19 Sun @ 05:04:00 -0500 — IMPLEMENTED: all four phases built, committed, and pushed (agent-lock a8b6cf4, engine ccc9c26, companions c6383e9). Full suite green throughout. The overnight live trial is handed to Craig as a structured manual-testing task; its findings file as follow-up tasks, not a build gate.
- 2026-07-19 Sun @ 04:35:57 -0500 — DOING: build started. Decomposed into the four implementation phases as todo.org build tasks under the sentry parent (SPEC_ID-bound); running in no-approvals + auto-flush mode.
- 2026-07-19 Sun @ 04:35:57 -0500 — READY: Craig completed his deep read and approved the spec for build. Gate passed.
- 2026-07-14 Tue @ 02:03:28 -0500 — all 12 review findings dispositioned live with Craig and folded into the design; decisions now 10/10; still DRAFT pending Craig's deep read.
- 2026-07-14 Tue @ 00:52:03 -0500 — drafted, all nine design decisions resolved live with Craig during the authoring session.
* Metadata
-| Status | doing |
+| Status | implemented |
|----------+------------------------------------------|
| Owner | Craig Jennings |
|----------+------------------------------------------|
diff --git a/todo.org b/todo.org
index abc964a..8304470 100644
--- a/todo.org
+++ b/todo.org
@@ -39,42 +39,74 @@ Tags are assigned and refreshed by =task-audit=; =task-review= keeps them honest
* Rulesets Open Work
-** DOING [#B] Sentry workflow — build from spec :feature:
+** DONE [#B] Sentry workflow — build from spec :feature:
+CLOSED: [2026-07-19 Sun]
:PROPERTIES:
:SPEC_ID: f6c51f27-d7a2-4b63-9ff9-5ba005a66dfb
:END:
-Build the sentry supervisor workflow from the READY-gated spec:
-[[file:docs/specs/2026-07-14-sentry-workflow-spec.org][sentry workflow spec]] (READY 2026-07-19, Craig approved after his deep read).
-Origin: work project's proposal,
-[[file:docs/design/2026-07-14-sentry-workflow-proposal.org][docs/design/2026-07-14-sentry-workflow-proposal.org]]. Decomposed into the four
-implementation phases below; building in no-approvals + auto-flush mode.
-*** TODO Phase 1 — agent-lock helper + bats
-=.ai/scripts/agent-lock= (canonical =claude-templates/.ai/scripts/=): mkdir-atomic
-acquire, PID/host/ISO-timestamp metadata, age-based staleness reclaim, bounded-wait
-contention, heartbeat refresh, acquire/release/status subcommands. Locks under
-=/run/user/<uid>/agent-locks/<name>/= with =~/.cache/agent-locks/= fallback. bats:
-two concurrent acquires → one winner, release frees, stale reclaim surfaces a note,
-busy → bounded wait then defer, heartbeat keeps a live lock young, runtime-dir home.
-*** TODO Phase 2 — sentry.org engine
-=.ai/workflows/sentry.org= (mirror synced): entry ticket (:COMMIT_AUTONOMY:),
-interactive entry gates (dirty tracked tree / red suite), ff-only branch reconcile,
-=sentry/YYYY-MM-DD-<host>= branch mechanics, the ten-pass runner with the
-probe→work→session-context→commit contract, digest + morning-approval queue,
-skip-and-note semantics, spine-set dirty exclusion + fire-end digest commit,
-stall-notify after two unmerged-branch skips, the stop-sentry operation. INDEX.org
-entry.
-*** TODO Phase 3 — companion reconciliations
-knowledge-base.md write recipe (roam-write lock around the write block; edit+trigger
-replaces inline pull/commit/push); inbox.org core §5 (acquire/release around the
-Phase D edit, capture-guard underneath, graceful degradation when the helper is
-absent); roam-sync.sh header comment; triage-intake.org note (runs as a sentry pass,
-own triggers kept); wrap-it-up.org active-sentry guard (refuse, point at "stop
-sentry").
-*** TODO Phase 4 — verification + flip spec to IMPLEMENTED
-=make test= green; file follow-up tasks for the live-trial-night items (Craig runs
-the trial on ratio — entry gates, one fire end to end, morning branch review). On
-completion, flip the spec keyword DRAFT/DOING → IMPLEMENTED with a dated history
-line, and close this parent.
+Built the sentry supervisor workflow from the spec
+([[file:docs/specs/2026-07-14-sentry-workflow-spec.org][sentry workflow spec]], now IMPLEMENTED). Four phases, each committed and
+pushed in no-approvals + auto-flush mode; full suite green throughout. The overnight
+live trial is handed to Craig as a manual-testing task (below); its findings file as
+follow-ups.
+*** 2026-07-19 Sun @ 04:52:00 -0500 Built the agent-lock helper + 18 bats tests
+=.ai/scripts/agent-lock= (canonical =claude-templates/.ai/scripts/=, mirror synced):
+mkdir-atomic acquire, PID/host/ISO-timestamp metadata, mtime-based staleness reclaim
+(atomic-rename claim so two acquirers can't double-acquire — caught by the pre-commit
+review), heartbeat refresh, acquire/release/status/path subcommands, XDG_RUNTIME_DIR
+home with =~/.cache= fallback. Commit a8b6cf4.
+*** 2026-07-19 Sun @ 04:56:00 -0500 Built the sentry.org engine + INDEX entry
+=.ai/workflows/sentry.org= (mirror synced): :COMMIT_AUTONOMY: entry ticket, the
+interactive entry gates, ff-only reconcile, =sentry/<date>-<host>= branch mechanics,
+the ten-pass probe→work→session-context→commit runner, digest + morning-approval
+queue, skip-not-degrade safety, spine-excluded dirty checks + fire-end digest commit,
+multi-day stall notify, the stop-sentry operation. All 10 decisions and 12 findings
+reflected. Commit ccc9c26.
+*** 2026-07-19 Sun @ 05:00:00 -0500 Wired the roam writers + wrap-up guard
+knowledge-base.md and inbox.org core §5 acquire the roam-write lock and edit-plus-
+trigger (roam-sync stays sole committer); roam-sync.sh header updated to match;
+wrap-it-up.org gained a Step 0 active-sentry guard; triage-intake.org notes its
+sentry-pass role. Graceful degradation when agent-lock is absent. Commit c6383e9.
+*** 2026-07-19 Sun @ 05:04:00 -0500 Verified suite green + flipped spec to IMPLEMENTED
+=make test= green at HEAD (pytest 393, ERT + bats all pass, exit 0). Flipped the spec
+keyword DOING → IMPLEMENTED with a dated history line and mirrored the Metadata Status.
+Filed the overnight live trial as a structured manual-testing task.
+
+** TODO Manual testing and validation
+*** Sentry — entry gates fire with Craig present
+What we're verifying: the interactive entry gates stop for the right states and start the loop only on a clean, green baseline.
+- On rulesets (ratio), with a clean tree and green suite, say "start sentry hourly".
+- Confirm it reads =:COMMIT_AUTONOMY: yes= and doesn't decline.
+#+begin_src sh :results output
+# Dirty the tree on purpose, then re-arm — the dirty-tree gate should stop and offer finish/stash/rollback.
+echo "# scratch" >> README.org
+git diff --stat
+#+end_src
+- Re-run "start sentry"; confirm it surfaces the dirty README and the three numbered options rather than starting.
+- Discard the scratch edit (=git checkout -- README.org=), re-arm, and confirm it reconciles, creates =sentry/$(date +%F)-$(uname -n)=, and arms the loop.
+Expected: sentry declines on the dirty tree with numbered options, and on a clean+green tree it creates the host-suffixed branch and starts the hourly loop.
+*** Sentry — one fire runs end to end
+What we're verifying: a single fire walks the passes, commits per writing pass to the branch, appends the digest, sweeps the spine, and releases the lock.
+- Let one fire run (or trigger the loop body once).
+#+begin_src sh :results output
+proj="$(basename "$(git rev-parse --show-toplevel)")"
+.ai/scripts/agent-lock status "sentry-$proj" # held during a fire, free between fires
+git log --oneline main..HEAD | head # chore(sentry): ... commits on the branch
+tail -40 .ai/session-context.org # the per-fire digest block + any approval-queue heading
+#+end_src
+- Confirm each pass shows a ran-or-skipped digest line (no silent gaps), destructive/judgment items sit under the approval-queue heading (not executed), and the tree is clean after the fire's digest commit.
+Expected: one digest block per fire with a line per pass, queued items parked with their exact command, branch carries the pass commits, working tree clean, lock free between fires.
+*** Sentry — wrap-up guard and stop-sentry
+What we're verifying: wrap-up refuses while sentry is live, and stop-sentry cleanly ends the loop.
+- With sentry live, say "wrap it up"; confirm it refuses with "sentry is active — say 'stop sentry' first."
+- Say "stop sentry"; confirm the loop cancels and it offers the branch disposition (merge now / leave named) and the approval-queue walk.
+Expected: wrap-up blocks on the held single-runner lock; stop-sentry cancels the loop and walks branch + queue disposition.
+*** Sentry — morning branch review
+What we're verifying: the morning teardown reviews and merges cleanly, nothing reached main unpushed.
+- =git log main..sentry/<date>-<host>= and read the diff.
+- Squash-merge what's wanted, delete the branch, revert any stale Emacs buffers.
+- Confirm main was never pushed to during the night and the approval queue was walked.
+Expected: the night's work is reviewable as one branch, merges by choice, and main stayed clean throughout.
** TODO [#C] Polyglot projects — supported, or refused? :spec:
SCHEDULED: <2026-07-20 Mon>