Commit graph

13 commits

Author SHA1 Message Date
Trevon
211db15606
fix(daemon): bound semantic neighbor scores and report startup phase (#334)
Semantic-neighbor maintenance aborted the daemon during startup:
std::clamp<float> asserted '!(__hi < __lo)' because the adaptive cosine
threshold could exceed 1.0 for a legal pair of identical vectors. The same
work was also admitted while the daemon was still initializing, so the
300-second starvation guard forced a pass before readiness.

+ semanticInverseNorm/semanticCosineSimilarity/semanticExplicitThreshold in the
  existing embed policy header, shared by the streamed and corpus branches;
  non-finite vectors or scores produce no neighbor and legal scores are bounded
  before ranking and threshold selection
+ startupMaintenanceEligible() requires ServiceManagerState::Ready, not
  stopping and idle, and is evaluated before
  ResourceGovernor::admitDeferrable(), so an elapsed deferral deadline can no
  longer manufacture missing readiness
+ StartupPhaseTracker (two atomics, no mutex) plus a warn-level init-waiter
  line reporting state, phase and phase_elapsed_ms instead of a debug-level
  state number; a 53-minute startup previously logged nothing actionable
+ regression through the public backfill and corpus-rebuild APIs using a 64-D
  vector whose old float inverse norm rounds its self-cosine above 1
- removed the duplicated inverse-norm and cosine lambdas from EmbeddingService
- renamed __test_setModelProvider/__test_setKgStore to testing_* because they
  used reserved identifiers, across 11 files
- re-anchored 13 pre-existing raw-environment allowlist entries to their new
  line numbers; no new exception was added

Startup is still blocked by corpus-sized memory-sync scans; this change stops
the abort and names the blocking phase, it does not make startup fast.

Signed-off-by: trvon <git@trevon.dev>
2026-10-22 16:48:49 -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
d03ffd07b3
refactor(plugins): centralize lifecycle policy 2026-08-03 17:52:58 -04:00
trvon
a930776655
feat: cleaning up test suite 2026-04-14 10:25:54 -04:00
trvon
364a11476d
fix: improvements for embedding repair routing to hot model. Continued search / graph build retrieval improvements 2026-04-06 09:55:59 -04:00
trvon
a3fd21766c
feat: reliability improvements for daemon lifecycle, submodule bumps, plugin improvements and search tuning optimizations based on benchmarks 2026-03-09 19:38:15 -04:00
trvon
8f06bd615f
feat: security fixes for plugin install and adding additional UTF-8 string sanitization 2026-02-28 10:17:03 -05:00
trvon
099bbef70d
feat: large update. Documentation update, config and plugin hardning and improvements related to loading trust. Exposed trust state in the doctor command with hints on improvements. Bug fixes and test improvements to reduce flakiness and TSAN issues 2026-02-26 11:21:29 -05:00
trvon
aacd7af41f
running linter 2025-12-13 16:27:07 -05:00
trevon
86378b8cb6
testing improvements, bug fixes for plugin loading and logic. Search engine bug fix 2025-12-12 04:54:25 -05:00
trvon
70e88af608
running linter 2025-11-25 13:10:29 -05:00
trevon
244cf02822
windows build stable on dev machine 2025-11-23 23:22:30 -05:00
trvon
166d8c520d
staging v0.7.7 2025-11-01 16:02:12 -04:00