fix(lr-9cfc): address PEACHES blocking findings B1/B2/B3#148
Merged
Conversation
B1 — remove registerClaim loop from attachAgentSession: pre-existing conversations are now display-only per task spec. Operator decides per-conversation; no auto-claim at session open to avoid recreating the stale-claim/zombie-blocking pattern fixed 2026-05-19. B2 — replace hardcoded X-Relay-Caller-Lead: "andy" with CLAGENTIC_OPERATOR_LEAD env var (falls back to empty string). Relay treats absent header as anonymous operator access — safe for UI-path sessions. No personal identifier in platform code (rule 11). B3 — wire onNewConversation call site via sidecar directory watcher (startSidecarWatcher). Fires onNewConversation when a new sidecar appears with agentName as participant. Watcher starts in attachAgentSession (relay-present path) and closes in detachAgentSession. Self-contained in relay-agent-claims.js; project-sessions.js unchanged. Nits also addressed: - Fix error message rendering "undefined: <msg>" when parsed.error is missing in relayPost (nit 5). - Export registerClaim/heartbeatClaim/releaseClaim for test use. - Add onNewConversation relay-absent no-op tests (nit 6). - Add fake Unix-socket relay server test covering register/heartbeat/ release HTTP paths (nit 7). - Update test header comment to match actual coverage.
…ar watcher startSidecarWatcher now takes a preExistingConvIds Set (snapshot of convs open at attach-time) and skips any sidecar event for a conv_id in that set. This prevents sidecar rewrites (new messages on existing convs) from triggering auto-claim — operator must explicitly claim pre-existing convs. Also fixes per-filename debounce (was a single shared closure var; concurrent events for different files could cancel each other) and removes os.homedir() fallback to hardcoded "/root" path. Regression test added: B4 scenario with a fake relay server, pre-existing sidecar rewrite, and a new conv sidecar — asserts pre-existing not claimed, new conv is claimed. Co-Authored-By: akuehner@users.noreply.github.com
|
This issue has been resolved in version 1.2.0-beta.2 (beta). To update, run: |
|
This issue has been resolved in version 1.2.0 (stable). To update, run: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes 3 blocking findings from PEACHES review of PR 147 (lr-9cfc). B1: Remove registerClaim loop from attachAgentSession — pre-existing conversations are display-only per task spec, not auto-claimed. B2: Replace hardcoded X-Relay-Caller-Lead header with CLAGENTIC_OPERATOR_LEAD env var. B3: Wire onNewConversation via startSidecarWatcher (fs.watch on sidecar dir, fires onNewConversation on new conv files). Also: fix relayPost error message undefined bug, add relay-absent and fake-server tests, export claim functions for tests. Task: lr-9cfc