Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions VENDORED.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ never a convenience.
| ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | ---------- | ----------------- |
| `apps/sidecar` | Derived from upstream's own `apps/sidecar`: of 38 tracked `src/` modules, 5 are byte-identical to upstream (`default-harness.ts`, `source-asset-delivery.ts`, `workflow-closure-apply.ts`, `workflow-probe-handler.ts`, `workflow-run-pack-restore.ts`), 10 are substantially rewritten under the same name (`atomic-write.ts`, `config.ts`, `conversation-state.ts`, `index.ts`, `run-grants.ts`, `signing-keypair.ts`, `step-agent-tools.ts`, `tool-materialization.ts`, `workflow-closure-materialization.ts`, `workflow-run-pack-client.ts`), and the remaining 23 are workbench-only, including the `workflow-host-wiring/` and `workflow-substrate-factory/` module splits of upstream's single-file `workflow-host-wiring.ts` and `workflow-substrate-factory.ts`. A living fork, not a frozen copy, so this row carries no tree hash. | [faremeter/interchange](https://github.com/faremeter/interchange) @ `b5580a02` (v0.3.0) | An app is never npm-published, so no publish can cover the execution host; retired by consuming an upstream-published host, or by renewing this row deliberately | sawyer | 2026-09-19 | `check:killdates` |
| `vendor/intx/agent` | `@intx/agent` source (`src/`, manifest, tsconfig) | [faremeter/interchange](https://github.com/faremeter/interchange) @ `a8bc06ae` (origin/main, 2026-08-27) | npm 0.3.0 predates the operator-configurable doom-loop threshold (`afd0c82b`, `c421c092`) the re-vendored `workflow-host` configures; no local delta; retired by the next `@intx/agent` publish | sawyer | 2026-10-26 | `check:killdates` |
| `vendor/intx/db` | `@intx/db` source (`src/`, `migrations/`, drizzle config, manifest, tsconfigs) | [faremeter/interchange](https://github.com/faremeter/interchange) @ `b5580a02` (v0.3.0) | npm 0.3.0 covers the base package but not the `wire_projection` column/loader delta (CL-6324) or the `workflow_definition.origin` column separating a definition from the per-run record of one folded run's deploy (CL-6452); retired when upstream absorbs the deltas | sawyer | 2026-09-19 | `check:killdates` |
| `vendor/intx/db` | `@intx/db` source (`src/`, `migrations/`, drizzle config, manifest, tsconfigs) | [faremeter/interchange](https://github.com/faremeter/interchange) @ `a8bc06ae` (origin/main, 2026-08-27) | npm 0.3.0 covers the base package but not the `wire_projection` column/loader delta (CL-6324) or the `workflow_definition.origin` column separating a definition from the per-run record of one folded run's deploy (CL-6452), shipped as migrations `0086`/`0087` behind upstream's `0085_add_approval_run_idx`; retired when upstream absorbs the deltas | sawyer | 2026-10-26 | `check:killdates` |
| `vendor/intx/hub-api` | `@intx/hub-api` source (`src/`, manifest, tsconfig) | [faremeter/interchange](https://github.com/faremeter/interchange) @ `b5580a02` (v0.3.0) | npm 0.3.0 covers the base package but not the exported null-principal `resolveApproval` (CL-6345) or the bearer-authenticated workflow-deploy mirror (`middleware/workflow-run-deploy-auth.ts`, CL-workflow-deploy-bearer); retired when upstream absorbs the deltas | sawyer | 2026-09-19 | `check:killdates` |
| `vendor/intx/hub-sessions` | `@intx/hub-sessions` source (`src/`, manifest, tsconfig) | [faremeter/interchange](https://github.com/faremeter/interchange) @ `b5580a02` (v0.3.0) | npm 0.3.0 covers the base package but not the usage forward (CL-5879), pack-acceptance fixes, adopted deploy front, wire-projection writer, event-collector serialization, anchor ordering, or malformed tool-call-name sanitization (CL-6478) | sawyer | 2026-09-19 | `check:killdates` |
| `vendor/intx/inference` | `@intx/inference` source (`src/`, manifest, tsconfig) | [faremeter/interchange](https://github.com/faremeter/interchange) @ `a8bc06ae` (origin/main, 2026-08-27) | npm 0.3.0 predates doom-loop detection (`8da4c827`, `afd0c82b`, `c421c092`); one local delta: `providers/google-genai-files.ts` builds its upload body as `new Uint8Array(bytes)` because TS 6's lib.dom `BodyInit` rejects `Uint8Array<ArrayBufferLike>` (upstream compiles ESNext-only under TS 5.9); retired by the next publish | sawyer | 2026-10-26 | `check:killdates` |
Expand Down Expand Up @@ -181,10 +181,14 @@ composes the same private halves and follows the prepared front's semantics
minus that lock. `vendor/intx/db` and `vendor/intx/hub-sessions` (CL-6324) together
persist a definition's evaluated inert projection at approval time:
`workflow_definition_version` gains a `wire_projection` jsonb column
(migration `0085_workflow_definition_version_wire_projection.sql`, renumbered
from `0084` when upstream v0.3.0 took that slot; the journal keeps the
original `when` timestamp so databases that already applied it do not re-run
the `ADD COLUMN`),
(migration `0086_workflow_definition_version_wire_projection.sql`, renumbered
from `0085` when upstream `a8bc06ae` took that slot and from `0084` before
that; the drizzle-kit journal keeps our original `when` timestamps, which
still sort after upstream's `0085`. Workbench applies the platform SQL by
sorted filename through `scripts/db-setup.ts`, which replays from scratch
and refuses a schema set up under a different file list, so a database
migrated before a renumber is reset, never patched — `scripts/db-setup.test.ts`
pins that refusal),
`createDbFrozenApprovalWriter` stamps it in the SAME transaction that
writes `approved_wire_hash`, and `loadFrozenWireProjection` reads it back
validated as a `WorkflowProjectionDefinition`. Upstream carries no
Expand Down
2 changes: 1 addition & 1 deletion scripts/checks/kill-dates.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# package's VENDORED-FROM delta line in the same change.
apps/sidecar | sawyer | 2026-09-19
vendor/intx/agent | sawyer | 2026-10-26 | d0d56d9f452b78f4b541ad8f4e89f975e8069446bb98f2c8097b90de4b020243
vendor/intx/db | sawyer | 2026-09-19 | 642b29735a7e36a1d3decdf8af26c33fa91e0989720323addb4c2f786ae88a18
vendor/intx/db | sawyer | 2026-09-19 | 3ab08b9122f3ab84d60e1f2d5b7af88c3eb673f9120ce6dedf3d2600d4a6cad4
vendor/intx/hub-api | sawyer | 2026-09-19 | f93a383cb5d6acdf50a461b43e4c8991dbdf7e13d34a4e5598e556eaee66308b
vendor/intx/hub-sessions | sawyer | 2026-09-19 | df5f1d275e197668851c53f58c51182d8bc455f3585e2ed65784d3687a856001
vendor/intx/inference | sawyer | 2026-10-26 | 77fec29b078e8d03e686747c70e6b62ac1fd1434db0fb2c1e12e84b6dc71465f
Expand Down
50 changes: 50 additions & 0 deletions scripts/db-setup.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
// The platform migration set is replayed from scratch and tracked by
// filename: a schema set up under an older @intx/db migration list (here,
// the pre-re-pin numbering of workbench's own two migrations) is refused
// with the reset instruction instead of being patched incrementally.
// DB-gated: skipped when DATABASE_URL is unset.
import { afterAll, describe, expect, test } from "bun:test";

import { dbTargetFromUrl, loadPostgres, setupDatabase } from "./db-setup";

const databaseUrl = process.env["DATABASE_URL"] ?? "";
const describeIfDb = databaseUrl === "" ? describe.skip : describe;

const OLD_NUMBERING_TAIL = [
"0084_delete_orphaned_credential_grants.sql",
"0085_workflow_definition_version_wire_projection.sql",
"0086_workflow_definition_origin.sql",
];

describeIfDb(
"setupDatabase against a schema migrated under the old numbering",
() => {
const schema = `db_setup_test_${Date.now().toString(36)}`;
const target = dbTargetFromUrl(databaseUrl);
const client = loadPostgres().then((postgres) =>
postgres({ ...target, max: 1, onnotice: () => undefined }),
);
afterAll(async () => {
const sql = await client;
await sql.unsafe(`DROP SCHEMA IF EXISTS "${schema}" CASCADE`);
await sql.end();
});

test("refuses to apply incrementally and names the reset", async () => {
const sql = await client;
await sql.unsafe(`CREATE SCHEMA "${schema}"`);
await sql.unsafe(
`CREATE TABLE "${schema}"."workbench_setup_migration" (filename text PRIMARY KEY, applied_at timestamptz NOT NULL DEFAULT now())`,
);
for (const file of OLD_NUMBERING_TAIL) {
await sql.unsafe(
`INSERT INTO "${schema}"."workbench_setup_migration" (filename) VALUES ($1)`,
[file],
);
}
await expect(setupDatabase(databaseUrl, { schema })).rejects.toThrow(
/different @intx\/db migration set[\s\S]*db-setup\.ts --reset/,
);
});
},
);
2 changes: 1 addition & 1 deletion scripts/db-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ async function loadIntxDb(): Promise<IntxDbMigrate> {
return { runMigrations: loaded.runMigrations, dropSchema: loaded.dropSchema };
}

async function loadPostgres(): Promise<PostgresFactory> {
export async function loadPostgres(): Promise<PostgresFactory> {
const resolved = resolveHubDependency("postgres");
const loaded = (await import(resolved)) as { default: PostgresFactory };
return loaded.default;
Expand Down
4 changes: 2 additions & 2 deletions vendor/intx/db/VENDORED-FROM
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Source: https://github.com/faremeter/interchange (packages/db)
Commit: b5580a02fb918eebccc33ded7727ffee781ffbd1 (tag v0.3.0)
Commit: a8bc06ae38661c5e0ed91ded8559bf09f502213d (origin/main, 2026-08-27)
License: LGPL-2.1-only (see vendor/intx/LICENSE)
Local modifications: exports map repointed from the upstream intx-src condition to direct TypeScript source resolution (types/default -> ./src/...); dist references removed. CL-6324: workflow_definition_version gains a wire_projection jsonb column (migration 0085_workflow_definition_version_wire_projection.sql -- renumbered from 0084 when upstream v0.3.0 took that slot for 0084_delete_orphaned_credential_grants.sql; the journal keeps our original `when` so DBs that already applied it do not re-run the ADD COLUMN), schema/workflow-definitions.ts declares it, and workflow-definition-store.ts adds loadFrozenWireProjection (exported from src/index.ts) to read it back beside the approved wire hash. CL-6452: workflow_definition gains an origin column (migration 0086_workflow_definition_origin.sql, declared in schema/workflow-definitions.ts) marking the per-run record a folded run's deploy mints for itself, so launch and refresh resolve the hub-authored definition instead of the newest same-named row.
Local modifications: exports map repointed from the upstream intx-src condition to direct TypeScript source resolution (types/default -> ./src/...); dist references removed. CL-6324: workflow_definition_version gains a wire_projection jsonb column (migration 0086_workflow_definition_version_wire_projection.sql -- renumbered from 0085 when upstream a8bc06ae took that slot for 0085_add_approval_run_idx.sql, and from 0084 before that; the journal keeps our original `when` values, which still sort after upstream's 0085), schema/workflow-definitions.ts declares it, and workflow-definition-store.ts adds loadFrozenWireProjection (exported from src/index.ts) to read it back beside the approved wire hash. CL-6452: workflow_definition gains an origin column (migration 0087_workflow_definition_origin.sql, renumbered from 0086; declared in schema/workflow-definitions.ts) marking the per-run record a folded run's deploy mints for itself, so launch and refresh resolve the hub-authored definition instead of the newest same-named row. Workbench applies these files by sorted filename through scripts/db-setup.ts (replay-from-scratch with a filename ledger); the drizzle journal exists for drizzle-kit only.
1 change: 1 addition & 0 deletions vendor/intx/db/migrations/0085_add_approval_run_idx.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CREATE INDEX "approval_run_idx" ON "approval" USING btree ("run_id");
Loading
Loading