Commit graph

736 commits

Author SHA1 Message Date
trvon
6528949e75
fix(retrieval): harden one-shot output
Deduplicate unary results, verify direct blobs before writing, and surface stream finalization failures instead of reporting partial output as successful.

Signed-off-by: trvon <git@trevon.dev>
2026-08-23 19:36:29 -06:00
trvon
8c1ea34b33
fix(graph): scope health checks to graph data
Signed-off-by: trvon <git@trevon.dev>
2026-08-23 19:36:28 -06:00
trvon
910a1d7f9c
test(daemon): harden background wait, slow-lane hysteresis 2026-08-21 08:55:23 -06:00
trvon
e2f5f55974
test(daemon): fix pool teardown race and scale hysteresis 2026-08-21 05:14:10 -06:00
trvon
734bbe3a0c
test(extraction): poll for launcher response lines 2026-08-20 23:25:33 -06:00
trvon
788140eeee
fix(cli): discover daemon log via status 2026-08-20 21:00:49 -06:00
trvon
6372763f6e
fix(storage): sign S3 wire path verbatim 2026-08-20 19:52:20 -06:00
trvon
44939e5828
fix(daemon): bypass strand close during global teardown 2026-08-20 19:51:56 -06:00
trvon
2c350218e7
test(memory-sync): scale convergence waits 2026-08-20 07:25:01 -06:00
trvon
ee41571aef
fix(daemon): preserve stamp claim ownership 2026-08-20 07:24:45 -06:00
trvon
8a097a93c5
fix(daemon): serialize socket accept shutdown 2026-08-19 17:26:49 -06:00
trvon
7a69883230
test(ci): isolate ARM smoke lifecycles 2026-08-19 14:34:04 -06:00
trvon
d152b5697d
chore(tooling): mark dependency-managed includes 2026-08-19 08:43:17 -06:00
trvon
45c692a370
test(daemon): synchronize repair hysteresis setup 2026-08-19 08:43:02 -06:00
trvon
a83897eeb9
test(ci): normalize Windows expectations 2026-08-19 05:25:52 -06:00
trvon
d9f914267a
fix(memory-sync): escape acknowledgement keys 2026-08-19 05:25:31 -06:00
trvon
0e3378113e
test(ci): fix remaining platform builds 2026-08-19 01:54:59 -06:00
trvon
a34f49f39e
test(ci): stabilize platform matrix 2026-08-18 21:07:59 -06:00
trvon
c30793d1d9
test(portability): reject analyzer shims 2026-08-17 21:43:12 -06:00
trvon
c56cae7961
fix(metadata): normalize extraction status 2026-08-17 21:43:12 -06:00
trvon
5a24effbae
fix(daemon): harden async shutdown 2026-08-17 21:43:12 -06:00
trvon
6f93435d04
docs(p2p): define local validation contract 2026-08-17 21:43:11 -06:00
trvon
b152429229
fix(vector): bind rebuild readiness to epochs 2026-08-17 21:43:11 -06:00
trvon
9b1091757b
feat(p2p): expose sync protocol status 2026-08-17 21:43:11 -06:00
trvon
780c602d50
feat(daemon): wire bounded sync lifecycle 2026-08-17 21:43:11 -06:00
trvon
9fdf75eb60
feat(memory-sync): add vector adapter 2026-08-17 21:43:11 -06:00
trvon
e3ce4496f5
feat(memory-sync): add metadata adapters 2026-08-17 21:43:11 -06:00
trvon
86fe2ff6c9
feat(memory-sync): manage session lifecycle 2026-08-17 21:43:10 -06:00
trvon
ccbc7e768e
fix(memory-sync): bound reconciliation 2026-08-17 20:05:07 -06:00
trvon
4340a24bee
feat(memory-sync): authenticate records 2026-08-17 20:03:52 -06:00
trvon
2261019ee9
feat(storage): add sync backend primitives 2026-08-17 20:03:34 -06:00
trvon
0ed43a1a3f
test(daemon): make lock-holder test fork-safe
The child forked by 'Daemon does not terminate unverified data-dir lock
holder' built an fs::path and called json::dump(), both of which allocate;
a fork in a multithreaded process can leave the malloc lock held, so the
child could fail before signaling readiness. Pre-compute the lock path in
the parent, format the payload with snprintf into a stack buffer, signal a
failure byte on open/flock error, and retry the parent's read on EINTR.
Portability allowlist line numbers updated for the shift.
2026-08-14 12:06:06 -06:00
trvon
5b251a0337
fix(memory-sync): parse s3 URL via storage resolver
Route the s3 backend through StorageBackendFactory::parseURL so scheme
detection, authority credentials, and query params flow through the same
path as the daemon's storage resolver, and reject a backend=s3 config
whose path is not an s3:// URL.
2026-08-13 12:20:03 -06:00
trvon
7fffac1cc3
test(p2p): add container convergence harness
docker-compose with two saged daemons + MinIO (R2 stand-in) + shared
volume, a multi-stage saged.Dockerfile, and a validation script driving
filesystem<->filesystem convergence and causal-ordering determinism
(scenarios 1 + 3).
2026-08-13 12:20:03 -06:00
trvon
ed8778163e
feat(cli): add yams p2p publish/read/status
Thin p2p command over the memory-sync service: publish <key> <value|@file>,
read <key>, and status (merged index summary + backend identity). Binary
values are hex-encoded in JSON output; config resolves from [memory_sync]
with --backend/--path/--node-id overrides.
2026-08-13 12:20:02 -06:00
trvon
347da90df4
feat(memory-sync): add daemon config + service factory
Typed MemorySyncDaemonConfig parsed from the [memory_sync] TOML section
(enabled, node_id, backend, path, sync_interval_ms) plus
createMemorySyncService() which resolves filesystem/s3 backends and
constructs the service. No YAMS_* env knobs.
2026-08-13 12:20:02 -06:00
trvon
15bbaa8567
refactor(cli): extract testable post-init guidance
Factor the post-setup 'what next / how to configure' guidance into pure
formatLaterCommand/formatInitSummary builders so each decision branch's
help is testable without stdout, and add a focused test asserting the
later-command and ready-summary text. Output is byte-identical.
Portability allowlist line numbers updated for the shift.
2026-08-13 12:20:02 -06:00
trvon
7ad04189f5
refactor(cli): extract already-initialized init path
Factor the alreadyInitialized && !force_ branch out of the monolithic
execute() into a private handleAlreadyInitialized() helper. Behavior
preserved; setup decision/try nesting reduced. Portability allowlist
line numbers updated for the shift.
2026-08-13 08:33:15 -06:00
trvon
b5d50bf9e6
feat(memory-sync): add periodic sync service
Daemon-facing service owns the backend + sync loop and reconciles on a
configurable interval via a stoppable worker thread. Typed
MemorySyncConfig (nodeId, syncIntervalMs); start/stop idempotent and
stop noexcept-safe. Backend injected so filesystem and S3/R2 resolution
stay with the caller.
2026-08-13 08:17:01 -06:00
trvon
24a15e67d3
feat(memory-sync): add backend-agnostic sync loop
Publish memory records as content-addressed blobs plus a
version-vector-tagged index record per write; sync lists the index,
pulls records, and LWW-merges to a deterministic winner per logical
key. Backend injected (filesystem / S3-R2 interchangeable).
2026-08-13 08:13:44 -06:00
trvon
91c64d6192
feat(memory-sync): add version-vector + LWW data model
Version vector (element-wise max merge, dominates/concurrent partial
order) plus hybrid timestamp and LWW resolution: causally-later writes
win, concurrent writes resolve deterministically by (ts, origin). JSON
serialization via nlohmann. Header-only, no library deps.
2026-08-13 08:05:01 -06:00
trvon
b7eaea8263
test: move stress cases to slow suite
Stress-tagged cases ran in the default unit lane because only ~[slow]
was filtered. Tag them [slow] and add ~[slow]/[slow] splits to the five
binaries (mcp_submodule, work_coordinator, daemon_background,
plugin_infrastructure, hybrid_search) so they run in the slow suite.
2026-08-12 20:36:16 -06:00
trvon
c64fae7eac
test(storage): tag refcount stress cases slow
Stress cases with 20 threads / 200 iterations run in the default unit
lane because only ~[slow] is filtered. Tag them [slow] so they move to
the storage_submodule_slow suite.
2026-08-12 20:31:09 -06:00
trvon
b34bfcf508
test(portability): add cross-platform lint gate
Catch Windows/Linux/macOS-only defect classes before push: raw
std::jthread, sqlite3_open* via bare path.c_str(), and raw getenv
reads outside the config boundary. Wired into pre-commit and the
unit/policy suite; 575 reviewed sites allowlisted.
2026-08-12 19:54:02 -06:00
trvon
9a234f449f
test(metadata): clone DB template via VACUUM INTO
copy_file of the migrated WAL-mode template plus -wal/-shm sidecars
corrupts WAL replay on Windows (stale -shm), losing kg_nodes. VACUUM
INTO produces a self-contained single-file copy; a probe verifies the
KG schema survived the clone.
2026-08-12 19:32:48 -06:00
trvon
8911c5fa5e
fix(config): distinguish empty from unset env on Windows
_putenv_s removes a variable for "" and returns EINVAL for NULL, so the
CRT environment cannot represent an explicitly empty value; the boundary
collapsed unset and empty into one state. Read/write through the Win32
environment (SetEnvironmentVariableA/GetEnvironmentVariableA) instead,
keeping a best-effort _putenv_s sync so legacy std::getenv readers stay
coherent, and treat the empty-vs-unset read race fail-closed.
2026-08-12 19:14:34 -06:00
trvon
f392cf0954
style(tests): align validation formatting 2026-08-12 12:29:12 -06:00
trvon
be24d07c27
fix(ci): stabilize sanitizer validation
Rebuild macOS TSan outputs so compiler instrumentation and compiler-rt come from one Apple toolchain generation. Preserve daemon fixture dependencies until ServiceManager teardown so sanitizer lanes do not exercise a test-only use-after-free.
2026-08-08 11:42:33 -04:00
trvon
7485b482f8
fix(build): restore clean test and benchmark links 2026-08-06 09:59:07 -04:00
trvon
b1cefa4179
fix(bench): reject unknown arguments 2026-08-05 20:53:19 -04:00