Skip to content

fix(lr-9cfc): address PEACHES blocking findings B1/B2/B3#150

Closed
akuehner wants to merge 1 commit into
mainfrom
feat/lr-9cfc-ui-agent-claim-registration
Closed

fix(lr-9cfc): address PEACHES blocking findings B1/B2/B3#150
akuehner wants to merge 1 commit into
mainfrom
feat/lr-9cfc-ui-agent-claim-registration

Conversation

@akuehner
Copy link
Copy Markdown
Member

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: " 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.

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.
@akuehner
Copy link
Copy Markdown
Member Author

Superseded by #148 which merged first. Same B1/B2/B3 fixes — this branch conflicts with main post-merge.

@akuehner akuehner closed this May 19, 2026
@akuehner akuehner deleted the feat/lr-9cfc-ui-agent-claim-registration branch May 19, 2026 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant