Fix durable recovery and upgrade to Go 1.27.1 - #60
Merged
Merged
Conversation
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.
Durable tasks could be deleted after a failed dead-letter write or delivered again after exhausting their retry limit. Reserve attempts before delivery, pin each task's limit, and retain recoverable work until archival and cleanup succeed. Failed storage operations retry without additional sends, and atomic file replacement preserves the prior pending record. Startup pending-load failures also retry automatically; processor-specific task IDs prevent recovery from requeuing live work or overwriting its attempt count.
Remove duplicated async state from the audit server, upgrade Go to 1.27.1 and compatible dependencies, and have CI read its Go version from go.mod. Include the recovery specification, regression tests, documentation, and generated project workflow skills.
A crash after reservation can consume an unsent attempt. Legacy records adopt a fixed limit during recovery; older binaries do not enforce this recovery contract.
Validation on Go 1.27.1:
go fmt ./...,go vet ./...,go build ./...go test -v -race ./...go test -tags=integration -v -race ./...against an isolated local test servicego test ./... -coverpkg=./... -coverprofile=coverage.outandgo tool cover -func=coverage.out: 98.2% overall; 100% statement coverage in all changed production filesgo mod verifyandgo mod tidy -diffgo run golang.org/x/vuln/cmd/govulncheck@latest ./...: no vulnerabilities foundGOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build ./...openspec validate --all --strict: all four canonical specifications passBoth completed proposals are archived and their deltas are synchronized. The earlier architecture specification now follows the durable recovery contract; no open changes remain.
Follow-up validation: deterministic regression tests cover repeated pending-load failures, recovery across processor instances, and live work already queued or retrying. Race-enabled unit and integration tests, vet, build, and strict specification validation pass. All changed production files retain 100% statement coverage. The medium review finding is resolved; a second independent review of the two changed production files reported no findings.