Skip to content

Remove generated recommendations from findings schema#66

Merged
Kiran01bm merged 1 commit intoblock:mainfrom
bakayolo:fix/lambda-runtime-family-recommendations
Apr 30, 2026
Merged

Remove generated recommendations from findings schema#66
Kiran01bm merged 1 commit intoblock:mainfrom
bakayolo:fix/lambda-runtime-family-recommendations

Conversation

@bakayolo
Copy link
Copy Markdown
Collaborator

@bakayolo bakayolo commented Apr 29, 2026

Summary

  • remove Recommendation from Finding and bump snapshot schema to v3
  • stop computing recommendation text in detection and remove the policy API for it
  • remove provider-side upgrade target heuristics that only existed to feed generated recommendations
  • update docs, CLI examples, emitters, and snapshot tests for the slimmer finding shape

Testing

  • go test ./...
  • pre-push hook: gofmt, goimports, golangci-lint, go test ./...

@bakayolo bakayolo requested a review from a team as a code owner April 29, 2026 22:54
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 29, 2026

Codecov Report

❌ Patch coverage is 85.29412% with 5 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
pkg/policy/default.go 76.19% 5 Missing ⚠️
Files with missing lines Coverage Δ
pkg/emitters/examples/logging_emitter.go 0.00% <ø> (ø)
pkg/eol/endoflife/adapters.go 84.39% <100.00%> (ø)
pkg/eol/endoflife/provider.go 90.47% <100.00%> (ø)
pkg/snapshot/store.go 85.23% <ø> (ø)
pkg/types/resource.go 100.00% <ø> (ø)
pkg/types/status.go 100.00% <ø> (ø)
pkg/workflow/detection/activities.go 88.43% <ø> (ø)
pkg/policy/default.go 63.63% <76.19%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bakayolo bakayolo force-pushed the fix/lambda-runtime-family-recommendations branch 2 times, most recently from 41ecd33 to f176dc7 Compare April 29, 2026 23:52
@bakayolo bakayolo force-pushed the fix/lambda-runtime-family-recommendations branch from f176dc7 to f3c0a94 Compare April 30, 2026 00:26
@bakayolo bakayolo changed the title Fix lifecycle-derived recommendations Remove generated recommendations from findings schema Apr 30, 2026
@Kiran01bm Kiran01bm merged commit 1857342 into block:main Apr 30, 2026
8 checks passed
@bakayolo bakayolo deleted the fix/lambda-runtime-family-recommendations branch April 30, 2026 03:41
Kiran01bm added a commit that referenced this pull request Apr 30, 2026
fix(policy): drop messages_test cases for APIs removed by #66
Kiran01bm added a commit that referenced this pull request Apr 30, 2026
## What and Why ?
Follow-up to the deletes-only fix that landed alongside #66. PR #66
added
a new `IsDeprecatedSupport` branch to `getYellowMessage` (Lambda-style
"Standard Support" / "Deprecated Support" semantics) plus the
`versionSubject` and `isLambda` helpers, but no tests were added at the
time. The deletes-only fix dropped policy coverage from 98.8% → 96.0%
because it removed the `GetRecommendation` test surface that #66 had
already deleted; this PR recovers that coverage by exercising the new
branch instead.

## Tests added

| Test | Branch covered |
|------|----------------|
| `TestGetMessage_Yellow_DeprecatedSupport_WithEOL` | Lambda runtime in
deprecated support **with** an end date — exercises the
`IsDeprecatedSupport`+`EOLDate` path and `versionSubject`'s `"Runtime"`
label (via `isLambda`) |
| `TestGetMessage_Yellow_DeprecatedSupport_NoEOL` |
`IsDeprecatedSupport` **without** an end date — non-Lambda resource, so
`versionSubject` returns `"Version"`; asserts the until-phrase is
omitted |

## Verification

All commands run with `GOTOOLCHAIN=go1.24.2`:

- `go test ./pkg/policy/... -cover` → **98.7%** (up from 96.0%)
- `go test ./...` → all packages green
- `golangci-lint run ./...` → 0 findings
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.

2 participants