ci: live community-stack integration + minimal basic example#147
Merged
Conversation
The integration-test job in ci.yml ran `mvn verify -DskipUnitTests` against
WireMock with `continue-on-error: true`, which masked failures and never
exercised a real agent. Replaces it with a Go-pattern dedicated workflow:
the WireMock contract layer becomes its own non-blocking-suppression job,
plus a new live-stack job that clones the community repo, brings up
docker compose, and runs a real example.
Mirrors axonflow-sdk-go/.github/workflows/integration.yml.
Changes:
- .github/workflows/integration.yml (new):
- contract-integration: `mvn verify -DskipUnitTests` (WireMock).
Runs on every PR + push. NO continue-on-error.
- live-integration: clone community stack, docker compose up, run
examples/basic against http://localhost:8080. Skipped on PR
(Go pattern); runs on push to main + schedule + workflow_dispatch.
- .github/workflows/ci.yml: drop the stale `integration-test` job
(continue-on-error wrapper around `mvn verify -DskipUnitTests`).
The same step now lives in integration.yml without the suppression.
- examples/basic/: new minimal example exercising healthCheck() +
proxyLLMCall() against a running agent. One pom.xml + one Java class.
pom.xml declares axonflow-sdk 6.1.0; the live-integration job
installs the local SNAPSHOT before running.
Pre-existing test fix (caught and fixed when the suppression came off):
- AxonFlowIntegrationTest#generatePlanShouldReturnPlan stubbed
/api/v1/orchestrator/plan, but the Java SDK actually POSTs to
/api/request with request_type=multi-agent-plan and reads the
agent's enveloped {success, plan_id, data: {steps, domain, ...}}
shape. Updated stub URL + response body to match the real wire
contract. This is the kind of drift `continue-on-error: true` was
hiding.
Issue #146 tracks the follow-up planning + connectors example dirs
(scoped out of this PR per QF-10's "trivially small" constraint).
Part of the Phase 1 quality-freeze QF-14 row.
13 tasks
saurabhjain1592
added a commit
that referenced
this pull request
Apr 28, 2026
* review fixes: integration.yml, basic example, surefire binding Deep-review pass over QF-10 Java workstream (#147) caught several issues. All P0+P1 findings addressed here. Workflow correctness: - `mvn verify -DskipUnitTests` was running unit tests AND integration tests redundantly because `skipUnitTests` was an unbound property — the flag was a no-op. Bound to surefire's <skipTests> via ${skipUnitTests} property in pom.xml; default false. Verified locally: `mvn verify -DskipUnitTests=true` now runs only the 12 failsafe integration tests, not 1211 surefire tests as well. - Contract-integration job now matrixed across Java 11/17/21 (was JDK 17 only). Matches the unit-test matrix in ci.yml so JDK-specific drift in WireMock contract tests fails at PR time. - `mvn install -DskipTests` in live-integration now wrapped in a 3-attempt retry loop, matching the pattern already used in ci.yml's Build/Test steps for transient Maven Central flakes. - Example pom version pinning closed: live-integration now rewrites `examples/basic/pom.xml`'s axonflow-sdk version to match the parent pom's project.version before running. Previously the example pinned 6.1.0 literally, so when the parent bumped (e.g. to 6.2.0) the example silently kept resolving 6.1.0 from Maven Central instead of the freshly-installed local SNAPSHOT. - Logs ordering: capture docker logs BEFORE compose down (compose down destroys the containers, so the previous step ran AFTER teardown always returned empty). - Persist logs to disk + upload as actions/upload-artifact so failure triage doesn't require re-running. - Failsafe-reports artifact also uploaded on contract-integration failure (per JDK). - docker compose up -d --wait --wait-timeout 120 — let compose's healthcheck do the polling work; kept curl /health loop as belt-and-suspenders. - concurrency.group on workflow — back-to-back pushes won't spawn parallel docker stacks. - Cron moved from Monday 06:00 UTC to Tuesday 06:00 UTC — failures land in EU/IN working hours, not weekend handover. examples/basic/Basic.java: - AxonFlow now created in try-with-resources. Without this OkHttp's dispatcher + connection pool keep the JVM alive ~60s after main() returns, eating into the workflow's 90s exec budget. - userToken("demo-user") removed from the ClientRequest builder. The agent's JWT middleware rejects literal non-JWT strings; the SDK auto-populates user_token from clientId when omitted, which is what the example wanted. - Catch-all `catch (Exception e)` replaced with narrow handlers: AuthenticationException + ConnectionException now exit non-zero (real failures), PolicyViolationException is logged as a valid outcome, only RuntimeException not in those classes is treated as community-fail-open. Smoke no longer masks regressions as success. - Reads AXONFLOW_CLIENT_ID/SECRET from env without silent default — matches the TS basic example's pattern, exits 1 if missing. - Added Step 3: listConnectors() — read-only, works on community, exercises a 4th SDK surface for free coverage. CHANGELOG: example added + skipUnitTests fix listed under [Unreleased] / Added + Fixed (user-facing). * ci: skip jacoco when skipUnitTests is set The contract-integration job runs `mvn verify -DskipUnitTests=true`, which now actually skips surefire (per the pom binding in this PR). But jacoco:check (bound to verify) still ran and failed: "branches covered ratio is 0.04, but expected minimum is 0.35" — coverage data came only from the 12 failsafe tests because surefire was skipped. Coverage gating is the unit-test job's responsibility (ci.yml `build (17)`). Pass `-Djacoco.skip=true` here so the contract job doesn't double up on coverage enforcement.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes the QF-14 (Java SDK) row in the Phase 1 quality-freeze epic
(
axonflow-business-docs/engineering/QUALITY_FREEZE_EPIC_2026-04-24.md).The
integration-testjob inci.ymlwas runningmvn verify -DskipUnitTestsagainst WireMock withcontinue-on-error: true—non-blocking theater. It never exercised a real agent, and even if the
WireMock stubs drifted from the real wire shape (they had), the
suppression hid the failure.
This PR replaces it with the Go SDK pattern: dedicated
integration.ymlthat runs the WireMock contract layer as a real blocking job AND adds a
live-stack job that clones the community repo, brings up
docker compose, and runs a real example.Ported from:
axonflow-sdk-go/.github/workflows/integration.yml.What this PR does
CI
contract-integration(every PR + push, NOcontinue-on-error):mvn verify -DskipUnitTests. Same WireMock test suite as before, butnow blocks merges if it fails.
live-integration(push to main + schedule + workflow_dispatch;skipped on PR per Go pattern): clones community repo,
docker compose up, installs the local SNAPSHOT to~/.m2, runsexamples/basicend-to-end againsthttp://localhost:8080.ci.ymlloses its staleintegration-testjob — samemvn verifystep now lives in
integration.ymlwithout thecontinue-on-errorsuppression.
New example:
examples/basic/One
pom.xml+ one Java class (Basic.java). Mirrors the Go SDK'sexamples/basic/main.gostructure: client init from env, health check,single
proxyLLMCallround-trip. The live-integration job runs itagainst the live community stack as a smoke. Issue #146 tracks the
follow-up
planning+connectorsexample dirs, which were scoped outper the QF-10 "trivially small" constraint.
Pre-existing test fix surfaced by removing the suppression
AxonFlowIntegrationTest#generatePlanShouldReturnPlanstubbed/api/v1/orchestrator/plan, but the Java SDK actually POSTs to/api/requestwithrequest_type=multi-agent-planand parses theagent's enveloped
{success, plan_id, data: {steps, domain, ...}, metadata}shape. Updated stub URL + response body to match the realwire contract. Per the freeze policy ("no bug found gets postponed"),
this is fixed inside the same PR — it's exactly the class of drift the
old
continue-on-error: truewas hiding.Self-review checklist
@v4)permissions: contents: readscoped tightcontinue-on-error: trueanywherepom.xmlversion bump (perfeedback_no_per_pr_version_bumps.md)Test plan
mvn test -B(full unit suite): BUILD SUCCESS — 1204 tests, 0 failmvn verify -DskipUnitTests -B(WireMock contract suite): BUILDSUCCESS — 12/12 in
AxonFlowIntegrationTest, after fixinggeneratePlanShouldReturnPlanmvn install -DskipTests -Bthencd examples/basic && mvn -B compile: BUILD SUCCESScontract-integrationgreen on this PRlive-integrationgreen on push to main (post-merge)Out of scope (filed separately)
examples/planning/+examples/connectors/dirs