Commit graph

1,824 commits

Author SHA1 Message Date
trvon
300695c6b7
fix(embedding): avoid deferred shutdown access before start
Signed-off-by: trvon <me@trevon.dev>
2026-09-05 11:53:10 -06:00
trvon
390431dbd6
fix(ingest): preserve extractor metadata through enrichment
Signed-off-by: trvon <me@trevon.dev>
2026-09-05 11:53:10 -06:00
trvon
5a8cc0e530
fix(metadata): cancel integrity validation without quarantine
Signed-off-by: trvon <me@trevon.dev>
2026-09-05 11:53:04 -06:00
trvon
32e162519d
fix(daemon): retain async initialization completion ownership
Signed-off-by: trvon <me@trevon.dev>
2026-09-05 11:53:04 -06:00
trvon
7900979345
feat(memory-sync): validate traceable record-only task revisions
Signed-off-by: trvon <me@trevon.dev>
2026-09-05 11:52:57 -06:00
trvon
94e948c658
fix(memory-sync): require explicit shared corpus scope
Signed-off-by: trvon <me@trevon.dev>
2026-09-05 11:52:52 -06:00
trvon
8d7629ea7e
fix(retrieval): propagate metadata lookup failures
Signed-off-by: trvon <me@trevon.dev>
2026-09-05 11:52:46 -06:00
trvon
11c391579c
fix(cli): preserve content bytes during hash hydration
Signed-off-by: trvon <me@trevon.dev>
2026-09-05 11:52:46 -06:00
trvon
db4df714e8
fix(daemon): deliver immediate in-process responses once
Signed-off-by: trvon <me@trevon.dev>
2026-09-05 11:52:46 -06:00
trvon
67d2a6a9b1
fix(retrieval): preserve content identities in JSON results
Signed-off-by: trvon <me@trevon.dev>
2026-09-05 11:52:46 -06:00
trvon
fddc2575a5
fix(metadata): keep replica derivation readiness local
Signed-off-by: trvon <me@trevon.dev>
2026-09-05 11:52:40 -06:00
Trevon
f2ed25d68a
Merge pull request #100 from trvon/ci/forgejo-ssh-hostname
ci: use direct Forgejo SSH host
2026-09-04 22:10:00 -06:00
trvon
664c77618d
ci: use direct Forgejo SSH host
Signed-off-by: trvon <me@trevon.dev>
2026-09-04 19:33:01 -06:00
Trevon
11a25d88be
Merge pull request #99 from trvon/ci/disable-forgejo-host-verification
ci: disable Forgejo SSH host verification
2026-09-04 19:12:35 -06:00
trvon
cceaaf6d59
ci: disable Forgejo host verification
Signed-off-by: trvon <me@trevon.dev>
2026-09-04 17:48:44 -06:00
Trevon
fbe88fc5ca
Merge pull request #97 from trvon/ci/isolate-experimental-repositories
ci: isolate experimental package repositories
2026-09-04 17:17:09 -06:00
trvon
f8fbe7fe7a ci: check S3 content type invariant
Signed-off-by: trvon <me@trevon.dev>
2026-09-04 17:14:43 -06:00
trvon
296e732064 ci: make immutable uploads atomic
Signed-off-by: trvon <me@trevon.dev>
2026-09-04 17:14:43 -06:00
trvon
cf732ed8ff ci: follow repository publisher ownership
Signed-off-by: trvon <me@trevon.dev>
2026-09-04 17:14:43 -06:00
trvon
618bd5e0c0 ci: isolate experimental package repositories
Signed-off-by: trvon <me@trevon.dev>
2026-09-04 17:14:43 -06:00
0xkite
52d8f18284
Merge pull request #96 from trvon/ci/experimental-release-trust
ci: trust experimental release artifacts
2026-09-04 17:14:40 -06:00
trvon
0ab39df476
ci: attest experimental release artifacts
Signed-off-by: trvon <me@trevon.dev>
2026-09-03 21:39:17 -06:00
trvon
4778c9154b
ci: pin experimental release source
Signed-off-by: trvon <me@trevon.dev>
2026-09-03 21:39:16 -06:00
trvon
8639893fad
ci: mirror approved refs to Forgejo
Signed-off-by: trvon <me@trevon.dev>
2026-09-03 21:39:16 -06:00
Trevon
63390a54a0
refactor(daemon): extract post-ingest NL graph builder (#88)
* refactor(daemon): extract post-ingest NL graph builder

Signed-off-by: trvon <me@trevon.dev>

* fix(daemon): preserve post-ingest graph behavior

Keep the extracted graph builder private, preserve the original confidence-only
pointer ordering before copying concepts, avoid defining tie order, and use a
C++20-safe identifier. Make path expectations follow production normalization.

Signed-off-by: trvon <me@trevon.dev>

* fix(daemon): include move utility directly

Signed-off-by: trvon <git@trevon.dev>

---------

Signed-off-by: trvon <me@trevon.dev>
Signed-off-by: trvon <git@trevon.dev>
2026-09-03 19:37:37 -06:00
Trevon
0148a05456
refactor(daemon): extract bootstrap status builder (#87)
Signed-off-by: trvon <me@trevon.dev>
2026-09-03 19:37:37 -06:00
Trevon
3b22a30ec5
refactor(search): extract auxiliary vector merge (#86)
* refactor(search): extract auxiliary vector merge

Signed-off-by: trvon <me@trevon.dev>

* fix(search): preserve auxiliary tie behavior

Keep the extracted merge comparator identical to the original score-only sort
and avoid prescribing equal-score order in characterization tests. Qualify the
search detail namespace so the topology test compiles unambiguously.

Signed-off-by: trvon <me@trevon.dev>

* test(search): avoid auxiliary score tie

Signed-off-by: trvon <git@trevon.dev>

---------

Signed-off-by: trvon <me@trevon.dev>
Signed-off-by: trvon <git@trevon.dev>
2026-09-03 19:37:36 -06:00
Trevon
dd43bd661b
refactor(repair): share embedding candidate policy (#85)
* refactor(repair): unify embedding candidate policy

Signed-off-by: trvon <me@trevon.dev>

* test(repair): exercise candidate projection seam

Override the concrete repository grep projection in the test double so the
candidate-policy characterization exercises its in-memory documents.

Signed-off-by: trvon <me@trevon.dev>

---------

Signed-off-by: trvon <me@trevon.dev>
2026-09-03 19:37:36 -06:00
Trevon
2de6d917e3
refactor(daemon): narrow checkpoint WAL capability (#84)
* refactor(daemon): decouple checkpoint repository

Signed-off-by: trvon <me@trevon.dev>

* fix(daemon): preserve partial checkpoint fallback

Signed-off-by: trvon <git@trevon.dev>

---------

Signed-off-by: trvon <me@trevon.dev>
Signed-off-by: trvon <git@trevon.dev>
2026-09-03 19:37:35 -06:00
0xkite
000863e664
docs: replace SourceHut with Forgejo mirror (#91)
Signed-off-by: trvon <me@trevon.dev>
Co-authored-by: trvon <me@trevon.dev>
2026-09-03 17:16:57 -06:00
Trevon
9883a4382b
refactor(vector): decouple embedding generator policy (#83)
* refactor(vector): add injectable executor for the embedding daemon bridge

await_with_timeout spawned coroutines unconditionally on the daemon
global IO context, coupling the vector-layer embedding generator to
daemon globals. EmbeddingConfig gains an optional
boost::asio::any_io_executor executorOverride; the bridge uses it when
present and keeps the global executor as the default — identical
behavior for all existing callers (embedding_service, model providers,
CLI all construct without an override).

Lead 1 plan step (b) of the embedding_generator vector->daemon
decomposition (Brick audit follow-up).

Validation: full ninja build green; meson test yams:service_manager,
vector_submodule, yams:embedding_lifecycle, yams:embedding_recovery —
all green.

Signed-off-by: trvon <me@trevon.dev>

* refactor(vector): split DaemonBackend into own TU

Keep daemon client/IPC headers out of the vector-layer generator TU;
EmbeddingGenerator builds the backend via createDaemonBackend factory
on the existing IEmbeddingBackend seam. Behavior-preserving.

Brick audit lead 1: 5 file-level cycles hubbed on
embedding_generator.cpp.

Signed-off-by: trvon <me@trevon.dev>

* revert(vector): keep bridge executor out of public EmbeddingConfig

Pre-push gate caught it: the config layer includes the vector header
transitively (ConfigResolver.h -> document_chunker.h ->
embedding_generator.h) and has no boost asio include path, so
<boost/asio/any_io_executor.hpp> in the public header breaks the
config build.

Executor selection stays in embedding_daemon_backend.cpp (daemon-facing
TU by design); per-instance injection needs the config->vector include
direction fixed first — recorded as follow-up.

Signed-off-by: trvon <me@trevon.dev>

* refactor(vector): trust resolved backend policy

Remove EmbeddingGenerator's ambient ConfigResolver read. Callers now own
backend-policy resolution; EmbeddingService marks its already-resolved
runtime policy unconditionally. Keep TuneAdvisor only for the process-wide
concurrency gate, where instance-local policy would not coordinate admission.

Tests pin typed backend authority against conflicting environment state.

Signed-off-by: trvon <me@trevon.dev>

* chore(vector): remove stale config include

The generator no longer reads config helpers after backend policy moved to
callers, so drop the misleading DaemonBackend comment and unused include.

Signed-off-by: trvon <me@trevon.dev>

---------

Signed-off-by: trvon <me@trevon.dev>
2026-09-02 10:12:46 -04:00
Trevon
d33fed9c10
chore: remove dead functions and address Fold triage leaks (#82)
* chore: remove dead post-ingest helper

Remove shouldPrepareSequentially, the sole Fold unused-function finding
confirmed dead by clean ASan and TSan builds. All other 45 findings have
live callers or uses that Fold's bounded model missed and remain intact.

Fold provenance: build/fold/release-prep-79.sarif (2026-09-01 run).

Signed-off-by: trvon <me@trevon.dev>

* chore(plugins): document Fold ownership

Document 6 proved memory-leak findings as intentional ownership:
process-lifetime Ort::Env singletons and host-freed C-ABI result data.
Refresh portability allowlist anchors shifted by the comments.

Fold provenance: build/fold/release-prep-79.sarif (2026-09-01 run).

Signed-off-by: trvon <me@trevon.dev>

* fix(storage): treat reserve boundary as emergency

Classify available bytes equal to the configured emergency reserve as Emergency, matching the hard-minimum contract and operator message that the reserve has been reached. Add a regression assertion at the exact boundary.

Signed-off-by: trvon <git@trevon.dev>

---------

Signed-off-by: trvon <me@trevon.dev>
Signed-off-by: trvon <git@trevon.dev>
2026-09-02 08:27:05 -04:00
trvon
5d967b9708
feat(metrics): surface WAL data-system optics in daemon status
WalMetricsProvider::getStats() was wired (attachWalManager) but never
consumed anywhere: WAL active/pending/total entries, bytes, and log-file
count were invisible to operators. Close the optics gap:

- MetricsSnapshot: add walActiveTransactions/PendingEntries/TotalEntries/
  TotalBytes/LogFileCount (detailed snapshot only).
- DaemonMetrics::enrichDetailedSnapshot: populate from
  ServiceManager::getWalMetricsProvider() (cheap atomic reads).
- request_dispatcher_status: emit wal_* requestCounts on detailed status.
- metric_keys.h: kWAL* keys (wal_active_transactions, ...).
- status_command --json: render a 'wal' object when counters are nonzero.
- tests: WalMetricsProvider pass-through unit tests (zeros without a
  manager; forwards WALManager stats; reset on null manager).

Validated: build/debug suite (ConfigResolver 42 cases, metrics core/status,
new WAL provider tests) plus brick (0 new cycles on touched files) and fold
(0 findings on added lines).
2026-09-01 13:55:44 -06:00
trvon
bf598d6dbf
Merge branch 'experimental' of https://github.com/trvon/yams into experimental
Conflicts resolved:
- src/daemon/components/DaemonMetrics.cpp: adopt PR #80 POSIX guard for
  <fstream> (#if !defined(_WIN32) && !defined(__APPLE__)) — the /proc
  readers live in the non-Win/non-Apple branch; narrower __linux__ guard
  would drop fstream on other POSIX targets.
- tests/unit/daemon/components/config_resolver_test.cpp: adopt decoupled
  applyMemorySync expectation (no-op on section sets without memory_sync);
  disk_pressure is validated independently in daemon_main.
- src/daemon/components/ConfigResolver.cpp: drop redundant
  applyStorageDiskPressure coupling inside applyMemorySync (regression vs
  base #79; daemon_main already applies disk pressure separately).
2026-09-01 13:40:12 -06:00
Trevon
901e594fc5
refactor(daemon): apply Brick audit fixes to the PR #79 decomposition (#80)
* feat(storage): expose typed disk pressure policy

Signed-off-by: trvon <git@trevon.dev>

* fix(mcp): preserve embedded stdio buffers

Move process-global stream setup to the MCP executable so embedded transports retain caller-owned redirection. Add a regression for the failing construction order.

* refactor(daemon): scope shared P2P protected-file accessors for cross-TU use

The protected-file accessors (readProtectedP2pPrivateKey,
readProtectedP2pTrustFile, writeExclusiveP2pPrivateKey) are shared by the
P2P identity-key paths and the memory-sync bootstrap. Keep their
platform-specific definitions in p2p_integration.cpp unchanged and scope
them into yams::daemon::service_manager_detail, declared by the private,
non-installed header p2p_protected_file.h. Qualify the internal
callsites. No behavior change.

Prepares moving ServiceManager::initializeMemorySync into the
memory-sync translation unit (Brick audit cohesion note).

Signed-off-by: trvon <me@trevon.dev>

* refactor(daemon): place initializeMemorySync with memory-sync TU

Brick structural audit of PR #79 flagged that
ServiceManager::initializeMemorySync lives in p2p_integration.cpp while
the rest of the memory-sync surface lives in memory_sync.cpp. Move it —
together with its exclusive helper ensureAuthenticatedDirectStore — into
memory_sync.cpp.

The shared protected-file accessors remain defined in
p2p_integration.cpp (see the preceding service_manager_detail commit);
moved function bodies are unchanged and ServiceManager.h is untouched.

Brick evidence (experimental pre-79 af609a1e vs post-79 4d942793):
ServiceManager.cpp functions 84 -> 59 with 25 moved and 0 vanished;
ServiceManager.cpp outgoing call/import edges 1292 -> 954, distinct
targets 59 -> 41.

Validation: full ninja build green; meson test yams:service_manager,
yams:service_manager_shutdown, yams:service_manager_degraded — 3/3 OK.

Signed-off-by: trvon <me@trevon.dev>

* refactor(vector): break simeon_embedding_backend.h include cycle with embedding_generator.h

simeon_embedding_backend.h only declares functions taking EmbeddingConfig
by reference, yet included the full embedding_generator.h definition,
forcing every consumer of the simeon backend header to transitively pull
the generator header (and feeding the embedding_generator <->
simeon_embedding_backend 2-cycle reported by the Brick structural survey).

Replace the include with forward declarations for IEmbeddingBackend and
EmbeddingConfig. Consumers that use the full definitions
(simeon_embedding_backend.cpp, search_engine.cpp,
ingestion_throughput_bench.cpp) now include embedding_generator.h
directly.

Brick caveat: the tool's lexical lane cannot see the header-include edge
removal (0.65-confidence interface-dispatch misattribution keeps a
file-level cycle in its graph); the include-cycle break is verified at
source level. Brick survey pre/post artifacts kept in
worktree build/brick/architecture-iter{,-after}.json.

Validation: full ninja build green; meson test yams:vector_submodule,
yams:simeon_model_provider, yams:embedding_lifecycle,
yams:embedding_recovery, yams:service_manager — 5/5 OK.

Signed-off-by: trvon <me@trevon.dev>

* refactor(vector): extract computeCosineSimilarity from VectorDatabase into vector_utils

The pure cosine-similarity helper was stranded as a static member of the
VectorDatabase storage class, forcing sqlite_vec_backend.cpp to include
vector_database.h for a pure math function (Brick deferred lead #2 from
the PR #79 audit loop).

Move the implementation to vector_utils as a free function
(yams::vector::vector_utils::computeCosineSimilarity, semantics copied
verbatim: 0.0 on size mismatch or zero norm), keep
VectorDatabase::computeCosineSimilarity as a forwarding static for the
external caller in doctor dedupe, and switch the four backend callsites
to the free function. sqlite_vec_backend.cpp no longer includes
vector_database.h.

Validation: full ninja build green; meson test vector_submodule (incl.
simeon_backend_catch2_test) and yams:service_manager — green.

Signed-off-by: trvon <me@trevon.dev>

* refactor(daemon): extract client transport types to break sandbox probe header cycle

ClientTransportMode and ClientConfig moved verbatim from daemon_client.h
into a new shared header client_config.h (Brick deferred lead #3 from the
PR #79 audit loop: daemon_client <-> sandbox_detection type-level cycle).

sandbox_detection.h now depends only on client_config.h; its
implementation adds the explicit daemon_client.h include it needs for
the DaemonClient discovery statics. All existing consumers are
unaffected: daemon_client.h includes client_config.h so ClientConfig
remains visible transitively.

Remaining runtime dependency (sandbox_detection.cpp calling
DaemonClient::resolveSocketPathConfigFirst / isDaemonRunning statics,
which forward to socket_utils and a file-local ping helper) is recorded
as the follow-up for full decoupling; the header-level cycle is broken.

Validation: full ninja build green; meson test yams:service_manager,
yams:multiplex_client, yams:jsonrpc_client, vector_submodule — all green.

Signed-off-by: trvon <me@trevon.dev>

* test: refresh portability allowlist line anchors after include shifts

The Brick-audit include additions (search_engine.cpp,
ingestion_throughput_bench.cpp) and removal (sqlite_vec_backend.cpp)
shifted line numbers, making seven portability allowlist entries stale
(same reviewed raw getenv/path usages, new line numbers). Refresh the
anchors; no code or policy change.

Signed-off-by: trvon <me@trevon.dev>

* fix(daemon): include <fstream> for all POSIX /proc probe paths

The /proc readers compile in the non-Windows/non-Apple branch (BSD and
other POSIX targets), not just under __linux__; guard the <fstream>
include with the same condition so those targets compile.

Copilot review finding on PR #80 (src/daemon/components/DaemonMetrics.cpp:7).

Signed-off-by: trvon <me@trevon.dev>

* refactor(daemon): apply storage.disk_pressure outside applyMemorySync

ConfigResolver::applyMemorySync also applied [storage.disk_pressure],
coupling unrelated config parsing to the memory_sync apply path and
producing a misleading refusal message for invalid disk-pressure
policies. Move the call to its natural site in daemon_main before the
memory_sync apply, with its own accurate refusal message. Same startup
semantics (exit 1 on invalid policy), correct attribution.

Copilot review finding on PR #80 (src/daemon/components/ConfigResolver.cpp:1658).

Signed-off-by: trvon <me@trevon.dev>

* test(daemon): update applyMemorySync no-op expectation after disk-pressure decoupling

applyMemorySync no longer applies [storage.disk_pressure] (moved to its
own call site in daemon_main), so a section set without memory_sync
entries is now a no-op rather than a disk-pressure rejection. The
invalid-disk-pressure rejection is still asserted directly against
applyStorageDiskPressure in the preceding checks.

Caught by the pre-push CI gate (asan+tsan: daemon_component_submodule).

Signed-off-by: trvon <me@trevon.dev>

---------

Signed-off-by: trvon <git@trevon.dev>
Signed-off-by: trvon <me@trevon.dev>
2026-08-31 18:50:18 -04:00
trvon
4d94279353
Merge branch 'experimental' of https://github.com/trvon/yams into experimental 2026-08-30 18:17:49 -06:00
Trevon
6c1846ba80
refactor(daemon): decompose ServiceManager responsibilities (#79)
* fix(ci): enable OpenGrep custom ignore support

Signed-off-by: trvon <me@trevon.dev>

* fix(p2p): centralize backoff cap and bound test polling

Signed-off-by: trvon <me@trevon.dev>

* refactor(daemon): split ServiceManager responsibilities

Signed-off-by: trvon <me@trevon.dev>

* fix(daemon): narrow ServiceManager test-hook declarations

Signed-off-by: trvon <me@trevon.dev>

* chore(architecture): ignore local Brick artifacts

Signed-off-by: trvon <me@trevon.dev>

---------

Signed-off-by: trvon <me@trevon.dev>
2026-08-30 20:08:00 -04:00
trvon
943d2b61f3
Merge branch 'experimental' of https://github.com/trvon/yams into experimental 2026-08-30 15:14:57 -06:00
Trevon
af609a1e63
refactor(p2p): tighten tests, share helpers, and guard test hooks (#77)
Compile the direct-P2P test-only machinery out of production builds
(YAMS_DAEMON_TEST_HOOKS_ENABLED now wraps the reconnect-loop hook storage,
invoker, and call site, matching the already-guarded setter). Replace the
single shared writer key in p2p_manager tests with one distinct key pair per
writer identity so origin-binding regressions (a record claiming origin X but
signed by Y's key) fail verification. Extract the copy-pasted bytes/text/TempDir
helpers into tests/common/p2p_test_helpers.h and reuse them across the
transport/delta/manager suites. Replace a timing-sensitive fixed sleep in the
transport session-expiry test with a bounded poll that accepts both deadline
manifestations, and gate the memory-sync-service concurrent-lifecycle stress
case behind YAMS_RUN_STRESS_TESTS=1 per the existing FTS5 pattern. Deduplicate
the byte-identical commitment-JSON serialization inside MemorySyncLoop
(coldBootstrapRoot / persistReplicationCheckpoint) into one static helper.

Signed-off-by: trvon <git@trevon.dev>
2026-08-30 11:27:12 -06:00
Trevon
d012d95b07
fix(p2p): harden CLI status and operator/key-rotation flows (#76)
Keep `p2p status` text output machine-parseable by removing ANSI severity
colorization, and stop connect/disconnect/forget from throwing on malformed
daemon responses (safe .value defaults, uint64 counters). Bound handshake and
delta timeouts to kP2pMaxOperationTimeout up front, and ceiling direct
sync_interval_ms to the 5-minute reconnect bound so invalid config fails early
instead of aborting daemon startup. Degrade memory-sync status to peerCount=0
on a transient peer-registry read instead of failing the whole status IPC. Add
an explicit `p2p forget` operation (proto FORGET=9 through dispatcher, manager,
and registry) so operators can rotate a peer's pinned key while preserving
fail-closed enrollment.

Signed-off-by: trvon <git@trevon.dev>
2026-08-30 11:27:11 -06:00
Trevon
89d9f7ca57
fix(p2p): harden direct-P2P framing and ingress admission (#75)
Bound pre-authentication JSON nesting depth to 32 so a pathologically nested
control frame cannot overflow the session-thread stack before any trust
decision. Raise the control-frame cap to 512 KiB to cover the worst-case
authenticated state frame (~300 KiB across 256 writers x 256-byte ids). Gate
MemorySyncLoop::applyDeltas through the resource governor so a peer cannot
flood deltas on the direct replication path. Account delta/bootstrap wire bytes
using the exact received frame size instead of a compact re-serialization.

Signed-off-by: trvon <git@trevon.dev>
2026-08-30 11:27:11 -06:00
Trevon
9c19452e7d
test(p2p): add direct control fuzz harnesses (#74)
Add libFuzzer/AFL++ harnesses for the direct-P2P handshake/state/history and
delta/bootstrap control parsers. Fuzzers invoke the same production parser
seams as the live wire path, so coverage cannot drift from real validation. A
protocol-v3 seed exercises exact-version rejection after the v4 upgrade. Bound
noninteractive AFL++ campaigns with AFL_FUZZ_SECONDS and register focused
fuzz-smoke tests without duplicating broad protocol/delta registrations.
Clarify that peer/cycle status is local health telemetry rather than global
convergence, and document the remaining decision-grade live-performance gate.

Signed-off-by: trvon <git@trevon.dev>
2026-08-30 11:27:11 -06:00
Trevon
e954c6da71
fix(p2p): serialize sync application (#73)
Signed-off-by: trvon <git@trevon.dev>
2026-08-30 11:27:10 -06:00
Trevon
1c30839d7f
fix(p2p): harden bootstrap trust (#72)
Require authenticated direct stores and explicit operator enrollment while hardening private keys and trust files across Unix and Windows. Sign local control artifacts, bind them to a protected store generation, and serialize async initialization shutdown.

Signed-off-by: trvon <git@trevon.dev>
2026-08-30 11:27:10 -06:00
Trevon
0eac7c2fd9
fix(p2p): harden transport availability (#71)
Signed-off-by: trvon <git@trevon.dev>
2026-08-30 11:27:09 -06:00
Trevon
dbe7aea900
fix(p2p): resume bounded history catch-up (#70)
Signed-off-by: trvon <git@trevon.dev>
2026-08-30 11:27:09 -06:00
Trevon
70a4977249
fix(p2p): replicate content deletion (#69)
Signed-off-by: trvon <git@trevon.dev>
2026-08-30 11:27:09 -06:00
Trevon
5a53cdfa90
feat(p2p): add authenticated direct replication (#68)
* fix(memory-sync): keep replication responsive

Skip poisoned blobs without wedging backfill and publish immutable status snapshots so daemon IPC does not block on an active reconciliation cycle.

Reconstructed from ff62d3f8, 8e232721, and e60f513d.

Signed-off-by: trvon <git@trevon.dev>

* feat(p2p): add authenticated direct transport

Require TLS 1.3 mutual identity and bind the authenticated certificate, node, corpus, and epoch before replication state is exchanged.

Reconstructed from 96f9db88 and c46de77b.

Signed-off-by: trvon <git@trevon.dev>

* feat(p2p): exchange causal deltas

Persist peer pins and causal resume state before visibility so reconnects continue bounded authenticated replication without becoming remote query proxies.

Reconstructed from 1b8be146 and 41883338.

Signed-off-by: trvon <git@trevon.dev>

* feat(p2p): integrate direct sync services

Wire listener, reconnect, IPC, CLI, peer persistence, and daemon lifecycle around the authenticated direct transport.

Reconstructed from a19aaa44.

Signed-off-by: trvon <git@trevon.dev>

* fix(p2p): apply replicated document state

Index authenticated remote winners, propagate document tombstones, and keep service/test wiring complete across daemon paths.

Reconstructed from 4ca660c6, 443253f1, 3e9db24d, and 4b2ddcc5.

Signed-off-by: trvon <git@trevon.dev>

* test(p2p): register direct sync gates

Replace the superseded internal contract with operator-facing direct-sync guidance and register daemon integration coverage in the standard test layout.

Reconstructed from 360b9115 and 89416ccb.

Signed-off-by: trvon <git@trevon.dev>

* fix(p2p): require bounded peer enrollment

Bound aggregate sessions and worker lifetimes, create owner-only identity keys atomically, and reject unknown inbound peers until operators pin their mTLS identity.

Reconstructed from f91be528, 79de8e48, 4fb1e4b8, dc30a6c0, and b329edd3.

Signed-off-by: trvon <git@trevon.dev>

* fix(p2p): persist quarantine and deletes

Persist full-history writer commitments before invalidating forked state, and order local deletion through a durable authenticated outbox so tombstones survive crashes and reconnects.

Reconstructed from 74ce01e0 and 19888604.

Signed-off-by: trvon <git@trevon.dev>

* feat(p2p): add authenticated cold bootstrap

Install bounded zero-state snapshots only from previously operator-pinned peers, bind them to exact frontiers and full-history commitments, and recover staged journals before replication can resume.

Reconstructed from 8a9f5acf.

Signed-off-by: trvon <git@trevon.dev>

---------

Signed-off-by: trvon <git@trevon.dev>
2026-08-30 11:27:08 -06:00
trvon
8055563eaa
fix(mcp): preserve embedded stdio buffers
Move process-global stream setup to the MCP executable so embedded transports retain caller-owned redirection. Add a regression for the failing construction order.
2026-08-27 23:29:27 -06:00
trvon
05202d49a3
feat(storage): expose typed disk pressure policy
Signed-off-by: trvon <git@trevon.dev>
2026-08-27 09:54:06 -06:00