mirror of
https://github.com/SikongJueluo/pi-extensions.git
synced 2026-10-05 11:52:55 +08:00
feat(permission): complete shadow review events for offline analysis
- key inner-cmd decisive review events by requestId so link decisions join offline - record judge runtime id, prompt and tool schema versions, end-to-end and model latency, input and output usage, and evidence-quality flags on every judge result row - record forwarded and session-mismatch preflight defers so they stay visible in the offline denominator
This commit is contained in:
@@ -84,7 +84,9 @@ describe("requestStructuredVerdict", () => {
|
||||
verdict: "defer",
|
||||
reason: "User intent is unavailable.",
|
||||
metadata,
|
||||
inputTokens: 10,
|
||||
outputTokens: 12,
|
||||
modelLatencyMs: expect.any(Number),
|
||||
});
|
||||
});
|
||||
|
||||
@@ -264,6 +266,7 @@ describe("requestStructuredVerdict", () => {
|
||||
code: "no_model",
|
||||
metadata: undefined,
|
||||
modelCalled: false,
|
||||
modelLatencyMs: null,
|
||||
});
|
||||
|
||||
await expect(
|
||||
@@ -277,6 +280,7 @@ describe("requestStructuredVerdict", () => {
|
||||
code: "unsupported_api",
|
||||
metadata,
|
||||
modelCalled: false,
|
||||
modelLatencyMs: null,
|
||||
});
|
||||
|
||||
const shutdown = new AbortController();
|
||||
|
||||
Reference in New Issue
Block a user