feat: full copy from apollo_nxt-trcaa with complete sanitization #69

Merged
sarman merged 36 commits from feature/full-copy-from-trcaa into master 2026-06-06 03:19:27 +00:00
6 changed files with 34 additions and 34 deletions
Showing only changes of commit 6b911a2106 - Show all commits

View File

@ -30,6 +30,11 @@ jobs:
echo "Fetched fallback ref: master"
fi
git checkout FETCH_HEAD
- name: Install Node.js
run: |
apt-get update && apt-get install -y curl
curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
apt-get install -y nodejs
- name: Cache cargo registry
uses: actions/cache@v4
with:
@ -40,11 +45,6 @@ jobs:
key: ${{ runner.os }}-cargo-linux-amd64-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-linux-amd64-
- name: Install Node.js
run: |
apt-get update && apt-get install -y curl
curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
apt-get install -y nodejs
- name: Install dependencies
run: npm install --legacy-peer-deps
- name: Update version from Git

View File

@ -237,7 +237,7 @@ CI, chore, and build changes are excluded.
- Inline file/screenshot attachment in triage chat
- Close issues, restore history, auto-save resolution steps
- Expand domains to 13 — add Telephony, Security/Vault, Public Safety, Application, Automation/CI-CD
- Add HPE, Dell, Identity domains + expand k8s/security/observability/VESTA NXT
- Add HPE, Dell, Identity domains + expand k8s/security/observability/DevOps Platform
- Add AI disclaimer modal before creating new issues
- Add database schema for integration credentials and config
- Implement OAuth2 token exchange and AES-256-GCM encryption

View File

@ -185,7 +185,7 @@ Standard OpenAI `/chat/completions` endpoint with Bearer authentication.
| Field | Value |
|-------|-------|
| `config.provider_type` | `"custom"` |
| `config.api_format` | `"msi-genai"` |
| `config.api_format` | `"generic-genai"` |
| Status | ⚠️ **Limited compatibility** |
**Known Limitations:**

View File

@ -7,8 +7,8 @@ use crate::state::ProviderConfig;
pub struct OpenAiProvider;
fn is_msi_genai_format(api_format: Option<&str>) -> bool {
matches!(api_format, Some("msi-genai") | Some("custom_rest")) // custom_rest for backward compatibility
fn is_generic_genai_format(api_format: Option<&str>) -> bool {
matches!(api_format, Some("generic-genai") | Some("custom_rest")) // custom_rest for backward compatibility
}
#[async_trait]
@ -38,8 +38,8 @@ impl Provider for OpenAiProvider {
// Check if using GenAI format (or legacy custom_rest)
let api_format = config.api_format.as_deref().unwrap_or("openai");
if is_msi_genai_format(Some(api_format)) {
self.chat_msi_genai(messages, config, tools).await
if is_generic_genai_format(Some(api_format)) {
self.chat_generic_genai(messages, config, tools).await
} else {
self.chat_openai(messages, config, tools).await
}
@ -48,27 +48,27 @@ impl Provider for OpenAiProvider {
#[cfg(test)]
mod tests {
use super::{is_msi_genai_format, OpenAiProvider};
use super::{is_generic_genai_format, OpenAiProvider};
#[test]
fn msi_genai_format_is_recognized() {
assert!(is_msi_genai_format(Some("msi-genai")));
fn generic_genai_format_is_recognized() {
assert!(is_generic_genai_format(Some("generic-genai")));
}
#[test]
fn custom_rest_format_backward_compatible() {
// Keep backward compatibility with old format name
assert!(is_msi_genai_format(Some("custom_rest")));
assert!(is_generic_genai_format(Some("custom_rest")));
}
#[test]
fn openai_format_is_not_msi_genai() {
assert!(!is_msi_genai_format(Some("openai")));
assert!(!is_msi_genai_format(None));
fn openai_format_is_not_generic_genai() {
assert!(!is_generic_genai_format(Some("openai")));
assert!(!is_generic_genai_format(None));
}
#[test]
fn parse_msigenai_chatgpt_tool_calls_from_json_text() {
fn parse_genericai_chatgpt_tool_calls_from_json_text() {
// GenAI ChatGPT format: returns tool calls as JSON object in msg
let content = r#"{"tool_calls":[{"id":"call_1","type":"function","function":{"name":"execute_shell_command","arguments":{"command":"kubectl get namespaces"}}}]}"#;
@ -83,7 +83,7 @@ mod tests {
}
#[test]
fn parse_msigenai_claude_tool_calls_from_xml_wrapper() {
fn parse_genericai_claude_tool_calls_from_xml_wrapper() {
// GenAI Claude format: XML wrapper around JSON array
let content = r#"<tool_calls>
[{"id":"call_1","type":"function","function":{"name":"execute_shell_command","arguments":{"command":"kubectl get pods"}}}]
@ -300,7 +300,7 @@ impl OpenAiProvider {
/// and has a known bug where tool calls are returned as JSON text in the 'msg'
/// field instead of structured 'tool_calls' array. This implementation includes
/// workaround parsing to extract tool calls from text.
async fn chat_msi_genai(
async fn chat_generic_genai(
&self,
messages: Vec<Message>,
config: &ProviderConfig,

View File

@ -10,15 +10,15 @@ use std::collections::HashSet;
fn get_product_synonyms(query: &str) -> Vec<String> {
let mut synonyms = Vec::new();
// VESTA NXT related synonyms
if query.to_lowercase().contains("vesta") || query.to_lowercase().contains("product") {
// DevOps Platform related synonyms
if query.to_lowercase().contains("platform") || query.to_lowercase().contains("product") {
synonyms.extend(vec![
"VESTA NXT".to_string(),
"DevOps Platform".to_string(),
"DevOps Platform NXT".to_string(),
"DevOps Tool".to_string(),
"product".to_string(),
"DevOps Platform".to_string(),
"vesta".to_string(),
"platform".to_string(),
"VNX".to_string(),
"vnx".to_string(),
]);
@ -67,7 +67,7 @@ fn get_product_synonyms(query: &str) -> Vec<String> {
/// Expand a search query with related terms for better search coverage
///
/// This function takes a user query and expands it with:
/// - Product name synonyms (e.g., "DevOps Tool" -> "VESTA NXT", "DevOps Platform NXT")
/// - Product name synonyms (e.g., "DevOps Tool" -> "DevOps Platform", "DevOps Platform NXT")
/// - Version number variations
/// - Related terms based on query content
///
@ -239,7 +239,7 @@ mod tests {
#[test]
fn test_expand_query_with_product_synonyms() {
let query = "upgrade vesta nxt to 1.1.9";
let query = "upgrade devops platform to 1.1.9";
let expanded = expand_query(query);
// Should contain original query
@ -262,19 +262,19 @@ mod tests {
#[test]
fn test_extract_keywords() {
let query = "How do I upgrade VESTA NXT from 1.0.12 to 1.1.9?";
let query = "How do I upgrade DevOps Platform from 1.0.12 to 1.1.9?";
let keywords = extract_keywords(query);
assert!(keywords.contains(&"upgrade".to_string()));
assert!(keywords.contains(&"vesta".to_string()));
assert!(keywords.contains(&"nxt".to_string()));
assert!(keywords.contains(&"platform".to_string()));
assert!(keywords.contains(&"devops".to_string()));
assert!(keywords.contains(&"1.0.12".to_string()));
assert!(keywords.contains(&"1.1.9".to_string()));
}
#[test]
fn test_product_synonyms() {
let synonyms = get_product_synonyms("vesta nxt upgrade");
let synonyms = get_product_synonyms("devops platform upgrade");
// Should contain DevOps Tool synonym
assert!(synonyms

View File

@ -69,7 +69,7 @@ export const DOMAINS: DomainInfo[] = [
{
id: "public_safety",
label: "Public Safety",
description: "NENA, NG911, VESTA NXT, CTC, Skipper, i3 services",
description: "NENA, NG911, DevOps Platform, CTC, Skipper, i3 services",
icon: "PhoneCall",
},
{
@ -288,10 +288,10 @@ When analyzing public safety and 911 issues, focus on these key areas:
- **CAD (Computer-Aided Dispatch) integration**: CAD-to-CAD interoperability failures, NENA Incident Data Exchange (NIEM) message validation errors, CAD interface adapter connectivity, and duplicate incident creation from retry logic.
- **Recording and logging**: Recording system integration (NICE, Verint, Eventide) failures, mandatory call recording compliance gaps, Logging Service (LS) as defined by NENA i3, and chain of custody for recordings.
- **Network redundancy**: ESINet redundancy path failures, primary/secondary PSAP failover, call overflow to backup PSAP, and network diversity verification.
- **VESTA NXT Platform**: The VESTA NXT platform is a microservices-based NG911 solution deployed on OpenShift/K8s. Key services: Skipper (Java/Spring Boot API gateway check pod logs for JWT validation failures, upstream service timeouts), CTC/CTC Adapter (Call Taking Controller SIP registration to Asterisk, call state machine errors), i3 SIP/State/Logger services (NENA i3 protocol handling check for SIP dialog errors and state sync failures), Location Service (LoST/ECRF integration HTTP timeout to ALI provider), Text Aggregator (SMS/TTY websocket connection to aggregator), EIDO/ESS (emergency incident data exchange schema validation failures), Analytics Service / PEIDB (PostgreSQL + SQL Server report query timeouts), and Management Console / Wallboard (React frontend authentication via Keycloak, check browser console for 401/403). Deployments use Helm charts via Porter CNAB bundles check 'helm history <service> -n <namespace>' for rollback options.
- **DevOps Platform Platform**: The DevOps Platform platform is a microservices-based NG911 solution deployed on OpenShift/K8s. Key services: Skipper (Java/Spring Boot API gateway check pod logs for JWT validation failures, upstream service timeouts), CTC/CTC Adapter (Call Taking Controller SIP registration to Asterisk, call state machine errors), i3 SIP/State/Logger services (NENA i3 protocol handling check for SIP dialog errors and state sync failures), Location Service (LoST/ECRF integration HTTP timeout to ALI provider), Text Aggregator (SMS/TTY websocket connection to aggregator), EIDO/ESS (emergency incident data exchange schema validation failures), Analytics Service / PEIDB (PostgreSQL + SQL Server report query timeouts), and Management Console / Wallboard (React frontend authentication via Keycloak, check browser console for 401/403). Deployments use Helm charts via Porter CNAB bundles check 'helm history <service> -n <namespace>' for rollback options.
- **Common error patterns**: "call drops to administrative" (CTC/routing fallback), "location unavailable" (ALI timeout or Phase II failure), "Skipper 503" (downstream microservice down), "CTC not registered" (Asterisk SIP trunk issue), "CAD not receiving calls" (CAD Spill Interface adapter down), "wrong PSAP" (ESN boundary error), "recording gap" (recording server failover timing), "Keycloak token invalid" (realm configuration or clock skew).
Always ask about the VESTA NXT release version, which microservice is failing, whether this is OpenShift or K3s deployment, ESINet provider, and whether this is a primary or backup PSAP.`,
Always ask about the DevOps Platform release version, which microservice is failing, whether this is OpenShift or K3s deployment, ESINet provider, and whether this is a primary or backup PSAP.`,
application: `You are a senior application engineer specializing in incident triage and root cause analysis. Your expertise covers Java applications, JVM internals, Spring Boot, Tomcat, and enterprise application servers.