Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ name: CI — Quality Gates

on:
push:
branches: [main, develop]
branches: [main, develop, "phalanx/ci-fix/**"]
pull_request:
branches: [main, develop]
branches: [main, develop, ci-fixer-e2e-test]
workflow_dispatch:

# Cancel in-progress runs on new push to same branch
Expand Down
34 changes: 34 additions & 0 deletions alembic/versions/20260415_0001_ci_fix_context.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
"""ci_fix_run: add pipeline_context_json for multi-agent shared state

Revision ID: 20260415_0001
Revises: 20260412_0005
Create Date: 2026-04-15
"""

from __future__ import annotations

import sqlalchemy as sa
from alembic import op

revision = "20260415_0001"
down_revision = "20260412_0005"
branch_labels = None
depends_on = None


def upgrade() -> None:
# Add pipeline_context_json — stores the full CIFixContext as a JSON blob.
# NULL for runs created before this migration; populated by new pipeline runs.
op.add_column(
"ci_fix_runs",
sa.Column(
"pipeline_context_json",
sa.Text(),
nullable=True,
comment="CIFixContext serialized as JSON — full multi-agent pipeline state",
),
)


def downgrade() -> None:
op.drop_column("ci_fix_runs", "pipeline_context_json")
16 changes: 16 additions & 0 deletions docker/sandbox/go/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM golang:1.22-alpine

# Install staticcheck and golangci-lint for broader Go lint coverage
RUN go install honnef.co/go/tools/cmd/staticcheck@2024.1.0 && \
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.59.1

# Create non-root user
RUN adduser -D -u 1000 phalanx

COPY ../reset.sh /phalanx/reset.sh
RUN chmod +x /phalanx/reset.sh

RUN mkdir -p /workspace && chown phalanx:phalanx /workspace

WORKDIR /workspace
USER phalanx
19 changes: 19 additions & 0 deletions docker/sandbox/node/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM node:20-slim

# Create non-root user
RUN useradd -m -u 1000 -s /bin/bash phalanx 2>/dev/null || true

# Install common Node tooling used by the CI fixer.
RUN npm install -g \
eslint@8.57.0 \
typescript@5.4.5 \
jest@29.7.0 \
--no-fund --no-audit

COPY ../reset.sh /phalanx/reset.sh
RUN chmod +x /phalanx/reset.sh

RUN mkdir -p /workspace && chown phalanx:phalanx /workspace

WORKDIR /workspace
USER phalanx
24 changes: 24 additions & 0 deletions docker/sandbox/python/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM python:3.12-slim

# Create non-root user
RUN useradd -m -u 1000 -s /bin/bash phalanx

# Install pinned tool versions used by the CI fixer.
# Versions are chosen to match the most common customer constraints.
# When VersionParityAgent detects a mismatch, it installs the customer's
# pinned version inside the running container before executing.
RUN pip install --no-cache-dir \
ruff==0.4.4 \
mypy==1.10.0 \
pytest==8.2.0 \
pytest-asyncio==0.23.7

# Copy reset script
COPY ../reset.sh /phalanx/reset.sh
RUN chmod +x /phalanx/reset.sh

# Workspace dir — populated via docker cp by SandboxProvisioner
RUN mkdir -p /workspace && chown phalanx:phalanx /workspace

WORKDIR /workspace
USER phalanx
7 changes: 7 additions & 0 deletions docker/sandbox/reset.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
# Shared reset script — clears workspace and caches between fix runs.
# Runs inside the container via: docker exec {id} sh /phalanx/reset.sh
set -e
rm -rf /workspace/* 2>/dev/null || true
rm -rf /tmp/pip-* /tmp/npm-* /tmp/.cache /root/.cache 2>/dev/null || true
echo "done"
15 changes: 15 additions & 0 deletions docker/sandbox/rust/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM rust:1.77-slim

# Install clippy and rustfmt (included in toolchain but ensure available)
RUN rustup component add clippy rustfmt

# Create non-root user
RUN useradd -m -u 1000 -s /bin/bash phalanx

COPY ../reset.sh /phalanx/reset.sh
RUN chmod +x /phalanx/reset.sh

RUN mkdir -p /workspace && chown phalanx:phalanx /workspace

WORKDIR /workspace
USER phalanx
Loading
Loading