igel-qe-core 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/index.js +38 -0
- package/dist/mcp/server.js +104 -0
- package/knowledge_base/__init__.py +3 -0
- package/knowledge_base/__pycache__/__init__.cpython-314.pyc +0 -0
- package/knowledge_base/__pycache__/__init__.cpython-37.pyc +0 -0
- package/knowledge_base/__pycache__/__init__.cpython-38.pyc +0 -0
- package/knowledge_base/__pycache__/confidence.cpython-37.pyc +0 -0
- package/knowledge_base/__pycache__/config.cpython-314.pyc +0 -0
- package/knowledge_base/__pycache__/config.cpython-37.pyc +0 -0
- package/knowledge_base/__pycache__/config.cpython-38.pyc +0 -0
- package/knowledge_base/__pycache__/context_fusion.cpython-314.pyc +0 -0
- package/knowledge_base/__pycache__/context_fusion.cpython-37.pyc +0 -0
- package/knowledge_base/__pycache__/feedback_analytics.cpython-37.pyc +0 -0
- package/knowledge_base/__pycache__/feedback_applier.cpython-37.pyc +0 -0
- package/knowledge_base/__pycache__/feedback_cli.cpython-37.pyc +0 -0
- package/knowledge_base/__pycache__/feedback_curator.cpython-37.pyc +0 -0
- package/knowledge_base/__pycache__/feedback_handler.cpython-37.pyc +0 -0
- package/knowledge_base/__pycache__/generate.cpython-37.pyc +0 -0
- package/knowledge_base/__pycache__/generate_qcapps134.cpython-37.pyc +0 -0
- package/knowledge_base/__pycache__/input_classifier.cpython-314.pyc +0 -0
- package/knowledge_base/__pycache__/input_classifier.cpython-37.pyc +0 -0
- package/knowledge_base/__pycache__/kg_extractor.cpython-37.pyc +0 -0
- package/knowledge_base/__pycache__/knowledge_graph.cpython-314.pyc +0 -0
- package/knowledge_base/__pycache__/knowledge_graph.cpython-37.pyc +0 -0
- package/knowledge_base/__pycache__/manual_tc_parser.cpython-314.pyc +0 -0
- package/knowledge_base/__pycache__/manual_tc_parser.cpython-37.pyc +0 -0
- package/knowledge_base/__pycache__/precedence.cpython-37.pyc +0 -0
- package/knowledge_base/__pycache__/prompts.cpython-314.pyc +0 -0
- package/knowledge_base/__pycache__/prompts.cpython-37.pyc +0 -0
- package/knowledge_base/__pycache__/reranker.cpython-314.pyc +0 -0
- package/knowledge_base/__pycache__/reranker.cpython-37.pyc +0 -0
- package/knowledge_base/__pycache__/retrieval_debug.cpython-314.pyc +0 -0
- package/knowledge_base/__pycache__/retrieval_debug.cpython-37.pyc +0 -0
- package/knowledge_base/__pycache__/retriever.cpython-314.pyc +0 -0
- package/knowledge_base/__pycache__/retriever.cpython-37.pyc +0 -0
- package/knowledge_base/__pycache__/server.cpython-37.pyc +0 -0
- package/knowledge_base/__pycache__/tc_transformer.cpython-314.pyc +0 -0
- package/knowledge_base/__pycache__/tc_transformer.cpython-37.pyc +0 -0
- package/knowledge_base/__pycache__/test_generator.cpython-314.pyc +0 -0
- package/knowledge_base/__pycache__/test_generator.cpython-37.pyc +0 -0
- package/knowledge_base/agents/__init__.py +6 -0
- package/knowledge_base/agents/__pycache__/__init__.cpython-37.pyc +0 -0
- package/knowledge_base/agents/__pycache__/__init__.cpython-38.pyc +0 -0
- package/knowledge_base/agents/__pycache__/fusion_agent.cpython-37.pyc +0 -0
- package/knowledge_base/agents/__pycache__/fusion_agent.cpython-38.pyc +0 -0
- package/knowledge_base/agents/__pycache__/graph.cpython-37.pyc +0 -0
- package/knowledge_base/agents/__pycache__/graph.cpython-38.pyc +0 -0
- package/knowledge_base/agents/__pycache__/healing_agent.cpython-37.pyc +0 -0
- package/knowledge_base/agents/__pycache__/intent_agent.cpython-37.pyc +0 -0
- package/knowledge_base/agents/__pycache__/intent_agent.cpython-38.pyc +0 -0
- package/knowledge_base/agents/__pycache__/kg_agent.cpython-37.pyc +0 -0
- package/knowledge_base/agents/__pycache__/kg_agent.cpython-38.pyc +0 -0
- package/knowledge_base/agents/__pycache__/memory_agent.cpython-37.pyc +0 -0
- package/knowledge_base/agents/__pycache__/memory_agent.cpython-38.pyc +0 -0
- package/knowledge_base/agents/__pycache__/rca_agent.cpython-37.pyc +0 -0
- package/knowledge_base/agents/__pycache__/reflection_agent.cpython-37.pyc +0 -0
- package/knowledge_base/agents/__pycache__/reflection_agent.cpython-38.pyc +0 -0
- package/knowledge_base/agents/__pycache__/regression_agent.cpython-37.pyc +0 -0
- package/knowledge_base/agents/__pycache__/retrieval_agent.cpython-37.pyc +0 -0
- package/knowledge_base/agents/__pycache__/retrieval_agent.cpython-38.pyc +0 -0
- package/knowledge_base/agents/__pycache__/script_agent.cpython-37.pyc +0 -0
- package/knowledge_base/agents/__pycache__/script_agent.cpython-38.pyc +0 -0
- package/knowledge_base/agents/__pycache__/state.cpython-37.pyc +0 -0
- package/knowledge_base/agents/__pycache__/state.cpython-38.pyc +0 -0
- package/knowledge_base/agents/__pycache__/temporal_agent.cpython-37.pyc +0 -0
- package/knowledge_base/agents/__pycache__/temporal_agent.cpython-38.pyc +0 -0
- package/knowledge_base/agents/__pycache__/validation_agent.cpython-37.pyc +0 -0
- package/knowledge_base/agents/__pycache__/validation_agent.cpython-38.pyc +0 -0
- package/knowledge_base/agents/automation_design_agent.py +123 -0
- package/knowledge_base/agents/code_intelligence_agent.py +147 -0
- package/knowledge_base/agents/confidence_agent.py +94 -0
- package/knowledge_base/agents/execution_validation_agent.py +129 -0
- package/knowledge_base/agents/feedback_agent.py +56 -0
- package/knowledge_base/agents/fusion_agent.py +113 -0
- package/knowledge_base/agents/graph.py +152 -0
- package/knowledge_base/agents/healing_agent.py +62 -0
- package/knowledge_base/agents/intent_agent.py +76 -0
- package/knowledge_base/agents/kg_agent.py +91 -0
- package/knowledge_base/agents/memory_agent.py +62 -0
- package/knowledge_base/agents/rca_agent.py +53 -0
- package/knowledge_base/agents/reflection_agent.py +62 -0
- package/knowledge_base/agents/regression_agent.py +81 -0
- package/knowledge_base/agents/requirement_agent.py +71 -0
- package/knowledge_base/agents/retrieval_agent.py +66 -0
- package/knowledge_base/agents/scenario_agent.py +81 -0
- package/knowledge_base/agents/script_agent.py +121 -0
- package/knowledge_base/agents/script_generator_agent.py +77 -0
- package/knowledge_base/agents/state.py +53 -0
- package/knowledge_base/agents/temporal_agent.py +48 -0
- package/knowledge_base/agents/testcase_agent.py +111 -0
- package/knowledge_base/agents/validation_agent.py +49 -0
- package/knowledge_base/agents/workflow_engine.py +87 -0
- package/knowledge_base/alembic/README.md +104 -0
- package/knowledge_base/alembic/__pycache__/env.cpython-37.pyc +0 -0
- package/knowledge_base/alembic/__pycache__/env.cpython-38.pyc +0 -0
- package/knowledge_base/alembic/env.py +76 -0
- package/knowledge_base/alembic/script.py.mako +5 -0
- package/knowledge_base/alembic/versions/.gitkeep +26 -0
- package/knowledge_base/alembic/versions/001_phase0_feedback.py +122 -0
- package/knowledge_base/alembic/versions/002_feedback_promotions.py +60 -0
- package/knowledge_base/alembic/versions/003_enterprise_hardening.py +74 -0
- package/knowledge_base/alembic/versions/__pycache__/001_phase0_feedback.cpython-37.pyc +0 -0
- package/knowledge_base/alembic/versions/__pycache__/001_phase0_feedback.cpython-38.pyc +0 -0
- package/knowledge_base/alembic/versions/__pycache__/002_feedback_promotions.cpython-37.pyc +0 -0
- package/knowledge_base/alembic/versions/__pycache__/002_feedback_promotions.cpython-38.pyc +0 -0
- package/knowledge_base/api/__init__.py +1 -0
- package/knowledge_base/api/__pycache__/__init__.cpython-37.pyc +0 -0
- package/knowledge_base/api/__pycache__/__init__.cpython-38.pyc +0 -0
- package/knowledge_base/api/__pycache__/middleware.cpython-38.pyc +0 -0
- package/knowledge_base/api/__pycache__/server.cpython-37.pyc +0 -0
- package/knowledge_base/api/__pycache__/server.cpython-38.pyc +0 -0
- package/knowledge_base/api/middleware.py +78 -0
- package/knowledge_base/api/server.py +778 -0
- package/knowledge_base/chunking/__init__.py +0 -0
- package/knowledge_base/chunking/__pycache__/__init__.cpython-37.pyc +0 -0
- package/knowledge_base/chunking/__pycache__/__init__.cpython-38.pyc +0 -0
- package/knowledge_base/chunking/__pycache__/chunker.cpython-37.pyc +0 -0
- package/knowledge_base/chunking/__pycache__/chunker.cpython-38.pyc +0 -0
- package/knowledge_base/chunking/__pycache__/validators.cpython-37.pyc +0 -0
- package/knowledge_base/chunking/__pycache__/validators.cpython-38.pyc +0 -0
- package/knowledge_base/chunking/chunker.py +402 -0
- package/knowledge_base/chunking/validators.py +144 -0
- package/knowledge_base/cli/__init__.py +1 -0
- package/knowledge_base/cli/__pycache__/__init__.cpython-37.pyc +0 -0
- package/knowledge_base/cli/__pycache__/__init__.cpython-38.pyc +0 -0
- package/knowledge_base/cli/__pycache__/feedback_cli.cpython-37.pyc +0 -0
- package/knowledge_base/cli/__pycache__/feedback_cli.cpython-38.pyc +0 -0
- package/knowledge_base/cli/__pycache__/generate.cpython-37.pyc +0 -0
- package/knowledge_base/cli/__pycache__/generate.cpython-38.pyc +0 -0
- package/knowledge_base/cli/__pycache__/generate_qcapps134.cpython-37.pyc +0 -0
- package/knowledge_base/cli/feedback_cli.py +121 -0
- package/knowledge_base/cli/generate.py +308 -0
- package/knowledge_base/cli/generate_qcapps134.py +391 -0
- package/knowledge_base/config/.env +100 -0
- package/knowledge_base/config/.env.example +75 -0
- package/knowledge_base/config/__init__.py +5 -0
- package/knowledge_base/config/__pycache__/__init__.cpython-37.pyc +0 -0
- package/knowledge_base/config/__pycache__/__init__.cpython-38.pyc +0 -0
- package/knowledge_base/config/__pycache__/settings.cpython-37.pyc +0 -0
- package/knowledge_base/config/__pycache__/settings.cpython-38.pyc +0 -0
- package/knowledge_base/config/settings.py +280 -0
- package/knowledge_base/connectors/__init__.py +5 -0
- package/knowledge_base/connectors/__pycache__/__init__.cpython-37.pyc +0 -0
- package/knowledge_base/connectors/__pycache__/__init__.cpython-38.pyc +0 -0
- package/knowledge_base/connectors/__pycache__/base.cpython-37.pyc +0 -0
- package/knowledge_base/connectors/__pycache__/base.cpython-38.pyc +0 -0
- package/knowledge_base/connectors/__pycache__/bitbucket_connector.cpython-37.pyc +0 -0
- package/knowledge_base/connectors/__pycache__/bitbucket_connector.cpython-38.pyc +0 -0
- package/knowledge_base/connectors/__pycache__/community_connector.cpython-38.pyc +0 -0
- package/knowledge_base/connectors/__pycache__/confluence_connector.cpython-37.pyc +0 -0
- package/knowledge_base/connectors/__pycache__/confluence_connector.cpython-38.pyc +0 -0
- package/knowledge_base/connectors/__pycache__/jira_connector.cpython-37.pyc +0 -0
- package/knowledge_base/connectors/__pycache__/jira_connector.cpython-38.pyc +0 -0
- package/knowledge_base/connectors/__pycache__/kb_igel_connector.cpython-38.pyc +0 -0
- package/knowledge_base/connectors/__pycache__/playwright_fetcher.cpython-38.pyc +0 -0
- package/knowledge_base/connectors/__pycache__/query_bridge.cpython-38.pyc +0 -0
- package/knowledge_base/connectors/__pycache__/search_backends.cpython-38.pyc +0 -0
- package/knowledge_base/connectors/__pycache__/serviceNow_connector.cpython-37.pyc +0 -0
- package/knowledge_base/connectors/__pycache__/serviceNow_connector.cpython-38.pyc +0 -0
- package/knowledge_base/connectors/__pycache__/sync_scheduler.cpython-37.pyc +0 -0
- package/knowledge_base/connectors/__pycache__/sync_scheduler.cpython-38.pyc +0 -0
- package/knowledge_base/connectors/__pycache__/teamcity_connector.cpython-37.pyc +0 -0
- package/knowledge_base/connectors/__pycache__/teamcity_connector.cpython-38.pyc +0 -0
- package/knowledge_base/connectors/__pycache__/testRail_connector.cpython-37.pyc +0 -0
- package/knowledge_base/connectors/__pycache__/testRail_connector.cpython-38.pyc +0 -0
- package/knowledge_base/connectors/__pycache__/web_fetcher.cpython-38.pyc +0 -0
- package/knowledge_base/connectors/base.py +44 -0
- package/knowledge_base/connectors/bitbucket_connector.py +25 -0
- package/knowledge_base/connectors/community_connector.py +112 -0
- package/knowledge_base/connectors/confluence_connector.py +165 -0
- package/knowledge_base/connectors/jira_connector.py +174 -0
- package/knowledge_base/connectors/kb_igel_connector.py +145 -0
- package/knowledge_base/connectors/playwright_fetcher.py +50 -0
- package/knowledge_base/connectors/query_bridge.py +170 -0
- package/knowledge_base/connectors/search_backends.py +368 -0
- package/knowledge_base/connectors/serviceNow_connector.py +25 -0
- package/knowledge_base/connectors/sync_scheduler.py +111 -0
- package/knowledge_base/connectors/teamcity_connector.py +25 -0
- package/knowledge_base/connectors/testRail_connector.py +25 -0
- package/knowledge_base/connectors/web_fetcher.py +280 -0
- package/knowledge_base/core/__init__.py +8 -0
- package/knowledge_base/core/__pycache__/__init__.cpython-37.pyc +0 -0
- package/knowledge_base/core/__pycache__/__init__.cpython-38.pyc +0 -0
- package/knowledge_base/core/__pycache__/cache.cpython-38.pyc +0 -0
- package/knowledge_base/core/__pycache__/circuit_breaker.cpython-38.pyc +0 -0
- package/knowledge_base/core/__pycache__/confidence.cpython-37.pyc +0 -0
- package/knowledge_base/core/__pycache__/confidence.cpython-38.pyc +0 -0
- package/knowledge_base/core/__pycache__/logging_setup.cpython-38.pyc +0 -0
- package/knowledge_base/core/__pycache__/metrics.cpython-38.pyc +0 -0
- package/knowledge_base/core/__pycache__/precedence.cpython-37.pyc +0 -0
- package/knowledge_base/core/__pycache__/precedence.cpython-38.pyc +0 -0
- package/knowledge_base/core/__pycache__/request_context.cpython-38.pyc +0 -0
- package/knowledge_base/core/cache.py +98 -0
- package/knowledge_base/core/circuit_breaker.py +33 -0
- package/knowledge_base/core/confidence.py +254 -0
- package/knowledge_base/core/logging_setup.py +39 -0
- package/knowledge_base/core/metrics.py +63 -0
- package/knowledge_base/core/precedence.py +354 -0
- package/knowledge_base/core/request_context.py +54 -0
- package/knowledge_base/db/__init__.py +0 -0
- package/knowledge_base/db/__pycache__/__init__.cpython-314.pyc +0 -0
- package/knowledge_base/db/__pycache__/__init__.cpython-37.pyc +0 -0
- package/knowledge_base/db/__pycache__/__init__.cpython-38.pyc +0 -0
- package/knowledge_base/db/__pycache__/client.cpython-314.pyc +0 -0
- package/knowledge_base/db/__pycache__/client.cpython-37.pyc +0 -0
- package/knowledge_base/db/__pycache__/client.cpython-38.pyc +0 -0
- package/knowledge_base/db/__pycache__/connector_sync.cpython-38.pyc +0 -0
- package/knowledge_base/db/__pycache__/feedback_schema.cpython-37.pyc +0 -0
- package/knowledge_base/db/__pycache__/feedback_schema.cpython-38.pyc +0 -0
- package/knowledge_base/db/__pycache__/kg_introspect.cpython-314.pyc +0 -0
- package/knowledge_base/db/__pycache__/kg_introspect.cpython-37.pyc +0 -0
- package/knowledge_base/db/__pycache__/kg_introspect.cpython-38.pyc +0 -0
- package/knowledge_base/db/__pycache__/schema.cpython-37.pyc +0 -0
- package/knowledge_base/db/__pycache__/schema.cpython-38.pyc +0 -0
- package/knowledge_base/db/client.py +100 -0
- package/knowledge_base/db/connector_sync.py +43 -0
- package/knowledge_base/db/feedback_schema.py +548 -0
- package/knowledge_base/db/igel_schema.py +150 -0
- package/knowledge_base/db/kg_introspect.py +116 -0
- package/knowledge_base/db/migrations.py +22 -0
- package/knowledge_base/db/schema.py +649 -0
- package/knowledge_base/deploy/Dockerfile +23 -0
- package/knowledge_base/deploy/feedback_automation.sh +18 -0
- package/knowledge_base/deploy/firecrawl-docker.sh +50 -0
- package/knowledge_base/deploy/igel-testgen.service +26 -0
- package/knowledge_base/deploy/install_reranker.sh +92 -0
- package/knowledge_base/deploy/requirements.txt +68 -0
- package/knowledge_base/deploy/run_server.sh +35 -0
- package/knowledge_base/docs/TEST_GENERATION_GUIDE.md +174 -0
- package/knowledge_base/embeddings/__init__.py +0 -0
- package/knowledge_base/embeddings/__pycache__/__init__.cpython-314.pyc +0 -0
- package/knowledge_base/embeddings/__pycache__/__init__.cpython-37.pyc +0 -0
- package/knowledge_base/embeddings/__pycache__/__init__.cpython-38.pyc +0 -0
- package/knowledge_base/embeddings/__pycache__/azure_embedder.cpython-314.pyc +0 -0
- package/knowledge_base/embeddings/__pycache__/azure_embedder.cpython-37.pyc +0 -0
- package/knowledge_base/embeddings/__pycache__/azure_embedder.cpython-38.pyc +0 -0
- package/knowledge_base/embeddings/azure_embedder.py +99 -0
- package/knowledge_base/eval/__init__.py +33 -0
- package/knowledge_base/eval/__main__.py +172 -0
- package/knowledge_base/eval/__pycache__/__init__.cpython-37.pyc +0 -0
- package/knowledge_base/eval/__pycache__/__init__.cpython-38.pyc +0 -0
- package/knowledge_base/eval/__pycache__/__main__.cpython-37.pyc +0 -0
- package/knowledge_base/eval/__pycache__/baseline.cpython-37.pyc +0 -0
- package/knowledge_base/eval/__pycache__/baseline.cpython-38.pyc +0 -0
- package/knowledge_base/eval/__pycache__/harness.cpython-37.pyc +0 -0
- package/knowledge_base/eval/__pycache__/harness.cpython-38.pyc +0 -0
- package/knowledge_base/eval/__pycache__/scorers.cpython-37.pyc +0 -0
- package/knowledge_base/eval/__pycache__/scorers.cpython-38.pyc +0 -0
- package/knowledge_base/eval/baseline.py +213 -0
- package/knowledge_base/eval/harness.py +400 -0
- package/knowledge_base/eval/queries_50.json +302 -0
- package/knowledge_base/eval/scorers.py +494 -0
- package/knowledge_base/exemplars/README.md +7 -0
- package/knowledge_base/exemplars/__pycache__/pytest_reference_snippet.cpython-37.pyc +0 -0
- package/knowledge_base/exemplars/gold_manual_concise_snippet.md +8 -0
- package/knowledge_base/exemplars/gold_manual_detailed_snippet.md +7 -0
- package/knowledge_base/exemplars/pytest_reference_snippet.py +37 -0
- package/knowledge_base/feedback/__init__.py +10 -0
- package/knowledge_base/feedback/__pycache__/__init__.cpython-37.pyc +0 -0
- package/knowledge_base/feedback/__pycache__/__init__.cpython-38.pyc +0 -0
- package/knowledge_base/feedback/__pycache__/analytics.cpython-37.pyc +0 -0
- package/knowledge_base/feedback/__pycache__/analytics.cpython-38.pyc +0 -0
- package/knowledge_base/feedback/__pycache__/applier.cpython-37.pyc +0 -0
- package/knowledge_base/feedback/__pycache__/applier.cpython-38.pyc +0 -0
- package/knowledge_base/feedback/__pycache__/curator.cpython-37.pyc +0 -0
- package/knowledge_base/feedback/__pycache__/curator.cpython-38.pyc +0 -0
- package/knowledge_base/feedback/__pycache__/handler.cpython-37.pyc +0 -0
- package/knowledge_base/feedback/__pycache__/handler.cpython-38.pyc +0 -0
- package/knowledge_base/feedback/analytics.py +72 -0
- package/knowledge_base/feedback/applier.py +93 -0
- package/knowledge_base/feedback/curator.py +49 -0
- package/knowledge_base/feedback/handler.py +151 -0
- package/knowledge_base/generation/__init__.py +5 -0
- package/knowledge_base/generation/__pycache__/__init__.cpython-37.pyc +0 -0
- package/knowledge_base/generation/__pycache__/__init__.cpython-38.pyc +0 -0
- package/knowledge_base/generation/__pycache__/input_classifier.cpython-37.pyc +0 -0
- package/knowledge_base/generation/__pycache__/input_classifier.cpython-38.pyc +0 -0
- package/knowledge_base/generation/__pycache__/manual_tc_parser.cpython-37.pyc +0 -0
- package/knowledge_base/generation/__pycache__/manual_tc_parser.cpython-38.pyc +0 -0
- package/knowledge_base/generation/__pycache__/prompts.cpython-37.pyc +0 -0
- package/knowledge_base/generation/__pycache__/prompts.cpython-38.pyc +0 -0
- package/knowledge_base/generation/__pycache__/tc_transformer.cpython-37.pyc +0 -0
- package/knowledge_base/generation/__pycache__/test_generator.cpython-37.pyc +0 -0
- package/knowledge_base/generation/__pycache__/test_generator.cpython-38.pyc +0 -0
- package/knowledge_base/generation/input_classifier.py +148 -0
- package/knowledge_base/generation/manual_tc_parser.py +180 -0
- package/knowledge_base/generation/prompts.py +755 -0
- package/knowledge_base/generation/tc_transformer.py +368 -0
- package/knowledge_base/generation/test_generator.py +553 -0
- package/knowledge_base/graph_db/__init__.py +5 -0
- package/knowledge_base/graph_db/__pycache__/__init__.cpython-37.pyc +0 -0
- package/knowledge_base/graph_db/__pycache__/__init__.cpython-38.pyc +0 -0
- package/knowledge_base/graph_db/__pycache__/graphiti_client.cpython-37.pyc +0 -0
- package/knowledge_base/graph_db/__pycache__/kg_traversal.cpython-37.pyc +0 -0
- package/knowledge_base/graph_db/__pycache__/migrate_kg.cpython-37.pyc +0 -0
- package/knowledge_base/graph_db/__pycache__/neo4j_client.cpython-37.pyc +0 -0
- package/knowledge_base/graph_db/__pycache__/neo4j_client.cpython-38.pyc +0 -0
- package/knowledge_base/graph_db/__pycache__/schema.cpython-37.pyc +0 -0
- package/knowledge_base/graph_db/__pycache__/temporal_ingest.cpython-37.pyc +0 -0
- package/knowledge_base/graph_db/graphiti_client.py +127 -0
- package/knowledge_base/graph_db/kg_traversal.py +192 -0
- package/knowledge_base/graph_db/migrate_kg.py +93 -0
- package/knowledge_base/graph_db/neo4j_client.py +116 -0
- package/knowledge_base/graph_db/schema.py +22 -0
- package/knowledge_base/graph_db/temporal_ingest.py +59 -0
- package/knowledge_base/ingestion/__init__.py +1 -0
- package/knowledge_base/ingestion/__pycache__/__init__.cpython-37.pyc +0 -0
- package/knowledge_base/ingestion/__pycache__/__init__.cpython-38.pyc +0 -0
- package/knowledge_base/ingestion/__pycache__/ingest.cpython-37.pyc +0 -0
- package/knowledge_base/ingestion/__pycache__/ingest.cpython-38.pyc +0 -0
- package/knowledge_base/ingestion/__pycache__/ingest_images.cpython-37.pyc +0 -0
- package/knowledge_base/ingestion/__pycache__/ingest_images.cpython-38.pyc +0 -0
- package/knowledge_base/ingestion/__pycache__/kg_extractor.cpython-37.pyc +0 -0
- package/knowledge_base/ingestion/__pycache__/kg_extractor.cpython-38.pyc +0 -0
- package/knowledge_base/ingestion/__pycache__/web_ingest.cpython-38.pyc +0 -0
- package/knowledge_base/ingestion/ingest.py +346 -0
- package/knowledge_base/ingestion/ingest_images.py +330 -0
- package/knowledge_base/ingestion/kg_extractor.py +358 -0
- package/knowledge_base/ingestion/web_ingest.py +83 -0
- package/knowledge_base/intelligence/__init__.py +1 -0
- package/knowledge_base/intelligence/__pycache__/__init__.cpython-37.pyc +0 -0
- package/knowledge_base/intelligence/__pycache__/execution_ingest.cpython-37.pyc +0 -0
- package/knowledge_base/intelligence/__pycache__/predictive_engine.cpython-37.pyc +0 -0
- package/knowledge_base/intelligence/__pycache__/risk_scorer.cpython-37.pyc +0 -0
- package/knowledge_base/intelligence/execution_ingest.py +34 -0
- package/knowledge_base/intelligence/predictive_engine.py +7 -0
- package/knowledge_base/intelligence/risk_scorer.py +8 -0
- package/knowledge_base/memory/__init__.py +6 -0
- package/knowledge_base/memory/__pycache__/__init__.cpython-37.pyc +0 -0
- package/knowledge_base/memory/__pycache__/__init__.cpython-38.pyc +0 -0
- package/knowledge_base/memory/__pycache__/cognee_client.cpython-37.pyc +0 -0
- package/knowledge_base/memory/__pycache__/cognee_client.cpython-38.pyc +0 -0
- package/knowledge_base/memory/__pycache__/ingest_memory.cpython-37.pyc +0 -0
- package/knowledge_base/memory/__pycache__/memory_types.cpython-37.pyc +0 -0
- package/knowledge_base/memory/__pycache__/memory_types.cpython-38.pyc +0 -0
- package/knowledge_base/memory/cognee_client.py +164 -0
- package/knowledge_base/memory/ingest_memory.py +60 -0
- package/knowledge_base/memory/memory_types.py +23 -0
- package/knowledge_base/models/test_requirement.py +84 -0
- package/knowledge_base/parsers/__init__.py +0 -0
- package/knowledge_base/parsers/__pycache__/__init__.cpython-37.pyc +0 -0
- package/knowledge_base/parsers/__pycache__/__init__.cpython-38.pyc +0 -0
- package/knowledge_base/parsers/__pycache__/csv_parser.cpython-37.pyc +0 -0
- package/knowledge_base/parsers/__pycache__/csv_parser.cpython-38.pyc +0 -0
- package/knowledge_base/parsers/__pycache__/doc_parser.cpython-37.pyc +0 -0
- package/knowledge_base/parsers/__pycache__/doc_parser.cpython-38.pyc +0 -0
- package/knowledge_base/parsers/__pycache__/html_parser.cpython-38.pyc +0 -0
- package/knowledge_base/parsers/__pycache__/image_extractor.cpython-37.pyc +0 -0
- package/knowledge_base/parsers/__pycache__/image_extractor.cpython-38.pyc +0 -0
- package/knowledge_base/parsers/__pycache__/markdown_parser.cpython-37.pyc +0 -0
- package/knowledge_base/parsers/__pycache__/markdown_parser.cpython-38.pyc +0 -0
- package/knowledge_base/parsers/__pycache__/pdf_parser.cpython-37.pyc +0 -0
- package/knowledge_base/parsers/__pycache__/pdf_parser.cpython-38.pyc +0 -0
- package/knowledge_base/parsers/csv_parser.py +126 -0
- package/knowledge_base/parsers/doc_parser.py +176 -0
- package/knowledge_base/parsers/html_parser.py +151 -0
- package/knowledge_base/parsers/image_extractor.py +370 -0
- package/knowledge_base/parsers/markdown_parser.py +116 -0
- package/knowledge_base/parsers/pdf_parser.py +178 -0
- package/knowledge_base/retrieval/__init__.py +1 -0
- package/knowledge_base/retrieval/__pycache__/__init__.cpython-37.pyc +0 -0
- package/knowledge_base/retrieval/__pycache__/__init__.cpython-38.pyc +0 -0
- package/knowledge_base/retrieval/__pycache__/context_fusion.cpython-37.pyc +0 -0
- package/knowledge_base/retrieval/__pycache__/context_fusion.cpython-38.pyc +0 -0
- package/knowledge_base/retrieval/__pycache__/knowledge_graph.cpython-37.pyc +0 -0
- package/knowledge_base/retrieval/__pycache__/knowledge_graph.cpython-38.pyc +0 -0
- package/knowledge_base/retrieval/__pycache__/reranker.cpython-37.pyc +0 -0
- package/knowledge_base/retrieval/__pycache__/reranker.cpython-38.pyc +0 -0
- package/knowledge_base/retrieval/__pycache__/retrieval_debug.cpython-37.pyc +0 -0
- package/knowledge_base/retrieval/__pycache__/retrieval_debug.cpython-38.pyc +0 -0
- package/knowledge_base/retrieval/__pycache__/retriever.cpython-37.pyc +0 -0
- package/knowledge_base/retrieval/__pycache__/retriever.cpython-38.pyc +0 -0
- package/knowledge_base/retrieval/__pycache__/unified_query.cpython-38.pyc +0 -0
- package/knowledge_base/retrieval/__pycache__/web_retriever.cpython-38.pyc +0 -0
- package/knowledge_base/retrieval/context_fusion.py +264 -0
- package/knowledge_base/retrieval/knowledge_graph.py +267 -0
- package/knowledge_base/retrieval/reranker.py +308 -0
- package/knowledge_base/retrieval/retrieval_debug.py +69 -0
- package/knowledge_base/retrieval/retriever.py +885 -0
- package/knowledge_base/retrieval/unified_query.py +189 -0
- package/knowledge_base/retrieval/web_retriever.py +337 -0
- package/knowledge_base/validators/__init__.py +1 -0
- package/knowledge_base/validators/__pycache__/__init__.cpython-314.pyc +0 -0
- package/knowledge_base/validators/__pycache__/__init__.cpython-37.pyc +0 -0
- package/knowledge_base/validators/__pycache__/step_fidelity.cpython-314.pyc +0 -0
- package/knowledge_base/validators/__pycache__/step_fidelity.cpython-37.pyc +0 -0
- package/knowledge_base/validators/step_fidelity.py +88 -0
- package/knowledge_base/vision/__init__.py +0 -0
- package/knowledge_base/vision/__pycache__/__init__.cpython-37.pyc +0 -0
- package/knowledge_base/vision/__pycache__/__init__.cpython-38.pyc +0 -0
- package/knowledge_base/vision/__pycache__/image_describer.cpython-37.pyc +0 -0
- package/knowledge_base/vision/__pycache__/image_describer.cpython-38.pyc +0 -0
- package/knowledge_base/vision/image_describer.py +202 -0
- package/package.json +31 -0
|
@@ -0,0 +1,391 @@
|
|
|
1
|
+
"""
|
|
2
|
+
QCAPPS-134 Comprehensive Test Case Generator
|
|
3
|
+
=============================================
|
|
4
|
+
Expands the 4-step QCAPPS-134 "Chromium | Hardware-dependent" test case into
|
|
5
|
+
4 separate, detailed test case documents with positive, negative, and edge case
|
|
6
|
+
coverage — using the IGEL Knowledge Base (PostgreSQL + pgvector RAG).
|
|
7
|
+
|
|
8
|
+
Outputs: Markdown (.md) + Python pytest (.py) + JSON (.json) per sub-topic.
|
|
9
|
+
|
|
10
|
+
Usage:
|
|
11
|
+
python -m knowledge_base.cli.generate_qcapps134
|
|
12
|
+
"""
|
|
13
|
+
from __future__ import annotations
|
|
14
|
+
|
|
15
|
+
import json
|
|
16
|
+
import sys
|
|
17
|
+
import time
|
|
18
|
+
from pathlib import Path
|
|
19
|
+
|
|
20
|
+
from rich.console import Console
|
|
21
|
+
from rich.panel import Panel
|
|
22
|
+
from rich.table import Table
|
|
23
|
+
|
|
24
|
+
from knowledge_base.db.client import init_pool, test_connection, close_pool
|
|
25
|
+
from knowledge_base.generation.test_generator import (
|
|
26
|
+
generate_test_cases,
|
|
27
|
+
GeneratedTestCase,
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
console = Console()
|
|
31
|
+
|
|
32
|
+
GENERATED_DIR = Path(__file__).resolve().parents[1] / "tests" / "Generated"
|
|
33
|
+
JSON_DIR = Path(__file__).resolve().parents[1] / "output" / "qcapps_134"
|
|
34
|
+
|
|
35
|
+
ORIGINAL_DESCRIPTION = """\
|
|
36
|
+
This test case contains all hardware-dependent features of Chromium on IGEL OS 12.
|
|
37
|
+
|
|
38
|
+
Additional Information:
|
|
39
|
+
- by default chrome://* is blocked; set "URLBlocklist" to ";" to unblock all urls
|
|
40
|
+
- wait a bit (1-2 seconds) until setup parameters take effect after hitting 'Apply'
|
|
41
|
+
- Preferences: /userhome/.config/chromium/Default/Preferences
|
|
42
|
+
- Policies: /etc/chromium-browser/policies/managed/policies.json
|
|
43
|
+
- if preferences are changed chromium needs a restart
|
|
44
|
+
- Attention! On AMD devices, the chrome://media-internals information might be misleading. Always check the cpu consumption!
|
|
45
|
+
|
|
46
|
+
TC Setup option to change Screenlock/Screensaver timer:
|
|
47
|
+
- TC Setup > User Interface > Screenlock/Screensaver > Start automatically = true
|
|
48
|
+
- TC Setup > User Interface > Screenlock/Screensaver > Timeout = 1
|
|
49
|
+
- TC Setup > User Interface > Screenlock/Screensaver > Different screenlock timeout = true
|
|
50
|
+
- TC Setup > User Interface > Screenlock/Screensaver > Screenlock timeout = 2
|
|
51
|
+
"""
|
|
52
|
+
|
|
53
|
+
SUB_TOPICS = [
|
|
54
|
+
{
|
|
55
|
+
"id": "hw_accel",
|
|
56
|
+
"topic": (
|
|
57
|
+
"QCAPPS-134 Chromium Hardware Video Acceleration on IGEL OS 12 — "
|
|
58
|
+
"comprehensive test with positive, negative, and edge case scenarios. "
|
|
59
|
+
"Cover: enabling/disabling Hardware Acceleration toggle "
|
|
60
|
+
"(TC Setup: Apps > Chromium Browser > Global Settings > Hardware Acceleration = true/false), "
|
|
61
|
+
"H264 video playback on YouTube, tagesschau.de, and W3C HTML5 video page, "
|
|
62
|
+
"h264ify extension auto-installation verification via chrome://extensions, "
|
|
63
|
+
"CPU consumption comparison with and without HW acceleration using 'atop 1' command, "
|
|
64
|
+
"chrome://gpu and chrome://media-internals verification. "
|
|
65
|
+
"Negative: HW acceleration disabled but expecting smooth playback, "
|
|
66
|
+
"missing GPU driver, chrome://gpu showing software rendering. "
|
|
67
|
+
"Edge cases: AMD GPU with misleading chrome://media-internals (always check CPU), "
|
|
68
|
+
"dual GPU systems, chromium restart required after settings change."
|
|
69
|
+
),
|
|
70
|
+
"json_key": "QCAPPS-134-HW-ACCEL",
|
|
71
|
+
"json_summary": "Chromium | Hardware Video Acceleration",
|
|
72
|
+
"original_step": (
|
|
73
|
+
"Step 1: Check Hardware Video Acceleration and Play videos (HTML5 video)\n"
|
|
74
|
+
"Test Data:\n"
|
|
75
|
+
"- Enable HW video acceleration in Chromium Global settings:\n"
|
|
76
|
+
" TC Setup: Apps > Chromium Browser > Global Settings > Hardware Acceleration = true/false\n"
|
|
77
|
+
"- Check hardware video acceleration and H264 Support:\n"
|
|
78
|
+
" https://www.youtube.com/\n"
|
|
79
|
+
" https://www.tagesschau.de/\n"
|
|
80
|
+
" https://www.w3.org/2010/05/video/mediaevents.html\n"
|
|
81
|
+
"- Check if H264 Extension is automatically installed:\n"
|
|
82
|
+
" Open chrome://extensions and check for 'h264ify' extension\n"
|
|
83
|
+
"- Check Hardware Consumption with and without Hardware Acceleration:\n"
|
|
84
|
+
" Run 'atop 1' in terminal and compare cpu usage for chromium process\n"
|
|
85
|
+
"Expected Result:\n"
|
|
86
|
+
"- Videos should play smoothly and UI should work as expected\n"
|
|
87
|
+
"- h264ify extension is installed automatically\n"
|
|
88
|
+
"- Hardware Acceleration can be positively identified via the cpu consumption"
|
|
89
|
+
),
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"id": "gpu_libva",
|
|
93
|
+
"topic": (
|
|
94
|
+
"QCAPPS-134 Chromium GPU Process and libva Library Verification on IGEL OS 12 — "
|
|
95
|
+
"comprehensive test with positive, negative, and edge case scenarios. "
|
|
96
|
+
"Cover: verifying Chromium GPU process is running via 'ps ax | grep chromium | grep gpu-process', "
|
|
97
|
+
"checking libva library paths loaded by GPU process via 'cat /proc/<pid>/maps | grep libva', "
|
|
98
|
+
"verifying VA-API hardware acceleration is properly initialized. "
|
|
99
|
+
"Negative: GPU process not running, missing libva libraries, "
|
|
100
|
+
"libva not loaded when HW acceleration is disabled. "
|
|
101
|
+
"Edge cases: multiple Chromium instances, process restart after crash, "
|
|
102
|
+
"different libva versions on different hardware platforms."
|
|
103
|
+
),
|
|
104
|
+
"json_key": "QCAPPS-134-GPU-LIBVA",
|
|
105
|
+
"json_summary": "Chromium | GPU Process and libva Libraries",
|
|
106
|
+
"original_step": (
|
|
107
|
+
"Step 2: Check Chromium process and libraries\n"
|
|
108
|
+
"Test Data:\n"
|
|
109
|
+
"- Open local shell and find Chromium gpu process by running:\n"
|
|
110
|
+
" ps ax | grep chromium | grep gpu-process\n"
|
|
111
|
+
"- Run the following command:\n"
|
|
112
|
+
" cat /proc/<pid of gpu-process>/maps | grep libva\n"
|
|
113
|
+
"Expected Result:\n"
|
|
114
|
+
"- You should see the Chromium gpu process running\n"
|
|
115
|
+
"- You should see a list of libva library paths"
|
|
116
|
+
),
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"id": "openh264",
|
|
120
|
+
"topic": (
|
|
121
|
+
"QCAPPS-134 OpenH264 Service Verification for Chromium on IGEL OS 12 — "
|
|
122
|
+
"comprehensive test with positive, negative, and edge case scenarios. "
|
|
123
|
+
"Cover: checking OpenH264 service status via "
|
|
124
|
+
"'systemctl status igel-openh264-installer@chromium.service', "
|
|
125
|
+
"verifying service is active and running, checking H264 codec availability "
|
|
126
|
+
"for Chromium browser, H264 video playback validation. "
|
|
127
|
+
"Negative: service stopped/failed, service not found (missing package), "
|
|
128
|
+
"service active but H264 codec not loaded in Chromium. "
|
|
129
|
+
"Edge cases: service restart behavior, service status after device reboot, "
|
|
130
|
+
"interaction with HW acceleration setting, multiple browser sessions."
|
|
131
|
+
),
|
|
132
|
+
"json_key": "QCAPPS-134-OPENH264",
|
|
133
|
+
"json_summary": "Chromium | OpenH264 Service Verification",
|
|
134
|
+
"original_step": (
|
|
135
|
+
"Step 3: Check if OpenH264 works\n"
|
|
136
|
+
"Test Data:\n"
|
|
137
|
+
"- Check if H264 Service is running\n"
|
|
138
|
+
"- Run as root in terminal:\n"
|
|
139
|
+
" systemctl status igel-openh264-installer@chromium.service\n"
|
|
140
|
+
"Expected Result:\n"
|
|
141
|
+
"- Specified H264 service is active"
|
|
142
|
+
),
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"id": "ms_teams",
|
|
146
|
+
"topic": (
|
|
147
|
+
"QCAPPS-134 MS Teams in Chromium Browser on IGEL OS 12 — "
|
|
148
|
+
"comprehensive test with positive, negative, and edge case scenarios. "
|
|
149
|
+
"Cover: launching MS Teams in Chromium (https://teams.microsoft.com/), "
|
|
150
|
+
"verifying connected external audio/video devices are correctly identified, "
|
|
151
|
+
"performing a test call with Windows and iOS MS Teams native users, "
|
|
152
|
+
"screen sharing functionality test, "
|
|
153
|
+
"long-term call (>10 minutes) with screenlock/screensaver interaction test "
|
|
154
|
+
"(TC Setup > User Interface > Screenlock/Screensaver > Start automatically = true, Timeout = 1, "
|
|
155
|
+
"Different screenlock timeout = true, Screenlock timeout = 2). "
|
|
156
|
+
"Negative: no audio device connected, camera not detected, "
|
|
157
|
+
"network interruption during call, Teams login failure. "
|
|
158
|
+
"Edge cases: screensaver activating during active call, "
|
|
159
|
+
"multiple audio devices connected (USB headset + built-in), "
|
|
160
|
+
"screen sharing with multiple monitors, call quality degradation over time."
|
|
161
|
+
),
|
|
162
|
+
"json_key": "QCAPPS-134-MS-TEAMS",
|
|
163
|
+
"json_summary": "Chromium | MS Teams in Browser",
|
|
164
|
+
"original_step": (
|
|
165
|
+
"Step 4: Test MS Teams in Browser\n"
|
|
166
|
+
"Test Data:\n"
|
|
167
|
+
"- Start MS Teams in Chromium Browser (https://teams.microsoft.com/)\n"
|
|
168
|
+
"- Check if all connected external audio/video devices are correctly identified\n"
|
|
169
|
+
"- Perform a Test Call with someone who uses Windows and someone who uses iOS\n"
|
|
170
|
+
" (both using MS Teams native on those devices)\n"
|
|
171
|
+
"- Perform Screen Sharing\n"
|
|
172
|
+
"- Perform a long term call (x > 10min) and check if IGEL OS screenlock/screensaver\n"
|
|
173
|
+
" interrupts the call\n"
|
|
174
|
+
"Expected Result:\n"
|
|
175
|
+
"- All audio/video devices are correctly identified\n"
|
|
176
|
+
"- Test Call against MS Teams running natively on Windows or iOS does work\n"
|
|
177
|
+
"- Audio/Video Quality is as expected and does not degrade over time\n"
|
|
178
|
+
"- Screen Sharing is possible\n"
|
|
179
|
+
"- IGEL OS screensaver/screenlock does not interrupt the call"
|
|
180
|
+
),
|
|
181
|
+
},
|
|
182
|
+
]
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
def _extract_json_from_markdown(md_content: str, meta: dict) -> dict:
|
|
186
|
+
"""Parse generated markdown into structured JSON matching the project's output format."""
|
|
187
|
+
import re
|
|
188
|
+
|
|
189
|
+
result = {
|
|
190
|
+
"issue_key": meta["json_key"],
|
|
191
|
+
"summary": meta["json_summary"],
|
|
192
|
+
"original_qcapps_step": meta["original_step"],
|
|
193
|
+
"preconditions": "",
|
|
194
|
+
"steps": [],
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
prec_match = re.search(
|
|
198
|
+
r"##\s*Preconditions?\s*\n(.*?)(?=\n##|\Z)",
|
|
199
|
+
md_content, re.DOTALL | re.IGNORECASE,
|
|
200
|
+
)
|
|
201
|
+
if prec_match:
|
|
202
|
+
result["preconditions"] = prec_match.group(1).strip()
|
|
203
|
+
|
|
204
|
+
table_match = re.search(
|
|
205
|
+
r"\|\s*#\s*\|\s*STEP\s*\|.*?\n\|[-|\s]+\n(.*?)(?=\n##|\n\n---|\Z)",
|
|
206
|
+
md_content, re.DOTALL | re.IGNORECASE,
|
|
207
|
+
)
|
|
208
|
+
if table_match:
|
|
209
|
+
table_body = table_match.group(1).strip()
|
|
210
|
+
for row in table_body.split("\n"):
|
|
211
|
+
row = row.strip()
|
|
212
|
+
if not row or row.startswith("|---"):
|
|
213
|
+
continue
|
|
214
|
+
cells = [c.strip() for c in row.split("|")]
|
|
215
|
+
cells = [c for c in cells if c]
|
|
216
|
+
if len(cells) >= 4:
|
|
217
|
+
try:
|
|
218
|
+
step_no = int(cells[0])
|
|
219
|
+
except ValueError:
|
|
220
|
+
continue
|
|
221
|
+
result["steps"].append({
|
|
222
|
+
"step_no": step_no,
|
|
223
|
+
"step": cells[1].replace("<br>", "\n").replace("**", ""),
|
|
224
|
+
"test_data": cells[2].replace("<br>", "\n"),
|
|
225
|
+
"expected_result": cells[3].replace("<br>", "\n"),
|
|
226
|
+
})
|
|
227
|
+
|
|
228
|
+
if not result["steps"]:
|
|
229
|
+
step_sections = re.findall(
|
|
230
|
+
r"(?:###?\s*(?:Step|Test Step)\s*(\d+)[^\n]*)\n(.*?)(?=(?:###?\s*(?:Step|Test Step)\s*\d+)|\n##|\Z)",
|
|
231
|
+
md_content, re.DOTALL | re.IGNORECASE,
|
|
232
|
+
)
|
|
233
|
+
for num, body in step_sections:
|
|
234
|
+
result["steps"].append({
|
|
235
|
+
"step_no": int(num),
|
|
236
|
+
"step": f"Step {num}",
|
|
237
|
+
"test_data": body.strip()[:2000],
|
|
238
|
+
"expected_result": "",
|
|
239
|
+
})
|
|
240
|
+
|
|
241
|
+
return result
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
def run_generation(sub: dict, test_id: str) -> GeneratedTestCase:
|
|
245
|
+
"""Generate a single sub-topic test case."""
|
|
246
|
+
console.print(f"\n[bold cyan]--- Generating: {sub['json_summary']} ---[/bold cyan]")
|
|
247
|
+
console.print(f" Test ID: {test_id}")
|
|
248
|
+
console.print(f" Topic: {sub['topic'][:100]}...")
|
|
249
|
+
|
|
250
|
+
full_topic = (
|
|
251
|
+
f"{sub['topic']}\n\n"
|
|
252
|
+
"Generate a COMPREHENSIVE test case document covering:\n"
|
|
253
|
+
"1. POSITIVE SCENARIOS: All happy-path validations for the feature\n"
|
|
254
|
+
"2. NEGATIVE SCENARIOS: What happens when settings are wrong, services are down, "
|
|
255
|
+
"devices are missing, or configurations are invalid\n"
|
|
256
|
+
"3. EDGE CASES: Boundary conditions, unusual hardware configurations, timing issues, "
|
|
257
|
+
"platform-specific behaviors\n\n"
|
|
258
|
+
"Important IGEL context for this test:\n"
|
|
259
|
+
"- by default chrome://* is blocked; set URLBlocklist to ; to unblock all urls\n"
|
|
260
|
+
"- wait 1-2 seconds until setup parameters take effect after hitting Apply\n"
|
|
261
|
+
"- Preferences: /userhome/.config/chromium/Default/Preferences\n"
|
|
262
|
+
"- Policies: /etc/chromium-browser/policies/managed/policies.json\n"
|
|
263
|
+
"- if preferences are changed chromium needs a restart\n"
|
|
264
|
+
"- On AMD devices, chrome://media-internals information might be misleading. "
|
|
265
|
+
"Always check the cpu consumption!\n"
|
|
266
|
+
"- Screenlock/Screensaver config: TC Setup > User Interface > Screenlock/Screensaver\n\n"
|
|
267
|
+
"The test case must be written so that a person with NO IGEL knowledge can understand "
|
|
268
|
+
"and execute every step. Include exact navigation paths, exact commands, and specific "
|
|
269
|
+
"observable outcomes."
|
|
270
|
+
)
|
|
271
|
+
|
|
272
|
+
result = generate_test_cases(
|
|
273
|
+
topic=full_topic,
|
|
274
|
+
output_format="both",
|
|
275
|
+
product="IGEL OS",
|
|
276
|
+
test_id=test_id,
|
|
277
|
+
feature_area="Chromium Hardware Validation",
|
|
278
|
+
top_k=10,
|
|
279
|
+
output_dir=GENERATED_DIR,
|
|
280
|
+
debug_retrieval=False,
|
|
281
|
+
source_tc=None,
|
|
282
|
+
detail_level="detailed",
|
|
283
|
+
)
|
|
284
|
+
|
|
285
|
+
if result.markdown_path:
|
|
286
|
+
md_content = result.markdown_path.read_text(encoding="utf-8")
|
|
287
|
+
json_data = _extract_json_from_markdown(md_content, sub)
|
|
288
|
+
json_path = JSON_DIR / f"{sub['json_key']}.json"
|
|
289
|
+
json_path.write_text(
|
|
290
|
+
json.dumps(json_data, indent=2, ensure_ascii=False),
|
|
291
|
+
encoding="utf-8",
|
|
292
|
+
)
|
|
293
|
+
console.print(f" [green]JSON[/green]: {json_path}")
|
|
294
|
+
|
|
295
|
+
return result
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
def main() -> None:
|
|
299
|
+
console.rule("[bold blue]QCAPPS-134 Comprehensive Test Case Generator[/bold blue]")
|
|
300
|
+
console.print(" Source : QCAPPS-134 (Chromium | Hardware-dependent)")
|
|
301
|
+
console.print(" Sub-topics : 4 (HW Accel, GPU/libva, OpenH264, MS Teams)")
|
|
302
|
+
console.print(f" MD+Py Output : {GENERATED_DIR}")
|
|
303
|
+
console.print(f" JSON Output : {JSON_DIR}")
|
|
304
|
+
console.print(" Detail Level : detailed (beginner-friendly)")
|
|
305
|
+
console.print()
|
|
306
|
+
|
|
307
|
+
GENERATED_DIR.mkdir(parents=True, exist_ok=True)
|
|
308
|
+
JSON_DIR.mkdir(parents=True, exist_ok=True)
|
|
309
|
+
|
|
310
|
+
console.print("[bold]Connecting to PostgreSQL Knowledge Base...[/bold]")
|
|
311
|
+
init_pool()
|
|
312
|
+
if not test_connection():
|
|
313
|
+
console.print("[red]DB connection failed. Check knowledge_base/.env[/red]")
|
|
314
|
+
sys.exit(1)
|
|
315
|
+
console.print("[green]Connected.[/green]\n")
|
|
316
|
+
|
|
317
|
+
results: list[tuple[dict, GeneratedTestCase]] = []
|
|
318
|
+
t_global = time.time()
|
|
319
|
+
|
|
320
|
+
for i, sub in enumerate(SUB_TOPICS):
|
|
321
|
+
test_id = f"TC{20 + i:03d}"
|
|
322
|
+
try:
|
|
323
|
+
r = run_generation(sub, test_id)
|
|
324
|
+
results.append((sub, r))
|
|
325
|
+
_print_single_result(r)
|
|
326
|
+
except Exception as e:
|
|
327
|
+
console.print(f" [red]FAILED: {e}[/red]")
|
|
328
|
+
import traceback
|
|
329
|
+
traceback.print_exc()
|
|
330
|
+
|
|
331
|
+
close_pool()
|
|
332
|
+
elapsed = round(time.time() - t_global, 1)
|
|
333
|
+
|
|
334
|
+
console.print()
|
|
335
|
+
console.rule("[bold green]Generation Complete[/bold green]")
|
|
336
|
+
summary = Table(title=f"QCAPPS-134 Expansion Results ({elapsed}s total)")
|
|
337
|
+
summary.add_column("Test ID")
|
|
338
|
+
summary.add_column("Sub-Topic", max_width=40)
|
|
339
|
+
summary.add_column("Chunks", justify="right")
|
|
340
|
+
summary.add_column("Steps(orig)", justify="center")
|
|
341
|
+
summary.add_column("Syntax")
|
|
342
|
+
summary.add_column("Time(s)", justify="right")
|
|
343
|
+
summary.add_column("Status")
|
|
344
|
+
|
|
345
|
+
for sub, r in results:
|
|
346
|
+
status = "[green]OK[/green]" if r.kb_sources else "[red]FAIL[/red]"
|
|
347
|
+
if r.warnings:
|
|
348
|
+
status = "[yellow]WARN[/yellow]"
|
|
349
|
+
summary.add_row(
|
|
350
|
+
r.test_id,
|
|
351
|
+
sub["json_summary"],
|
|
352
|
+
str(r.kb_chunk_count),
|
|
353
|
+
"1",
|
|
354
|
+
"[green]Y[/green]" if r.syntax_valid else "[red]N[/red]",
|
|
355
|
+
str(r.generation_time_sec),
|
|
356
|
+
status,
|
|
357
|
+
)
|
|
358
|
+
console.print(summary)
|
|
359
|
+
|
|
360
|
+
console.print("\n[bold]Output Files:[/bold]")
|
|
361
|
+
for sub, r in results:
|
|
362
|
+
console.print(f" {sub['json_summary']}:")
|
|
363
|
+
if r.markdown_path:
|
|
364
|
+
console.print(f" MD : {r.markdown_path}")
|
|
365
|
+
if r.python_path:
|
|
366
|
+
console.print(f" PY : {r.python_path}")
|
|
367
|
+
json_path = JSON_DIR / f"{sub['json_key']}.json"
|
|
368
|
+
if json_path.exists():
|
|
369
|
+
console.print(f" JSON: {json_path}")
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
def _print_single_result(r: GeneratedTestCase) -> None:
|
|
373
|
+
console.print(f" KB Chunks : {r.kb_chunk_count}")
|
|
374
|
+
console.print(f" Tokens : ~{r.tokens_used:,}")
|
|
375
|
+
console.print(f" Time : {r.generation_time_sec}s")
|
|
376
|
+
console.print(f" Syntax Valid : {'Yes' if r.syntax_valid else 'No'}")
|
|
377
|
+
if r.markdown_path:
|
|
378
|
+
console.print(f" [green]MD[/green] : {r.markdown_path}")
|
|
379
|
+
if r.python_path:
|
|
380
|
+
console.print(f" [green]PY[/green] : {r.python_path}")
|
|
381
|
+
if r.kb_sources:
|
|
382
|
+
console.print(f" KB Sources ({len(r.kb_sources)}):")
|
|
383
|
+
for src in r.kb_sources[:5]:
|
|
384
|
+
console.print(f" {src[:120]}")
|
|
385
|
+
if r.warnings:
|
|
386
|
+
for w in r.warnings[:3]:
|
|
387
|
+
console.print(f" [yellow]WARN[/yellow]: {w[:120]}")
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
if __name__ == "__main__":
|
|
391
|
+
main()
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# ── PostgreSQL ───────────────────────────────────────────
|
|
2
|
+
DB_HOST=192.168.204.65
|
|
3
|
+
DB_PORT=5432
|
|
4
|
+
DB_NAME=IGEL
|
|
5
|
+
DB_USER=igle
|
|
6
|
+
DB_PASSWORD=12345
|
|
7
|
+
|
|
8
|
+
# Server auth (not parsed by dotenv — for human reference only)
|
|
9
|
+
# SERVER_URL=https://192.168.204.65:5432/
|
|
10
|
+
# SERVER_USER=root
|
|
11
|
+
# SERVER_PASS=FRIDEbAsec
|
|
12
|
+
|
|
13
|
+
# ── Azure OpenAI (LLM) ───────────────────────────────────
|
|
14
|
+
AZURE_API_KEY=8vhk6TdJxBz1dN5RKJHpN9R4IWVU81wc5PmFHtx793pNegMpxXx7JQQJ99BLACYeBjFXJ3w3AAAAACOG3FtZ
|
|
15
|
+
AZURE_ENDPOINT=https://qe-genai.cognitiveservices.azure.com/
|
|
16
|
+
AZURE_DEPLOYMENT=gpt-4.1
|
|
17
|
+
AZURE_API_VERSION=2024-12-01-preview
|
|
18
|
+
|
|
19
|
+
# ── Azure OpenAI (Embeddings) ────────────────────────────
|
|
20
|
+
AZURE_EMBEDDING_DEPLOYMENT=text-embedding-3-large
|
|
21
|
+
AZURE_EMBEDDINGS_API_VERSION=2024-02-01
|
|
22
|
+
EMBEDDING_DIM=3072
|
|
23
|
+
|
|
24
|
+
# # ── Ingestion Settings ───────────────────────────────────
|
|
25
|
+
# KB_DIR=C:\Users\parav\Workspace\IGEL\IGEL Automation_Suit_AI\innominds\Knowledge Base
|
|
26
|
+
# MARKDOWN_OUTPUT_DIR=C:\Users\parav\Workspace\IGEL\IGEL Automation_Suit_AI\innominds\Knowledge Base\markdown_output
|
|
27
|
+
# BATCH_SIZE=32
|
|
28
|
+
# MAX_RETRIES=3
|
|
29
|
+
# LOG_LEVEL=INFO
|
|
30
|
+
|
|
31
|
+
# ── V3 GraphRAG / rerank / context (CPU-optimized) ──
|
|
32
|
+
RERANKER_BACKEND=local
|
|
33
|
+
RERANKER_DEVICE=cpu
|
|
34
|
+
RERANKER_CPU_PROFILE=true
|
|
35
|
+
RERANKER_MODEL=cross-encoder/ms-marco-MiniLM-L-6-v2
|
|
36
|
+
RERANKER_TOP_N=16
|
|
37
|
+
RERANKER_BATCH_SIZE=8
|
|
38
|
+
RERANKER_MAX_LENGTH=256
|
|
39
|
+
RERANKER_PASSAGE_CHARS=2000
|
|
40
|
+
RERANKER_PARENT_CHARS=1200
|
|
41
|
+
RERANKER_TORCH_THREADS=4
|
|
42
|
+
RERANKER_SCORE_THRESHOLD=0.2
|
|
43
|
+
# Multilingual OSS (slower on CPU): RERANKER_MODEL=BAAI/bge-reranker-base
|
|
44
|
+
# COHERE_API_KEY=
|
|
45
|
+
# COHERE_RERANK_MODEL=rerank-multilingual-v3.0
|
|
46
|
+
|
|
47
|
+
# ── Chunking strategy ──
|
|
48
|
+
CHUNK_PARENT_MAX_TOKENS=1024
|
|
49
|
+
CHUNK_CHILD_MAX_TOKENS=220
|
|
50
|
+
CHUNK_OVERLAP_TOKENS=64
|
|
51
|
+
CHUNK_CONTEXT_HEADERS=true
|
|
52
|
+
|
|
53
|
+
# ── Live web retrieval (confidence-gated Stage 2 search) ──
|
|
54
|
+
WEB_RETRIEVAL_ENABLED=true
|
|
55
|
+
CONFIDENCE_THRESHOLD=0.75
|
|
56
|
+
WEB_SEARCH_BACKENDS=firecrawl,ddgs,searxng
|
|
57
|
+
WEB_MAX_PAGES=5
|
|
58
|
+
WEB_MIN_SCORE=0.15
|
|
59
|
+
WEB_BUDGET_RATIO=0.12
|
|
60
|
+
WEB_CACHE_TTL_SECONDS=3600
|
|
61
|
+
FIRECRAWL_BASE_URL=http://127.0.0.1:3002
|
|
62
|
+
FIRECRAWL_API_KEY=
|
|
63
|
+
CRAWL4AI_ENABLED=true
|
|
64
|
+
CRAWL4AI_TIMEOUT=30
|
|
65
|
+
DDGS_BACKEND=auto
|
|
66
|
+
DDGS_REGION=wt-wt
|
|
67
|
+
SEARXNG_BASE_URL=
|
|
68
|
+
STRIP_PROMOTED_PATTERNS=ad,sponsored,promo,advertisement
|
|
69
|
+
WEB_SEARCH_INCLUDE_DOMAINS=
|
|
70
|
+
WEB_SEARCH_EXCLUDE_DOMAINS=
|
|
71
|
+
KB_IGEL_BASE_URL=https://kb.igel.com
|
|
72
|
+
COMMUNITY_BASE_URL=https://community.igel.com
|
|
73
|
+
KB_IGEL_ENABLED=true
|
|
74
|
+
COMMUNITY_ENABLED=true
|
|
75
|
+
KG_ENABLED=true
|
|
76
|
+
KG_MAX_HOPS=2
|
|
77
|
+
CONTEXT_TOKEN_BUDGET=8000
|
|
78
|
+
CONTEXT_RESERVE_PROMPT=800
|
|
79
|
+
CONTEXT_MIN_SCORE=0.10
|
|
80
|
+
CONTEXT_MAX_CHUNKS=10
|
|
81
|
+
CONTEXT_KG_BUDGET_RATIO=0.22
|
|
82
|
+
CONTEXT_IMAGE_BUDGET_RATIO=0.08
|
|
83
|
+
CONTEXT_INCLUDE_IMAGES=true
|
|
84
|
+
RETRIEVAL_CANDIDATE_MULTIPLIER=6
|
|
85
|
+
RETRIEVAL_EXCLUDE_SOURCES=Jira,Defects
|
|
86
|
+
|
|
87
|
+
# ── Unified query (EKG + Web + MCP connectors) ──
|
|
88
|
+
QUERY_EXTERNAL_ENABLED=true
|
|
89
|
+
QUERY_MCP_SOURCES=jira,confluence
|
|
90
|
+
|
|
91
|
+
# ── Enterprise hardening ──
|
|
92
|
+
API_KEY_REQUIRED=true
|
|
93
|
+
RATE_LIMIT_ENABLED=true
|
|
94
|
+
JSON_LOGS=true
|
|
95
|
+
FTS_LANGUAGE=english
|
|
96
|
+
QUERY_TIMEOUT_SECONDS=60
|
|
97
|
+
RETRIEVAL_TRACE_SAMPLE_RATE=0.1
|
|
98
|
+
DB_SSLMODE=prefer
|
|
99
|
+
DEFAULT_GENERATION_MODE=pipeline
|
|
100
|
+
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# IGEL EKG Knowledge Base — environment template
|
|
2
|
+
# Copy to knowledge_base/config/.env and fill in values
|
|
3
|
+
|
|
4
|
+
# PostgreSQL
|
|
5
|
+
DB_HOST=192.168.204.65
|
|
6
|
+
DB_PORT=5432
|
|
7
|
+
DB_NAME=genai
|
|
8
|
+
DB_USER=genai
|
|
9
|
+
DB_PASSWORD=CHANGE_ME
|
|
10
|
+
DB_SSLMODE=prefer
|
|
11
|
+
|
|
12
|
+
# Azure OpenAI
|
|
13
|
+
AZURE_API_KEY=CHANGE_ME
|
|
14
|
+
AZURE_ENDPOINT=https://your-endpoint.cognitiveservices.azure.com/
|
|
15
|
+
AZURE_DEPLOYMENT=gpt-4.1
|
|
16
|
+
AZURE_EMBEDDING_DEPLOYMENT=text-embedding-3-large
|
|
17
|
+
EMBEDDING_DIM=3072
|
|
18
|
+
|
|
19
|
+
# API Security (Phase C)
|
|
20
|
+
API_KEY_REQUIRED=true
|
|
21
|
+
API_KEY=CHANGE_ME_ADMIN_KEY
|
|
22
|
+
API_KEYS=read_key:read,write_key:write,admin_key:admin
|
|
23
|
+
RATE_LIMIT_ENABLED=true
|
|
24
|
+
JSON_LOGS=true
|
|
25
|
+
|
|
26
|
+
# Retrieval (Phase D)
|
|
27
|
+
FTS_LANGUAGE=english
|
|
28
|
+
REDIS_URL=redis://localhost:6379/0
|
|
29
|
+
EMBED_CACHE_TTL=3600
|
|
30
|
+
RETRIEVAL_CACHE_TTL=300
|
|
31
|
+
QUERY_TIMEOUT_SECONDS=60
|
|
32
|
+
QUERY_GENERATION_TIMEOUT_SECONDS=90
|
|
33
|
+
ASYNC_THREAD_LIMIT=16
|
|
34
|
+
QUERY_EXTERNAL_ENABLED=true
|
|
35
|
+
QUERY_MCP_SOURCES=jira,confluence
|
|
36
|
+
WEB_RETRIEVAL_ENABLED=true
|
|
37
|
+
CONFIDENCE_THRESHOLD=0.75
|
|
38
|
+
WEB_SEARCH_BACKENDS=firecrawl,ddgs,searxng
|
|
39
|
+
WEB_MAX_PAGES=5
|
|
40
|
+
WEB_ALLOW_PRIVATE_HOSTS=false
|
|
41
|
+
FIRECRAWL_BASE_URL=http://127.0.0.1:3002
|
|
42
|
+
FIRECRAWL_API_KEY=
|
|
43
|
+
CRAWL4AI_ENABLED=true
|
|
44
|
+
CRAWL4AI_TIMEOUT=30
|
|
45
|
+
DDGS_BACKEND=auto
|
|
46
|
+
DDGS_REGION=wt-wt
|
|
47
|
+
SEARXNG_BASE_URL=
|
|
48
|
+
STRIP_PROMOTED_PATTERNS=ad,sponsored,promo,advertisement
|
|
49
|
+
WEB_SEARCH_INCLUDE_DOMAINS=
|
|
50
|
+
WEB_SEARCH_EXCLUDE_DOMAINS=
|
|
51
|
+
|
|
52
|
+
# Connectors (Phase F)
|
|
53
|
+
JIRA_ENABLED=false
|
|
54
|
+
JIRA_URL=
|
|
55
|
+
JIRA_USERNAME=
|
|
56
|
+
JIRA_API_TOKEN=
|
|
57
|
+
CONFLUENCE_ENABLED=false
|
|
58
|
+
CONFLUENCE_URL=
|
|
59
|
+
CONFLUENCE_USERNAME=
|
|
60
|
+
CONFLUENCE_API_TOKEN=
|
|
61
|
+
|
|
62
|
+
# Agentic pipeline
|
|
63
|
+
AGENTIC_ENABLED=true
|
|
64
|
+
EVAL_ENABLED=true
|
|
65
|
+
CONFIDENCE_REJECT_THRESHOLD=0.4
|
|
66
|
+
CONFIDENCE_WARN_THRESHOLD=0.6
|
|
67
|
+
|
|
68
|
+
# Generation A/B (Phase I)
|
|
69
|
+
DEFAULT_GENERATION_MODE=pipeline
|
|
70
|
+
|
|
71
|
+
# Reranker (CPU)
|
|
72
|
+
RERANKER_BACKEND=local
|
|
73
|
+
RERANKER_DEVICE=cpu
|
|
74
|
+
RERANKER_MODEL=cross-encoder/ms-marco-MiniLM-L-6-v2
|
|
75
|
+
CHUNK_CHILD_MAX_TOKENS=220
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|