Skip to content

Fix 3 critical validation issues#2

Merged
DarlingtonDeveloper merged 1 commit into
mainfrom
fix/validation-criticals
Feb 14, 2026
Merged

Fix 3 critical validation issues#2
DarlingtonDeveloper merged 1 commit into
mainfrom
fix/validation-criticals

Conversation

@DarlingtonDeveloper
Copy link
Copy Markdown
Contributor

Summary

  • Add CC_SIDECAR_NATS_TOKEN env var override in both pre-config and post-config env blocks; add EnvironmentFile=-/etc/cc-sidecar/env to systemd unit
  • Move parseTranscript() and onComplete() outside tracker.mu lock — collect ready paths under the lock, then process outside it to prevent blocking Touch() during NATS publish/KV lookup
  • Detect failed sessions heuristically (no assistant messages in transcript → ExitCode: 1) and route to PublishFailed() so Warren receives both completed and failed events

Test plan

  • go build ./... passes
  • go test ./... passes (new exit code detection tests added)
  • Deploy with CC_SIDECAR_NATS_TOKEN set via /etc/cc-sidecar/env and verify NATS auth
  • Observe a completed CC session and verify swarm.cc.session.completed is published
  • Kill a CC session early and verify swarm.cc.session.failed is published

🤖 Generated with Claude Code

- Add CC_SIDECAR_NATS_TOKEN env var support and EnvironmentFile
  directive in systemd unit
- Move parseTranscript and onComplete callback outside tracker mutex
  to prevent blocking during network I/O
- Detect failed sessions (no assistant messages = exit code 1) and
  route to PublishFailed

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@DarlingtonDeveloper DarlingtonDeveloper merged commit 4534471 into main Feb 14, 2026
1 check passed
@DarlingtonDeveloper DarlingtonDeveloper deleted the fix/validation-criticals branch February 14, 2026 21:31
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