Skip to content

refactor(models): add shared auto-replay high-risk policy - #4673

Open
Ishita-Singh-12 wants to merge 2 commits into
keploy:mainfrom
Ishita-Singh-12:refactor/#4603-auto-replay-risk
Open

Ishita-Singh-12 wants to merge 2 commits into
keploy:mainfrom
Ishita-Singh-12:refactor/#4603-auto-replay-risk

Conversation

@Ishita-Singh-12

Copy link
Copy Markdown

Describe the changes that are made

Implements the OSS portion of #4603 by adding models.IsAutoReplayHighRisk(FailureInfo) bool next to the shared failure types.

The rule is Risk == High OR any SchemaAdded / SchemaBroken category. It is separate from the general replay risk policy. No current call sites change; k8s-proxy and enterprise adoption remains a follow-up.

Links & References

Closes: NA (downstream adoption is still needed)

Related PRs

Related Issues

Related Documents

  • NA

What type of PR is this? (check all applicable)

  • Code Refactor
  • Test

Added e2e test pipeline?

  • no, because this adds a pure policy helper without changing call sites

Added comments for hard-to-understand areas?

  • yes

Added to documentation?

  • no documentation needed beyond the exported helper's comment

Are there any sample code or steps to test the changes?

  • yes, mentioned below

On Go 1.27.0 linux/amd64:

  • go test -count=1 ./pkg/models passed: 1,042 tests/subtests, including 73 for this helper (parent tests included).
  • go test -race -count=1 ./pkg/models passed.
  • go vet ./pkg/models passed.
  • Helper statement coverage is 100%. Independent QA measured models package coverage at 73.6%, not 100%.
  • Matrix coverage includes all current risk/category enums, unknown values, nil/empty categories, category order, mixed lists and duplicates.
  • Independent QA verified that removing either SchemaAdded or SchemaBroken protection makes the tests fail, then restored the helper and re-ran tests/vet.
  • The focused test passed 100 repeated runs.
  • go test -p 2 -timeout 25s ./pkg/platform/yaml/... ./utils/... passed.
  • Formatting and diff whitespace checks passed.

The full ./... suite was attempted under bounded execution budgets but did not complete. A 45s aggregate package timeout expired in pkg/service/record; TestGetTestAndMockChans_SlowMappingSinkIsNotCutOff passed in isolation on both this patch and unmodified main (8.012s each). This is not a full-suite pass. Live downstream k8s-proxy/enterprise auto-replay was not tested.

Self Review done?

  • yes, including independent QA of the OSS helper patch

Any relevant screenshots, recordings or logs?

  • NA

Additional checklist

  • Read the contribution guidelines
  • Followed the PR semantics guide
  • Followed the branch semantics guide

Signed-off-by: Ishita Singh <ishi.ishitasingh@gmail.com>
Signed-off-by: Ishita Singh <ishi.ishitasingh@gmail.com>
@github-actions

github-actions Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown

The CLA check failed. Please ensure you have:

  • Signed the CLA by commenting 'I have read the CLA Document and I hereby sign the CLA'
  • Used the correct email address in your commits (matches the one you used to sign the CLA).

After fixing these issues, comment 'recheck' to trigger the workflow again.

@Ishita-Singh-12

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

@Ishita-Singh-12

Copy link
Copy Markdown
Author

recheck

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thank you and congratulations 🎉 for opening your very first pull request in keploy

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