# Psyclone / CMSDK — Combined Changelog Version 2.2.0 (22/08/2026) ******************** ## Psyclone (LGPL) Feature: Builders — a first-class declarative bake pipeline. A Recipe now carries a stable string RecipeID identity end-to-end, and every bake message carries five correlation entries so a bake can be tracked, correlated and reasoned about across the system. The bake stream is split into clean, typed channels — per-kind bake OUTPUT types (Bake.Start/Status/Success/…) and per-verb control types (BakeControl.Cancel/Restart/Pause/…) — with the recipe title carried as a data entry rather than baked into the type name. Feature: Builders — bake lifecycle and blue-edit control. A `.status` stream carries progress-only acknowledgements and a `.data` stream carries lossless, sequence-numbered payload with gap-detection (a missing sequence is a hard error, not silent loss), a bounded reassembly buffer and per-batch acks. Recipe "blue-edit" knobs allow interactive control of a running bake. Control semantics enforce an issued-by allow-list, a monotonic control sequence, and cancel-supersedes-pause ordering; an interactive step honours fail | pause | skip on timeout. Feature: Supervisor — an automatic Startup Supervisor now owns single-node bring-up as a Root-space crank. A `` PsySpec element creates a Root-crank Supervisor (previously a no-op); the Supervisor mints a Recipe ID, sends the recipe to the target node, streams `.status`/`.data` back, and drives PAUSE/START control with acks. The legacy procID==0 Supervisor fan-out and registry have been dissolved in favour of a proper Root-space component identity. Feature: Supervisor — SystemStatus and creation ownership. The node broadcasts `Psyclone.SystemStatus` on a 5-second cadence and the Supervisor auto-subscribes; single-node component creation is now owned by the Startup Supervisor, and `Psyclone.Ready` fires only after all components have actually been created. A node-level heartbeat and the documented `.data`/`.status` message cadences are implemented, with unregister now draining in-flight dispatches for a clean teardown. Feature: Multi-node bring-up — Psyclone now brings up a distributed model across multiple OS-process nodes. `bringUpSpec` is multi-node-aware (groups components by `node=`, defers unknown nodes), routes `Psyclone.Builder.*` to the target node's `processMessage`, and forwards cross-node recipes; an external-space host is treated as an idempotent skip on re-entry. Stage 3 completes cross-node bring-up including ID-reservation adoption ordering, context ID-clash tie-break, `SYNC_COMPONENT_INFO` confirmation and cross-node triggergroup join forwarding. Feature: New self-checking multi-node test harness — `test=psymulti` runs three real OS-process nodes under Supervisor orchestration, alongside `test=psytest` and `test=psylong`, wired through a `test=` CLI dispatch. Feature: Streaming during long steps — `.data` and heartbeat `.status` are now streamed *during* a long `` step (no extra thread), so a long-running external step reports progress live rather than going dark until completion. Fix: Broke a type-ID sync livelock and a type-level id-sync hard-fail that occurred on concurrent multi-node bring-up (don't hard-fail on confirm-after-negotiation). Fix: Fixed multi-node join races and crashes — a cross-node recipe-forward double-free, a 50ms sweep timer-thread stampede segfault, an empty-tag network registration for untagged join members, and a node-join race/crash surfaced by `test=psymulti`. Fix: Fixed a builder_golden SEGV — guard a NULL monitoring pointer in `deliverTriggerMessage` and drain the SystemStatus beat on teardown. Fix: Fixed StartupSupervisor crank shutdown — broke a shutdown spin and a crank-shutdown spin when the strangler defaults were flipped on. Fix: Eagerly create external-space host modules before the Startup Supervisor deferral, so external hosts exist when the SS expects them. Fix: Examples — unique crank names for per-node RetrieveTest modules (fixes a multi-node shutdown hang), and the ExternalModules helper now honours its launch port instead of a hardcoded 10000. Fix: External-module launches are now routed through CMSDK `NewProcessEx` for a single, consistent cross-platform launch path. Build: Bumped the CMSDK submodule pointer to pick up the shared-memory cleanup, launcher-thread and Windows-portability fixes below. Docs: Documented Builder and Supervisor across the Psyclone User Guide, System Guide and the Psyclone LLM guide; added a `docs.html` landing page (User Guide / System Guide picker); recorded the milestone of three standard CLI tests green on macOS and Windows. ## CMSDK (BSD) Feature: LLM Connections — a new `` / `` connection primitive. `LLMConnection` parses vendor/model configuration into typed errors and a stats struct, connects over the CMSDK HTTP client, and calls an endpoint via `interact()` with JSON path extraction (jsmn). Both a request/response mode (mode-A) and a streaming mode (mode-B) are supported, with mode-B stream statistics accounting, a typed cancel error, `reset()` parity and an owner-end lifecycle callback hook. Feature: LLM Connections — real streaming transport. Added an `SSEEventParser`, an `HTTPChunkedDecoder`, a `StreamByteSource` with bounded pump loops, and an `EventStreamFrameParser` that validates the AWS event-stream prelude and per-message CRCs — so live token-streaming endpoints (SSE and binary event-stream) are consumed correctly. Feature: LLM Connections — secret handling. LLM credentials resolve from environment-variable or file references, and inline secrets in a spec are rejected, so keys never have to live in the spec file. Feature: `PsySpace::registerInternalCrank` — inject a built-in crank by function name, backing the Root-space Supervisor/Builder cranks on the Psyclone side. Perf: (carried) TCP/UDP messaging throughput and latency improvements remain in effect from the 2.1.0 socket-mode work. Fix: Reliable POSIX shared-segment cleanup — startup pre-clean plus graceful unlink, so a killed run can't leave a stale named segment behind to poison the next start. Fix: Launch die-with-parent children from a persistent launcher thread, so a spawned child is reliably torn down with its parent. Fix: `NewProcess`/`NewProcessEx` must not treat the command line / title as a printf format string — a `%` in a command line no longer triggers a Windows c0000409 fast-fail (this was crashing the CLIRunner `test=cmsdk` case). Fix: POSIX `NewProcessEx` implemented with capture / env / process-group support and an optional `posixUseShell` (`/bin/sh -c`), unified onto a single shared launch path; `ReleaseProcessCapture` exposed for a signal-free capture-pipe release. Fix: SSL client verification on Windows now imports the Windows ROOT system store (CryptoAPI) into the SSL_CTX X509 store — `SSL_CTX_set_default_verify_paths` pointed at the build-time OPENSSLDIR and failed cert verification against public endpoints on end-user machines. Fix: HTTP client fixes exposed by the LLMConnection work — honour the computed encryption in `makeHTTPRequest` (was hardcoded to SSL), un-invert the `ReceiveHTTPReply` timeout check, preserve a buffered reply when the peer closes after responding (`Connection: close`), and correct the URL parser (colon-in-path vs port) and chunked transfer-encoding decode. Fix: Fixed a `NetworkThread` teardown use-after-free race — capture parent/id before clearing `isRunning`, and have `endConnection`/`shutdown` wait (bounded, self/forced-aware) for the worker OS-thread to exit. Fix: `NetworkManager` map corruption fixed — wrong id space, `operator[]` on read paths, and missing locking. Fix: `PsyAPI::waitForNewMessage` held a dangling reference into a popped queue slot. Fix: Memory-safety pass under a new ASan gate — fixed `gethostbyname_r` use-after-free, ~21 `new[]`/scalar-`delete` mismatches, a `PsySpace::logEntry` leak, 22 `StringFormat` frees, and a third over-read in `GetFirstFreeBitLocN` (now word-granular). Fix: Flake-1 shutdown hardening — cooperative-only connection-worker shutdown (no `pthread_cancel` of a mutex holder), `Node::terminate` teardown deadlock fixed with a cancel-safe mutex and a dedicated signal thread, and `ThreadManager::JoinThread` now joins the worker before freeing the `NetworkThread`. Fix: Windows portability of the concurrency fuzz TUs — `_putenv_s` (setenv is POSIX), `GetModuleFileNameA` on the re-exec path, and a portable temp path instead of a hardcoded `/tmp`. Build: Added `ProcessMemoryFuzz`/`ConcFuzz` and `LLMConnection` translation units to the vs2022 project/filters so a headless MSBuild links them; dropped stray `cmsdk_perf_*.json` test artifacts. Feature: Test — a seeded oracle fuzz for the ProcessMemory ring (`test=processmemory_fuzz`), a Phase-2 ring-invariant checker, and a resize-heavy op-mix (`PSY_RING_RESIZEHEAVY=1`). Feature: Utils — POSIX pseudo-terminal process primitives and `utils::ProbeProcessWait`, a stall-on-stdin probe (Linux exact, macOS composite, Windows stub), for the Windows stall-probe test work. Build: Scale unit-test time budgets under sanitizers (`UT_TIME_SCALE`); ignore SIGPIPE so the SSL tests can run. Docs: LLM guide documents the child-process launch path (`NewProcessEx`, capture lifecycle, `ReleaseProcessCapture`); the Doxyfile dist-copy exclusion is version-agnostic so the Doxygen build stays at 0 warnings. --- # Psyclone AIOS & CMSDK 2.1.1 — Changelog _Combined changelog for the 2.1.1 release (covering everything since the last released version, 2.0.3). Psyclone is LGPL; CMSDK is BSD._ ## Psyclone (LGPL) Version 2.1.1 (26/07/2026) ******************** Feature: External-module lifecycle (T1.4) — Psyclone now auto-starts, supervises and gracefully stops external-module executables declared in a spec; a crashed internal space is auto-restarted for crash isolation, and helpers are told to exit before the node stops so they shut down cleanly within the stop timeout Feature: Declarative TriggerGroup join primitive (T1.6) — a that fires only on grouped activation (requires-all / requires-any / min-count) across multiple triggers, with a matching CMSDK join primitive Feature: psytest self-checking system suite hardened — self-creates its MyFiles fixture (a clean checkout needs no manual test/test.txt), resolves the ExternalModules helper relative to the Psyclone executable, adds an External-Module auto-start end-to-end stage, and emits a rich per-test summary report Feature: Full trigger-filter operator set documented and verified — worked examples plus corrected semantics for all 8 trigger-filter ops (equals/notequals, equalsnumeric/notequalsnumeric, greaterthan/lessthan, haskey, maxage) Fix: Fixed inverted equalsnumeric / notequalsnumeric trigger filters and haskey matching; numeric ops now parse as float64 and maxage operand is milliseconds Fix: Fixed a shutdown self-SIGKILL/hang — Node::terminate could EndProcess its own pid; it now notifies spaces of shutdown before stopping external executables so helpers exit gracefully Fix: Fixed ExternalModules graceful-stop on Windows — a CREATE_NEW_CONSOLE child can't receive the parent's console ctrl, so the helper now handles CTRL_BREAK/C/CLOSE and exits when its space is shut down Fix: Fixed Node::createSpace reusing a stale ProcessMap entry — Root osID/type are refreshed on reuse (stale shared-memory safety) Fix: Bundled CMSDK fixes (see CMSDK changelog): intermittent network_http teardown hang (double-delete race in NetworkChannel with bounded teardown waits + invalid-handle hardening), Windows GetExitCodeProcess misuse reporting running processes as terminated (259), and a Linux thread-reap SIGSEGV/hang Build: Fixed clean builds from scratch — the per-module build/ object directories are now self-created by the compile rules (mkdir -p) instead of relying on parse-time guards, so make clean && make (and make rebuild) work out of the box on all four modules (CMSDK/Examples/Psyclone/System) Build: Examples vs2022 now links against the non-SSL CMSDK2022.lib to fix the Windows build Docs: TriggerGroup marked Shipped across the Psyclone user/system guides; trigger-filter reference expanded with verified worked examples Version 2.1.0 (12/07/2026) ******************** Feature: Native macOS support — Psyclone and CMSDK now build, run and pass the full test suite on Apple Silicon/Intel macOS, not just Linux and Windows Feature: Added a unified CMSDK unit test framework (UnitTestFramework.h/.cpp) — one PASS/FAIL line per object, indented perf metrics, timestamped performance JSON with compare= %-deltas for automated regression tracking, live progress line, per-test process isolation with timeout, self-healing shared-memory cleanup between runs Feature: Routed `Psyclone test=cmsdk` (all), `test=` (single test in isolation), `test=list` to the new CMSDK unit test framework, with compare=, out=, outdir=, verbose=1, fork=0 options Feature: Authored/converted ~20+ CMSDK object unit tests, incl. new coverage for Base64, hash (MD5/SHA1/SHA256/CRC32/SHA3/Keccak), MathClasses, Bitmap, HTML, xml_parser, Subscriptions, VantagePoints, Observations, ControlMessage, ThreadManager, DataMessage — 33 tests, all passing Feature: Rebuilt Examples/psytest.xml into a self-checking function + performance test — context-chained stages exercising context switching, time sync, ping/pong (guaranteed and UDP/best-effort), signals, dynamic context switching with interval triggers, and whiteboard/file-catalog/data-catalog retrieval; each stage prints a concise PASS/FAIL + perf line; PsyTest_Summary aggregates a final SUCCESS/FAILED verdict; stall watchdogs report a stage-specific failure instead of hanging Feature: Added tail-latency percentile reporting (p50/p90/p95/p99/p99.9) to the PingMaster/PingUDPMaster/SignalMaster performance tests, alongside the existing throughput/avg_age metrics Feature: Added a `network_https` unit test exercising a real TLS handshake and encrypted HTTP round-trips over loopback with a runtime-generated self-signed certificate, for SSL/TLS builds (`make ssl`) Feature: Added `-O0` unoptimised debug/ssldebug build targets for a real single-step debugging experience Feature: Added VS Code workspace configuration for macOS C++ development (IntelliSense, build tasks, integrated debugger) Feature: Added web API documentation and a Partner project dashboard script Feature: Added a full NewPsySpec.xml feature implementation audit (Implemented / Parsed-only / Not-implemented, with file:line evidence) and a prioritised roadmap, published alongside this codebase Fix: Fixed a macOS-only thread-liveness bug that caused shutdown hangs — IsThreadRunning/CheckForThreadFinished used a destructive pthread_join as a liveness probe, reaping the thread so a later authoritative join operated on an already-joined pthread_t (heap-corrupting undefined behaviour); switched to non-destructive pthread_kill(h,0) liveness + a single authoritative join Fix: Fixed two macOS-only timeout-emulation primitives (macos_pthread_mutex_timedlock, macos_pthread_join_with_timeout) that silently never honoured their timeout, turning bounded waits into indefinite hangs under contention — root cause of intermittent 30s teardown hangs Fix: Fixed macOS CPU percentage calculation — GetProcAndOSCPUUsage mixed Mach clock ticks (~100/sec) with microsecond-scale process ticks, inflating reported CPU usage by ~10,000x Fix: Implemented real per-thread CPU measurement on macOS via Mach thread_info (previously a stub returning garbage stats for Root-space components) Fix: Fixed ComponentMemory/ProcessMemory off-by-one arena bounds checks and resize/destroyComponent memmove lengths that were over-copying by indexSize*8 bytes Fix: Fixed a dangling-pointer bug in MessageDataCatalog (HTML/TEXT branches) where a std::string temporary's buffer was read after the temporary was destroyed Fix: Fixed SubscriptionEngine, Node, Monitoring, ServiceManager, InterSystemManager, System/Catalog and CCMCatalog using std::map::operator[] on read paths, which silently inserted NULL/empty entries under a shared read lock — a source of routing races and unbounded map growth from arbitrary query keys Fix: Fixed mutex leaks on early returns across Monitoring, ServiceManager, InterSystemManager and ThreadManager Fix: Fixed a PsyProbe out-of-bounds pointer arithmetic bug when indexing recent-message rings Fix: Fixed a Console EOF busy-loop that spun at 100% CPU when stdin closed Fix: Fixed pre-existing psytest.xml spec bugs — duplicate crank names, a broken context-transition chain that stalled the run after the ping stage, and undefined %SignalCount%/%RequestCycles% variables Fix: Fixed aarch64 Linux builds incorrectly detected as 32-bit, breaking builds on ARM64 Linux (e.g. Raspberry Pi 5) Fix: Fixed Linux Python3 build — hardcoded python3.4m include/lib paths replaced with sysconfig-derived paths; fixed LP64 SWIG binding word-size mismatch causing vector vs vector ODR clashes Fix: Fixed the make lgpl / make bsd distribution builds failing on macOS — replace.sh (repo root and CMSDK) used the GNU-only sed -b flag, which BSD sed rejects, and BSD sed aborted with "RE error: illegal byte sequence" on the CP1252-encoded quickstart template; the -b flag is now feature-detected at runtime and sed runs under LC_ALL=C (byte-transparent, preserves CRLF; GNU sed behaviour on Linux/Cygwin unchanged). Verified identical distribution archives on macOS and Linux Perf: TCP messaging throughput ~42k → ~90k msg/s and latency 23.8us → ~11us (~2x) by keeping sockets non-blocking instead of flipping blocking mode on every send, and only reading from the socket when the buffer doesn't already hold the requested bytes Perf: UDP messaging throughput ~107k → ~155k msg/s and latency 9.3us → ~6us via the same socket-mode and buffered-read optimisations Perf: Replaced a per-message 36KB recent-message ring memmove in ComponentMemory/ProcessMemory with a circular write index, removing a large memmove from the hot path Perf: Removed a per-message heap allocation and a no-match leak in the message-routing hot path (SubscriptionEngine::getTriggersForMsg) by adding a fill-in-place overload Perf: MessageProtocol::ReceiveMessage now peeks the header into a stack buffer and does a single malloc(size), replacing a malloc(1KB)+free+malloc(size) sequence per message Perf: Removed 4 fcntl syscalls per message from the TCP send path and 2 from the read path by eliminating redundant per-call socket-mode switching Perf: PsySpace thread-run functions return THREAD_RET without a heap allocation Perf: Increased CMSDK DataMessage and networking performance via targeted optimisation of hot construction/serialisation paths Version 2.0.3 and earlier: see git history. ## CMSDK (BSD) Version 2.1.1 (26/07/2026) ******************** Feature: Added NewProcessEx / ReadProcessOutput / SendProcessBreak in Utils for the Psyclone T1.4 external-exec lifecycle (cross-platform child-process spawn, output capture and graceful-break signalling) Feature: TriggerGroup declarative-join support — CMSDK primitive backing the Psyclone grouped-activation feature, with grouped-delivery documented in the CMSDK LLM guide and Doxygen-clean header comments Fix: Fixed an intermittent network_http teardown hang — a double-delete race in NetworkChannel endConnection/shutdown; teardown now uses bounded waits plus invalid-handle hardening (verified 20/20 clean test=cmsdk runs) Fix: Fixed Windows GetExitCodeProcess misuse — a still-running process was reported as terminated with code 259 (STILL_ACTIVE); process-exit detection is now correct Fix: Fixed a Linux SIGSEGV/hang introduced by the graceful-shutdown thread change — thread reaping is now safe on Linux Fix: Fixed intermittent Windows unit-test failures — graceful thread shutdown plus WAIT_ABANDONED handling Fix: Windows shared memory now honours force by zeroing a pre-existing named mapping; assorted minor Windows compilation fixes Fix: SSL — OpenSSL handshake/certificate errors are now routed through the log system; client-side hostname verification and custom CA locations; verify-peer default with allowselfsigned opt-in Fix: Corrected Subscriptions.h trigger-filter doc-comments — maxage operand is milliseconds (not microseconds), haskey matches any entry type, >=/<= epsilon boundary noted on greaterthan/lessthan, numeric ops parse as float64 Build: Clean builds from scratch fixed — the build/ object directory is now self-created by the compile rules (mkdir -p $(@D)) rather than a parse-time guard, so make clean && make and make rebuild work out of the box Version 2.1.0 (12/07/2026) ******************** Feature: Native macOS support — CMSDK now builds and runs correctly on Apple Silicon/Intel macOS as a first-class platform alongside Linux and Windows, with a full passing unit test suite Feature: Added a unified CMSDK unit test framework (UnitTestFramework.h/.cpp) — one PASS/FAIL line per object, indented perf metrics, timestamped performance JSON (cmsdk_perf_latest.json) with compare= %-deltas for an automated regression-tracking loop, a live overwriting progress line, per-test process isolation with a timeout (a crash/hang in one test can't take down the suite), and self-healing shared-memory cleanup so a killed run can't poison the next Feature: Authored/converted ~20+ object unit tests: Base64, hash (MD5/SHA1/SHA256/CRC32/SHA3/Keccak), MathClasses, Bitmap, HTML, xml_parser, Subscriptions, VantagePoints, Observations, ControlMessage, ThreadManager, DataMessage, NetworkManager, RequestGateway, ComponentMemory, ProcessMemory — 33 tests total, all passing Feature: Added a `network_https` unit test — a real TLS handshake plus encrypted HTTP round-trips over loopback with a runtime-generated self-signed certificate — for SSL/TLS builds Feature: Added `-O0` unoptimised debug/ssldebug build targets for a real single-step debugging experience (previously debug builds were still optimised, making breakpoints unreliable) Feature: Added a per-test hang-diagnostic mechanism — on timeout, the child is signalled (SIGUSR1) to dump a native stack trace of exactly where it hung before being killed, and the parent reports the last progress phase recorded, instead of a bare "timed out" Fix: Fixed a macOS-only thread-liveness bug that caused shutdown hangs across the whole product — IsThreadRunning/CheckForThreadFinished used a destructive pthread_join as a liveness probe (which reaps the thread), so a later authoritative join operated on an already-joined pthread_t: heap-corrupting undefined behaviour. Switched to non-destructive pthread_kill(h,0) liveness probing plus a single authoritative join, with null-handle guards Fix: Fixed two macOS-only timeout-emulation primitives (macos_pthread_mutex_timedlock, macos_pthread_join_with_timeout) that treated an absolute deadline as a relative countdown / used an already-expired deadline, so bounded waits silently became indefinite hangs under contention — root cause of intermittent 30s teardown hangs and 6-27s stalls on IsThreadRunning Fix: Fixed macOS CPU percentage calculation — GetProcAndOSCPUUsage mixed Mach clock ticks (~100/sec) with microsecond-scale process ticks, inflating reported CPU usage by roughly 10,000x Fix: Implemented real per-thread CPU measurement on macOS via pthread_mach_thread_np + Mach thread_info (previously a stub returning false / garbage stats for Root-space components such as AudioInput/AudioOutput) Fix: Fixed ComponentMemory/ProcessMemory off-by-one arena bounds checks (were using > instead of >= indexSize) and resize/destroyComponent memmove lengths that were over-copying by indexSize*8 bytes Fix: Fixed OpenSharedMemorySegment(size=0) reading its size from an offset the caller's own header immediately overwrites; now autodetects the real size via fstat Fix: Fixed a NetworkChannel::shutdown() deadlock — it held channelMutex while joining a worker thread that also needed the same mutex — plus an unsigned-integer underflow in a wait timeout calculation Fix: Fixed NetworkChannel::waitForMessage never setting its connection-id out-parameter, so a receiver had no way to reply to the correct sender; now tracks the source connection id per message Fix: Fixed a NULL-pointer crash in RequestGateway::addToCallLog constructing std::string from NULL getString() results (e.g. a DataMessage request with no "User-Agent"); parameters are now NULL-safe Fix: Fixed Stats::getMedian off-by-two iterator bug and a mutex leak on an early return Fix: Fixed Point::getDistanceTo using the X coordinate twice instead of X and Y Fix: Fixed corrupted multibyte character literals in HTML2Char that broke the build on some toolchains Fix: Fixed aarch64 Linux builds incorrectly detected as 32-bit (BITARCH/-fPIC), breaking builds on ARM64 Linux (e.g. Raspberry Pi 5) Fix: Fixed Linux Python3 build — hardcoded python3.4m include/lib paths replaced with sysconfig-derived paths matching the macOS branch; fixed an LP64 SWIG binding word-size mismatch (vector vs vector ODR clash) that broke the wrapper build on 64-bit Linux Fix: Fixed the make bsd distribution build failing on macOS — replace.sh used the GNU-only sed -b flag, which BSD sed rejects; the flag is now feature-detected at runtime, and sed runs under LC_ALL=C so non-UTF-8 template files cannot trigger BSD sed's "illegal byte sequence" error (byte-transparent, preserves CRLF; GNU sed behaviour on Linux/Cygwin unchanged). Verified identical distribution archives on macOS and Linux Perf: TCP messaging throughput ~42k → ~90k msg/s and latency 23.8us → ~11us (~2x improvement) by keeping sockets non-blocking instead of flipping blocking mode around every send (previously 4 fcntl syscalls/message plus a race with the receive thread on the same socket) Perf: UDP messaging throughput ~107k → ~155k msg/s and latency 9.3us → ~6us via the same socket-mode and buffered-read optimisations Perf: Removed a redundant per-read SetSocketNonBlockingMode call (2 fewer fcntl syscalls per read) Perf: NetworkConnection::receive() now only reads from the socket when the buffer doesn't already hold the requested bytes — a single drain typically pulls a whole message (or several pipelined messages), so most subsequent reads cost no syscall at all Perf: MessageProtocol::ReceiveMessage now peeks the header into a stack buffer and does a single malloc(size), replacing a malloc(1KB)+free+malloc(size) sequence on every message Perf: Replaced a per-message 36KB recent-message ring memmove in both ComponentMemory and ProcessMemory with a circular write index (recentInPos/recentOutPos), removing a large memmove from the hot messaging path Perf: PsySpace*Run thread functions return THREAD_RET without a heap allocation Perf: CMSDK DataMessage construction/serialisation and general networking hot paths optimised (unittest + optimisation pass) Perf: RequestGateway/NetworkManager test harnesses warmed up and stabilised so back-to-back and concurrent runs no longer fail on transient address-in-use or teardown-timing races — validated with a 1500-run soak, zero failures, no hangs Version 2.0.0 Beta 3 (02/07/2014) ******************** Fix: Fixed HTTP server connection issues Fix: Fixed more memory leaks Fix: Fixed several network protocol and connection problems Fix: Since this is still in Beta there are more fixes than can be listed here Performance: Improved messaging performance Feature: Added statistics functions and objects (MovingAverage, etc.) Feature: Added DataMessage toXML and toJSON Version 2.0.0 Beta 2 (23/05/2014) ******************** Fix: Fixed memory leaks Fix: Since this is still in Beta there are more fixes than can be listed here Performance: Improved messaging performance Version 2.0.0 Beta 1 (09/05/2014) ******************** Complete rewrite of all CoreLibrary source code, design and implementation --- **Release 2.2.0 summary:** ~27 fixes since 2.1.1 (18 CMSDK, 9 Psyclone) plus 3 headline features — Builders, Supervisor and LLM Connections — and multi-node bring-up.