<?xml version="1.0" encoding="utf-8"?>
<entry xmlns="http://www.w3.org/2005/Atom" xml:base="https://docs.spec-kitty.ai/adr/3.x/2026-06-30-1-sync-daemon-identity-and-cleanup-classification/">
  <id>https://docs.spec-kitty.ai/adr/3.x/2026-06-30-1-sync-daemon-identity-and-cleanup-classification/</id>
  <title>ADR: Sync Daemon Identity Contract and Cleanup Classification</title>
  <updated>2026-06-30T00:00:00.000Z</updated>
  <author><name>Spec Kitty</name></author>
  <link rel="alternate" type="text/html" href="https://docs.spec-kitty.ai/adr/3.x/2026-06-30-1-sync-daemon-identity-and-cleanup-classification/"/>
  <summary>The `--spec-kitty-daemon-root` scope marker becomes the sole kill authority for sync daemons; `owner.json` is health reporting and interpreter identity only stale-version evidence.</summary>
  <content type="html">&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Superseded (2026-09-06)&lt;/strong&gt; by
&lt;a href=&quot;/adr/3.x/2026-09-06-1-convergence-retirement-and-client-repo-inversion/&quot;&gt;&lt;code dir=&quot;auto&quot;&gt;2026-09-06-1-convergence-retirement-and-client-repo-inversion.md&lt;/code&gt;&lt;/a&gt;.
The sync daemon this ADR governs was retired by the Convergence (#3881 / #3824); daemon identity,
&lt;code dir=&quot;auto&quot;&gt;owner.json&lt;/code&gt;, and orphan reaping no longer exist. Retained as historical record.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id=&quot;context-and-problem-statement&quot;&gt;Context and Problem Statement&lt;/h2&gt;
&lt;p&gt;On 2026-06-30 a Spec Kitty machine accumulated &lt;strong&gt;18 orphan sync daemons&lt;/strong&gt; on
ports &lt;code dir=&quot;auto&quot;&gt;9401–9418&lt;/code&gt;, spanning package versions &lt;code dir=&quot;auto&quot;&gt;3.2.2&lt;/code&gt;, &lt;code dir=&quot;auto&quot;&gt;3.2.3&lt;/code&gt;, and &lt;code dir=&quot;auto&quot;&gt;3.2.4&lt;/code&gt;.
Each CLI upgrade left the prior-version daemon running because the old reaper
skipped any candidate whose executable or interpreter identity differed from
the current process — a third identity condition that silently gated cleanup.
The result was unbounded orphan accumulation across upgrades.&lt;/p&gt;
&lt;p&gt;The root cause had two distinct but interacting facets:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Stale executable-identity skip gate.&lt;/strong&gt; The reaper excluded same-scope
daemons whose &lt;code dir=&quot;auto&quot;&gt;exe()&lt;/code&gt; / &lt;code dir=&quot;auto&quot;&gt;argv[0]&lt;/code&gt; did not match the current process’s
interpreter. On macOS framework Python (Homebrew), the kernel rewrites both
fields to the &lt;code dir=&quot;auto&quot;&gt;Python.app&lt;/code&gt; stub after re-exec, so legitimate same-scope
daemons from the same interpreter became invisible to the reaper. Across
upgrades the interpreter path itself changes, making every prior-version
daemon permanently un-reapable regardless of scope identity.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;No authoritative daemon-local identity contract.&lt;/strong&gt; Kill decisions were
partly delegated to the &lt;code dir=&quot;auto&quot;&gt;owner.json&lt;/code&gt; health payload — a reporting artefact
written by the running daemon that reflects self-reported state, not a
source of kill authority. This made the kill boundary non-deterministic:
a daemon that failed to write &lt;code dir=&quot;auto&quot;&gt;owner.json&lt;/code&gt; could neither be identified nor
cleaned up.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;These two defects combined to produce the 18-orphan leak tracked in issues
&lt;a href=&quot;https://github.com/Priivacy-ai/spec-kitty/issues/2261&quot;&gt;#2261&lt;/a&gt; and
&lt;a href=&quot;https://github.com/Priivacy-ai/spec-kitty/issues/1071&quot;&gt;#1071&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Mission &lt;code dir=&quot;auto&quot;&gt;sync-daemon-orphan-cleanup-01KWC2A3&lt;/code&gt; (&lt;code dir=&quot;auto&quot;&gt;kitty-specs/sync-daemon-orphan-cleanup-01KWC2A3/&lt;/code&gt;)
resolves both defects. Three decision moments were opened during planning to
settle the key design questions; each is cited below at the relevant decision.&lt;/p&gt;
&lt;h2 id=&quot;decision-drivers&quot;&gt;Decision Drivers&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Provably-stale same-scope daemons from prior versions must be auto-cleaned
at startup (FR-007, FR-008).&lt;/li&gt;
&lt;li&gt;No process may be killed without a positive identity proof — killing by
port alone is prohibited (C-004).&lt;/li&gt;
&lt;li&gt;&lt;code dir=&quot;auto&quot;&gt;owner.json&lt;/code&gt; is a health-reporting artefact, not kill authority (FR-003).&lt;/li&gt;
&lt;li&gt;Ambiguous candidates (cross-root, pre-marker, wedged) must be surfaced to
the operator rather than silently killed (FR-002, FR-009).&lt;/li&gt;
&lt;li&gt;The cleanup model must be expressible as a concrete classification so the
operator can see exactly which class each candidate falls into (FR-001,
FR-004).&lt;/li&gt;
&lt;li&gt;The decision must be recorded as an ADR so it is discoverable (C-005,
DIRECTIVE_003).&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;decision-outcome&quot;&gt;Decision Outcome&lt;/h2&gt;
&lt;p&gt;The mission adopts a &lt;strong&gt;daemon-root scope-marker-as-primary-kill-authority&lt;/strong&gt;
model with an explicit three-class &lt;code dir=&quot;auto&quot;&gt;cleanup_class&lt;/code&gt; verdict per candidate.&lt;/p&gt;
&lt;h3 id=&quot;d-1--daemon-root-scope-marker-is-the-primary-kill-authority&quot;&gt;D-1 — Daemon-root scope marker is the primary kill authority&lt;/h3&gt;
&lt;p&gt;A candidate sync daemon is eligible for automatic cleanup when, and only
when, &lt;strong&gt;both&lt;/strong&gt; of the following hold:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Its command-line carries the &lt;code dir=&quot;auto&quot;&gt;--spec-kitty-daemon-root=&amp;#x3C;path&gt;&lt;/code&gt; scope
marker naming the &lt;strong&gt;same&lt;/strong&gt; daemon state root as the current foreground
process.&lt;/li&gt;
&lt;li&gt;Its command-line has the production spawn shape: a &lt;code dir=&quot;auto&quot;&gt;-c&lt;/code&gt; flag whose script
payload references &lt;code dir=&quot;auto&quot;&gt;run_sync_daemon&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Executable / interpreter identity (the old third condition) is &lt;strong&gt;stale-version
evidence only and is NOT a kill gate&lt;/strong&gt; (FR-008). Same-scope daemons from a
prior installed version therefore flip from &lt;em&gt;skipped&lt;/em&gt; to &lt;em&gt;reaped&lt;/em&gt; — this is
the direct fix for the 18-orphan accumulation.&lt;/p&gt;
&lt;p&gt;&lt;code dir=&quot;auto&quot;&gt;owner.json&lt;/code&gt; (&lt;code dir=&quot;auto&quot;&gt;owner_present&lt;/code&gt;) is recorded in the identity record for
diagnostics and reporting but is &lt;strong&gt;never consulted for kill decisions&lt;/strong&gt;
(FR-003). &lt;code dir=&quot;auto&quot;&gt;owner.json&lt;/code&gt; is health-reporting data; the scope marker is kill
authority.&lt;/p&gt;
&lt;h3 id=&quot;d-2--explicit-daemon_family-tag-required-in-the-health-payload&quot;&gt;D-2 — Explicit &lt;code dir=&quot;auto&quot;&gt;daemon_family&lt;/code&gt; tag required in the health payload&lt;/h3&gt;
&lt;p&gt;Every Spec Kitty sync daemon embeds an explicit &lt;code dir=&quot;auto&quot;&gt;daemon_family: &quot;sync&quot;&lt;/code&gt; field
in its &lt;code dir=&quot;auto&quot;&gt;/api/health&lt;/code&gt; response (added in WP04). The cleanup path asserts that
the family is &lt;code dir=&quot;auto&quot;&gt;&quot;sync&quot;&lt;/code&gt; before acting; a missing field (pre-WP04 daemon) is
defaulted to &lt;code dir=&quot;auto&quot;&gt;&quot;sync&quot;&lt;/code&gt; only when the port is in the sync range &lt;code dir=&quot;auto&quot;&gt;[9400, 9450)&lt;/code&gt;
and the production spawn shape is present. Dashboard-family listeners (port
range &lt;code dir=&quot;auto&quot;&gt;[9237, 9337)&lt;/code&gt;) are never touched by the sync cleanup path regardless
of any other identity signal (C-001, C-002, NFR-001/002/003).&lt;/p&gt;
&lt;h3 id=&quot;d-3--three-class-cleanup_class-model&quot;&gt;D-3 — Three-class &lt;code dir=&quot;auto&quot;&gt;cleanup_class&lt;/code&gt; model&lt;/h3&gt;
&lt;p&gt;Every scanned in-range listener is assigned exactly one of three verdicts
(&lt;code dir=&quot;auto&quot;&gt;src/specify_cli/sync/classification.py&lt;/code&gt;):&lt;/p&gt;

























&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;&lt;code dir=&quot;auto&quot;&gt;cleanup_class&lt;/code&gt;&lt;/th&gt;&lt;th&gt;Meaning&lt;/th&gt;&lt;th&gt;Kill authority&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;safe_auto&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Sync daemon, port in &lt;code dir=&quot;auto&quot;&gt;[9400, 9450)&lt;/code&gt;, self-reported PID/port match actual listener, singleton scope positively proven, not the recorded singleton.&lt;/td&gt;&lt;td&gt;Auto-cleaned at startup and by &lt;code dir=&quot;auto&quot;&gt;auth doctor --reset&lt;/code&gt;.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;operator_required&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Appears to be SK sync but is pre-marker, cross-root, missing PID, missing daemon-local identity, or wedged/unresponsive (see D-01 below).&lt;/td&gt;&lt;td&gt;Only cleaned by &lt;code dir=&quot;auto&quot;&gt;auth doctor --reset --force&lt;/code&gt; or interactive confirmation.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;never_touch&lt;/code&gt;&lt;/td&gt;&lt;td&gt;Third-party listener, dashboard-family, cross-family, out-of-range, or otherwise unidentifiable as SK sync.&lt;/td&gt;&lt;td&gt;Never killed under any circumstances.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;A &lt;code dir=&quot;auto&quot;&gt;skip_reason&lt;/code&gt; accompanies every non-&lt;code dir=&quot;auto&quot;&gt;safe_auto&lt;/code&gt; record, making the
classification auditable via &lt;code dir=&quot;auto&quot;&gt;auth doctor --json&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&quot;d-4--wedged-listeners-are-operator_required-not-safe_auto&quot;&gt;D-4 — Wedged listeners are &lt;code dir=&quot;auto&quot;&gt;operator_required&lt;/code&gt;, not &lt;code dir=&quot;auto&quot;&gt;safe_auto&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Decision moment &lt;code dir=&quot;auto&quot;&gt;01KWC36NQBY670Q52B7C4SX2KH&lt;/code&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;An in-range listener that does &lt;strong&gt;not&lt;/strong&gt; answer &lt;code dir=&quot;auto&quot;&gt;/api/health&lt;/code&gt; (wedged/hung)
but whose command-line carries a recognisable scope marker is classified
&lt;code dir=&quot;auto&quot;&gt;operator_required/unresponsive&lt;/code&gt; rather than &lt;code dir=&quot;auto&quot;&gt;safe_auto&lt;/code&gt;. A live
&lt;code dir=&quot;auto&quot;&gt;/api/health&lt;/code&gt; self-report is required for &lt;code dir=&quot;auto&quot;&gt;safe_auto&lt;/code&gt;; cmdline scope-proof
alone is insufficient. Wedged daemons are surfaced by &lt;code dir=&quot;auto&quot;&gt;auth doctor&lt;/code&gt; and
cleaned by &lt;code dir=&quot;auto&quot;&gt;auth doctor --reset&lt;/code&gt;, but are &lt;strong&gt;never&lt;/strong&gt; auto-killed at startup.&lt;/p&gt;
&lt;p&gt;This is the more conservative choice: it ensures the startup fast-path only
kills daemons that are provably responsive and correctly self-identifying,
not merely ones whose argv happened to carry the right marker.&lt;/p&gt;
&lt;h3 id=&quot;d-5--operator_required-daemons-require-explicit---force-or-interactive-confirmation&quot;&gt;D-5 — &lt;code dir=&quot;auto&quot;&gt;operator_required&lt;/code&gt; daemons require explicit &lt;code dir=&quot;auto&quot;&gt;--force&lt;/code&gt; or interactive confirmation&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Decision moment &lt;code dir=&quot;auto&quot;&gt;01KWC36QG4ZH8J79J9G1Y06FCD&lt;/code&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;code dir=&quot;auto&quot;&gt;auth doctor --reset&lt;/code&gt; auto-cleans &lt;code dir=&quot;auto&quot;&gt;safe_auto&lt;/code&gt; daemons without confirmation.
For &lt;code dir=&quot;auto&quot;&gt;operator_required&lt;/code&gt; daemons (cross-root, pre-marker, wedged/ambiguous),
an explicit interactive &lt;code dir=&quot;auto&quot;&gt;y/N&lt;/code&gt; prompt or the &lt;code dir=&quot;auto&quot;&gt;--force&lt;/code&gt; flag (for
non-interactive / &lt;code dir=&quot;auto&quot;&gt;--json&lt;/code&gt; callers) is required before any signal is sent.
This guards against the reaper-over-kill failure mode — killing a legitimately
separate daemon that shares a port range but belongs to a different &lt;code dir=&quot;auto&quot;&gt;$HOME&lt;/code&gt; or
state root.&lt;/p&gt;
&lt;h3 id=&quot;d-6--1071-same-home-singleton-leak-is-live-reconfirmed-by-automated-test&quot;&gt;D-6 — #1071 same-&lt;code dir=&quot;auto&quot;&gt;$HOME&lt;/code&gt; singleton leak is live-reconfirmed by automated test&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;Decision moment &lt;code dir=&quot;auto&quot;&gt;01KWC36SFC7XVDVA9QQTN1NAK8&lt;/code&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;The same-&lt;code dir=&quot;auto&quot;&gt;$HOME&lt;/code&gt; singleton leak documented in issue #1071 (multiple
same-scope daemons accumulating under one &lt;code dir=&quot;auto&quot;&gt;$HOME&lt;/code&gt;/runtime root) is
live-reconfirmed via an automated regression test in the live-subprocess
harness (&lt;code dir=&quot;auto&quot;&gt;tests/sync/test_issue_1071_singleton_reconfirmation.py&lt;/code&gt;) before
the issue is closed. Manual reconfirmation plus documentation alone is
insufficient — the test provides durable, machine-checked evidence that the
new scope-marker authority resolves the leak.&lt;/p&gt;
&lt;h2 id=&quot;consequences&quot;&gt;Consequences&lt;/h2&gt;
&lt;h3 id=&quot;positive&quot;&gt;Positive&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;18-orphan leak fixed by construction.&lt;/strong&gt; The daemon-root scope marker as
primary authority removes the executable-identity skip gate that caused
stale daemons to accumulate across upgrades. Same-scope stale daemons from
any prior version are now auto-reaped at startup (FR-007, FR-008).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Deterministic kill boundary.&lt;/strong&gt; The &lt;code dir=&quot;auto&quot;&gt;cleanup_class&lt;/code&gt; verdict is computed
from stable cmdline data, not from self-reported health payloads. The
boundary is the same on every host and does not depend on &lt;code dir=&quot;auto&quot;&gt;owner.json&lt;/code&gt;
being present or accurate.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;No silent kills.&lt;/strong&gt; &lt;code dir=&quot;auto&quot;&gt;operator_required&lt;/code&gt; candidates are always surfaced
with &lt;code dir=&quot;auto&quot;&gt;skip_reason&lt;/code&gt; and a one-step remediation command (&lt;code dir=&quot;auto&quot;&gt;auth doctor --reset --force&lt;/code&gt;). Third-party listeners are never touched.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Auditable classification.&lt;/strong&gt; &lt;code dir=&quot;auto&quot;&gt;auth doctor --json&lt;/code&gt; exposes the full
identity record and &lt;code dir=&quot;auto&quot;&gt;cleanup_class&lt;/code&gt; for every in-range candidate, enabling
scripted and CI-driven inspection.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Durable regression proof.&lt;/strong&gt; &lt;code dir=&quot;auto&quot;&gt;test_issue_1071_singleton_reconfirmation.py&lt;/code&gt;
proves no singleton leak remains under the new authority.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;negative&quot;&gt;Negative&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Pre-marker daemons (spawned before this mission shipped) require operator
action.&lt;/strong&gt; A daemon started before the &lt;code dir=&quot;auto&quot;&gt;--spec-kitty-daemon-root=&lt;/code&gt; marker
was introduced has no scope marker in its cmdline, making positive
attribution impossible. It is surfaced as &lt;code dir=&quot;auto&quot;&gt;operator_required/pre_marker&lt;/code&gt;
and cleaned by &lt;code dir=&quot;auto&quot;&gt;auth doctor --reset --force&lt;/code&gt; — not automatically. This is a
one-time migration cost for existing installations; daemons spawned after
this mission lands always carry the marker.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Wedged daemons require the operator path.&lt;/strong&gt; A process that hangs before
responding to &lt;code dir=&quot;auto&quot;&gt;/api/health&lt;/code&gt; cannot prove its own identity, so it is not
auto-cleaned. The operator must run &lt;code dir=&quot;auto&quot;&gt;auth doctor --reset&lt;/code&gt; (or &lt;code dir=&quot;auto&quot;&gt;--force&lt;/code&gt;) to
clear them.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;neutral&quot;&gt;Neutral&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;code dir=&quot;auto&quot;&gt;owner.json&lt;/code&gt; (&lt;code dir=&quot;auto&quot;&gt;owner_present&lt;/code&gt;) field remains in the identity record for
diagnostics and reporting; it does not affect the kill decision.&lt;/li&gt;
&lt;li&gt;The &lt;code dir=&quot;auto&quot;&gt;daemon_family&lt;/code&gt; field was added to the &lt;code dir=&quot;auto&quot;&gt;/api/health&lt;/code&gt; payload in WP04;
absence of the field is tolerated (defaulted to &lt;code dir=&quot;auto&quot;&gt;&quot;sync&quot;&lt;/code&gt; for in-range
spawn-shaped daemons) for backward compatibility with pre-WP04 daemons.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;confirmation&quot;&gt;Confirmation&lt;/h2&gt;
&lt;p&gt;This decision is confirmed when:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code dir=&quot;auto&quot;&gt;auth doctor --json&lt;/code&gt; reports &lt;code dir=&quot;auto&quot;&gt;cleanup_class&lt;/code&gt; and &lt;code dir=&quot;auto&quot;&gt;skip_reason&lt;/code&gt; for every
in-range candidate.&lt;/li&gt;
&lt;li&gt;Startup auto-clean removes all &lt;code dir=&quot;auto&quot;&gt;safe_auto&lt;/code&gt; same-scope stale-version
daemons and does not spawn an additional process (AS-1 / FR-006/007/008).&lt;/li&gt;
&lt;li&gt;&lt;code dir=&quot;auto&quot;&gt;auth doctor --reset&lt;/code&gt; sweeps &lt;code dir=&quot;auto&quot;&gt;safe_auto&lt;/code&gt;; &lt;code dir=&quot;auto&quot;&gt;--force&lt;/code&gt; additionally sweeps
&lt;code dir=&quot;auto&quot;&gt;operator_required&lt;/code&gt;. &lt;code dir=&quot;auto&quot;&gt;never_touch&lt;/code&gt; candidates are untouched in all paths.&lt;/li&gt;
&lt;li&gt;&lt;code dir=&quot;auto&quot;&gt;tests/sync/test_issue_1071_singleton_reconfirmation.py&lt;/code&gt; is green (no
singleton leak under the same-&lt;code dir=&quot;auto&quot;&gt;$HOME&lt;/code&gt; scenario).&lt;/li&gt;
&lt;li&gt;The boundary regression matrix (dashboard ↔ sync port isolation) remains
clean under all four cleanup entrypoints.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&quot;more-information&quot;&gt;More Information&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Mission spec / research / plan:&lt;/strong&gt;
&lt;a href=&quot;../../../kitty-specs/sync-daemon-orphan-cleanup-01KWC2A3/&quot;&gt;&lt;code dir=&quot;auto&quot;&gt;kitty-specs/sync-daemon-orphan-cleanup-01KWC2A3/&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Decision moments:&lt;/strong&gt;
&lt;a href=&quot;../../../kitty-specs/sync-daemon-orphan-cleanup-01KWC2A3/decisions/DM-01KWC36NQBY670Q52B7C4SX2KH.md&quot;&gt;&lt;code dir=&quot;auto&quot;&gt;decisions/DM-01KWC36NQBY670Q52B7C4SX2KH.md&lt;/code&gt;&lt;/a&gt; (wedged-listener classification),
&lt;a href=&quot;../../../kitty-specs/sync-daemon-orphan-cleanup-01KWC2A3/decisions/DM-01KWC36QG4ZH8J79J9G1Y06FCD.md&quot;&gt;&lt;code dir=&quot;auto&quot;&gt;decisions/DM-01KWC36QG4ZH8J79J9G1Y06FCD.md&lt;/code&gt;&lt;/a&gt; (&lt;code dir=&quot;auto&quot;&gt;operator_required&lt;/code&gt; confirmation flow),
&lt;a href=&quot;../../../kitty-specs/sync-daemon-orphan-cleanup-01KWC2A3/decisions/DM-01KWC36SFC7XVDVA9QQTN1NAK8.md&quot;&gt;&lt;code dir=&quot;auto&quot;&gt;decisions/DM-01KWC36SFC7XVDVA9QQTN1NAK8.md&lt;/code&gt;&lt;/a&gt; (#1071 reconfirmation method)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Key implementation surfaces:&lt;/strong&gt;
&lt;code dir=&quot;auto&quot;&gt;src/specify_cli/sync/classification.py&lt;/code&gt; (classifier + &lt;code dir=&quot;auto&quot;&gt;DaemonIdentityRecord&lt;/code&gt;),
&lt;code dir=&quot;auto&quot;&gt;src/specify_cli/sync/owner.py&lt;/code&gt; (&lt;code dir=&quot;auto&quot;&gt;reap_orphan_daemons&lt;/code&gt;, &lt;code dir=&quot;auto&quot;&gt;ReapResult&lt;/code&gt;),
&lt;code dir=&quot;auto&quot;&gt;src/specify_cli/sync/orphan_sweep.py&lt;/code&gt; (&lt;code dir=&quot;auto&quot;&gt;enumerate_identity_records&lt;/code&gt;, &lt;code dir=&quot;auto&quot;&gt;reset_orphans&lt;/code&gt;),
&lt;code dir=&quot;auto&quot;&gt;src/specify_cli/sync/daemon.py&lt;/code&gt; (&lt;code dir=&quot;auto&quot;&gt;DAEMON_SCOPE_ARG_PREFIX&lt;/code&gt;, &lt;code dir=&quot;auto&quot;&gt;_daemon_scope_root&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Operator runbook:&lt;/strong&gt;
&lt;a href=&quot;../../operations/sync-daemon-orphan-cleanup.md&quot;&gt;&lt;code dir=&quot;auto&quot;&gt;docs/operations/sync-daemon-orphan-cleanup.md&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Regression test:&lt;/strong&gt; &lt;code dir=&quot;auto&quot;&gt;tests/sync/test_issue_1071_singleton_reconfirmation.py&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Related issues:&lt;/strong&gt;
&lt;a href=&quot;https://github.com/Priivacy-ai/spec-kitty/issues/2261&quot;&gt;#2261&lt;/a&gt; (primary: 18-orphan report),
&lt;a href=&quot;https://github.com/Priivacy-ai/spec-kitty/issues/1071&quot;&gt;#1071&lt;/a&gt; (same-&lt;code dir=&quot;auto&quot;&gt;$HOME&lt;/code&gt; singleton leak)&lt;/li&gt;
&lt;/ul&gt;</content>
</entry>
