Repository navigation
Nexora v0.3.0
Added
Core Engine
- Execution cancellation -
NexoraEngine.cancel(executionId)returnsCompletableFuture<Boolean>(trueif cancelled,falseif already finished; fails withExecutionNotFoundExceptionfor unknown ids). Pending steps are never started, running steps are interrupted, the execution is persisted asCANCELLED, andPlanCancelledEventfires. Saga compensation runs for completed steps when enabled. Cancelled executions are not dead-lettered. NewExecutionStatus.CANCELLEDandExecutionState.CANCELLED(#33)
Observability
NexoraEngine.submit(intent)- Starts an execution and returns anExecutionHandle(executionId+ result future) immediately, so the id is known before the run finishes (#33)- OpenAPI specification for the observe server - A hand-maintained OpenAPI 3.1 document covering every endpoint, with schemas and success and error examples, served at
GET /openapi.yaml. Swagger UI is served atGET /docsfrom the bundledorg.webjars:swagger-uiassets under a strict Content-Security-Policy, with no CDN or validator calls. CI lints the document with Redocly CLI, andOpenApiSpecTestfails the build when a route is added without documenting it or the document describes a route the server does not serve (#46) - Execution replay -
NexoraEngine.replay(executionId)re-runs aFAILED,TIMED_OUT,CANCELLEDorCOMPENSATEDexecution with the same goal and context under a new execution id; the original id is in the replay's context as_replayOf. Steps that completed reuse their original idempotency key so idempotent capabilities skip repeated side effects; failed steps, and every step of a compensated execution, get fresh keys. Exposed asPOST /api/executions/{id}/replay(202,404,409with the current state),nexora replay <executionId>, and a Replay button in the history panel. Dead letter replay now delegates to it (#37) - Execution history REST API -
GET /api/executionslists executions newest first with keyset (cursor) pagination andstatus,goal,from/to,limitfilters, responding{"data": [...], "cursor": "...", "total": N}.GET /api/executions/{id}returns one execution with its step records.ExecutionStoregainsfindByFilter(ExecutionFilter)andcount(ExecutionFilter); the JDBC store builds both with bound parameters only and adds an index on(started_at, execution_id). The observe UI and the payment pipeline demo get an Execution History panel with status and goal filters, cursor-based Load more, and click-to-expand step detail (#34) - Cancel REST API, CLI, and UI -
POST /api/executeand DLQ replay now return the newexecutionId. The observe UI has a Cancel button on running executions, and the payment pipeline demo adds a cancellation scenario and a "Slow payment" preset.DELETE /api/executions/{id}on the observe server (200cancelled,404unknown,409already finished) andnexora cancel <executionId> [--server URL]. Newnexora_plan_cancelled_totalcounter; cancels are not counted as failures (#33) - Health check endpoints -
GET /health/live(liveness),GET /health/ready(readiness: persistence, plugins, executor;503with a per-check breakdown when any is DOWN), andGET /health(summary with version, checks, and capability circuit states). All three are unauthenticated. Newnexora_readygauge andNexoraNotReadyalert (#31)
Changed
-
Code formatting enforced - All Java code is formatted with palantir-java-format via the Spotless Maven plugin.
mvn verifyfails on unformatted code; runmvn spotless:applyto fix -
/health/readysemantics - Readiness now reflects the engine's own dependencies instead of capability circuit state. An OPEN circuit no longer returns503; circuit states moved to thecapabilitiesfield ofGET /health(#31) -
PluginManager.loadPlugin(Path)returns the plugin id - Previouslyvoid. Source compatible; code compiled against an oldernexora-plugin-loadermust be recompiled (#140) -
DagStepScheduler.schedule(Plan, ExecutionContext, AtomicBoolean)replaced byschedule(Plan, ExecutionContext, HaltSignal)-HaltSignalcarries why the execution stopped (DEADLINEorCANCELLED) so the scheduler can reportTIMED_OUTorCANCELLED. Deadline behaviour is unchanged (#33) -
Default webhook events include
CANCELLED- Intents without explicitwebhookEventsare now notified when cancelled (#33)
Fixed
- Step records could be persisted out of order - Step persistence ran as asynchronous event-bus handlers with no ordering, so a step's completion could be written before its start (leaving it
RUNNING), and step rows could still be missing when the execution's result completed. Step persistence now uses the newExecutionEventBus.subscribeSync, which runs inline in publish order; the step-start row, with its idempotency key, is written before the capability runs (#37) - Execution state write failures were silent -
JdbcExecutionStore.updateExecutionswallowed SQL errors, so a failed terminal write could leave a record stuck atCOMPENSATING(blocking replay) or atFAILEDafter compensation. It now throws, and the engine retries state writes up to three times. The engine also keeps an execution tracked until saga compensation has finished, so replay and cancel never act on a half-written record (#37) - Step idempotency keys were erased on completion -
JdbcExecutionStore.upsertStepreplaced the whole row, and completion and failure updates carry no key, so the key recorded at step start was lost as soon as the step finished. Updates without a key now keep the recorded one (#37) findByIdreported database errors as "not found" -JdbcExecutionStore.findByIdswallowed query failures and returned empty, so a database outage surfaced as404from the detail endpoint and asNOT_FOUNDfromcancel. It now throwsIllegalStateException; both endpoints answer500(#34)- Observe server failed to serialize
java.timevalues -nexora-clilackedjackson-datatype-jsr310, so any response containing anInstantorDurationthrew instead of responding:GET /api/dead-letterswith entries, webhook delivery records, andGET /healthonce capabilities were registered. Instants serialize as ISO-8601 timestamps and durations as ISO-8601 durations (PT0.25S) (#34) - Timed-out capabilities kept running -
TimeoutInterceptorusedCompletableFuture.cancel(true), which does not interrupt the worker, so a capability that exceeded its timeout carried on in the background. It now runs on aFutureTaskand is interrupted on timeout (#33) - Retries after interruption -
RetryInterceptorno longer starts another attempt once the step thread has been interrupted (#33) - Plugin jars never activated -
NexoraEngine.Builder.withPluginJar()loaded the jar but never activated the plugin, so its capabilities and planners were never registered and executions failed withCAPABILITY_NOT_FOUND.build()now activates jar plugins after inline plugins, in the order added, and fails withPluginInitializationExceptionif activation fails (#140)