feat: add device-aware lease contracts#887
Closed
thymikee wants to merge 3 commits into
Closed
Conversation
Size Report
Startup median (7 runs, lower is better):
Top changed chunks:
|
Member
Author
|
Closing as superseded by #890, which integrates the lease contract, proxy connect, session admission/expiry, and diagnostics work. Please continue review there. |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add provider- and device-aware remote lease contracts so follow-on proxy/session work can share one lease metadata model.
Details: introduces ADR 0007 and CONTEXT vocabulary, extends lease payload/config/state types with optional
leaseProvider,deviceKey, andclientId, updatesLeaseRegistryto keepDeviceLeaseas the canonical model with aSimulatorLeasecompatibility alias, and rejects same backend/provider/device contention withDEVICE_LEASE_BUSYwhile preserving backend-only leases.Also adds shared lease-context helpers for request/session fallback and diagnostics consumers. Touched-file count: 15. Scope expanded slightly from the original list to include
src/daemon/request-admission.ts,src/remote-config-core.ts, andsrc/daemon/__tests__/lease-context.test.tsso the new shared contract is parsed and applied consistently. No connect proxy behavior or session cleanup is implemented here.Validation
Verified with
pnpm format, focused lease/context/handler tests, request execution scope tests, remote config option-schema tests, vocabulary grep, andpnpm typecheck.