Skip to content

Acquisition id survives renewal; with releases by it (v0.3.1) - #22

Merged
flyingrobots merged 1 commit into
mainfrom
fix/acquisition-identity
Sep 16, 2026
Merged

flyingrobots merged 1 commit into
mainfrom
fix/acquisition-identity

Conversation

@flyingrobots

Copy link
Copy Markdown
Member

Closes the second half of the review's MUST 4: claim_id distinct from record_oid. Reproduced first (extend inside with left the lock held), fixed, plus a second forced interleaving and honest timing numbers. Merging tags v0.3.1.

… (v0.3.1)

0.3.0 conflated the acquisition's identity with its record oid, so an
extend inside a with changed the oid and the wrapper's release said
"superseded", leaving the lock until expiry. Records carry an acquisition id
now, minted by a claim and kept by extend and by the parent rewrite a child
admission performs; release --acquisition, sem release --acquisition and with
release by it, --record still matches an exact version. Reproduced first.

Also a second forced interleaving (a renewal between a release's read and
its commit), README wording that no longer implies the parent's liveness is
re-checked at commit, and measured 500-lock timings. 286 checks.
@coderabbitai

coderabbitai Bot commented Sep 16, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: d75ffaeb-2e23-4779-8c16-8dcbdc34fe8b

📥 Commits

Reviewing files that changed from the base of the PR and between e3706f2 and 00d0738.

📒 Files selected for processing (5)
  • CHANGELOG.md
  • README.md
  • bin/git-locks
  • schema/git-locks.schema.json
  • test/test.sh

📝 Summary

Summary by CodeRabbit

  • New Features

    • Added stable acquisition IDs that persist across renewals and parent/child lock updates.
    • Added --acquisition support for releasing locks and semaphore acquisitions across renewals.
    • Updated with cleanup to release the acquisition it created.
    • Semaphore reacquisition preserves its ID while active and creates a new one after expiry.
    • Lock and semaphore output now includes acquisition IDs.
  • Documentation

    • Updated command help, JSON schema, README, and changelog to document acquisition identity and performance measurements.

Walkthrough

The lock system adds stable acquisition IDs separate from mutable record IDs. Claims, renewals, parent rewrites, releases, with, semaphores, schemas, documentation, and tests now use or describe the new identity.

Changes

Acquisition identity lifecycle

Layer / File(s) Summary
Lock identity and claim contract
bin/git-locks, schema/git-locks.schema.json
Claims mint acquisition IDs and include them with record IDs in lock records and output.
Renewal-safe release and cleanup
bin/git-locks, test/test.sh, schema/git-locks.schema.json, CHANGELOG.md
Release accepts acquisition selectors. Renewals and parent rewrites preserve acquisition IDs. with cleanup and interleaved release tests use the stable identity.
Semaphore acquisition identity
bin/git-locks, schema/git-locks.schema.json
Live semaphore reacquisition preserves its acquisition ID. New or expired slots receive new IDs. Semaphore release accepts acquisition selectors.
Release documentation and measurements
README.md
Documentation distinguishes job, acquisition, and record IDs. It also records parent timing behavior and measurements for 500 locks.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Bug fix · Severity of issue fixed: Medium

Poem

A rabbit claims a lasting name

Renewed records still play the game
Release finds the thread anew
Semaphores keep their promise too
The lock hops free when work is through

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit reads each line,
The patch grows clear beneath the moon,
Small changes hop in place,
Tests guard the garden path,
Reviews bloom before the dawn.

Comment @coderabbitai help to get the list of available commands.

@flyingrobots
flyingrobots merged commit db808fc into main Sep 16, 2026
2 of 3 checks passed
@flyingrobots
flyingrobots deleted the fix/acquisition-identity branch September 16, 2026 03:10
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