Skip to content

Fix #1238: Wire trigger index loading and add kg list --pinned command#862

Open
AlexMikhalev wants to merge 1 commit intomainfrom
task/1238-spec-gaps-wiring
Open

Fix #1238: Wire trigger index loading and add kg list --pinned command#862
AlexMikhalev wants to merge 1 commit intomainfrom
task/1238-spec-gaps-wiring

Conversation

@AlexMikhalev
Copy link
Copy Markdown
Contributor

Summary

Implements fixes for spec gaps identified in issue #1238:

Changes

  1. Wire load_trigger_index() in production (terraphim_config/src/lib.rs)

    • Added extract_triggers_from_kg() helper to parse markdown directives and extract trigger:: and pinned:: entries
    • Wired trigger index loading after RoleGraph construction in all three code paths
  2. Update auto-routing to use trigger fallback (terraphim_service/src/auto_route.rs)

    • Changed score_distinct_concepts() to use find_matching_node_ids_with_fallback()
  3. Add kg list --pinned CLI command (terraphim_agent/src/main.rs)

    • Added new Kg command with list subcommand matching spec request

Verification

  • cargo check --workspace passes
  • cargo clippy --workspace -- -D warnings passes
  • cargo fmt --all -- --check passes
  • cargo test -p terraphim_config -p terraphim_service -p terraphim_rolegraph --lib passes

Refs #1238

- Add extract_triggers_from_kg() helper in terraphim_config to parse
  markdown directives and extract trigger:: and pinned:: entries
- Wire load_trigger_index() after RoleGraph construction in all three
  code paths: automata_path success, local KG fallback, and local KG
  direct build
- Update auto_route.rs to use find_matching_node_ids_with_fallback()
  instead of find_matching_node_ids() for concept scoring
- Add  CLI command matching spec request

Refs #1238
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant