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
1 change: 0 additions & 1 deletion bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions docs/VENDORING.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ signingKey })` (local disk + keypair, no hub, no database) is present in
tarball already carries it (its `subscribeAgentEvents(agent,
opts.onEvent)` wiring). Root `dependencies` pins `0.3.0`.

CL-9021 later dropped the `@intx/hub-sessions` root pin: no first-party
tree imports it (the only references are the inert
`vendor/intx-workflow-host/` provenance files), so the published-tarball
coverage above stands as fallback, not as an installed dependency.
`scripts/check-no-hub-sessions.test.ts` locks the removal.

Everything vendored in this pass sits at the same upstream commit
`1ad010463a6bce6034cded3e078b14db482882a8` as the existing trees; no
vendored tree mixes pins.
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@
"@intx/authz": "workspace:*",
"@intx/crypto": "0.3.0",
"@intx/harness": "workspace:*",
"@intx/hub-sessions": "0.3.0",
"@intx/inference": "workspace:*",
"@intx/log": "workspace:*",
"@intx/mail-memory": "0.3.0",
Expand Down
59 changes: 59 additions & 0 deletions scripts/check-no-hub-sessions.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import { existsSync, readdirSync, readFileSync } from "node:fs";
import { join, relative } from "node:path";
import { describe, expect, test } from "bun:test";

// CL-9021: the root pin for the sessions package was dropped because no
// first-party tree imports it. The only remaining references are the inert
// `vendor/intx-workflow-host/` provenance files (not a workspace member,
// excluded from typecheck/test/build per docs/VENDORING.md) plus prose
// comments. Fail if a built tree gains an import or the pin creeps back.

const repoRoot = join(import.meta.dir, "..");
const pkg = JSON.parse(
readFileSync(join(repoRoot, "package.json"), "utf8"),
) as {
dependencies: Record<string, string>;
};

// Trees that participate in typecheck (tsconfig include) and the test suite.
const FIRST_PARTY_TREES = [
"src",
"packages",
"scripts",
"e2e",
"evals",
"testkit",
];

const SESSIONS_IMPORT =
/(?:from\s+|require\(\s*|import\(\s*)["']@intx\/hub-sessions(?:\/[^"']*)?["']\s*\)?/;

function tsFiles(dir: string): string[] {
const files: string[] = [];
const walk = (current: string) => {
for (const entry of readdirSync(current, { withFileTypes: true })) {
const absolute = join(current, entry.name);
if (entry.isDirectory()) walk(absolute);
else if (entry.name.endsWith(".ts")) files.push(absolute);
}
};
if (existsSync(dir)) walk(dir);
return files;
}

describe("no sessions package", () => {
test("package.json carries no dependency on the sessions package", () => {
expect(pkg.dependencies["@intx/hub-sessions"]).toBeUndefined();
});

test("no first-party tree imports the sessions package", () => {
const offenders: string[] = [];
for (const tree of FIRST_PARTY_TREES) {
for (const file of tsFiles(join(repoRoot, tree))) {
if (SESSIONS_IMPORT.test(readFileSync(file, "utf8")))
offenders.push(relative(repoRoot, file).split("/").join("/"));
}
}
expect(offenders).toEqual([]);
});
});
Loading