Skip to content

Conversation

@varunraokadaparthi
Copy link
Contributor

Introduce a self-contained analysis engine for krkn-ai chaos test results under pkg/krknai/analysisengine/, along with PromptStore changes to accept external template sources.

Changes:

  • pkg/krknai/analysisengine/engine.go: KrknAI analysis engine that orchestrates aggregation, LLM analysis, result reporting, and Slack notifications
  • pkg/krknai/analysisengine/engine_test.go: Unit tests covering config validation, embedded template loading, summary writing, full Run flow with mock LLM, LLM failure handling, and missing results
  • pkg/krknai/analysisengine/prompts/krknai.yaml: Placeholder prompt template for chaos analysis (needs to be updated)
  • internal/prompts/prompts.go: NewPromptStore now accepts an fs.FS parameter so each consumer provides its own template source
  • internal/prompts/prompts_test.go: Updated tests for new signature
  • internal/analysisengine/engine.go: Updated to use prompts.DefaultTemplates()

Introduce a self-contained analysis engine for krkn-ai chaos test results under `pkg/krknai/analysisengine/`, along with PromptStore changes to accept external template sources.

Changes:
- `pkg/krknai/analysisengine/engine.go`: KrknAI analysis engine that orchestrates aggregation, LLM analysis, result reporting, and
  Slack notifications
- `pkg/krknai/analysisengine/engine_test.go`: Unit tests covering config validation, embedded template loading, summary writing, full Run flow with mock LLM, LLM failure handling, and missing results
- `pkg/krknai/analysisengine/prompts/krknai.yaml`: Placeholder prompt template for chaos analysis (needs to be updated)
- `internal/prompts/prompts.go`: NewPromptStore now accepts an fs.FS parameter so each consumer provides its own template source
- `internal/prompts/prompts_test.go`: Updated tests for new signature
- `internal/analysisengine/engine.go`: Updated to use prompts.DefaultTemplates()

Co-authored-by: Cursor AI <noreply@cursor.com>
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 11, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: varunraokadaparthi

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 11, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 11, 2026

@varunraokadaparthi: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.


// DefaultTemplates returns the built-in prompt templates as an fs.FS.
func DefaultTemplates() fs.FS {
templatesFS, _ := fs.Sub(defaultTemplates, "templates")
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we try to handle this error right here?

type Config struct {
ResultsDir string // Directory containing krkn-ai results
APIKey string // Gemini API key
LLMConfig *llm.AnalysisConfig // Optional LLM configuration overrides
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this need to be repeated? most of these are already defined in a struct here. https://github.com/varunraokadaparthi/osde2e/blob/457bc7fff1cb9b923c325acc53365945b2595964/internal/analysisengine/engine.go#L36

Could you embed the main config here instead? https://medium.com/codex/struct-embedding-in-go-fa9fd9d223ca

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

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants