fix: redis startup fails due to nologin shell#15
Merged
zbigniewsobiecki merged 1 commit intodevfrom Jan 2, 2026
Merged
Conversation
The redis user has /usr/sbin/nologin as its default shell, which prevents `su redis -c` from working. This was causing Redis to fail to start in production with "This account is currently not available." Fix by using `su -s /bin/sh` to explicitly specify a shell for the redis user when starting the service. Also updated agent environment documentation to reflect the correct startup command. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
zbigniewsobiecki
added a commit
that referenced
this pull request
Jan 2, 2026
* feat: add Redis configuration and startup for agents (#13) Add Redis support alongside PostgreSQL, enabling agents to use in-memory data storage for caching, queues, and session management. Changes: - Install redis-server and redis-tools in Docker image - Configure Redis with AOF persistence, 256MB memory limit, and LRU eviction - Add startRedis() function following the same pattern as startPostgres() - Integrate Redis startup into agent lifecycle (base.ts, review.ts) - Document Redis CLI commands and usage in agent prompts - Both PostgreSQL and Redis are critical: agents fail if either service doesn't start Redis configuration: - Port: 6379 (standard) - Bind: localhost only for security - Persistence: AOF with everysec fsync - Memory: 256MB with allkeys-lru eviction policy - Access: via redis-cli through Tmux gadget 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com> * fix: increase post-job grace period to allow debug agent webhooks The debug agent wasn't triggering because CASCADE was shutting down too quickly after uploading session logs. Trello webhooks for attachment uploads take a few seconds to arrive, but we were only waiting 5 seconds before shutting down the machine. Increased postJobGracePeriodMs from 5s to 45s to ensure: 1. Agent uploads session log attachment 2. Trello webhook is delivered while machine is still running 3. Debug agent trigger processes the webhook 4. Debug agent runs before shutdown This fixes the race condition where attachment webhooks arrived after the machine had already shut down. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * feat: add support for GitHub PR review submission webhooks Both pull_request_review (review submission) and pull_request_review_comment (review comments) now trigger the review agent for PRs with Trello card URLs. Changes: - Updated webhook queue to store event types alongside payloads - Added PRReviewSubmittedTrigger for review submissions (approve/request changes) - Fixed hardcoded event type in GitHub webhook dequeuing - Both review types now trigger the review agent when PR has Trello card URL Previously, only review comments triggered the agent. Now review submissions (when someone clicks 'Approve' or 'Request Changes') also trigger it. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * fix: move cards to IN REVIEW after PR creation from GitHub webhooks Adds automatic card movement logic to executeGitHubAgent that mirrors the existing behavior in Trello webhook handler. When implementation agent creates a PR, the card is now moved to the IN REVIEW list and a comment with the PR URL is added. This ensures consistent behavior regardless of whether the agent was triggered by a Trello webhook or a GitHub webhook. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * docs: add GitHub webhook integration documentation Adds comprehensive documentation for GitHub webhook setup: - GitHub webhook endpoint in API endpoints section - Detailed setup instructions with configuration steps - List of supported GitHub triggers and their behavior - Updated features list to include GitHub integration This complements the recent GitHub webhook improvements including PR review submission support and automatic card movement. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * fix: redis startup fails due to nologin shell (#15) The redis user has /usr/sbin/nologin as its default shell, which prevents `su redis -c` from working. This was causing Redis to fail to start in production with "This account is currently not available." Fix by using `su -s /bin/sh` to explicitly specify a shell for the redis user when starting the service. Also updated agent environment documentation to reflect the correct startup command. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
zbigniewsobiecki
added a commit
that referenced
this pull request
Jan 2, 2026
* feat: add Redis configuration and startup for agents (#13) Add Redis support alongside PostgreSQL, enabling agents to use in-memory data storage for caching, queues, and session management. Changes: - Install redis-server and redis-tools in Docker image - Configure Redis with AOF persistence, 256MB memory limit, and LRU eviction - Add startRedis() function following the same pattern as startPostgres() - Integrate Redis startup into agent lifecycle (base.ts, review.ts) - Document Redis CLI commands and usage in agent prompts - Both PostgreSQL and Redis are critical: agents fail if either service doesn't start Redis configuration: - Port: 6379 (standard) - Bind: localhost only for security - Persistence: AOF with everysec fsync - Memory: 256MB with allkeys-lru eviction policy - Access: via redis-cli through Tmux gadget 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com> * fix: increase post-job grace period to allow debug agent webhooks The debug agent wasn't triggering because CASCADE was shutting down too quickly after uploading session logs. Trello webhooks for attachment uploads take a few seconds to arrive, but we were only waiting 5 seconds before shutting down the machine. Increased postJobGracePeriodMs from 5s to 45s to ensure: 1. Agent uploads session log attachment 2. Trello webhook is delivered while machine is still running 3. Debug agent trigger processes the webhook 4. Debug agent runs before shutdown This fixes the race condition where attachment webhooks arrived after the machine had already shut down. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * feat: add support for GitHub PR review submission webhooks Both pull_request_review (review submission) and pull_request_review_comment (review comments) now trigger the review agent for PRs with Trello card URLs. Changes: - Updated webhook queue to store event types alongside payloads - Added PRReviewSubmittedTrigger for review submissions (approve/request changes) - Fixed hardcoded event type in GitHub webhook dequeuing - Both review types now trigger the review agent when PR has Trello card URL Previously, only review comments triggered the agent. Now review submissions (when someone clicks 'Approve' or 'Request Changes') also trigger it. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * fix: move cards to IN REVIEW after PR creation from GitHub webhooks Adds automatic card movement logic to executeGitHubAgent that mirrors the existing behavior in Trello webhook handler. When implementation agent creates a PR, the card is now moved to the IN REVIEW list and a comment with the PR URL is added. This ensures consistent behavior regardless of whether the agent was triggered by a Trello webhook or a GitHub webhook. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * docs: add GitHub webhook integration documentation Adds comprehensive documentation for GitHub webhook setup: - GitHub webhook endpoint in API endpoints section - Detailed setup instructions with configuration steps - List of supported GitHub triggers and their behavior - Updated features list to include GitHub integration This complements the recent GitHub webhook improvements including PR review submission support and automatic card movement. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * fix: redis startup fails due to nologin shell (#15) The redis user has /usr/sbin/nologin as its default shell, which prevents `su redis -c` from working. This was causing Redis to fail to start in production with "This account is currently not available." Fix by using `su -s /bin/sh` to explicitly specify a shell for the redis user when starting the service. Also updated agent environment documentation to reflect the correct startup command. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
zbigniewsobiecki
added a commit
that referenced
this pull request
Apr 15, 2026
Closes spec 005 by shipping the operator-facing half. The backend (previous commit) now has a UI driver that writes `projectId` into the Linear integration config. Wizard state: - `pm-wizard-state.ts` — `linearProjectId` + `linearProjects` fields, `SET_LINEAR_PROJECTS` + `SET_LINEAR_PROJECT_ID` actions, and a reset-on-team-change hook (a new team invalidates the project list). - `buildEditState()` hydrates `linearProjectId` from a saved config so reopening the wizard for an edited project pre-selects the scope. - `buildLinearIntegrationConfig(state)` — new pure save-payload builder. Keeps the save mutation thin and gives the payload shape a direct unit-test surface without a React runtime. Discovery hook: - `useLinearDiscovery()` — adds `linearProjectsMutation` mirroring the existing `linearDetailsMutation` pattern (byProject + raw-creds variants; fires after team selection and on editing-mount when a team is already stored). UI: - `LinearTeamStep` — renders a SearchableSelect for "Linear Project (optional)" under the Team selector, but only when a team is selected. Native placeholder `<option value="">` doubles as the clear control. Helper copy explicitly marks the field optional and names the fallback behavior. - `LinearWebhookInfoPanel` — adds a one-paragraph callout clarifying that project-scope filtering happens on CASCADE's side — Linear webhook config stays team-scoped and unchanged. Pre-empts the predictable support question. - Save payload now includes `projectId` exactly when the selector has a value; omitted when empty. Clearing persists as "no project scope". Docs: - `src/integrations/README.md` — Linear operator-setup paragraph now mentions the optional project scope and where it lives in the wizard. - `CHANGELOG.md` — single operator-facing Unreleased entry covering the whole feature. Tests: 21 new unit tests across pm-wizard-state (reducer + hydration + save-payload builder), linear-team-step (new SSR component tests covering render gating, options population, edit-mode pre-selection, clear behavior, helper copy), and linear-webhook-info-panel (regression + new callout copy). AC #15 of plan 3 (manual end-to-end smoke test with a live Linear workspace + webhook delivery) is an operator post-merge verification step — not executable in CI. Spec: docs/specs/005-linear-project-scope.md.done Plan: 005/3 (wizard-ui). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
9 tasks
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.
Critical Hotfix
Redis is failing to start in production with error: "This account is currently not available."
Root Cause
The
redisuser has/usr/sbin/nologinas its default shell, which preventssu redis -cfrom executing commands.Fix
Use
su -s /bin/sh redis -cto explicitly specify a shell when starting Redis as the redis user.Changes
-s /bin/shflagTesting
Impact
HIGH PRIORITY - This fix is critical as Redis startup failure prevents all agents from running in production.
🤖 Generated with Claude Code