24 Commits

Author SHA1 Message Date
Dmitry Ng 87ac00f195 test(graphiti): strengthen search method tests with proper types 2026-04-11 15:20:52 +03:00
Dmitry Ng 51385079ed Merge pull request #244 from mason5052/test/graphiti-client-coverage
test: add unit tests for graphiti client disabled mode
2026-04-11 16:13:25 +04:00
Dmitry Ng 6753e2b3d6 test(langfuse): strengthen noop tests with safer assertions 2026-04-11 14:02:21 +03:00
Mason b323a8ace0 test: add unit tests for langfuse context and noop observer (#242)
* test: add unit tests for langfuse context and noop observer

Add tests for observation context put/get round-trip, nested context
override behavior, and noop observer: trace ID generation, parent
inheritance, explicit override, Shutdown, ForceFlush, and enqueue.

* test: add edge case tests for noop observer branch coverage

Add two missing branch tests: explicit ObservationID with no parent
context (verifies new trace generation), and explicit TraceID with
parent (verifies observation ID is NOT inherited when trace is explicit).
2026-04-11 14:43:36 +04:00
Dmitry Ng 10e77fb546 test(langfuse): fix float assertions and strengthen type checks 2026-04-11 13:40:15 +03:00
Dmitry Ng 930830e742 test(schema): improve test clarity with null byte comments 2026-04-11 13:17:55 +03:00
Dmitry Ng 7c25f356ed feat: enable runtime provider switching
Adds conditional chain normalization in processChain to preserve reasoning cache when provider unchanged while fixing incomplete tool_calls and converting IDs when switching providers. Extends GraphQL API with modelProvider parameter for seamless provider changes without restart.
2026-04-08 23:58:56 +03:00
mason5052 166035b3de test: add unit tests for graphiti client disabled mode
Add tests for NewClient with enabled=false, IsEnabled nil/disabled/enabled
receivers, GetTimeout nil/configured, AddMessages no-op on disabled client,
and all 7 search methods returning "graphiti is not enabled" error when
disabled. All tests are hermetic with no network dependency.
2026-04-08 12:06:32 -04:00
mason5052 161b122d91 test: add getCurrentTimeRef test and strengthen ModelParameters assertions
Add missing TestGetCurrentTimeRef coverage. Replace shallow key-presence
checks in ModelParameters.ToLangfuse tests with full value assertions:
verify MapValue string/integer/boolean/list payloads for inf default,
explicit max_tokens, formatted floats, json mode, and stop words.
2026-04-08 11:29:00 -04:00
mason5052 cad6b01ebb test: add unit tests for langfuse helpers package
Add comprehensive unit tests for all utility functions in the langfuse
helpers package: mergeMaps, ObservationLevel, GenerationUsageUnit,
GenerationUsage, ModelParameters, GetLangchainModelParameters, trace/span
ID generation, time helpers, and pointer helpers.
2026-04-08 09:44:01 -04:00
Dmitry Ng 36ac0c876b Merge pull request #234 from octo-patch/fix/issue-220-user-defined-provider-precedence
fix: user-defined providers take precedence over built-in providers
2026-04-08 04:58:07 +04:00
Dmitry Ng fc91758b9c Merge pull request #238 from vxcontrol/feature/frontend
Add Analytics Dashboard and Template Management System
2026-04-08 04:36:05 +04:00
Dmitry Ng 089dcb36b4 feat: implement flow templates management 2026-04-08 03:34:32 +03:00
Dmitry Ng 51cb312b57 Merge pull request #230 from mason5052/test/server-models-validation
test: add unit tests for key server/models validation types
2026-04-08 01:20:43 +04:00
mason5052 1b2681cd99 test: shadow loop variable to prevent parallel subtest capture
Add tt := tt inside each for-range loop before t.Run to ensure
parallel subtests capture their own immutable copy of the test case.
2026-04-06 19:15:29 -04:00
Octopus a12ffe9c01 fix: user-defined providers take precedence over built-in providers (fixes #220) 2026-04-05 09:44:53 +08:00
dependabot[bot] 17a76e46e2 build(deps): bump github.com/go-jose/go-jose/v4
Bumps the go_modules group with 1 update in the /backend directory: [github.com/go-jose/go-jose/v4](https://github.com/go-jose/go-jose).


Updates `github.com/go-jose/go-jose/v4` from 4.1.3 to 4.1.4
- [Release notes](https://github.com/go-jose/go-jose/releases)
- [Commits](https://github.com/go-jose/go-jose/compare/v4.1.3...v4.1.4)

---
updated-dependencies:
- dependency-name: github.com/go-jose/go-jose/v4
  dependency-version: 4.1.4
  dependency-type: indirect
  dependency-group: go_modules
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-03 04:22:29 +00:00
mason5052 8ddc25f411 test: add failure-path coverage for schema validation
Add missing negative-path tests:
- Schema.Valid() with invalid $ref that fails compilation
- GetValidator() with same invalid schema returns error
- ValidateBytes() with malformed JSON input returns error
2026-03-31 21:54:51 -04:00
mason5052 62dbefdd25 test: fill coverage gaps in server/models validation tests
Add missing test coverage identified by cross-review:

New files:
- assistants_test.go: AssistantStatus enum, Assistant struct, CreateAssistant,
  PatchAssistant (stop/input actions), AssistantFlow nested validation
- prompts_test.go: PromptType enum (8 valid constants from templates pkg),
  Prompt struct, PatchPrompt validation

Extended existing files:
- users_test.go: add AuthCallback positive-path test, UserRolePrivileges
  validation, fix brittle double-call assertion in UserPreferences test
- api_tokens_test.go: add APITokenWithSecret validation (valid, invalid
  embedded token, invalid JWT)
- flows_test.go: add Flow.Valid, FlowTasksSubtasks.Valid,
  FlowContainers.Valid, Task.Valid, TaskSubtasks.Valid, Subtask.Valid,
  Container.Valid with valid/invalid/missing-field cases
2026-03-31 21:53:39 -04:00
mason5052 cc0260b205 test: add unit tests for schema package JSON Schema validation
Add comprehensive test coverage for the schema package including
Schema validation, JSON Schema Draft 7 compilation, document validation,
database serialization, and custom Type marshaling.

Tests cover:
- Schema.Valid() with various schema types (string, object, array, etc.)
- Schema.GetValidator() compilation
- Schema.ValidateString/ValidateBytes/ValidateGo with valid and invalid docs
- Schema.Value()/Scan() database serialization round-trip
- Type.MarshalJSON() including object auto-properties and ExtProps
- Type.UnmarshalJSON() including ExtProps extraction
- Pattern, enum, and array constraint validation
- scanFromJSON helper with string, bytes, and error cases
2026-03-31 20:37:16 -04:00
mason5052 5d4638e79d test: add unit tests for server/models validation functions
Add comprehensive test coverage for the server/models package validation
logic including enum types, struct validators, and custom validators.

Test files added:
- users_test.go: UserStatus, UserType, Login, Password, User,
  UserPassword, AuthCallback, UserRole, UserPreferences validation
- providers_test.go: ProviderType, Provider, CreateProvider,
  PatchProvider, ProviderInfo validation
- api_tokens_test.go: TokenStatus, APIToken, CreateAPITokenRequest,
  UpdateAPITokenRequest, APITokenClaims validation
- flows_test.go: FlowStatus, TaskStatus, SubtaskStatus, ContainerStatus,
  ContainerType, Role, Privilege, RolePrivileges, PatchFlow validation
- init_test.go: Custom validators (stpass, vmail, oauth_min_scope,
  solid, semver, semverex) and scanFromJSON helper
2026-03-31 20:36:51 -04:00
Dmitry Ng 600419bed3 feat: add license compliance documentation and reporting tools
- Introduce CONTRIBUTING.md for license compliance guidelines for developers.
- Update Dockerfile to generate license reports for frontend and backend dependencies.
- Add scripts for generating license reports and include them in the Docker build process.
- Create README.md and .gitignore files in the licenses directory for better organization.
- Update go.mod and go.sum to use the latest versions of vxcontrol dependencies.

This enhances the project's compliance with licensing requirements and improves dependency management.
2026-03-29 18:48:06 +03:00
Dmitry Ng c8cd0e68f9 feat: add Docker host network mode support and improve agent terminal execution
- Add host network mode support in Docker client (DOCKER_NETWORK=host)
- Update documentation for network modes (bridge vs host)
- Enhance OOB port allocation guidance with mandatory directives
- Improve terminal command execution descriptions (detach, timeout)
- Fix MSF workflow issues: add process isolation rules and RPC daemon patterns
- Add terminal execution mechanics to adviser prompts for better monitoring
- Update installer locale with host network mode explanation

Fixes agent issues with msfconsole hanging, port conflicts, and process isolation.
2026-03-29 15:53:30 +03:00
Dmitry Ng b90ea4711e repo final state 2026-03-26 06:16:07 +03:00