Skip to content

Commit 45f85df

Browse files
committed
chore(gates): follow the remote package move in path-keyed enforcement
1 parent 3ce4a9b commit 45f85df

9 files changed

Lines changed: 80 additions & 80 deletions

File tree

‎oxlint.config.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ export default defineConfig({
125125
files: [
126126
'src/daemon-client/daemon-client-rpc.ts',
127127
'packages/daemon/src/server/downloadable-artifact-http.ts',
128-
'src/remote/remote-request-diagnostics.ts',
129-
'src/remote/upload-stream.ts',
128+
'packages/remote/src/remote-request-diagnostics.ts',
129+
'packages/remote/src/upload-stream.ts',
130130
],
131131
rules: {
132132
'unicorn/catch-error-name': 'off',

‎scripts/layering/architecture-ownership.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ export const CLIENT_SIDE_POLICY_NAME = 'client-side';
117117
export const LOGICAL_MODULE_POLICIES = [
118118
{
119119
name: CLIENT_SIDE_POLICY_NAME,
120-
roots: ['src/cli.ts', 'src/cli/', 'src/client/', 'src/remote/', 'src/daemon-client/'],
120+
roots: ['src/cli.ts', 'src/cli/', 'src/client/', 'packages/remote/src/', 'src/daemon-client/'],
121121
forbiddenTargetRoots: [DAEMON_SOURCE_ROOT],
122122
},
123123
{

‎scripts/layering/daemon-modularity.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ for (const file of [
657657
'src/cli.ts',
658658
'src/cli/commands/daemon.ts',
659659
'src/client/client-normalizers.ts',
660-
'src/remote/daemon-artifacts.ts',
660+
'packages/remote/src/daemon-artifacts.ts',
661661
'src/daemon-client/daemon-client.ts',
662662
]) {
663663
for (const [kind, source] of [

‎test/wire-compat/closure-policy.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ export const WIRE_CLOSURE_WAIVERS: Readonly<Record<string, string>> = {
4949
'Client-side narrowing of the listed kernel DaemonRequest (token and session required, flags typed as CommandFlags); the declaration that fixes the shape is packages/kernel/src/contracts.ts#DaemonRequest.',
5050
'packages/contracts/src/daemon-wire-request.ts#DaemonWireRequestMeta':
5151
'Narrowing of the listed kernel DaemonRequestMeta (installSource, lockPlatform and the lease coordinates); the declaration that fixes the shape is packages/kernel/src/contracts.ts#DaemonRequestMeta.',
52-
'src/remote/upload-stream.ts#UploadStreamProgressOptions':
52+
'packages/remote/src/upload-stream.ts#UploadStreamProgressOptions':
5353
'Byte-progress callback options for local upload rendering. The bytes counted are digested through the request/response declarations; these options never cross the wire.',
54-
'src/remote/upload-progress.ts#UploadProgressSink':
54+
'packages/remote/src/upload-progress.ts#UploadProgressSink':
5555
'A callback for client-local upload progress rendering. Its events never leave the client, unlike the daemon progress stream, whose envelope and events are listed.',
5656
'packages/contracts/src/request-progress.ts#RequestProgressSink':
5757
'A callback type (event) => void. The event it receives is RequestProgressEvent, which is listed; the sink itself never crosses the wire.',

‎test/wire-compat/ledger.json‎

Lines changed: 51 additions & 51 deletions
Large diffs are not rendered by default.

‎test/wire-compat/surface.ts‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,16 +54,16 @@ const ARTIFACT_HTTP = 'packages/daemon/src/server/downloadable-artifact-http.ts'
5454
const REQUEST_DIAGNOSTICS_HTTP = 'packages/daemon/src/server/request-diagnostics-http.ts';
5555
const SESSION_TENANT_SCOPE = 'packages/daemon/src/core/session-tenant-scope.ts';
5656
const HTTP_REQUEST_TARGET = 'packages/daemon/src/server/http-request-target.ts';
57-
const REMOTE_REQUEST_DIAGNOSTICS = 'src/remote/remote-request-diagnostics.ts';
57+
const REMOTE_REQUEST_DIAGNOSTICS = 'packages/remote/src/remote-request-diagnostics.ts';
5858
const PROGRESS_PROTOCOL = 'packages/daemon-contracts/src/request-progress-protocol.ts';
5959
const CLIENT_RPC = 'src/daemon-client/daemon-client-rpc.ts';
6060
const CLIENT_PROGRESS = 'src/daemon-client/daemon-client-progress.ts';
6161
const CLIENT_TRANSPORT = 'src/daemon-client/daemon-client-transport.ts';
6262
const DAEMON_PROXY = 'packages/proxy/src/daemon-proxy.ts';
63-
const UPLOAD_CLIENT = 'src/remote/upload-client.ts';
64-
const REMOTE_ARTIFACTS = 'src/remote/daemon-artifacts.ts';
65-
const ARTIFACT_DOWNLOAD = 'src/remote/artifact-download.ts';
66-
const UPLOAD_STREAM = 'src/remote/upload-stream.ts';
63+
const UPLOAD_CLIENT = 'packages/remote/src/upload-client.ts';
64+
const REMOTE_ARTIFACTS = 'packages/remote/src/daemon-artifacts.ts';
65+
const ARTIFACT_DOWNLOAD = 'packages/remote/src/artifact-download.ts';
66+
const UPLOAD_STREAM = 'packages/remote/src/upload-stream.ts';
6767

6868
function from(file: string, ...names: string[]): WireDeclarationRef[] {
6969
return names.map((name) => ({ file, name }));
@@ -380,7 +380,7 @@ export const WIRE_SURFACE: readonly WireSurfaceGroup[] = [
380380
),
381381
// The prepared artifact whose fields (sha256, sizeBytes, fileName,
382382
// artifactType, contentType) ARE the preflight body the daemon parses.
383-
...from('src/remote/upload-client-artifact.ts', 'PreparedUploadArtifact'),
383+
...from('packages/remote/src/upload-client-artifact.ts', 'PreparedUploadArtifact'),
384384
// Consumer side of the resumable 308 contract. Listing the daemon's
385385
// `handleResumableUpload` proves it still PRODUCES 308; it says nothing
386386
// about the client still CONSUMING the released one. These own which

‎test/wire-compat/wire-mutations.test.ts‎

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -187,49 +187,49 @@ const MUTATIONS: readonly WireMutation[] = [
187187
},
188188
{
189189
breakClass: 'upload consumer: the preflight parser stops accepting a released response',
190-
file: 'src/remote/upload-client.ts',
190+
file: 'packages/remote/src/upload-client.ts',
191191
name: 'parseUploadPreflightResult',
192192
from: "preflight.ok !== true || typeof preflight.uploadId !== 'string'",
193193
to: 'preflight.ok !== true',
194194
},
195195
{
196196
breakClass: 'upload consumer: the preflight response shape narrows',
197-
file: 'src/remote/upload-client.ts',
197+
file: 'packages/remote/src/upload-client.ts',
198198
name: 'UploadPreflightResponse',
199199
from: 'cacheHit?: boolean;',
200200
to: '',
201201
},
202202
{
203203
breakClass: 'upload consumer: the legacy/finalize response shape narrows',
204-
file: 'src/remote/upload-client.ts',
204+
file: 'packages/remote/src/upload-client.ts',
205205
name: 'UploadResponse',
206206
from: 'uploadId: string;',
207207
to: 'id: string;',
208208
},
209209
{
210210
breakClass: 'upload consumer: the finalize request body key is renamed',
211-
file: 'src/remote/upload-client.ts',
211+
file: 'packages/remote/src/upload-client.ts',
212212
name: 'finalizeDirectUpload',
213213
from: 'JSON.stringify({ uploadId: options.uploadId })',
214214
to: 'JSON.stringify({ id: options.uploadId })',
215215
},
216216
{
217217
breakClass: 'upload consumer: the preflight ticket fields the daemon parses are renamed',
218-
file: 'src/remote/upload-client-artifact.ts',
218+
file: 'packages/remote/src/upload-client-artifact.ts',
219219
name: 'PreparedUploadArtifact',
220220
from: 'sha256: string;',
221221
to: 'checksum: string;',
222222
},
223223
{
224224
breakClass: 'artifact consumer: the download request drops its tenant header',
225-
file: 'src/remote/artifact-download.ts',
225+
file: 'packages/remote/src/artifact-download.ts',
226226
name: 'downloadRemoteArtifactFromUrl',
227227
from: '...buildDaemonHttpTenantHeaders(params.requestScope?.tenantId),',
228228
to: '',
229229
},
230230
{
231231
breakClass: 'artifact consumer: the artifact URL the client requests moves',
232-
file: 'src/remote/daemon-artifacts.ts',
232+
file: 'packages/remote/src/daemon-artifacts.ts',
233233
name: 'buildDaemonArtifactUrl',
234234
from: 'artifacts/',
235235
to: 'artifact/',
@@ -241,42 +241,42 @@ const MUTATIONS: readonly WireMutation[] = [
241241
// still the status it treats as "continue".
242242
{
243243
breakClass: '308 consumer: the client stops accepting a released offset header',
244-
file: 'src/remote/upload-stream.ts',
244+
file: 'packages/remote/src/upload-stream.ts',
245245
name: 'parseUploadResumeOffset',
246246
from: "headers['x-upload-offset'] ?? headers['upload-offset']",
247247
to: "headers['x-upload-offset']",
248248
},
249249
{
250250
breakClass: '308 consumer: Range-header offset parsing narrows',
251-
file: 'src/remote/upload-stream.ts',
251+
file: 'packages/remote/src/upload-stream.ts',
252252
name: 'parseUploadResumeOffset',
253253
from: '/^bytes=0-(\\d+)$/',
254254
to: '/^bytes 0-(\\d+)$/',
255255
},
256256
{
257257
breakClass: '308 consumer: the resumed request emits a different Content-Range',
258-
file: 'src/remote/upload-stream.ts',
258+
file: 'packages/remote/src/upload-stream.ts',
259259
name: 'buildUploadRequestHeaders',
260260
from: "'content-range': `bytes ${startOffset}-${payloadSize - 1}/${payloadSize}`,",
261261
to: "'content-range': `bytes=${startOffset}-${payloadSize - 1}/${payloadSize}`,",
262262
},
263263
{
264264
breakClass: '308 consumer: the client stops treating 308 as resume-and-continue',
265-
file: 'src/remote/upload-stream.ts',
265+
file: 'packages/remote/src/upload-stream.ts',
266266
name: 'isUploadResumeStatus',
267267
from: 'statusCode === 308',
268268
to: 'statusCode === 208',
269269
},
270270
{
271271
breakClass: '308 consumer: the streamed response shape a caller parses narrows',
272-
file: 'src/remote/upload-stream.ts',
272+
file: 'packages/remote/src/upload-stream.ts',
273273
name: 'UploadStreamResponse',
274274
from: 'statusMessage?: string;',
275275
to: '',
276276
},
277277
{
278278
breakClass: '308 consumer: header value coercion drops a released form',
279-
file: 'src/remote/upload-stream.ts',
279+
file: 'packages/remote/src/upload-stream.ts',
280280
name: 'parseNonNegativeIntegerHeader',
281281
from: 'firstHeaderValue(value)',
282282
to: 'undefined',
@@ -342,7 +342,7 @@ const CLOSURE_PROBES: readonly { reachedFrom: string; omit: string }[] = [
342342
// The consumer half of the auxiliary upload boundary, added after review:
343343
// proves those files are genuinely wired into the walk, not just listed.
344344
reachedFrom: 'requestUploadPreflight',
345-
omit: 'src/remote/upload-client-artifact.ts#PreparedUploadArtifact',
345+
omit: 'packages/remote/src/upload-client-artifact.ts#PreparedUploadArtifact',
346346
},
347347
];
348348

‎tsdown.config.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ const publicSdkChunkGroups = [
5656
],
5757
[
5858
'sdk-remote-config',
59-
/src[\\/]remote[\\/]remote-config-schema\.d\.[cm]?ts$/,
60-
/src[\\/]remote[\\/]remote-config-schema\.ts$/,
59+
/packages[\\/]remote[\\/]src[\\/]remote-config-schema\.d\.[cm]?ts$/,
60+
/packages[\\/]remote[\\/]src[\\/]remote-config-schema\.ts$/,
6161
],
6262
['sdk-selectors', /src[\\/]sdk[\\/]selectors\.d\.[cm]?ts$/, /src[\\/]sdk[\\/]selectors\.ts$/],
6363
] as const;

‎vitest.config.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ export default defineConfig({
313313
'src/bin.ts',
314314
'src/client/client-types.ts',
315315
'src/core/interactor-types.ts',
316-
'src/remote/remote-config.ts',
316+
'packages/remote/src/remote-config.ts',
317317
],
318318
},
319319
},

0 commit comments

Comments
 (0)