Skip to content

fix(sdk): fix read_file pagination skipping lines after wrapping #5356

fix(sdk): fix read_file pagination skipping lines after wrapping

fix(sdk): fix read_file pagination skipping lines after wrapping #5356

Workflow file for this run

# Main CI workflow for Deep Agents monorepo
#
# Runs on every pull request:
# - Linting for changed packages
# - Unit Tests for changed packages
#
# Only packages with changes are tested. SDK changes also trigger CLI tests.
# Pushes to main and workflow changes run full CI.
name: "🔧 CI"
on:
push:
branches: [main]
pull_request:
merge_group:
# Cancel redundant workflow runs
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
# Required for CodSpeed OIDC authentication in _benchmark.yml
id-token: write
env:
UV_NO_SYNC: "true"
jobs:
# Detect which packages have changes
changes:
name: "🔍 Detect Changes"
runs-on: ubuntu-latest
outputs:
deepagents: ${{ steps.filter.outputs.deepagents }}
cli: ${{ steps.filter.outputs.cli }}
evals: ${{ steps.filter.outputs.evals }}
daytona: ${{ steps.filter.outputs.daytona }}
modal: ${{ steps.filter.outputs.modal }}
runloop: ${{ steps.filter.outputs.runloop }}
quickjs: ${{ steps.filter.outputs.quickjs }}
steps:
- name: "📋 Checkout Code"
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: "🔍 Check for changes"
uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4
id: filter
with:
# Each package filter includes workflow/action paths so that CI
# infrastructure changes are validated against all packages.
#
# NOTE: Do NOT add negation patterns (e.g. '!libs/foo/**/*.md')
# here. dorny/paths-filter evaluates patterns with OR logic, so a
# negation like '!libs/deepagents/**/*.md' becomes "match anything
# NOT in that glob" — causing unrelated files (e.g. .github/
# templates) to match every filter and trigger full CI.
# See: https://github.com/dorny/paths-filter/issues/97
filters: |
deepagents:
- 'libs/deepagents/**'
- '.github/workflows/ci.yml'
- '.github/workflows/_lint.yml'
- '.github/workflows/_test.yml'
- '.github/actions/**'
cli:
- 'libs/cli/**'
- 'libs/deepagents/**'
- '.github/workflows/ci.yml'
- '.github/workflows/_lint.yml'
- '.github/workflows/_test.yml'
- '.github/workflows/_benchmark.yml'
- '.github/actions/**'
evals:
- 'libs/evals/**'
- '.github/workflows/ci.yml'
- '.github/workflows/_lint.yml'
- '.github/workflows/_test.yml'
- '.github/actions/**'
daytona:
- 'libs/partners/daytona/**'
- '.github/workflows/ci.yml'
- '.github/workflows/_lint.yml'
- '.github/workflows/_test.yml'
- '.github/actions/**'
modal:
- 'libs/partners/modal/**'
- '.github/workflows/ci.yml'
- '.github/workflows/_lint.yml'
- '.github/workflows/_test.yml'
- '.github/actions/**'
runloop:
- 'libs/partners/runloop/**'
- '.github/workflows/ci.yml'
- '.github/workflows/_lint.yml'
- '.github/workflows/_test.yml'
- '.github/actions/**'
quickjs:
- 'libs/partners/quickjs/**'
- '.github/workflows/ci.yml'
- '.github/workflows/_lint.yml'
- '.github/workflows/_test.yml'
- '.github/actions/**'
# Run linting on changed packages
lint-deepagents:
name: "🧹 Lint deepagents"
needs: changes
if: needs.changes.outputs.deepagents == 'true' || github.event_name == 'push'
uses: ./.github/workflows/_lint.yml
with:
working-directory: "libs/deepagents"
python-version: "3.11"
lint-cli:
name: "🧹 Lint cli"
needs: changes
if: needs.changes.outputs.cli == 'true' || github.event_name == 'push'
uses: ./.github/workflows/_lint.yml
with:
working-directory: "libs/cli"
python-version: "3.11"
lint-evals:
name: "🧹 Lint evals"
needs: changes
if: needs.changes.outputs.evals == 'true' || github.event_name == 'push'
uses: ./.github/workflows/_lint.yml
with:
working-directory: "libs/evals"
python-version: "3.14"
lint-daytona:
name: "🧹 Lint daytona"
needs: changes
if: needs.changes.outputs.daytona == 'true' || github.event_name == 'push'
uses: ./.github/workflows/_lint.yml
with:
working-directory: "libs/partners/daytona"
python-version: "3.11"
lint-modal:
name: "🧹 Lint modal"
needs: changes
if: needs.changes.outputs.modal == 'true' || github.event_name == 'push'
uses: ./.github/workflows/_lint.yml
with:
working-directory: "libs/partners/modal"
python-version: "3.11"
lint-runloop:
name: "🧹 Lint runloop"
needs: changes
if: needs.changes.outputs.runloop == 'true' || github.event_name == 'push'
uses: ./.github/workflows/_lint.yml
with:
working-directory: "libs/partners/runloop"
python-version: "3.11"
lint-quickjs:
name: "🧹 Lint quickjs"
needs: changes
if: needs.changes.outputs.quickjs == 'true' || github.event_name == 'push'
uses: ./.github/workflows/_lint.yml
with:
working-directory: "libs/partners/quickjs"
python-version: "3.11"
# Run unit tests on changed packages
test-deepagents:
name: "🧪 Test deepagents"
needs: changes
if: needs.changes.outputs.deepagents == 'true' || github.event_name == 'push'
strategy:
matrix:
python-version: ["3.11", "3.12", "3.13", "3.14"]
fail-fast: false
uses: ./.github/workflows/_test.yml
with:
working-directory: "libs/deepagents"
python-version: ${{ matrix.python-version }}
coverage: ${{ matrix.python-version == '3.12' }}
test-cli:
name: "🧪 Test cli"
needs: changes
if: needs.changes.outputs.cli == 'true' || github.event_name == 'push'
strategy:
matrix:
python-version: ["3.11", "3.12", "3.13", "3.14"]
fail-fast: false
uses: ./.github/workflows/_test.yml
with:
working-directory: "libs/cli"
python-version: ${{ matrix.python-version }}
coverage: ${{ matrix.python-version == '3.12' }}
test-evals:
name: "🧪 Test evals"
needs: changes
if: needs.changes.outputs.evals == 'true' || github.event_name == 'push'
strategy:
matrix:
python-version: ["3.12", "3.13", "3.14"]
fail-fast: false
uses: ./.github/workflows/_test.yml
with:
working-directory: "libs/evals"
python-version: ${{ matrix.python-version }}
coverage: ${{ matrix.python-version == '3.12' }}
test-daytona:
name: "🧪 Test daytona"
needs: changes
if: needs.changes.outputs.daytona == 'true' || github.event_name == 'push'
strategy:
matrix:
python-version: ["3.11", "3.12", "3.13", "3.14"]
fail-fast: false
uses: ./.github/workflows/_test.yml
with:
working-directory: "libs/partners/daytona"
python-version: ${{ matrix.python-version }}
coverage: ${{ matrix.python-version == '3.12' }}
test-modal:
name: "🧪 Test modal"
needs: changes
if: needs.changes.outputs.modal == 'true' || github.event_name == 'push'
strategy:
matrix:
python-version: ["3.11", "3.12", "3.13", "3.14"]
fail-fast: false
uses: ./.github/workflows/_test.yml
with:
working-directory: "libs/partners/modal"
python-version: ${{ matrix.python-version }}
coverage: ${{ matrix.python-version == '3.12' }}
test-runloop:
name: "🧪 Test runloop"
needs: changes
if: needs.changes.outputs.runloop == 'true' || github.event_name == 'push'
strategy:
matrix:
python-version: ["3.11", "3.12", "3.13", "3.14"]
fail-fast: false
uses: ./.github/workflows/_test.yml
with:
working-directory: "libs/partners/runloop"
python-version: ${{ matrix.python-version }}
coverage: ${{ matrix.python-version == '3.12' }}
# Run CodSpeed benchmarks on SDK changes
benchmark-deepagents:
name: "⏱️ Benchmark deepagents"
needs: changes
if: needs.changes.outputs.deepagents == 'true' || github.event_name == 'push'
uses: ./.github/workflows/_benchmark.yml
with:
working-directory: "libs/deepagents"
secrets: inherit
# Run CodSpeed benchmarks on CLI changes
benchmark-cli:
name: "⏱️ Benchmark cli"
needs: changes
if: needs.changes.outputs.cli == 'true' || github.event_name == 'push'
uses: ./.github/workflows/_benchmark.yml
with:
working-directory: "libs/cli"
secrets: inherit
# Final status check - ensures all jobs passed
ci_success:
name: "✅ CI Success"
needs:
- changes
- lint-deepagents
- lint-cli
- lint-evals
- lint-daytona
- lint-modal
- lint-runloop
- lint-quickjs
- test-deepagents
- test-cli
- test-evals
- test-daytona
- test-modal
- test-runloop
- benchmark-deepagents
- benchmark-cli
if: always()
runs-on: ubuntu-latest
steps:
- name: "🎉 All Checks Passed"
run: |
# Get all job results (excluding 'changes' which always succeeds)
results='${{ toJSON(needs.*.result) }}'
echo "Job results: $results"
# Check for failures or cancellations
if echo "$results" | grep -qE '"failure"|"cancelled"'; then
echo "Some jobs failed or were cancelled"
exit 1
fi
echo "All required checks passed (skipped jobs are OK)"
exit 0