Skip to content
Open
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
143 changes: 121 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,45 +10,100 @@ permissions:
contents: read

jobs:
# Fail-closed docs classifier (issue #188). Outputs docs_only=true only when
# every PR change is on the prose allowlist; any doubt, error, or non-PR
# event yields docs_only=false so the full checks below still run. The docs
# link validation runs once, here on Ubuntu, over all tracked Markdown on
# every PR (never on Windows/macOS); required jobs gate on this job's
# result instead of running the validator themselves. Required job names
# are unchanged, so branch protection is unaffected.
classify:
timeout-minutes: 5
runs-on: ubuntu-latest
outputs:
docs_only: ${{ steps.classify.outputs.docs_only }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 24
- name: Test the docs fast-path classifier
run: node --test scripts/ci-docs-fastpath.test.mjs
- id: classify
env:
PR_BASE_SHA: ${{ github.event.pull_request.base.sha }}
run: |
if [ "${{ github.event_name }}" = "pull_request" ]; then
python3 scripts/ci-docs-classify.py --base "$PR_BASE_SHA" --head HEAD
else
echo "docs_only=false" >> "$GITHUB_OUTPUT"
echo "reason=non-PR event runs full checks" >> "$GITHUB_OUTPUT"
echo "docs_only=false"
fi
- name: Validate all tracked Markdown links and anchors
run: python3 scripts/ci-docs-check.py --all

runtime:
timeout-minutes: 20
needs: [classify]
if: ${{ !cancelled() }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Fail closed when docs classification did not succeed
if: ${{ needs.classify.result != 'success' }}
run: |
echo "Docs fast-path classify job did not succeed (see the classify job log); failing closed."
exit 1
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7
if: needs.classify.outputs.docs_only != 'true'
with:
go-version: 1.27.x
cache: true
- run: go test ./...
- if: matrix.os == 'ubuntu-latest'
- if: needs.classify.outputs.docs_only != 'true'
run: go test ./...
- if: matrix.os == 'ubuntu-latest' && needs.classify.outputs.docs_only != 'true'
run: go test -race -count=1 ./...
- run: go vet ./...
- run: go build ./cmd/agentintercom
- run: go build ./cmd/agentintercom-conformance
- run: go run ./cmd/agentintercom demo
- if: needs.classify.outputs.docs_only != 'true'
run: go vet ./...
- if: needs.classify.outputs.docs_only != 'true'
run: go build ./cmd/agentintercom
- if: needs.classify.outputs.docs_only != 'true'
run: go build ./cmd/agentintercom-conformance
- if: needs.classify.outputs.docs_only != 'true'
run: go run ./cmd/agentintercom demo
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
if: needs.classify.outputs.docs_only != 'true'
with:
node-version: 24
cache: npm
cache-dependency-path: sdk/typescript/package-lock.json
- run: npm ci --ignore-scripts
- if: needs.classify.outputs.docs_only != 'true'
run: npm ci --ignore-scripts
working-directory: sdk/typescript
- if: matrix.os == 'ubuntu-latest'
- if: matrix.os == 'ubuntu-latest' && needs.classify.outputs.docs_only != 'true'
run: node --test scripts/managed-runtime-manifest.test.mjs
- run: npm run build:native
- if: needs.classify.outputs.docs_only != 'true'
run: npm run build:native
working-directory: sdk/typescript
- run: npm run pack:distribution
- if: needs.classify.outputs.docs_only != 'true'
run: npm run pack:distribution
working-directory: sdk/typescript
- run: npm run test:distribution
- if: needs.classify.outputs.docs_only != 'true'
run: npm run test:distribution
working-directory: sdk/typescript

npm-platforms:
timeout-minutes: 20
runs-on: ubuntu-latest
needs: [classify]
if: needs.classify.outputs.docs_only != 'true'
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7
Expand All @@ -64,23 +119,38 @@ jobs:
typescript-sdk:
timeout-minutes: 10
runs-on: ubuntu-latest
needs: [classify]
if: ${{ !cancelled() }}
defaults:
run:
working-directory: sdk/typescript
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Fail closed when docs classification did not succeed
if: ${{ needs.classify.result != 'success' }}
run: |
echo "Docs fast-path classify job did not succeed (see the classify job log); failing closed."
exit 1
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
if: needs.classify.outputs.docs_only != 'true'
with:
node-version: 24
cache: npm
cache-dependency-path: sdk/typescript/package-lock.json
- run: npm ci
- run: npm run typecheck
- run: npm run build
- run: npm run test:errors
- run: npm run test:release
- run: node --test ../../scripts/verification-bundle.test.mjs
- run: npm audit --audit-level=high
- if: needs.classify.outputs.docs_only != 'true'
run: npm ci
- if: needs.classify.outputs.docs_only != 'true'
run: npm run typecheck
- if: needs.classify.outputs.docs_only != 'true'
run: npm run build
- if: needs.classify.outputs.docs_only != 'true'
run: npm run test:errors
- if: needs.classify.outputs.docs_only != 'true'
run: npm run test:release
- if: needs.classify.outputs.docs_only != 'true'
run: node --test ../../scripts/verification-bundle.test.mjs
- if: needs.classify.outputs.docs_only != 'true'
run: npm audit --audit-level=high

node-compatibility:
timeout-minutes: 10
Expand All @@ -89,6 +159,8 @@ jobs:
matrix:
node: [20, 22]
runs-on: ubuntu-latest
needs: [classify]
if: needs.classify.outputs.docs_only != 'true'
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
Expand All @@ -102,30 +174,45 @@ jobs:
interoperability:
timeout-minutes: 10
runs-on: ubuntu-latest
needs: [classify]
if: ${{ !cancelled() }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Fail closed when docs classification did not succeed
if: ${{ needs.classify.result != 'success' }}
run: |
echo "Docs fast-path classify job did not succeed (see the classify job log); failing closed."
exit 1
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7
if: needs.classify.outputs.docs_only != 'true'
with:
go-version: 1.27.x
cache: true
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
if: needs.classify.outputs.docs_only != 'true'
with:
node-version: 24
cache: npm
cache-dependency-path: sdk/typescript/package-lock.json
- run: go build -o /tmp/agentintercom ./cmd/agentintercom
- run: npm ci
- if: needs.classify.outputs.docs_only != 'true'
run: go build -o /tmp/agentintercom ./cmd/agentintercom
- if: needs.classify.outputs.docs_only != 'true'
run: npm ci
working-directory: sdk/typescript
- run: npm run build
- if: needs.classify.outputs.docs_only != 'true'
run: npm run build
working-directory: sdk/typescript
- run: npm run test:integration
- if: needs.classify.outputs.docs_only != 'true'
run: npm run test:integration
working-directory: sdk/typescript
env:
OCTOBER_BUS_BINARY: /tmp/agentintercom

hosted:
timeout-minutes: 20
runs-on: ubuntu-latest
needs: [classify]
if: needs.classify.outputs.docs_only != 'true'
services:
postgres:
image: postgres:17@sha256:b8faeff7712663c2773a190181e1246e37e364b887611c04658c28b44e2408fe
Expand Down Expand Up @@ -158,6 +245,8 @@ jobs:
workspace-ui:
timeout-minutes: 15
runs-on: ubuntu-latest
needs: [classify]
if: needs.classify.outputs.docs_only != 'true'
defaults:
run:
working-directory: web
Expand All @@ -178,8 +267,18 @@ jobs:
vulnerabilities:
timeout-minutes: 10
runs-on: ubuntu-latest
needs: [classify]
if: ${{ !cancelled() }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Fail closed when docs classification did not succeed
if: ${{ needs.classify.result != 'success' }}
run: |
echo "Docs fast-path classify job did not succeed (see the classify job log); failing closed."
exit 1
- uses: golang/govulncheck-action@032d45514ae346b1db93c04b0c90b841c370344f # v1
if: needs.classify.outputs.docs_only != 'true'
with:
go-version-input: 1.27.x
go-package: ./...
repo-checkout: false
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ New adapters should keep registration, heartbeat, credential handling, and clean
- Protocol, runtime, dependency, security, and workflow changes require code-owner review.
- Resolve review conversations and request a new review after material changes.
- Never merge with a failed, skipped, or incomplete required check.
- Pull requests that touch only the prose allowlist (`README.md`, root contributor docs, `docs/releases.md`, `docs/release-notes-*.md`) take a fast path: documentation links/anchors across all tracked Markdown are validated once, and every required check still runs, gating on that result instead of the runtime matrix. Any other change, or any classifier doubt, runs the full checks. Link validation runs on every pull request, including code and mixed ones; run it locally with `python3 scripts/ci-docs-check.py --all`.
- Changes to a pinned dependency must update the public pin record in the same pull request.
- Release tags are created only from reviewed commits with passing checks.

Expand Down
Loading
Loading