feat: add per-project native server and SSE command streaming
build / jvm (push) Waiting to run
build / native (macos-15, macos-arm64) (push) Waiting to run
build / native (ubuntu-24.04, linux-x86_64) (push) Waiting to run
build / native (windows-2025, windows-x86_64) (push) Waiting to run
Test / Tests and coverage
Intrepid/AI Engineering/pipeline/head This commit looks good
build / jvm (push) Waiting to run
build / native (macos-15, macos-arm64) (push) Waiting to run
build / native (ubuntu-24.04, linux-x86_64) (push) Waiting to run
build / native (windows-2025, windows-x86_64) (push) Waiting to run
Test / Tests and coverage
Intrepid/AI Engineering/pipeline/head This commit looks good
Keep Spring in a persistent project server with lightweight clients, managed start/stop, bounded SSE subscriptions, cursor recovery and durable mutation outcomes. Preserve SQLite authority and transaction limits, and document reproducible native measurements. Validation: 269 tests, 11 pipeline scenarios, full native/SSE smoke, native package verification and 17 installer tests passed. Implements WRK-000E / DEC-0001 / DEC-0002.
This commit is contained in:
+31
-5
@@ -3,7 +3,8 @@
|
||||
AIE is a local engineering memory with two cycles: investigation/refinement and
|
||||
implementation, connected by DEC and Plan. OODA is adaptive; gates constrain delivery.
|
||||
The CLI records external observations and applies deterministic checks. It does not
|
||||
execute repository commands, operate a server or provide distributed collaboration.
|
||||
execute repository commands or provide distributed collaboration. A lightweight
|
||||
client communicates with an automatically managed local server for each project.
|
||||
|
||||
## Runtime and modules
|
||||
|
||||
@@ -13,6 +14,20 @@ GraalVM CE 25.5.5.0+3 is pinned in .sdkmanrc. Spring supplies process lifecycle
|
||||
services are ordinary Java classes with explicit project paths and no retained Work
|
||||
cache. Infrastructure stays outside immutable domain records.
|
||||
|
||||
AieLauncher handles client dispatch without opening Spring. The server starts a
|
||||
persistent Spring context and a bounded JDK HTTP listener. AiEngineeringApplication
|
||||
remains the Spring AOT application entry; the distribution uses AieLauncher and
|
||||
explicitly selects that AOT application when starting its server. Picocli parses
|
||||
prefixes and constructs the selected branch with fresh invocation objects; complete
|
||||
catalogs remain available for help and diagnostics.
|
||||
|
||||
Pending invocations subscribe to authenticated SSE; terminal immediate responses
|
||||
remain JSON. JobEvents retains a bounded replay window and publishes under the job
|
||||
monitor. SseStreams owns separate bounded writers and interrupts stalled socket
|
||||
writes. InvocationClient resumes with a cursor and verifies output offsets/prefixes;
|
||||
it never resubmits execution after a transport failure. Input and cancellation remain
|
||||
POST operations. See [event protocol](local-server-sse.md).
|
||||
|
||||
| Module | Owns | May depend on |
|
||||
|---|---|---|
|
||||
| filesystem | Codecs, paths, SQLite sessions/typed storage, atomic external files and locks | none |
|
||||
@@ -26,6 +41,7 @@ cache. Infrastructure stays outside immutable domain records.
|
||||
| legacyimport | Explicit DF preview/import, preserved originals and provenance | filesystem, project, work, discussion, artifact |
|
||||
| verification | Integrity/readiness, gates, snapshots, coordination, migration and context | protocol modules |
|
||||
| cli | Picocli commands and presentation | public module APIs |
|
||||
| localserver | Private process identity/locks, HTTP client/server, invocation jobs, durable outcomes | cli, filesystem, project |
|
||||
|
||||
ArchitectureTest enforces these boundaries. Work does not import Decision, Artifact
|
||||
or Verification. Verification coordinates across independently owned domains.
|
||||
@@ -43,6 +59,11 @@ bounded busy waits. Nested services share a transaction; failed nested mutations
|
||||
cannot be accidentally committed after an exception is caught. File-publication
|
||||
callbacks run after commit or rollback, after the connection closes.
|
||||
|
||||
The validated bootstrap choice is reused within that SQLite session, avoiding
|
||||
repeated configuration/manifest decoding under the publication fence. It expires
|
||||
with the transaction, never selects SQLite from file/connection existence, and
|
||||
does not cache domain records or approvals. There is no JDBC connection pool.
|
||||
|
||||
SqliteRecords maps trusted record components to typed scalar columns and ordered
|
||||
child rows. Composite operational values have a domain codec, not serialized file
|
||||
content. List presence preserves null versus empty, necessary for historical hashes.
|
||||
@@ -100,11 +121,16 @@ not removed. Details: [migration](storage-migration.md).
|
||||
|
||||
`nativePackage` builds AIE and the pinned SQLite diagnostic CLI with companion native
|
||||
libraries and a checksum manifest. Native hints cover operational records/resources.
|
||||
The candidate verifier creates a disposable database with native AIE and reads it
|
||||
with packaged sqlite3. Install preparation is distinct from activation: versioned
|
||||
The candidate verifier creates a disposable database with native AIE, reads it
|
||||
with packaged sqlite3, and verifies native server startup, build identity, command
|
||||
roundtrips, SSE/input/recovery/cancellation and shutdown. Install preparation is distinct from activation: versioned
|
||||
releases, a current symlink and shortcuts are switched only after verification.
|
||||
Installer tests use fake tools and disposable destinations. This Work did not run
|
||||
an actual installer or modify the active distribution or consumer projects.
|
||||
Installer tests use fake tools and disposable destinations. Build and verification
|
||||
do not activate the candidate distribution or modify consumer projects.
|
||||
|
||||
Local-server operational receipts live outside canonical memory; the database schema,
|
||||
historical formats and authority rules are unchanged. See [the protocol and operating
|
||||
limits](local-server.md) and [measured SSE results](local-server-sse-results.md).
|
||||
|
||||
Primary references: [SQLite JDBC native support](https://github.com/xerial/sqlite-jdbc#graalvm-native-image-support),
|
||||
[SQLite transactions](https://sqlite.org/lang_transaction.html),
|
||||
|
||||
Reference in New Issue
Block a user