Skip to content

Prepare admission tickets atomically - #196

Merged
arasovic merged 1 commit into
mainfrom
run/issue-195
Sep 6, 2026
Merged

Prepare admission tickets atomically#196
arasovic merged 1 commit into
mainfrom
run/issue-195

Conversation

@arasovic

@arasovic arasovic commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • add one concrete atomic Gate.Prepare batch enqueue operation
  • validate a same-run unique-worker batch before IDs or durable state work
  • generate every ticket ID before one locked state transition
  • append consecutive queued tickets under the supervisor-owned Gate identity without leasing capacity
  • preserve Enqueue and foreground behavior while retaining existing stale-owner reconciliation semantics

Verification

  • go test -race ./internal/admission -run TestPrepare -count=20
  • go test -race ./internal/admission -count=5
  • concurrent Prepare/Enqueue FIFO race repeated 20 times
  • random-ID, collision, overflow, corrupt/symlink state, save failure, and stale-reaping regressions
  • mutation proofs for whole-batch validation, exact one-save atomicity, duplicate-ID precheck, and queued-before-Wait state
  • npm run verify
  • go build ./...
  • Windows compile-only admission package test
  • independent Pi Worker Standards and Spec/simplicity reviews: no actionable findings

Closes #195

Parent: #177

@arasovic
arasovic merged commit 55ec022 into main Sep 6, 2026
23 checks passed
@arasovic
arasovic deleted the run/issue-195 branch September 6, 2026 19:34
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.

Prepare a full background admission batch atomically

1 participant