Skip to content

fix(#1175, #1192): a failed list-index or state write is reported, not swallowed - #1414

Merged
scttfrdmn merged 1 commit into
mainfrom
fix/1175-1192-error-discards
Oct 5, 2026
Merged

scttfrdmn merged 1 commit into
mainfrom
fix/1175-1192-error-discards

Conversation

@scttfrdmn

Copy link
Copy Markdown
Owner

#1175: updateStringIndex, removeFromStringIndex and the per-service list
helpers return their errors, and all 167 callers propagate them. A create
whose index write fails answers 500 InternalFailure rather than 200 over a
resource missing from its own list. The record-without-index partial state is
documented.

#1192: 43 discarded state.Put sites, plus list removals, ECR tag maps, S3
version lists, SQS FIFO dedup, DynamoDB stream records, the Lambda replay
cache, CloudFormation stack records and EC2's default-VPC writes, now return
their errors. TestServer seed helpers fail the test on a store failure. A
59-case sweep refuses each write in turn and asserts a 500.

The new make discarded-state-check gate (scripts/check-discarded-state.sh),
wired into CI, fails on a new discarded state write; nothing is allowlisted.
The eight #1365 marshal allowlist entries for these helpers are removed. The
default in-memory store never fails, so nothing changes for it.

Fixes #1175
Fixes #1192

Compatibility

Only a StateManager that can fail sees a difference. A write failure on these paths answers 500 InternalFailure instead of 200, and a corrupt list index errors on removal instead of being skipped. With the default in-memory store, nothing changes.

…t swallowed

#1175: updateStringIndex, removeFromStringIndex and the per-service list
helpers return their errors, and all 167 callers propagate them. A create
whose index write fails answers 500 InternalFailure rather than 200 over a
resource missing from its own list. The record-without-index partial state is
documented.

#1192: 43 discarded state.Put sites, plus list removals, ECR tag maps, S3
version lists, SQS FIFO dedup, DynamoDB stream records, the Lambda replay
cache, CloudFormation stack records and EC2's default-VPC writes, now return
their errors. TestServer seed helpers fail the test on a store failure. A
59-case sweep refuses each write in turn and asserts a 500.

The new make discarded-state-check gate (scripts/check-discarded-state.sh),
wired into CI, fails on a new discarded state write; nothing is allowlisted.
The eight #1365 marshal allowlist entries for these helpers are removed. The
default in-memory store never fails, so nothing changes for it.

Fixes #1175
Fixes #1192
@codecov

codecov Bot commented Oct 5, 2026

Copy link
Copy Markdown

@scttfrdmn

Copy link
Copy Markdown
Owner Author

Merging with codecov/patch at 66%, deliberately, on the same reasoning as #1392. The 229 uncovered lines are new if err != nil { return …, fmt.Errorf(…) } branches at 167 index-helper and 43 state.Put call sites. Each one is reachable only by a store that fails on that particular path. TestStateWriteFailure_IsReportedNotSwallowed covers 59 operations generically: it refuses each write in turn and asserts a 500, so a future discard on those paths fails without anyone listing it. The new discarded-state-check gate catches a reintroduced discard anywhere. Every other check is green. codecov/patch is not a required check.

@scttfrdmn
scttfrdmn merged commit 7c515fe into main Oct 5, 2026
14 of 15 checks passed
@scttfrdmn
scttfrdmn deleted the fix/1175-1192-error-discards branch October 5, 2026 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant