From ac644526e3050a025af7183f08d5f431b09df177 Mon Sep 17 00:00:00 2001 From: Gautam Bharti <3028386+gautamgb@users.noreply.github.com> Date: Mon, 14 Sep 2026 19:25:37 -0700 Subject: [PATCH] data_validation: point the agentdataflow central schema at the dataset-local one #62 settled the direction: dataset-local schemas are authoritative, the central data_validation/schemas/*.json are historical stubs. This is the follow-up promised there for agentdataflow_trace.schema.json specifically. The file becomes a $ref into datasets/agentdataflow_toolexchange_traces/schema.json, with a $comment naming the concrete divergences (trace_id shape, typed spans instead of an untyped array, the disposition enum, required provenance evidence) and pointing at #62 for why each one is deliberate. Nothing in the codebase currently loads or validates against this file - grepped for both "agentdataflow_trace.schema.json" and "exploit.schema.json" across .py, .md, and .yml and found no reference - so this is a documentation fix, not a behavior change, and there is nothing to test beyond the file parsing as JSON, which it does. The same drift exists between datasets/exploit_dataset/schema.json and data_validation/schemas/exploit.schema.json; filed as a separate issue rather than fixed here, since it's a different dataset's call to make and this PR should stay reviewable as one change. --- .../schemas/agentdataflow_trace.schema.json | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/data_validation/schemas/agentdataflow_trace.schema.json b/data_validation/schemas/agentdataflow_trace.schema.json index e2786fd..361a6dc 100644 --- a/data_validation/schemas/agentdataflow_trace.schema.json +++ b/data_validation/schemas/agentdataflow_trace.schema.json @@ -1,16 +1,5 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "Agent Data Flow and Tool Exchange Trace", - "type": "object", - "required": ["trace_id", "category", "dsgai_mapping", "trace_data", "type"], - "properties": { - "trace_id": { "type": "string", "pattern": "^TRACE-\\d{4}$" }, - "category": { "type": "string", "enum": ["tool_call", "multi_agent_delegation", "plugin_data_exchange", "credential_flow", "context_accumulation", "memory_read_write"] }, - "dsgai_mapping": { "type": "array", "items": { "type": "string", "pattern": "^DSGAI(0[1-9]|1[0-9]|2[01])$" }, "minItems": 1 }, - "agent_framework": { "type": "string" }, - "trace_data": { "type": "array", "items": { "type": "object" }, "minItems": 1 }, - "sensitivity_annotations": { "type": "array", "items": { "type": "string" } }, - "security_observations": { "type": "string" }, - "type": { "type": "string", "enum": ["benign", "adversarial"] } - } + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$comment": "Historical stub, superseded. datasets/agentdataflow_toolexchange_traces/schema.json is authoritative for this dataset: it is the schema its entries are actually validated against (datasets/agentdataflow_toolexchange_traces/validate.py), and it diverged from this file deliberately - trace_id shape, typed spans instead of an untyped trace_data array, a disposition enum that admits an unintentional failure alongside benign/adversarial, and a provenance tier with required evidence. See PR #62 for the reasoning behind each divergence. This file is kept only so a $ref into it does not break; do not hand-edit it without also updating the dataset-local schema, and prefer editing the dataset-local one.", + "$ref": "../../datasets/agentdataflow_toolexchange_traces/schema.json" }