Skip to content

fix(track-a): fence canonical lease post-merge races - #313

Merged
blakinio merged 9 commits into
mainfrom
fix/OTC-20260815-track-a-live-runtime-lease-postmerge-p1
Aug 15, 2026
Merged

fix(track-a): fence canonical lease post-merge races#313
blakinio merged 9 commits into
mainfrom
fix/OTC-20260815-track-a-live-runtime-lease-postmerge-p1

Conversation

@blakinio

Copy link
Copy Markdown
Owner

Post-merge remediation for task OTC-20260815-track-a-live-runtime-lease-manager, based on main@3575cc0c0a0b4efbcd9fc860d3226002fe40e70f after PR #312 merged.

Material findings addressed

Two P1 review findings landed on merged PR #312:

  1. guard-run could release the coordination flock if its parent died while the guarded child continued running.
  2. time-sensitive operations sampled time before blocking on the flock, so a lease expiring during lock wait could still be accepted.

Fix

  • locked() now yields the live flock FD;
  • guard-run passes that FD to the guarded child, so the child cannot outlive the serialization lock if the guard parent is killed;
  • acquire, renew, release, validate, status, and guard-run now sample time only after the flock is acquired;
  • regression tests cover post-lock expiry for every time-sensitive operation and parent-killed/child-survives lock inheritance.

Focused validation

Temporary branch-only remediation run 31908781559, job 95070594733: SUCCESS. The workflow applied the patch, ran the full lease unit suite, ran py_compile, committed the result, and was then removed from the branch. Final changed paths are only the manager implementation, its unit tests, and the active task record.

No Tibia client/runtime process, production canonical state, PR #303/#309 path, Track B path, or owner-funded AI/API quota is touched.

PR #311 remains fail-closed until this remediation is independently reviewed, protected CI passes, and the fix reaches main.

@blakinio
blakinio marked this pull request as ready for review August 15, 2026 21:17
@blakinio blakinio added the programme:client Oteryn client programme label Aug 15, 2026
@blakinio
blakinio merged commit f6fa226 into main Aug 15, 2026
11 checks passed
@blakinio
blakinio deleted the fix/OTC-20260815-track-a-live-runtime-lease-postmerge-p1 branch August 15, 2026 21:19

@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: e5c1addad5

ℹ️ 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 .github/scripts/tibia-official-client-re-canonical-live-lease.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

programme:client Oteryn client programme

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant