Skip to content

Commit 4f3e38f

Browse files
committed
chore(gates): track optional device pin allocation metadata
1 parent fc28835 commit 4f3e38f

2 files changed

Lines changed: 13 additions & 5 deletions

File tree

‎test/wire-compat/ledger.json‎

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@
120120
"packages/daemon/src/server/http/http-rpc-envelope.ts#sendJson": "sha256:a1de00da3f1db8c98e69a85dfe2e11b626a4d2ce472840e3b8f519aa8a207a8f",
121121
"packages/daemon/src/server/http/http-rpc-methods.ts#toDaemonRequest": "sha256:f3861d2d4f67f66e83800616926f6bbb0595de4ecbb0072b5b78971ebeb0705b",
122122
"packages/daemon/src/server/http/http-rpc-methods.ts#toInstallFromSourceDaemonRequest": "sha256:071c53e7bd8e553cb9df820961294ed4d1e2e385053485364d895cb1777e9429",
123-
"packages/daemon/src/server/http/http-rpc-methods.ts#toLeaseDaemonRequest": "sha256:3018984aeace4054767875f5eb6e6ad5d38bfcb71c15d1a56ccf9b53e0a419ec",
123+
"packages/daemon/src/server/http/http-rpc-methods.ts#toLeaseDaemonRequest": "sha256:b98bb0624ff0ca6fb849ccc2529dd595042125b2f376283e3b9fc43e805aa556",
124124
"packages/daemon/src/server/http/http-rpc-methods.ts#toReleaseMaterializedPathsDaemonRequest": "sha256:708736ca03d6a3fc449bb408382dbd509e490de1f84ecc8771fd77d4adda0154",
125125
"packages/daemon/src/server/http/http-rpc-envelope.ts#writeProgressEnvelope": "sha256:7be778b3902c72d7aa6282c16dc7106fdd64e99c0b5daf9f413ff5dd3fb044f1",
126126
"packages/daemon/src/server/http/http-rpc-envelope.ts#writeRpcResponseEnvelope": "sha256:7a8155e9fcbb53485489728250a85109b5dab0d96cdd4aa8b7e7eb87a4898ddb",
@@ -190,10 +190,12 @@
190190
"packages/daemon-client/src/daemon-client-transport.ts#buildRemoteInstancePreconditionHeaders": "sha256:70241561c4070a8ebbdbbdb4ebcdbdfcb9543501cbb649a6d71cf041aee55a08",
191191
"packages/daemon-client/src/daemon-client-transport.ts#isRemoteInstanceMismatchResponse": "sha256:7670f48fe0fc7344f8a000cd303e49788ec7ea9d1c729bcdc2af73ff02dae04d",
192192
"packages/daemon-client/src/daemon-client-transport.ts#isRemoteInstanceMismatch": "sha256:6d4cfdd36bd44686d2a48990491faf63ba9117fb760f982fd72922c99be8daee",
193-
"packages/contracts/src/lease-scope.ts#buildDaemonRpcRequest": "sha256:bead87907afdad0aa685126ef191a70d7e99495ce5d11dd1c0505d07623b9137",
193+
"packages/contracts/src/lease-scope.ts#buildDaemonRpcRequest": "sha256:b3d03bb08f8f332b04dea6d2ea30abca2faf83a10f11cb874df2344b3f54c2b6",
194194
"packages/contracts/src/lease-scope.ts#buildLeaseRpcParams": "sha256:365490a0fe1833d7ce8b0d3f5425462608a85119b12c1a2c4f16bb83b5d28e06",
195195
"packages/contracts/src/lease-scope.ts#isLeaseRpcCommand": "sha256:955dc1b73462d40593e5728dbcbaeec1307944b08262a22627e84cc5dc507e8f",
196-
"packages/contracts/src/lease-scope.ts#leaseRpcMethodForCommand": "sha256:3613555c6002c23ab5bec4b98bc1b4d6947014b52fa100176177f955cf762881"
196+
"packages/contracts/src/lease-scope.ts#leaseRpcMethodForCommand": "sha256:3613555c6002c23ab5bec4b98bc1b4d6947014b52fa100176177f955cf762881",
197+
"packages/contracts/src/device-pin.ts#DevicePin": "sha256:896f2b8cdcadea2d0fa7a66c2edc44007d1cf7f88d1043393e4268aacf1a63a9",
198+
"packages/contracts/src/device-pin.ts#DevicePinSelector": "sha256:c033ae0274d0da7c3cfdcafb2537091ba76e9a1fc4d635357fab9570cc1b223e"
197199
},
198200
"compatibleChanges": [
199201
{
@@ -228,8 +230,8 @@
228230
},
229231
{
230232
"declaration": "packages/daemon/src/server/http/http-rpc-methods.ts#toLeaseDaemonRequest",
231-
"digest": "sha256:3018984aeace4054767875f5eb6e6ad5d38bfcb71c15d1a56ccf9b53e0a419ec",
232-
"rationale": "#2110 read the optional providerApp lease-allocation parameter into the existing flags bag; #2494 reads the full provider-allocation flag set into that same bag through the shared readLeaseAllocateProviderFlags projection, so the reconstructed req.flags handed to prepareSession match what the line transport forwards for free. Released protocol-2 clients omit these and follow the unchanged allocation path; no existing field is required or reinterpreted. The optional retainOnClose boolean parameter is read into meta.leaseRetainOnClose; a released daemon ignores it and keeps releasing on session close. Reads the optional providerCredentialFingerprint lease-allocation parameter into request meta, so a local caller over HTTP gets the same credential check as over the socket. A daemon with an auth hook treats every HTTP caller as remote and strips it, as it does developerDir. Released protocol-2 clients omit it and follow the unchanged allocation path; no existing field is required or reinterpreted."
233+
"digest": "sha256:b98bb0624ff0ca6fb849ccc2529dd595042125b2f376283e3b9fc43e805aa556",
234+
"rationale": "#2110 read the optional providerApp lease-allocation parameter into the existing flags bag; #2494 reads the full provider-allocation flag set into that same bag through the shared readLeaseAllocateProviderFlags projection, so the reconstructed req.flags handed to prepareSession match what the line transport forwards for free. Released protocol-2 clients omit these and follow the unchanged allocation path; no existing field is required or reinterpreted. The optional retainOnClose boolean parameter is read into meta.leaseRetainOnClose; a released daemon ignores it and keeps releasing on session close. Reads the optional providerCredentialFingerprint lease-allocation parameter into request meta, so a local caller over HTTP gets the same credential check as over the socket. A daemon with an auth hook treats every HTTP caller as remote and strips it, as it does developerDir. Released protocol-2 clients omit it and follow the unchanged allocation path; no existing field is required or reinterpreted. Reads the optional devicePin allocation parameter into request metadata. Released clients omit it and retain their existing allocation behavior; no existing parameter becomes required or changes meaning."
233235
},
234236
{
235237
"declaration": "packages/kernel/src/errors.ts#DaemonError",
@@ -510,6 +512,11 @@
510512
"declaration": "packages/daemon/src/server/http/http-rpc-methods.ts#toInstallFromSourceDaemonRequest",
511513
"digest": "sha256:071c53e7bd8e553cb9df820961294ed4d1e2e385053485364d895cb1777e9429",
512514
"rationale": "Implementation-only validation repair: a supplied retentionMs is validated before request projection instead of silently dropping fractions or malformed values. Existing integer values in the supported 1..2147483647 range and omitted values keep their request projection, defaults, payload fields and response framing. Unsupported durations now fail clearly with the existing INVALID_ARGS envelope; released clients can parse that normal command error. No route, authentication, method or wire field changes; no protocol bump under ADR 0006."
515+
},
516+
{
517+
"declaration": "packages/contracts/src/lease-scope.ts#buildDaemonRpcRequest",
518+
"digest": "sha256:b3d03bb08f8f332b04dea6d2ea30abca2faf83a10f11cb874df2344b3f54c2b6",
519+
"rationale": "Adds the optional devicePin parameter to lease allocation RPC requests. Older daemons ignore this new parameter and continue to parse the existing lease scope and selector parameters unchanged. Clients without a pin send the same allocation payload as before. This is an additive optional request field under ADR 0006."
513520
}
514521
]
515522
}

‎test/wire-compat/surface.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ export const WIRE_SURFACE: readonly WireSurfaceGroup[] = [
219219
'ResponseLevel',
220220
),
221221
...from(KERNEL_DEVICE, 'PLATFORM_SELECTORS', 'PlatformSelector'),
222+
...from('packages/contracts/src/device-pin.ts', 'DevicePin', 'DevicePinSelector'),
222223
// The CLI's projection of a command into the request the daemon receives.
223224
// Its embedded flag/option vocabulary is waived rather than listed — see
224225
// closure-policy.ts: those reach the peer inside DaemonRequest's untyped

0 commit comments

Comments
 (0)