Skip to content

Commit d4c9a4d

Browse files
committed
Revert "feat(audit): preserve exact agent execution provenance"
This reverts commit 79b8775.
1 parent 62d899a commit d4c9a4d

49 files changed

Lines changed: 572 additions & 6417 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎packages/gateway-protocol/src/schema/nodes.test.ts‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,6 @@ describe("node protocol schemas", () => {
1919
expect(Value.Check(NodeInvokeRequestEventSchema, { ...request, sessionKey: null })).toBe(true);
2020
expect(Value.Check(NodeInvokeRequestEventSchema, { ...request, sessionKey: "" })).toBe(false);
2121
expect(Value.Check(NodeInvokeRequestEventSchema, { ...request, extra: true })).toBe(false);
22-
for (const forbidden of ["attribution", "passportId", "principalId", "instanceId"]) {
23-
expect(Value.Check(NodeInvokeRequestEventSchema, { ...request, [forbidden]: "forged" })).toBe(
24-
false,
25-
);
26-
}
2722
});
2823

2924
it("accepts bounded progress chunks and rejects extra fields", () => {
Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,9 @@
11
export const STATE_SCHEMA_INLINE_PLUGIN_NAME: string;
22

3-
export type StateSchemaInlinePluginOptions = {
4-
vitestFsModuleCache?: boolean;
5-
};
6-
7-
export type VitestCacheKeyGenerator = (context: {
8-
id: string;
9-
sourceCode: string;
10-
environment: unknown;
11-
}) => string | undefined | null | false;
12-
13-
export function createStateSchemaInlinePlugin(
14-
rootDir?: string,
15-
options?: StateSchemaInlinePluginOptions,
16-
): {
3+
export function createStateSchemaInlinePlugin(rootDir?: string): {
174
name: string;
185
load(
196
this: { addWatchFile(id: string): void },
207
id: string,
218
): { code: string; moduleType: "js" } | null;
22-
configureVitest?: (context: {
23-
experimental_defineCacheKeyGenerator(callback: VitestCacheKeyGenerator): void;
24-
}) => void;
259
};

‎scripts/lib/state-schema-inline-plugin.mjs‎

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ const STATE_SCHEMA_MODULES = [
1717
];
1818

1919
/** Inline canonical schema bytes so bundled consumers need no SQL asset. */
20-
export function createStateSchemaInlinePlugin(rootDir = process.cwd(), options = {}) {
20+
export function createStateSchemaInlinePlugin(rootDir = process.cwd()) {
2121
const schemasByModulePath = new Map(
2222
STATE_SCHEMA_MODULES.map((schema) => [path.resolve(rootDir, schema.modulePath), schema]),
2323
);
2424

25-
const plugin = {
25+
return {
2626
name: STATE_SCHEMA_INLINE_PLUGIN_NAME,
2727
load(id) {
2828
const schema = schemasByModulePath.get(path.resolve(id));
@@ -37,15 +37,4 @@ export function createStateSchemaInlinePlugin(rootDir = process.cwd(), options =
3737
};
3838
},
3939
};
40-
if (options.vitestFsModuleCache) {
41-
plugin.configureVitest = ({ experimental_defineCacheKeyGenerator }) => {
42-
experimental_defineCacheKeyGenerator(({ id }) => {
43-
const schema = schemasByModulePath.get(path.resolve(id));
44-
return schema
45-
? fs.readFileSync(path.resolve(rootDir, schema.schemaPath), "utf8")
46-
: undefined;
47-
});
48-
};
49-
}
50-
return plugin;
5140
}

‎src/agents/agent-execution-attribution-architecture.guardrail.test.ts‎

Lines changed: 0 additions & 104 deletions
This file was deleted.

‎src/agents/embedded-agent-runner/run/attempt.llm-boundary.cache-stability.test.ts‎

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -266,33 +266,6 @@ describe("prompt-cache byte-identity (issue #3658)", () => {
266266
);
267267
});
268268

269-
it("does not copy host-owned identity metadata into provider payloads", async () => {
270-
const message = currentUserMsg("Provider payload identity sentinel", TS_TURN1) as AgentMsg & {
271-
attribution?: unknown;
272-
passportId?: string;
273-
principalId?: string;
274-
};
275-
message.attribution = {
276-
runId: "private-run-sentinel",
277-
sessionKey: "private-session-key-sentinel",
278-
};
279-
message.passportId = "private-passport-sentinel";
280-
message.principalId = "private-principal-sentinel";
281-
282-
const payloads = await Promise.all([
283-
captureOpenAICompletionsPayload([message]),
284-
captureOpenAIResponsesPayload([message]),
285-
]);
286-
287-
for (const payload of payloads) {
288-
const wireBytes = JSON.stringify(payload);
289-
expect(wireBytes).not.toContain("private-run-sentinel");
290-
expect(wireBytes).not.toContain("private-session-key-sentinel");
291-
expect(wireBytes).not.toContain("private-passport-sentinel");
292-
expect(wireBytes).not.toContain("private-principal-sentinel");
293-
}
294-
});
295-
296269
it("stamp derives from message timestamp, not wall-clock — repeated calls are byte-stable", () => {
297270
// Same message object (fixed timestamp) → identical serialization regardless
298271
// of when normalize is called. Guards against any "now"-based drift.

‎src/audit/agent-event-audit-attempt-state.ts‎

Lines changed: 0 additions & 57 deletions
This file was deleted.

0 commit comments

Comments
 (0)