[Sprint] sprint-loop-40#36
Merged
Merged
Conversation
…SUR-2503) Add @doc/@arg annotations to aws::refresh_scan documenting the actual cache-window (days_ago rolling window) semantics. Update SUR-2477 on Linear to remove push-date language that never matched the implementation and replace it with accurate cache-window descriptions. Choosing spec-alignment (Path B) over product-change (Path A): the cache-window logic is correct and fully tested; adding an unverifiable ECR describe-images call would recreate the same spec/impl gap.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sprint Plan — 2026-05-06 (sprint-loop-40)
Sprint Goal
Resolve the specification–implementation gap left open after PR #35 (SUR-2477): either extend
aws::refresh_scanto honour image-push time as an additional cache-invalidation signal (product change path), or align the Linear acceptance criteria and test commentary to match the implemented cache-window semantics (spec-alignment path). Either path closes the outstanding DoD gap cleanly within the repo.Selected Issues
SUR-2503 — SUR-2477 follow-up: push-vs-scan acceptance vs aws::refresh_scan cache-window behavior
Linear URL: https://linear.app/surinis/issue/SUR-2503/sur-2477-follow-up-push-vs-scan-acceptance-vs-awsrefresh-scan-cache
Description summary:
PR #35 (SUR-2477) shipped four bats tests that cover
aws::refresh_scanusing mocks foraws::_describe_findings,aws::scan_image, anddate. The tests validate:days_agorolling cache window → skip re-scanimageScanCompletedAtfloored byjq→ no spurious re-scanHowever the original SUR-2477 Linear issue and its DoD described push-time semantics ("if push is newer than scan → re-scan", "if scan is newer than push → skip"). The live
bash/aws.shimplementation reads onlyimageScanCompletedAt; it never readsimagePushedAt. This leaves a documented-but-unresolved gap between spec language and code.Two resolution paths are available (the implementor must choose one):
aws::refresh_scanto also fetchimagePushedAtfrom ECR (viaaws::_describe_findingsor a new helper), add logic for push-newer-than-scan → force re-scan, and add bats coverage for the new code paths.aws::scan_status/aws::cmdat the level described in the original checklist, for added clarity.The issue is classified as fully in-repo (bash + bats and/or Linear text edits), requiring no credentials or external vendor access.
Rationale:
This is the only available Backlog issue. It represents legitimate unresolved scope from the previous sprint (SUR-2477) and is fully self-contained. Addressing it removes the spec ambiguity before it confuses future contributors or automated agents.
Definition of Done:
aws::refresh_scanreadsimagePushedAtand re-scans when push timestamp is newer than the last scan completion timestamp.days_ago) semantics actually implemented.make testpasses cleanly (both bats specs andtests/sur-*.shsuites).pre-commit run --all-filespasses (shellcheck, shfmt, conventional-commit, markdownlint if docs touched).Dependencies / ordering: None. SUR-2503 has no blockers and no sub-issues. It can be started immediately.
Risks & Mitigations
imagePushedAtfield to be present inaws::_describe_findingsoutput; if not, a new ECR describe call may be needed.aws ecr describe-image-scan-findingsJSON schema includesimagePushedAt. If absent, useaws ecr describe-imagesinstead and introduce aaws::_describe_imagehelper.datein bats to controlnowis fragile if the date mock interferes with other subshell calls.dateat the function level via subshell override).Out of Scope
aws::scan_repository,aws::get_tags, or any otheraws.shfunctions not directly involved in cache-window logic.aws-get-kubeconfigs.batsor the kubeconfigs command.aws::refresh_scan(unless the spec-alignment path requires@docannotation updates).Linear Evidence
ce9ebfde-ff2b-4f54-90f1-c388591ca110, key:SUR)a43901a0-b02b-4009-aae1-a6e8903d127d)Sub-issue Status
SUR-2503 has no sub-issues. Sub-issue dependency rule does not apply.
Linear State Transitions