Skip to content

#521: Draft: JSON-based exchange format for OFT items and reports - #580

Open
redcatbear wants to merge 4 commits into
mainfrom
documentation/521_draft-json-based-exchange-format
Open

#521: Draft: JSON-based exchange format for OFT items and reports#580
redcatbear wants to merge 4 commits into
mainfrom
documentation/521_draft-json-based-exchange-format

Conversation

@redcatbear

Copy link
Copy Markdown
Collaborator

Discussion draft for the OFT's own native document interchange and report format.

Closes #521.

@redcatbear redcatbear self-assigned this Aug 23, 2026
@redcatbear redcatbear added the documentation User guides, turorials, specifications label Aug 23, 2026
@github-project-automation github-project-automation Bot moved this to 📫 Backlog in OpenFastTrace Aug 23, 2026

@kaklakariada kaklakariada left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

General: looks very good!

Some more comments in the schema could help with understanding the proposal.

"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/itsallcode/openfasttrace/blob/main/doc/schemas/openfasttrace.schema.json",
"title": "OpenFastTrace JSON formats",
"description": "Schema for OpenFastTrace exchange (OFTX) and report (OFTR) documents. Properties whose value equals the declared default are omitted from serialized documents.",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just an idea: this mixes exchange and reports. Would it be clearer to have separate schemas?

I guess it's less duplication to leave it like this.

Comment on lines +76 to +80
"reproducible": {
"type": "boolean",
"default": false,
"description": "Whether running OFT again with the recorded parameters can reproduce the document bit-identically."
},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this? When is a report not reproducible? Only when the order in which files are read is different. But then OFT should sort the report reproducibly.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Order, timestamps. Some people like to have timestamps in the reports as record. Good as historical document. Less so if you need it reproducible.

Comment on lines +184 to +189
"reference": {
"default": "relative",
"enum": [
"absolute",
"relative"
]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean that when the user specifies a relative path, the report contains only relative paths starting from that path, and when they specify an absolute path, all files under this path will be absolute in this report?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Absolute paths seldom are useful in exchange. More so in a record (e.g., as proof of a tracing run). I understand "relative" as relative to the project root. Typically a repo checkout.

Comment on lines +203 to +204
"oftx",
"oftr"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These constants are a bit cryptic. Could we write this out, e.g. "oft-exchange" or similar?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can do. I just thought we align that with the extension .oftx.json. But writing it out inside the document is OK.

Comment thread doc/schemas/openfasttrace.schema.json Outdated
Comment on lines +496 to +516
"locatedId": {
"type": "object",
"required": [
"range"
],
"properties": {
"range": {
"$ref": "#/$defs/range"
},
"artifactType": {
"$ref": "#/$defs/range"
},
"name": {
"$ref": "#/$defs/range"
},
"revision": {
"$ref": "#/$defs/range"
}
},
"additionalProperties": false
},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if we need located IDs in the report. I would only add this if someone needs it.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think of it this way: a JSON based report fits nicely into a JavaScript report as Poldi did. Then you want location for jump URLs.

@github-project-automation github-project-automation Bot moved this from 📫 Backlog to 🔨 In Progress in OpenFastTrace Aug 26, 2026
Co-authored-by: Christoph Pirkl <4711730+kaklakariada@users.noreply.github.com>
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation User guides, turorials, specifications

Projects

Status: 🔨 In Progress

Development

Successfully merging this pull request may close these issues.

Draft: JSON-based exchange format for OFT items and reports

2 participants