Add end-to-end local CLI workflow coverage #35

Merged
JayKobe6k merged 2 commits from issue-18-cli-workflows into main 2026-09-06 21:14:01 +00:00
Owner

Summary

  • index an isolated multi-translation-unit C project through the production CLI
  • verify name, project-directory, and explicit database selectors resolve the same index
  • exercise text and JSON searches for values, functions, structs, and enums
  • feed a returned value handle into bounded bidirectional lineage traversal

Tests

  • nix develop --command cargo fmt --all -- --check
  • nix develop --command cargo lint
  • nix develop --command cargo test --all-targets --all-features
  • nix develop --command cargo doc --no-deps --all-features

Begins #18.

## Summary - index an isolated multi-translation-unit C project through the production CLI - verify name, project-directory, and explicit database selectors resolve the same index - exercise text and JSON searches for values, functions, structs, and enums - feed a returned value handle into bounded bidirectional lineage traversal ## Tests - `nix develop --command cargo fmt --all -- --check` - `nix develop --command cargo lint` - `nix develop --command cargo test --all-targets --all-features` - `nix develop --command cargo doc --no-deps --all-features` Begins #18.
Add local CLI workflow coverage
All checks were successful
Validate / Formatting, linting, and tests (pull_request) Successful in 10m22s
8f54a36b79
JayKobe6k left a comment

Found one actionable issue.

Found one actionable issue.
@ -0,0 +215,4 @@
assert!(
lineage["result"]["edges"]
.as_array()
.is_some_and(|edges| !edges.is_empty())
Author
Owner

[P2] This assertion accepts edges from either direction, so the test still passes if this bidirectional query loses all downstream traversal: second already has upstream producers that satisfy both nonempty checks, while merely echoing the downstream bound does not prove that third was reached. Please assert that the result contains nodes with both upstream and downstream depth (or equivalent producer and consumer edges) so the advertised end-to-end bidirectional path is protected.

[P2] This assertion accepts edges from either direction, so the test still passes if this bidirectional query loses all downstream traversal: `second` already has upstream producers that satisfy both nonempty checks, while merely echoing the downstream bound does not prove that `third` was reached. Please assert that the result contains nodes with both upstream and downstream depth (or equivalent producer and consumer edges) so the advertised end-to-end bidirectional path is protected.
Verify bidirectional CLI lineage
All checks were successful
Validate / Formatting, linting, and tests (pull_request) Successful in 10m37s
6da4ec4e05
Author
Owner

Review comment #1357: Fixed in 6da4ec4. Replaced the generic nonempty result checks with assertions requiring nonzero upstream_depth and downstream_depth nodes, so the production CLI workflow now proves traversal in both directions. Tests: nix develop --command cargo test --test cli_workflow; nix develop --command cargo fmt --all -- --check; nix develop --command cargo lint; nix develop --command cargo test --all-targets --all-features; nix develop --command cargo doc --no-deps --all-features.

Review comment #1357: Fixed in 6da4ec4. Replaced the generic nonempty result checks with assertions requiring nonzero `upstream_depth` and `downstream_depth` nodes, so the production CLI workflow now proves traversal in both directions. Tests: `nix develop --command cargo test --test cli_workflow`; `nix develop --command cargo fmt --all -- --check`; `nix develop --command cargo lint`; `nix develop --command cargo test --all-targets --all-features`; `nix develop --command cargo doc --no-deps --all-features`.
Sign in to join this conversation.
No description provided.