Skip to content

Commit 1c7d4fa

Browse files
nficanoclaude
andcommitted
Add adapters, conformance harness, property tests, CI workflows, and release scaffolding
- M5–M8 adapters: arcp-otel (transport-wrapping Tracer), arcp-runtime-jetty (embedded Jetty 12 WebSocket server), arcp-middleware-jakarta (plain Jakarta WebSocket adapter), arcp-middleware-spring-boot (auto-config + handler), arcp-middleware-vertx (Vert.x 5 Handler<ServerWebSocket>). - arcp-tck conformance harness with 7 dynamic JUnit @testfactory tests parameterised by a TckProvider SPI, self-validated against the in-process runtime. - Six new examples (result-chunk, agent-versions, list-jobs, lease-expires-at, idempotent-retry, custom-auth) plus the original four — all 10 print `OK <name>` on success. - Six Graphviz diagrams (module-graph, session-lifecycle, job-lifecycle, capability-negotiation, heartbeat-ack, result-chunk) with light + dark variants and a Makefile. - Stdio transport (§4.2) with newline-delimited JSON framing. - jqwik property tests for envelope round-trip, BigDecimal budget arithmetic, and result-chunk reassembly across arbitrary arrival orders. - PIT mutation testing wired as opt-in `:pitest` tasks on arcp-core and arcp-runtime. - Maven Central publishing scaffolding consolidated into the root build: POM dev info, SCM, issue tracker, Sonatype staging endpoints, and PGP signing wired through Gradle properties or env vars. - Docs tree under `docs/`: overview, quickstart, concepts, nine feature docs, and three reference docs. CONFORMANCE.md rewritten with file:line references for every implemented spec §. - CI workflows: per-PR build on JDK 21 + 25, nightly PIT, manual-trigger release to Sonatype Central, and a diagrams drift checker. - CONTRIBUTING.md, SECURITY.md, RELEASING.md. Runtime fix surfaced by lease-expiry example: when the watchdog terminates a job, the agent thread's competing CANCELLED emit is suppressed via the JobRecord status CAS so the first terminal state wins. Cleanup: planning/, BOOTSTRAP.md, dev-only prompts, and the v0.1-era test.yml workflow removed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 9d5cd0d commit 1c7d4fa

60 files changed

Lines changed: 2555 additions & 4093 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
name: ci
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths-ignore:
7+
- "**.md"
8+
- "LICENSE"
9+
- ".gitignore"
10+
- ".editorconfig"
11+
- "docs/diagrams/**" # diagrams workflow owns these
12+
pull_request:
13+
branches: [main]
14+
paths-ignore:
15+
- "**.md"
16+
- "LICENSE"
17+
- ".gitignore"
18+
- ".editorconfig"
19+
- "docs/diagrams/**"
20+
workflow_dispatch:
21+
22+
concurrency:
23+
group: ${{ github.workflow }}-${{ github.ref }}
24+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
25+
26+
permissions:
27+
contents: read
28+
29+
jobs:
30+
build:
31+
name: build (JDK ${{ matrix.jdk }})
32+
runs-on: ubuntu-24.04
33+
strategy:
34+
fail-fast: false
35+
matrix:
36+
# 21 is the LTS floor (`--release 21`); 25 is the September 2025 LTS
37+
# and matches the toolchain the local developer setup uses. Both must
38+
# produce green tests on every PR.
39+
jdk: ["21", "25"]
40+
steps:
41+
- uses: actions/checkout@v4
42+
with:
43+
fetch-depth: 1
44+
45+
- name: Set up JDK ${{ matrix.jdk }}
46+
uses: actions/setup-java@v4
47+
with:
48+
distribution: temurin
49+
java-version: ${{ matrix.jdk }}
50+
cache: gradle
51+
52+
- name: Validate Gradle wrapper
53+
uses: gradle/actions/wrapper-validation@v4
54+
55+
- name: Build
56+
run: ./gradlew build --no-daemon --stacktrace
57+
58+
- name: Run all 10 examples
59+
run: |
60+
./gradlew --no-daemon --stacktrace \
61+
:examples:submit-and-stream:run \
62+
:examples:cancel:run \
63+
:examples:heartbeat:run \
64+
:examples:cost-budget:run \
65+
:examples:result-chunk:run \
66+
:examples:agent-versions:run \
67+
:examples:list-jobs:run \
68+
:examples:lease-expires-at:run \
69+
:examples:idempotent-retry:run \
70+
:examples:custom-auth:run
71+
72+
- name: Upload test reports
73+
if: always()
74+
uses: actions/upload-artifact@v4
75+
with:
76+
name: test-reports-jdk${{ matrix.jdk }}
77+
path: |
78+
**/build/reports/tests/
79+
**/build/test-results/
80+
if-no-files-found: ignore
81+
retention-days: 7
82+
83+
javadoc:
84+
name: javadoc
85+
runs-on: ubuntu-24.04
86+
needs: build
87+
permissions:
88+
contents: read
89+
steps:
90+
- uses: actions/checkout@v4
91+
- uses: actions/setup-java@v4
92+
with:
93+
distribution: temurin
94+
java-version: "21"
95+
cache: gradle
96+
- name: Build javadoc for all published modules
97+
run: |
98+
./gradlew --no-daemon \
99+
:arcp-core:javadoc \
100+
:arcp-client:javadoc \
101+
:arcp-runtime:javadoc \
102+
:arcp:javadoc \
103+
:arcp-otel:javadoc \
104+
:arcp-runtime-jetty:javadoc \
105+
:arcp-middleware-jakarta:javadoc \
106+
:arcp-middleware-spring-boot:javadoc \
107+
:arcp-middleware-vertx:javadoc \
108+
:arcp-tck:javadoc

.github/workflows/diagrams.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: diagrams
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- "docs/diagrams/**"
8+
pull_request:
9+
branches: [main]
10+
paths:
11+
- "docs/diagrams/**"
12+
13+
jobs:
14+
drift-check:
15+
name: re-render and diff
16+
runs-on: ubuntu-24.04
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Install Graphviz
21+
run: sudo apt-get update && sudo apt-get install -y graphviz
22+
23+
- name: Record dot version
24+
run: dot -V
25+
26+
- name: Re-render SVGs
27+
run: make -C docs/diagrams clean all
28+
29+
- name: Diff against committed SVGs
30+
run: |
31+
if ! git diff --exit-code docs/diagrams/*.svg; then
32+
echo "::error::Committed SVGs differ from a fresh dot render."
33+
echo "Run 'make -C docs/diagrams' locally and commit the result."
34+
exit 1
35+
fi
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: pitest-nightly
2+
3+
on:
4+
schedule:
5+
# 04:00 UTC daily — off-peak for Actions runners
6+
- cron: "0 4 * * *"
7+
workflow_dispatch:
8+
9+
jobs:
10+
pitest:
11+
name: pitest (${{ matrix.module }})
12+
runs-on: ubuntu-24.04
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
module: [arcp-core, arcp-runtime]
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- uses: actions/setup-java@v4
21+
with:
22+
distribution: temurin
23+
java-version: "21"
24+
25+
- uses: gradle/actions/setup-gradle@v4
26+
27+
- name: Run PIT mutation analysis
28+
run: ./gradlew :${{ matrix.module }}:pitest --no-daemon --stacktrace
29+
30+
- name: Upload mutation report
31+
if: always()
32+
uses: actions/upload-artifact@v4
33+
with:
34+
name: pitest-${{ matrix.module }}
35+
path: ${{ matrix.module }}/build/reports/pitest/

.github/workflows/release.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: release
2+
3+
# Triggered manually from the Actions tab; the operator confirms the version
4+
# in the input field and the workflow handles tagging and Sonatype staging.
5+
on:
6+
workflow_dispatch:
7+
inputs:
8+
version:
9+
description: "Release version (e.g. 1.0.0)"
10+
required: true
11+
type: string
12+
dry_run:
13+
description: "Skip the Sonatype upload (build + sign locally only)"
14+
required: false
15+
type: boolean
16+
default: false
17+
18+
jobs:
19+
publish:
20+
name: publish (${{ inputs.version }})
21+
runs-on: ubuntu-24.04
22+
permissions:
23+
contents: write # for tagging
24+
steps:
25+
- uses: actions/checkout@v4
26+
with:
27+
fetch-depth: 0
28+
29+
- uses: actions/setup-java@v4
30+
with:
31+
distribution: temurin
32+
java-version: "21"
33+
34+
- uses: gradle/actions/setup-gradle@v4
35+
36+
- name: Configure git for tagging
37+
run: |
38+
git config user.name "github-actions[bot]"
39+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
40+
41+
- name: Set release version
42+
run: |
43+
# Replace `version = "x.x.x-SNAPSHOT"` with the supplied release version.
44+
sed -i 's|version = ".*"|version = "${{ inputs.version }}"|' build.gradle.kts
45+
grep '^[ ]*version =' build.gradle.kts
46+
47+
- name: Build + test
48+
run: ./gradlew build --no-daemon --stacktrace
49+
50+
- name: Publish to Sonatype Central
51+
if: ${{ !inputs.dry_run }}
52+
env:
53+
ORG_GRADLE_PROJECT_ossrhUsername: ${{ secrets.OSSRH_USERNAME }}
54+
ORG_GRADLE_PROJECT_ossrhPassword: ${{ secrets.OSSRH_PASSWORD }}
55+
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_SIGNING_KEY }}
56+
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_SIGNING_PASSWORD }}
57+
run: |
58+
./gradlew --no-daemon --stacktrace \
59+
:arcp-core:publish \
60+
:arcp-client:publish \
61+
:arcp-runtime:publish \
62+
:arcp:publish \
63+
:arcp-otel:publish \
64+
:arcp-runtime-jetty:publish \
65+
:arcp-middleware-jakarta:publish \
66+
:arcp-middleware-spring-boot:publish \
67+
:arcp-middleware-vertx:publish \
68+
:arcp-tck:publish
69+
70+
- name: Local publish (dry run)
71+
if: ${{ inputs.dry_run }}
72+
run: ./gradlew publishToMavenLocal --no-daemon --stacktrace
73+
74+
- name: Tag the release
75+
if: ${{ !inputs.dry_run }}
76+
run: |
77+
git tag -a "v${{ inputs.version }}" -m "Release ${{ inputs.version }}"
78+
git push origin "v${{ inputs.version }}"

.github/workflows/test.yml

Lines changed: 0 additions & 80 deletions
This file was deleted.

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,7 @@ bin/
2626
# JVM
2727
hs_err_pid*.log
2828
replay_pid*.log
29+
30+
# jqwik failure-replay cache
31+
.jqwik-database
32+
**/.jqwik-database

0 commit comments

Comments
 (0)