Skip to content

feat: renew distributed lock leases - #62

Merged
swkeever merged 2 commits into
mainfrom
skeever/locks-renew
Sep 2, 2026
Merged

swkeever merged 2 commits into
mainfrom
skeever/locks-renew

Conversation

@swkeever

@swkeever swkeever commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Adds client.locks.renew(key, lease, ttl=...) and returns a new immutable lease.

  • delegates to the generated renewProjectLock operation
  • preserves the lock token and refreshes server expiry/fencing state
  • uses service-key auth and request correlation
  • documents the public facade

Verification: OpenAPI provenance, Ruff, mypy, Pyright, 261 unit tests, contract dry-run, package build, and Hosting SDK contract guards.

@swkeever

swkeever commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-02T17:07:11.244659Z 8b6c400 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4f92f4429f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tests/unit/test_facade.py Outdated
Comment on lines +254 to +256
return FakeResponse(
200,
{"expires_at": "2026-08-26T12:01:00Z", "fencing_token": 8},

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep the fencing token stable in the renewal fixture

Model a successful renewal with fencing token 7, not 8. The ProjectLockLease contract in openapi/openapi.yaml states that this token stays unchanged across renewals and rises only when the lock changes hands; this fixture and its assertion currently bless the opposite behavior, so a future renewal implementation that incorrectly advances fencing epochs could still pass the facade test.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 8b6c400. Both facade and generated-transport fixtures now enforce fencing token 7 before and after renewal, matching the OpenAPI invariant.

@swkeever

swkeever commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: 8b6c400142

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@swkeever
swkeever marked this pull request as ready for review September 2, 2026 17:09
@swkeever
swkeever merged commit 1c9dfac into main Sep 2, 2026
2 checks passed
@swkeever
swkeever deleted the skeever/locks-renew branch September 2, 2026 17:09
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