Skip to content

pipe: the lease lets the request finish, a replay of a handled request is a read, and the lease length is a setting - #25

Merged
itswl merged 1 commit into
mainfrom
lease-follow-ups
Oct 27, 2026
Merged

itswl merged 1 commit into
mainfrom
lease-follow-ups

Conversation

@itswl

@itswl itswl commented Oct 27, 2026

Copy link
Copy Markdown
Owner

The three follow-ups named in the review of #24, by Claude (claude-opus-5-5) at the repository owner's request.

  1. A failed renewal no longer cancels the request. Cancelling mid-pipeline left the sender a dropped connection instead of an answer and the pipeline half-run, while complete_signature already re-asks whether the lease is still the request's. The heartbeat now logs and keeps trying; a lease still the request's completes it, a lost one answers 503.
  2. A replay of a handled request is answered from a read. The spent row is looked up on the read connection before the write lock is taken, so a bulk replay of one capture costs reads, not a write per copy. The storm fuse is unchanged.
  3. The lease length is HOOKRELAY_SIGNATURE_LEASE_SECONDS, 120 by default and at least 10, renewed every third of it. The stack's knob check required it to reach a compose; it is passed through the three that pass the replay window. The quickstart does not carry it.

Each change has a test that was run with the old behaviour back and failed.

Ceiling: the pipe moves from 6,650 to 6,700 source lines. #24 landed at exactly 6,650 by trading two dead methods for restored reasoning, and these follow-ups add 9 lines over it. The reason is written in scripts/assert_weight.py and the number is updated everywhere it is stated; the root README also had the judge's ceiling as 3,450, which has been 3,700 since 10-26.

Decision note: .agents/notes/implemented/2026-10-27-the-lease-lets-the-request-finish.md.

Gate: STACK GATE GREEN locally; CI read back before merging.

…t is a read, and the lease length is a setting

Three follow-ups to the signature lease, named in the review of #24. A failed renewal no longer cancels the request mid-pipeline: cancelling left the sender a dropped connection and the pipeline half-run, while complete_signature already re-asks whether the lease is still the request's — it completes if so and answers 503 if not. A replay of a handled request is answered from the read connection before the write lock is taken, so a bulk replay of one capture costs reads, not writes; the storm fuse is unchanged. The lease length is HOOKRELAY_SIGNATURE_LEASE_SECONDS (120 by default, at least 10), passed through the three composes that pass the replay window. Each change has a test that fails with the old behaviour back.

Ceiling: the pipe moves from 6,650 to 6,700 source lines. #24 landed at exactly 6,650 by trading two dead methods for restored reasoning; these three follow-ups add 9 lines over it. The doctrine answer is the same as the raises before it: the pipe's own door and ledger, not a judgement about an alert. Argued in scripts/assert_weight.py and stated in hookrelay/README.md, README.md, docs/evidence.md and the reproduce script; README.md also had the judge's ceiling as 3,450, which has been 3,700 since 10-26.
@itswl
itswl merged commit 0cd3ed7 into main Oct 27, 2026
8 checks passed
@itswl
itswl deleted the lease-follow-ups branch October 27, 2026 08:37
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.

1 participant