Skip to content

chore: v2 - ai assistant - unit tests#2336

Open
maxy-shpfy wants to merge 1 commit into
05-27-feat_v2_-_ai_assistant_-_architect_subagentfrom
05-27-chore_v2_-_ai_assistant_-_unit_tests
Open

chore: v2 - ai assistant - unit tests#2336
maxy-shpfy wants to merge 1 commit into
05-27-feat_v2_-_ai_assistant_-_architect_subagentfrom
05-27-chore_v2_-_ai_assistant_-_unit_tests

Conversation

@maxy-shpfy
Copy link
Copy Markdown
Collaborator

@maxy-shpfy maxy-shpfy commented May 28, 2026

Description

Adds a comprehensive unit test suite covering the agent layer's core modules. The following areas are now tested:

  • SkillsLoader – cold-cache fetches, version-matched cache hits, stale-version refetches, offline fallback to stale IDB rows, 404 handling, and concurrent-call deduplication.
  • createCsomTools – full 18-tool surface enumeration, get_pipeline_state / validate_pipeline JSON serialization, add_task null-field stripping and structured-outputs schema correctness (typed anyOf branches), argument-order pins for rename_task, rename_input, rename_output, and set_task_argument, and null-to-undefined normalization for add_input / add_output.
  • createDebugTools – tool name enumeration and truncation wiring for get_execution_details (artifact-map collapse), get_container_state (debug_info key cap), and get_container_log (byte-budget enforcement).
  • createRunTools – tool name enumeration and get_run_status overall-status derivation from execution_status_stats.
  • executeSearchDocs – cosine-similarity ranking, default topK of 5, empty-index short-circuit, IDB cache population and reuse, and fetch-failure error payload. executeSearchDocs is exported to enable direct testing.
  • truncate utilitiestruncateContainerLog (per-field byte budgets, null/undefined passthrough), truncateContainerState (20-key cap, per-value string truncation), and truncateExecutionDetails (non-empty artifact map collapse).
  • serializeSpecForAi – name/description, empty-spec defaults, input/output field inclusion, task isSubgraph flag, binding serialization, and activeSubgraphPath handling.
  • createToolBridgerequireSpec guard, getPipelineState, pipeline metadata mutations, task/input/output CRUD, connection creation/validation/deletion, setTaskArgument, subgraph creation, pipeline validation, submitPipelineRun (success, error, missing backend), and debugPipelineRun (failed-child walking with truncated payloads).

Test Instructions

All tests should pass with no failures.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 28, 2026

🎩 Preview

A preview build has been created at: 05-27-chore_v2_-_ai_assistant_-_unit_tests/9c53fbc

Copy link
Copy Markdown
Collaborator Author

@maxy-shpfy maxy-shpfy force-pushed the 05-27-chore_v2_-_ai_assistant_-_unit_tests branch from 51f8b20 to 9c53fbc Compare May 28, 2026 06:45
@maxy-shpfy maxy-shpfy marked this pull request as ready for review May 28, 2026 06:49
@maxy-shpfy maxy-shpfy requested a review from a team as a code owner May 28, 2026 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant