Skip to content

armgit / hypit

Public Imported from GitHub
0

Clone any viral video with AI agents. Not just a script, the whole workflow: swap the face, the words, the B-roll, ship 100 variants in one command, and get your 100M views.

chore: drop unpublished migration baggage

kashorina51e6fa1131f
diff --git a/docs/zh/guide/testing.md b/docs/zh/guide/testing.md
index 164f0e57..b36fa34f 100644
--- a/docs/zh/guide/testing.md
+++ b/docs/zh/guide/testing.md
@@ -54,25 +54,16 @@ test("compiles the expected exports", async () => {
### Provider 测试
-用真实或模拟的外部服务测试 Endpoint 实现。这类测试由环境门控:检查所需的凭据或可执行文件,缺失时跳过。
-
-```typescript
-test("generates a video", async (t) => {
- if (!process.env.KIE_API_KEY) {
- t.skip("KIE_API_KEY not set");
- return;
- }
- // ... real API call
-});
-```
+在可控的伪传输边界验证请求映射、提交歧义、轮询、下载与失败语义。仓库测试不调用付费 Provider,也不以环境变量
+开启真实 API smoke/canary;一次真实调用不能证明这些失败边界,反而会引入费用、网络和外部状态噪声。
### 架构边界
包边界由 package manifest、公开入口和共享合同表达;测试只验证边界上可观察的行为。
仓库不再把源码文本正则当作依赖分析或架构审查的替代品。
-不得提交客户或品牌 fixture、凭据痕迹、付费产物、工作站绝对路径与一次性交付脚本。
-通用 live test 只有在显式 opt-in、不提交秘密,并且未设置开关时能在花钱前退出的情况下才保留。
+不得提交客户或品牌 fixture、凭据痕迹、付费产物、工作站绝对路径与一次性交付脚本。本机 ffmpeg、浏览器或
+OpenCV 的集成测试可以显式 opt-in;它们不得联网调用付费服务,也不进入默认测试成功的必要条件。
## 受环境开关控制的测试
diff --git a/packages/generation/test/identity.test.ts b/packages/generation/test/identity.test.ts
index 396db062..d32585d5 100644
--- a/packages/generation/test/identity.test.ts
+++ b/packages/generation/test/identity.test.ts
@@ -39,9 +39,6 @@ test("generated audio is an ordinary Resource-backed media result", async () =>
const result = await facet.handler({ inputs: { set: { value: { kind: "inline", value: set } } } } as never);
assert.ok("audio" in result.outputs);
assert.deepEqual(result.outputs.audio, audio);
- const validators = new TypeValidatorRegistry();
- registerTypeValidatorFacets(validators, generationComponent.validators);
- assert.ok(validators.resolve(generationTypes.audioSet));
});
test("the primary-video projection returns the ordered Product member as a Blob value", async () => {
diff --git a/packages/model-kit/test/model-kit.test.ts b/packages/model-kit/test/model-kit.test.ts
index bdf23a85..fa612974 100644
--- a/packages/model-kit/test/model-kit.test.ts
+++ b/packages/model-kit/test/model-kit.test.ts
@@ -33,13 +33,8 @@ const definition = defineExactModelModule({
}],
});
-test("one exact model definition owns draft, media binding, finalization and generation contracts", async () => {
+test("media binding reaches the finalized exact-model request", async () => {
const endpoint = definition.endpoints.image!;
- assert.equal(endpoint.draftType.name, "GraphNativeImageRequestDraft");
- assert.equal(endpoint.mediaBindings.images?.type.name, "GraphNativeImageRequestImagesBinding");
- assert.equal(endpoint.textBindings.prompt?.producer.name, "bind-request-graph-native-image-prompt-text");
- assert.ok(definition.manifest.producers.some((producer) => producer.name === endpoint.finalizeProducer.name));
-
const artifact = {
kind: "blob" as const,
resource: fixtureResource("graph-native-image"),
@@ -61,8 +56,12 @@ test("one exact model definition owns draft, media binding, finalization and gen
assert.ok(finalizeFacet);
const finalized = await finalizeFacet.handler({ inputs: { draft: { value: bound.outputs.draft! } } } as never);
assert.equal(finalized.outputs.request?.kind, "inline");
- if (finalized.outputs.request?.kind !== "inline") return;
- const request = finalized.outputs.request.value as Record<string, unknown>;
+ assert.deepEqual(finalized.outputs.request?.kind === "inline" ? finalized.outputs.request.value : undefined, {
+ ports: {
+ images: [{ artifact, role: "image" }],
+ prompt: ["draw it"],
+ },
+ });
});
test("one graph Text edge fills the exact model prompt before finalization", async () => {
@@ -96,7 +95,4 @@ test("the dynamic Fragment exposes every Text and media edge as an explicit sema
"request-graph-native-image",
"select-primary-image",
]);
- assert.deepEqual(fragment.inputs.map((input) => input.name), [
- "draft", "first:artifact", "first:binding", "prompt:text", "second:artifact", "second:binding",
- ]);
});
diff --git a/packages/runtime-kit/test/registry.test.ts b/packages/runtime-kit/test/registry.test.ts
index 18ac1f48..973008c2 100644
--- a/packages/runtime-kit/test/registry.test.ts
+++ b/packages/runtime-kit/test/registry.test.ts
@@ -29,21 +29,6 @@ const endpoint = (use: string, extra: Record<string, unknown> = {}) =>
activate: (value: RuntimeAdapterFactoryContext) => ({ endpoint: endpointPackage(value.instance), ...extra }),
} as never);
-test("a facet declares which kind it is, and the registry keeps the two apart", () => {
- const registry = new RuntimeAdapterRegistry();
- registry.registerFacet(endpoint("example.endpoint"));
- registry.registerFacet(createRuntimeCredentialStoreAdapterFacet({
- use: "example.service",
- validate() {},
- open: () => ({ value: {} as never }),
- }));
-
- assert.ok(registry.has("example.endpoint", "endpoint"));
- assert.equal(registry.has("example.endpoint", "credential-store"), false);
- assert.ok(registry.has("example.service", "credential-store"));
- assert.equal(registry.has("example.service", "endpoint"), false);
-});
-
test("Endpoint and Credential Store adapters may share one package address", () => {
const registry = new RuntimeAdapterRegistry();
registry.registerFacet(endpoint("example.shared"));
@@ -56,24 +41,6 @@ test("Endpoint and Credential Store adapters may share one package address", ()
assert.ok(registry.has("example.shared", "credential-store"));
});
-test("asking an Endpoint adapter for a Credential Store is refused, not coerced", async () => {
- const registry = new RuntimeAdapterRegistry();
- registry.registerFacet(endpoint("example.endpoint"));
- await assert.rejects(async () => await registry.openCredentialStore("example.endpoint", context));
- await assert.rejects(async () => await registry.createEndpoint("example.absent", context));
-});
-
-test("a Credential Store adapter returns the selected Store directly", async () => {
- const registry = new RuntimeAdapterRegistry();
- const value = { resolve() {} } as never;
- registry.registerFacet(createRuntimeCredentialStoreAdapterFacet({
- use: "example.credentials",
- validate() {},
- open: () => ({ value }),
- }));
- assert.equal((await registry.openCredentialStore("example.credentials", context)).value, value);
-});
-
test("one kind and logical name has one adapter, so a second registration is an error", () => {
const registry = new RuntimeAdapterRegistry();
registry.registerFacet(endpoint("example.endpoint"));
diff --git a/packages/store-sqlite/src/store.ts b/packages/store-sqlite/src/store.ts
index e26b2ef5..01b3faab 100644
--- a/packages/store-sqlite/src/store.ts
+++ b/packages/store-sqlite/src/store.ts
@@ -1113,14 +1113,6 @@ export class SqliteRuntimeState {
`);
this.builds = new SqliteBuildStore(database);
this.operations = new SqliteOperationStore(database);
- const legacy = this.#database.prepare(
- "SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'hypit_dispatches'",
- ).get() as Row | undefined;
- if (legacy !== undefined) {
- const count = this.#database.prepare("SELECT COUNT(*) AS count FROM hypit_dispatches").get() as Row;
- assert(count.count === 0,
- "This Runtime contains legacy Dispatch rows; they require an explicit project migration");
- }
this.commandExecutions = new SqliteCommandExecutionStore(database);
this.execution = new SqliteBuildExecutionStore(database);
this.catalog = new SqliteBuildCatalog(database);
diff --git a/packages/whisperx/test/whisperx.test.ts b/packages/whisperx/test/whisperx.test.ts
index bcf2839d..7d18f737 100644
--- a/packages/whisperx/test/whisperx.test.ts
+++ b/packages/whisperx/test/whisperx.test.ts
@@ -1,17 +1,10 @@
-import {
- registerProducerFacets,
-} from "@hypit/component-kit";
-import type { ProducerRegistrar } from "@hypit/component-kit";
import { sealSpeechEvidenceAudio } from "@hypit/speech";
import type { SpeechEvidenceAudio } from "@hypit/speech";
import assert from "node:assert/strict";
import test from "node:test";
import { fixtureResource } from "../../../test/fixture-resource.js";
-import type { ResourceId, ProducerRef } from "@hypit/protocol";
import {
- whisperXComponent,
- whisperXProducers,
whisperXRequestForEvidenceAudio,
} from "@hypit/whisperx";
@@ -35,16 +28,3 @@ test("WhisperX receives normalized bytes without authored Segment truth", () =>
assert.equal(request.sampleFrames, 16_000);
assert.equal(request.language, "es");
});
-
-test("WhisperX installs into the host-neutral compute port without a Node Driver", () => {
- const registrations: ProducerRef[] = [];
- const registrar: ProducerRegistrar = {
- registerProducer(producer) {
- registrations.push(producer);
- },
- };
-
- registerProducerFacets(registrar, whisperXComponent.producers);
-
- assert.deepEqual(registrations, [whisperXProducers.request]);
-});