fix: 强化 Kafka 重放 barrier 完整性
This commit is contained in:
@@ -13,6 +13,13 @@ const HWLAB_SESSION_ID = "ses_5ec4e141-6abc-466d-9afe-049f7c0ac105";
|
||||
const TRACE_ID = "trc_mretx18t3jl4tg";
|
||||
const RUN_ID = "run_a78cbcb05f2c4afaa748a3158db44998";
|
||||
|
||||
test("Kafka help shows canonical default input and explicit reconstruction debug input", async () => {
|
||||
const result = await runKafkaCli(["help", "--json"], { env: {}, now: () => "2026-07-10T12:00:00.000Z" });
|
||||
assert.equal(result.exitCode, 0);
|
||||
assert.match(result.payload.commands[0], /--input-topic agentrun\.event\.v1/u);
|
||||
assert.match(result.payload.commands[1], /--input-topic agentrun\.event\.debug\.v1/u);
|
||||
});
|
||||
|
||||
test("offline JSONL maps 35 stdio reconstructions to 35 ordered HWLAB debug events without runtime dependencies", async () => {
|
||||
const cwd = await mkdtemp(path.join(os.tmpdir(), "hwlab-kafka-debug-jsonl-"));
|
||||
const inputFile = path.join(cwd, "agentrun-events.jsonl");
|
||||
@@ -204,6 +211,7 @@ test("canonical Kafka regeneration preflights without publishing and preserves r
|
||||
assert.equal(result.payload.replay.producerInvoked, false);
|
||||
assert.equal(result.payload.replay.outputBarrier, null);
|
||||
assert.match(result.payload.next.command, /--replay-id rpl_canonical_preflight/u);
|
||||
assert.match(result.payload.next.command, /--group-prefix hwlab-v03-workbench-isolated-debug/u);
|
||||
assert.match(result.payload.next.command, /--publish/u);
|
||||
assert.equal(producerCreated, false);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user