fix(issue-10,13): check every agy artifact for holders and purge orphaned leftovers
Round-3 review of f5a6575 (planner-reviewer-codex-01, R1/R2).
R1 - the adapter's in-use check handed only the conversation DB to lsof, so a
holder that keeps the presence lock (or a sidecar) open while naming the uuid
on no command line and in no session variable was invisible, and the held
lock was unlinked from under it. AgyAgentAdapter.conversation_in_use now
passes every path of the conversation (DB, -wal/-shm/-journal, brain,
annotation, presence lock).
R2 - both resolver stages required the DB, so once an interrupted or pre-#10
purge had removed it, the WAL/annotation/lock left behind were "no artifact"
(exit 5) forever. BaseAgentAdapter.has_artifacts (default: a uuid-bearing
artifact path that exists) replaces the resolver's path fallback, and agy's
override accepts any of its pieces.
Tests: a flock holder that names the uuid nowhere is refused and nothing is
removed; orphaned leftovers resolve to agy and are purged. VERSIONS.md
v4.4.3 items 1-2 and orc-onboard SKILL.md updated.
Refs #10 #13
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VCgu9Fa9iT7TbJUSzdq4Ff
This commit is contained in:
1 parent
f5a6575bf2
commit
fae70c13d9
6 files changed
+90
-9
No files matched your search
@@ -191,6 +191,14 @@ class BaseAgentAdapter:
|
||||
on-disk tree override this; the default has nothing to scan."""
|
||||
return []
|
||||
|
||||
def has_artifacts(self, uuid: str, ctx: DiscoveryContext) -> bool:
|
||||
"""Anything of this conversation is on disk (a purge target exists
|
||||
even when `verify_artifact` would not vouch for it). The default only
|
||||
trusts an artifact path that embeds the uuid - a shared store (one DB
|
||||
for every conversation) exists for any uuid and proves nothing."""
|
||||
path = self.artifact_path(uuid, ctx)
|
||||
return uuid in path and os.path.exists(path)
|
||||
|
||||
def conversation_in_use(self, uuid: str, ctx: DiscoveryContext) -> bool:
|
||||
"""True while a live process still references the conversation."""
|
||||
return conversation_in_use(uuid, [self.artifact_path(uuid, ctx)])
|
||||
|
||||
Reference in new issue
Block a user