Skip to content

Preserve concurrent spec edits during Redis status updates - #3

Open
fkautz wants to merge 2 commits into
mainfrom
fix/352-atomic-status
Open

fkautz wants to merge 2 commits into
mainfrom
fix/352-atomic-status

Conversation

@fkautz

@fkautz fkautz commented Sep 21, 2026

Copy link
Copy Markdown
Owner

Upstream PR creation is restricted, so this review PR is hosted in the fork. Its base matches google/ax main.

UpdateTaskStatus currently overwrites an entire stale task snapshot. Protect the read and write with WATCH/MULTI and bounded retries so a concurrent spec edit survives. Status publication occurs only with a successful transaction. Normalize an omitted atespace before selecting the key.

Fixes google#352.

TDD and validation

This branch starts independently from origin/main (d8ed0fe) and has two commits:

  1. 281c488 adds the regression and fails on the original behavior.
  2. 3ad3d2d implements the fix; the regression and complete suite pass.

Reproduce the red/green transition by checking out either commit and running:

go test ./internal/store/redis -run '^TestReviewStatusUpdatePreservesConcurrentSpecEdit$' -count=1 -v

Validated: go test ./... -count=1, targeted -race tests, go mod tidy with unchanged module files, make build, and git diff --check. Redis tests launch isolated real servers; redis-server is installed in CI and documented for local development.

Review

Codex review: no actionable regressions identified. Some reviewer test runs were blocked by its listener sandbox; the validation above was run separately with local listener access.

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.

Redis status update can overwrite a concurrently committed task spec edit

1 participant