Skip to content

Test#1223

Closed
SmelhausJosef wants to merge 7 commits intocoleam00:devfrom
SmelhausJosef:dev
Closed

Test#1223
SmelhausJosef wants to merge 7 commits intocoleam00:devfrom
SmelhausJosef:dev

Conversation

@SmelhausJosef
Copy link
Copy Markdown

@SmelhausJosef SmelhausJosef commented Apr 14, 2026

Summary

Describe this PR in 2-5 bullets:

  • Problem:
  • Why it matters:
  • What changed:
  • What did not change (scope boundary):

UX Journey

Before

(Draw the user-facing flow BEFORE this PR. Show each step the user takes.)

Example:
  User                   Archon                   AI Client
  ────                   ──────                   ─────────
  sends message ──────▶  resolves session
                         loads context
                         streams to AI ──────────▶ processes prompt
                         receives chunks ◀──────── streams response
  sees reply ◀─────────  sends to platform

After

(Draw the user-facing flow AFTER this PR. Highlight what changed with [brackets] or asterisks.)

Architecture Diagram

Before

(Map ALL modules touched or connected to this change. Draw lines between them.)

After

(Same diagram with changes highlighted. Mark new modules with [+], removed with [-],
 modified with [~]. Mark new connections with ===, removed with --x--.)

Connection inventory (list every module-to-module edge, mark changes):

From To Status Notes
unchanged / new / removed / modified

Label Snapshot

  • Risk: risk: low|medium|high
  • Size: size: XS|S|M|L|XL
  • Scope: core|workflows|isolation|git|adapters|server|web|cli|paths|config|docs|dependencies|ci|tests|skills
  • Module: <scope>:<component> (e.g. workflows:executor, adapters:slack, core:orchestrator)

Change Metadata

  • Change type: bug|feature|refactor|docs|security|chore
  • Primary scope: core|workflows|isolation|git|adapters|server|web|cli|paths|multi

Linked Issue

  • Closes #
  • Related #
  • Depends on # (if stacked)
  • Supersedes # (if replacing older PR)

Validation Evidence (required)

Commands and result summary:

bun run type-check
bun run lint
bun run format:check
bun run test
# Or all at once:
bun run validate
  • Evidence provided (test/log/trace/screenshot):
  • If any command is intentionally skipped, explain why:

Security Impact (required)

  • New permissions/capabilities? (Yes/No)
  • New external network calls? (Yes/No)
  • Secrets/tokens handling changed? (Yes/No)
  • File system access scope changed? (Yes/No)
  • If any Yes, describe risk and mitigation:

Compatibility / Migration

  • Backward compatible? (Yes/No)
  • Config/env changes? (Yes/No)
  • Database migration needed? (Yes/No)
  • If yes, exact upgrade steps:

Human Verification (required)

What was personally validated beyond CI:

  • Verified scenarios:
  • Edge cases checked:
  • What was not verified:

Side Effects / Blast Radius (required)

  • Affected subsystems/workflows:
  • Potential unintended effects:
  • Guardrails/monitoring for early detection:

Rollback Plan (required)

  • Fast rollback command/path:
  • Feature flags or config toggles (if any):
  • Observable failure symptoms:

Risks and Mitigations

List real risks in this PR (or write None).

  • Risk:
    • Mitigation:

Summary by CodeRabbit

Release Notes

  • New Features

    • Added webhook rules system allowing custom URL slug-based workflow dispatch without platform-specific mentions
    • Pull request/merge request opened events now carry descriptions as context for workflows
    • PostgreSQL is now the default database in Docker (SQLite remains default outside Docker)
  • Improvements

    • Refined webhook event handling to tighter mention-gating logic for platform adapters
    • Updated Codex assistant model reference to gpt-5.4
  • Documentation

    • Updated deployment guides to reflect new webhook rules functionality and PostgreSQL defaults
    • Clarified database setup instructions for Docker and local development

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 14, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: abae888f-7636-4c15-a385-0ffdfbcd5f36

📥 Commits

Reviewing files that changed from the base of the PR and between 73d9240 and a223ee8.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (60)
  • .archon/workflows/defaults/archon-workflow-builder.yaml
  • .codex/config.toml
  • .env.example
  • AGENTS.md
  • CLAUDE.md
  • deploy/.env.example
  • deploy/docker-compose.override.example.yml
  • docker-compose.yml
  • migrations/000_combined.sql
  • migrations/022_webhook_rules.sql
  • packages/adapters/src/community/forge/gitea/adapter.ts
  • packages/adapters/src/community/forge/gitlab/adapter.ts
  • packages/adapters/src/forge/github/adapter.ts
  • packages/adapters/src/forge/github/context.test.ts
  • packages/core/package.json
  • packages/core/src/clients/codex.test.ts
  • packages/core/src/clients/codex.ts
  • packages/core/src/config/config-loader.test.ts
  • packages/core/src/config/config-loader.ts
  • packages/core/src/db/adapters/sqlite.ts
  • packages/core/src/db/webhook-rules.test.ts
  • packages/core/src/db/webhook-rules.ts
  • packages/core/src/index.ts
  • packages/core/src/orchestrator/orchestrator-agent.ts
  • packages/core/src/webhooks/rules-engine.ts
  • packages/core/src/webhooks/types.ts
  • packages/docs-web/src/content/docs/adapters/community/gitea.md
  • packages/docs-web/src/content/docs/adapters/community/gitlab.md
  • packages/docs-web/src/content/docs/adapters/github.md
  • packages/docs-web/src/content/docs/deployment/docker.md
  • packages/docs-web/src/content/docs/deployment/index.md
  • packages/docs-web/src/content/docs/deployment/local.md
  • packages/docs-web/src/content/docs/getting-started/ai-assistants.md
  • packages/docs-web/src/content/docs/getting-started/configuration.md
  • packages/docs-web/src/content/docs/guides/authoring-workflows.md
  • packages/docs-web/src/content/docs/reference/configuration.md
  • packages/docs-web/src/content/docs/reference/database.md
  • packages/server/package.json
  • packages/server/src/routes/api.codebases.test.ts
  • packages/server/src/routes/api.conversations.test.ts
  • packages/server/src/routes/api.health.test.ts
  • packages/server/src/routes/api.messages.test.ts
  • packages/server/src/routes/api.ts
  • packages/server/src/routes/api.webhook-rules.test.ts
  • packages/server/src/routes/api.workflow-runs.test.ts
  • packages/server/src/routes/api.workflows.test.ts
  • packages/server/src/routes/schemas/webhook-rule.schemas.ts
  • packages/web/src/App.tsx
  • packages/web/src/components/layout/TopNav.tsx
  • packages/web/src/lib/api.generated.d.ts
  • packages/web/src/lib/api.ts
  • packages/web/src/routes/SettingsPage.tsx
  • packages/web/src/routes/WebhooksPage.tsx
  • packages/web/vite.config.ts
  • packages/workflows/src/dag-executor.ts
  • packages/workflows/src/executor-preamble.test.ts
  • packages/workflows/src/executor-shared.test.ts
  • packages/workflows/src/executor-shared.ts
  • packages/workflows/src/executor.test.ts
  • packages/workflows/src/executor.ts

📝 Walkthrough

Walkthrough

This PR introduces webhook rule infrastructure enabling push-based workflow dispatch via HTTP, updates the default Codex model from gpt-5.3-codex to gpt-5.4, enforces kebab-case naming for generated workflows, threads a canonical repository path through workflow execution, updates Docker Compose to use PostgreSQL by default, and refines git adapter webhook handling to gate processing on direct mentions only.

Changes

Cohort / File(s) Summary
Webhook Rules Database Layer
migrations/000_combined.sql, migrations/022_webhook_rules.sql, packages/core/src/db/adapters/sqlite.ts
Added remote_agent_webhook_rules table with path_slug, workflow_name, enabled fields and indexes; implemented SQLite schema migration with legacy column cleanup and deterministic path_slug backfill logic.
Webhook Rules Core Module
packages/core/src/db/webhook-rules.ts, packages/core/src/db/webhook-rules.test.ts, packages/core/src/webhooks/types.ts, packages/core/src/webhooks/rules-engine.ts
Implemented CRUD operations for webhook rules, added WebhookRule and WebhookRuleWithCodebaseName types, introduced dispatchMatchedWebhookRule and related payload-normalization utilities for webhook dispatch orchestration.
Webhook Rules API Endpoints
packages/server/src/routes/api.ts, packages/server/src/routes/api.webhook-rules.test.ts, packages/server/src/routes/schemas/webhook-rule.schemas.ts
Added REST endpoints for listing/creating/updating/deleting webhook rules under /api/webhook-rules, plus a non-OpenAPI POST /webhooks/:slug dispatcher; included comprehensive Zod + OpenAPI schemas for webhook rule requests/responses.
Webhook Rules Web UI
packages/web/src/routes/WebhooksPage.tsx, packages/web/src/App.tsx, packages/web/src/components/layout/TopNav.tsx, packages/web/src/lib/api.ts, packages/web/src/lib/api.generated.d.ts
Added new /webhooks route with WebhooksPage component for managing webhook rules (create/edit/delete/toggle); added navigation entry and API client functions for webhook rule operations.
Git Adapter Webhook Handling
packages/adapters/src/forge/github/adapter.ts, packages/adapters/src/community/forge/gitea/adapter.ts, packages/adapters/src/community/forge/gitlab/adapter.ts, packages/adapters/src/forge/github/context.test.ts
Extended PR/MR-opened event parsing to carry descriptions as context; refactored mention detection to gate message processing only when eventType === 'issue_comment' or 'note', preventing unwanted automation on raw PR descriptions.
Workflow Naming and Resolution
.archon/workflows/defaults/archon-workflow-builder.yaml
Added resolve-workflow-name bash node to extract and validate kebab-case workflow names from generated YAML; updated save-or-report to use resolved name as canonical source with mismatches triggering workflow failure.
Workflow Execution Canonical Path
packages/workflows/src/dag-executor.ts, packages/workflows/src/executor.ts, packages/workflows/src/executor-shared.ts, packages/workflows/src/executor.test.ts, packages/workflows/src/executor-preamble.test.ts, packages/workflows/src/executor-shared.test.ts
Threaded canonicalRepoPath parameter through DAG execution and variable substitution; added support for $CANONICAL_REPO_PATH workflow placeholder with auto-detection via getCanonicalRepoPath().
Codex Model Version Updates
CLAUDE.md, packages/core/src/config/config-loader.ts, packages/core/src/clients/codex.ts, packages/core/src/clients/codex.test.ts, packages/core/src/config/config-loader.test.ts, packages/docs-web/src/content/docs/getting-started/*, packages/docs-web/src/content/docs/guides/authoring-workflows.md, packages/docs-web/src/content/docs/reference/configuration.md, packages/web/src/routes/SettingsPage.tsx
Updated default Codex model from gpt-5.3-codex to gpt-5.4; added model fallback mappings for gpt-5.4 → gpt-5.3-codex and gpt-5.4-mini → gpt-5.4; extended error classification to treat "not supported" messages as model access errors.
Docker and Database Configuration
docker-compose.yml, deploy/docker-compose.override.example.yml, deploy/.env.example, .env.example, .codex/config.toml
Removed with-db profile requirement for PostgreSQL (now default); updated app service to expose only internal port with configurable PORT/DATABASE_URL; added postgres service (17-alpine downgraded to 16-alpine in root compose) with health checks; added POSTGRES_DB/POSTGRES_USER/POSTGRES_PASSWORD env defaults; enabled CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS environment policy.
Deployment and Documentation
packages/docs-web/src/content/docs/deployment/*, AGENTS.md, packages/core/package.json, packages/server/package.json
Updated deployment guides to reflect PostgreSQL-by-default Docker setup without --profile with-db; added comprehensive AGENTS.md handbook documenting architecture, constraints, DSL conventions; updated test scripts to include new webhook-rules test files.
Test Mocks and Setup
packages/server/src/routes/api.*.test.ts
Extended test suite mocks across all API route files to include dispatchMatchedWebhookRule and full @archon/core/db/webhook-rules module stubs for test isolation.
Vite Configuration
packages/web/vite.config.ts
Updated API port resolution to prioritize VITE_API_PORT, then ARCHON_API_PORT, then PORT before defaulting to '3090'.

Sequence Diagram(s)

sequenceDiagram
    participant Client as HTTP Client
    participant Server as API Server
    participant DB as Database
    participant Orch as Orchestrator
    participant Git as Git Adapter
    
    Client->>Server: POST /webhooks/:slug
    activate Server
    Server->>DB: findWebhookRuleBySlug(slug)
    activate DB
    DB-->>Server: WebhookRule
    deactivate DB
    
    Server->>DB: getCodebase(codebase_id)
    activate DB
    DB-->>Server: Codebase
    deactivate DB
    
    Server->>Orch: dispatchNamedWorkflow(workflowName, ...)
    activate Orch
    Orch->>Orch: Discover & load workflow definition
    Orch->>Orch: Execute DAG with webhook payload
    Orch-->>Server: (void)
    deactivate Orch
    
    Server-->>Client: 202 Accepted
    deactivate Server
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Suggested reviewers

  • leex279

Poem

🐰 Webhooks and paths now align in grace,
Rules route workflows to the right place,
Codex models evolve (5.4 shines bright!),
Postgres by default—a sensible sight. ✨🚀

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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