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/f6e6941

Copy link
Copy Markdown
Collaborator Author

maxy-shpfy commented May 28, 2026

@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
@maxy-shpfy maxy-shpfy force-pushed the 05-27-feat_v2_-_ai_assistant_-_architect_subagent branch from a1a47ab to 87d63ae Compare June 1, 2026 16:41
@maxy-shpfy maxy-shpfy force-pushed the 05-27-chore_v2_-_ai_assistant_-_unit_tests branch from 9c53fbc to 0405d6d Compare June 1, 2026 16:41
@maxy-shpfy maxy-shpfy force-pushed the 05-27-feat_v2_-_ai_assistant_-_architect_subagent branch from 87d63ae to 860e741 Compare June 1, 2026 16:53
@maxy-shpfy maxy-shpfy force-pushed the 05-27-chore_v2_-_ai_assistant_-_unit_tests branch from 0405d6d to 8176a7b Compare June 1, 2026 16:53
@maxy-shpfy maxy-shpfy force-pushed the 05-27-feat_v2_-_ai_assistant_-_architect_subagent branch from 860e741 to d10347a Compare June 1, 2026 17:07
@maxy-shpfy maxy-shpfy force-pushed the 05-27-chore_v2_-_ai_assistant_-_unit_tests branch from 8176a7b to 276e203 Compare June 1, 2026 17:07
Copy link
Copy Markdown
Collaborator

@camielvs camielvs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm as long as tests continue to pass

@maxy-shpfy maxy-shpfy force-pushed the 05-27-feat_v2_-_ai_assistant_-_architect_subagent branch from d10347a to 76feab5 Compare June 2, 2026 01:50
@maxy-shpfy maxy-shpfy force-pushed the 05-27-chore_v2_-_ai_assistant_-_unit_tests branch 2 times, most recently from 98933d5 to e65c099 Compare June 2, 2026 01:57
@maxy-shpfy maxy-shpfy force-pushed the 05-27-feat_v2_-_ai_assistant_-_architect_subagent branch 2 times, most recently from cbf5a16 to 8e2e146 Compare June 2, 2026 04:30
@maxy-shpfy maxy-shpfy force-pushed the 05-27-chore_v2_-_ai_assistant_-_unit_tests branch from e65c099 to 516b7d4 Compare June 2, 2026 04:30
@maxy-shpfy maxy-shpfy force-pushed the 05-27-feat_v2_-_ai_assistant_-_architect_subagent branch from 8e2e146 to bbb8830 Compare June 2, 2026 05:24
@maxy-shpfy maxy-shpfy force-pushed the 05-27-chore_v2_-_ai_assistant_-_unit_tests branch from 516b7d4 to f6e6941 Compare June 2, 2026 05:24
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.

2 participants