Skip to content

Cover the Idempotency-Key ASCII and length boundaries (carries #76) - #168

Merged
kikashy merged 1 commit into
mainfrom
carry/76-idempotency-key-boundaries
Oct 21, 2026
Merged

kikashy merged 1 commit into
mainfrom
carry/76-idempotency-key-boundaries

Conversation

@kikashy

@kikashy kikashy commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Closes #71. Carries #76 by @Haxxyyyy.

The author's change: a table-driven test for the POST /v1/jobs/{job}/runs Idempotency-Key rule in internal/runner/events_admission_test.go (+33). Valid boundary values (the shortest and the longest allowed key, the first and last visible ASCII characters) reach the unknown-job lookup and get 404; invalid values (one past the length bound, a space, DEL, control bytes, the empty header) are rejected first with 400. The content is the author's, byte for byte against their branch.

What the maintainer commit adds: the checks the author could not run (no Go on their machine).

  • The new test alone with -count=3 and with -race: passed; go.mod/go.sum byte-identical.
  • The four mutation runs issue Hold the Idempotency-Key's length and character range with a test #71 asks for, each on a scratch copy with the handler's check changed as the issue describes: 4 of 4 made the test fail (129 characters, space, DEL, empty).
  • The repository check list ran once: local-paths, agent-docs, diff-check, go-fmt, go-vet, build-pinned, manual-gate pass; the unit-tests step's internal/runner package hit its 10-minute timeout under the machine's load (three other builds running) and the steps after it did not run; the package passed in the focused runs. CI runs the list.

Material-decision impact: none (a table-driven test; no production change); test-only, so no review round by the house rule.

A Codex session applied the author's change and ran the mutation runs from a coordinator brief; the coordinator ran the check list and wrote the commit.

🤖 Generated with Claude Code

Closes #71. Carries #76 by @Haxxyyyy: a table-driven test for the
POST /v1/jobs/{job}/runs Idempotency-Key rule. Valid boundary values
(the shortest and the longest allowed key, the first and last visible
ASCII characters) reach the unknown-job lookup and get 404; invalid
values (one past the length bound, a space, DEL, control bytes, the
empty header) are rejected first with 400. The author's commits are
carried as one change, their content unchanged.

**What my commit adds:** the checks the author could not run. The new
test alone with -count=3 and with -race: passed. go.mod and go.sum
byte-identical. The four mutation runs issue #71 asks for, each on a
scratch copy with the handler's check changed as the issue describes:
4 of 4 made the test fail (129 characters, space, DEL, empty). The
repository check list ran once: gofmt, go vet, build-pinned and the
manual gate pass; the internal/runner package timed out under the
machine's load in that run and passed in the focused runs; CI runs it.

Co-authored-by: Haxxyyyy <tripathiharshkumar678@gmail.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: kikashy <35789537+kikashy@users.noreply.github.com>
@kikashy
kikashy merged commit dbfbf93 into main Oct 21, 2026
4 checks passed
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.

Hold the Idempotency-Key's length and character range with a test

1 participant