Skip to content

Commit ff7da87

Browse files
V48 (specification-implementation): Align residual hostKind inline docs/tests to local
Gate-3 NOTES Host section and pipeline-hosts README now match host-generics + generic-hosts hierarchy (LocalHost, hostKind local). Deposit synthesize-options mocks return local instead of the deprecated inline alias.
1 parent fd2e32d commit ff7da87

3 files changed

Lines changed: 39 additions & 21 deletions

File tree

BITCODE_SPEC_V48_NOTES.md

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -948,8 +948,9 @@ command exec. (Every host has these; there is no "git-less" host. The earlier
948948
dev/prod, serverless-can't-clone, and read-files-out-per-file framings were WRONG and
949949
are superseded by this section.)
950950

951-
The Host is a PRIMITIVE — `BitcodePipelineHost` (`packages/pipeline-hosts/host.ts`):
952-
- `capabilities`: a HOST CAPABILITIES descriptor — `hostKind` (`'inline' | 'sandbox'`),
951+
The Host is a PRIMITIVE — `BitcodePipelineHost` (`@bitcode/host-generics`; BC barrel
952+
`@bitcode/pipeline-hosts`):
953+
- `capabilities`: a HOST CAPABILITIES descriptor — `hostKind` (`'local' | 'sandbox'`),
953954
`clone` + `filesystem` + `exec` (TRUE for every host), `ephemeralFilesystem`,
954955
`defaultWorkingDirectory`; a SandboxHost additionally carries `sandboxProvider`
955956
(`'vercel' | 'aws'`).
@@ -961,23 +962,29 @@ Because the pipeline runs WITHIN the host, the workspace is the host's LOCAL che
961962
read locally, NEVER across a process/network boundary. The pipeline (Setup → … →
962963
Validation) speaks only to the primitive, so its behavior is identical on every host.
963964

965+
**Hierarchy (primitive → base):**
966+
```
967+
@bitcode/host-generics # BitcodePipelineHost, SandboxHost
968+
→ @bitcode/generic-hosts-local # LocalHost (was InlineHost)
969+
→ @bitcode/generic-hosts-vercel-sandbox # VercelSandboxHost + harness surface
970+
```
971+
964972
**HostKinds — two implementations of the primitive:**
965-
- **LocalHost** (`local-host.ts`) — runs the pipeline in the current box; provisions
966-
via a real `git clone` of the full tree to a local working dir (Node-fs workspace).
967-
- **SandboxHost** (`sandbox-host.ts`) — runs the pipeline inside a provisioned, isolated
968-
box that has git + FS, so within it the checkout is local exactly as for LocalHost.
969-
It is a base for providers:
970-
- **Vercel** (`VercelSandboxHost`, IMPLEMENTED) — provisions via the Sandbox SDK git
971-
source into the box working directory.
972-
- **AWS** (`AwsSandboxHost`, STUBBED) — the provider seam for an AWS-backed box; not
973-
yet implemented.
973+
- **LocalHost** (`@bitcode/generic-hosts-local`) — runs the pipeline in the current box;
974+
provisions via a real `git clone` of the full tree to a local working dir (Node-fs).
975+
- **SandboxHost** (`@bitcode/host-generics`) — abstract sandbox base; runs the pipeline
976+
inside a provisioned, isolated box that has git + FS, so within it the checkout is
977+
local exactly as for LocalHost. Providers:
978+
- **Vercel** (`VercelSandboxHost` in `@bitcode/generic-hosts-vercel-sandbox`, IMPLEMENTED)
979+
- **AWS** (`AwsSandboxHost`, STUBBED) — provider seam; not yet implemented.
974980
Provisioning AND the pipeline both run IN the box; nothing is read out of it per-file.
975981

976982
**Selection** is by CONFIGURED HostKind — not by environment, and with no dev/prod /
977-
local/remote terminology. `selectDepositHostKind(env)` returns `'inline' | 'sandbox'`
978-
from `BITCODE_PIPELINE_HOST` (explicit), defaulting to `inline`; a SandboxHost's
979-
provider comes from `BITCODE_SANDBOX_PROVIDER` (`'vercel' | 'aws'`, default `vercel`).
980-
`resolveDepositPipelineHost()` constructs the configured HostKind/provider. The
983+
local/remote terminology. `selectDepositHostKind(env)` returns `'local' | 'sandbox'`
984+
from `BITCODE_PIPELINE_HOST` (explicit), defaulting to `local` (`inline` accepted as a
985+
deprecated alias of `local`); a SandboxHost's provider comes from
986+
`BITCODE_SANDBOX_PROVIDER` (`'vercel' | 'aws'`, default `vercel`).
987+
`resolveDepositPipelineHost()` constructs LocalHost for hostKind `local`. The
981988
operator chooses which host runs the pipeline.
982989

983990
**Source provisioning + measurement:** the harness run provisions the full checkout on

packages/pipeline-hosts/README.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,20 @@
11
# `@bitcode/pipeline-hosts`
22

3-
This package owns host-runtime adapters for Bitcode pipeline QA. The first
4-
adapter is the Vercel Sandbox harness used to prove that Read/Fit and
5-
AssetPack pipeline work is running in an isolated host, emitting artifacts, and
6-
leaving enough telemetry for SQL readback.
3+
Compatibility barrel + AssetPack harness orchestration for Bitcode Hosts.
4+
5+
## Hierarchy (prefer these packages)
6+
7+
```
8+
@bitcode/host-generics # primitive (BitcodePipelineHost, SandboxHost)
9+
→ @bitcode/generic-hosts-local # LocalHost (was InlineHost)
10+
→ @bitcode/generic-hosts-vercel-sandbox # VercelSandboxHost + Vercel capabilities
11+
```
12+
13+
This package re-exports those packages and owns the AssetPack sandbox harness
14+
used to prove that Read/Fit and AssetPack pipeline work runs in an isolated host,
15+
emits artifacts, and leaves enough telemetry for SQL readback.
16+
17+
`BITCODE_PIPELINE_HOST`: unset|`local` (default; `inline` accepted as BC alias) | `sandbox`.
718

819
## Vercel Sandbox Host Capabilities
920

uapi/tests/api/depositSynthesizeOptionsRoute.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jest.mock('@bitcode/pipeline-asset-pack', () => ({
5757
jest.mock('@/lib/deposit-source-provisioning', () => ({
5858
resolveDepositPipelineHost: jest.fn(() => ({ capabilities: { hostKind: 'local' } })),
5959
provisionDepositSourceInventory: jest.fn(),
60-
selectDepositHostKind: jest.fn(() => 'inline'),
60+
selectDepositHostKind: jest.fn(() => 'local'),
6161
runDepositInBoxHarness: jest.fn(),
6262
}));
6363

@@ -271,7 +271,7 @@ describe('POST /api/deposit/synthesize-options', () => {
271271
mockRunHarness.mockReset();
272272
mockRealInference.mockReturnValue(true);
273273
mockProvision.mockResolvedValue(PROVISIONED);
274-
mockSelectKind.mockReturnValue('inline');
274+
mockSelectKind.mockReturnValue('local');
275275
});
276276

277277
it('requires a session', async () => {

0 commit comments

Comments
 (0)