Skip to content

Commit ac64452

Browse files
committed
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.
1 parent 4188a6a commit ac64452

1 file changed

Lines changed: 3 additions & 14 deletions

File tree

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,5 @@
11
{
2-
"$schema": "http://json-schema.org/draft-07/schema#",
3-
"title": "Agent Data Flow and Tool Exchange Trace",
4-
"type": "object",
5-
"required": ["trace_id", "category", "dsgai_mapping", "trace_data", "type"],
6-
"properties": {
7-
"trace_id": { "type": "string", "pattern": "^TRACE-\\d{4}$" },
8-
"category": { "type": "string", "enum": ["tool_call", "multi_agent_delegation", "plugin_data_exchange", "credential_flow", "context_accumulation", "memory_read_write"] },
9-
"dsgai_mapping": { "type": "array", "items": { "type": "string", "pattern": "^DSGAI(0[1-9]|1[0-9]|2[01])$" }, "minItems": 1 },
10-
"agent_framework": { "type": "string" },
11-
"trace_data": { "type": "array", "items": { "type": "object" }, "minItems": 1 },
12-
"sensitivity_annotations": { "type": "array", "items": { "type": "string" } },
13-
"security_observations": { "type": "string" },
14-
"type": { "type": "string", "enum": ["benign", "adversarial"] }
15-
}
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"$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.",
4+
"$ref": "../../datasets/agentdataflow_toolexchange_traces/schema.json"
165
}

0 commit comments

Comments
 (0)