Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions packages/schema/flowprint.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,14 @@
"minimum": 0,
"description": "Display order (0 = topmost lane)"
},
"data_class": {
"type": "array",
"items": {
"type": "string",
"enum": ["pii", "financial", "credentials", "internal"]
Comment on lines +117 to +121
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The new data_class definition (lines 117‑124) is copied verbatim across every lane and node schema entry (lanes, action, switch, parallel, wait, etc.). That is the same non-trivial property shape repeated at lines 212‑219, 293‑300, 367‑374, 430‑437, 508‑515, 558‑565, 606‑613, and so on. If we ever need to tweak the enum or description (or add constraints), every copy has to be updated in lockstep. Can we move this to a single shared schema definition (e.g. #/definitions/DataClassLabels and $ref it in each object) so the constraint lives in one place and serialization/validation changes stay consistent?

Finding type: Code Dedup and Conventions | Severity: 🟢 Low


Want Baz to fix this for you? Activate Fixer

Heads up!

Your free trial ends tomorrow.
To keep getting your PRs reviewed by Baz, update your team's subscription

},
"description": "Data classification labels for trace redaction policy"
},
Comment on lines +117 to +124
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

packages/schema adds data_class and expressions but doesn't include a .changeset/*.md — should we add one describing those additions?

Finding type: AI Coding Guidelines | Severity: 🟠 Medium


Want Baz to fix this for you? Activate Fixer

Other fix methods

Fix in Cursor

Prompt for AI Agents:

In packages/schema/flowprint.schema.json around lines 117-124, the new "data_class"
array (and similarly the new "expressions" property elsewhere) constitutes a
package-level API change for packages/schema but no .changeset/*.md entry was added.
Create a new .changeset markdown file describing the addition of the data_class field
and expressions (brief summary, type of change: minor or patch per repo policy), list
the affected files (packages/schema/flowprint.schema.json,
packages/schema/src/serialize.ts, packages/schema/src/structural.ts,
packages/schema/src/types.generated.ts, and
packages/schema/src/__tests__/data-class-expressions.test.ts), and ensure the changeset
follows the repository's CLAUDE.md format so release tooling will pick it up. If your
repo requires updating package.json version or changelog metadata in the changeset,
include that as well.

Heads up!

Your free trial ends tomorrow.
To keep getting your PRs reviewed by Baz, update your team's subscription

"height": {
"type": "number",
"minimum": 140,
Expand Down Expand Up @@ -201,6 +209,14 @@
"type": "string",
"description": "Markdown notes for documentation and design rationale"
},
"data_class": {
"type": "array",
"items": {
"type": "string",
"enum": ["pii", "financial", "credentials", "internal"]
},
"description": "Data classification labels for trace redaction policy"
},
"metadata": {
"type": "object",
"additionalProperties": {
Expand All @@ -216,6 +232,13 @@
"rules": {
"$ref": "#/definitions/RulesRef"
},
"expressions": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "Key-value pairs of output field name to expression string. Makes this an engine-native transform node."
},
"position": {
"$ref": "#/definitions/Position"
},
Expand Down Expand Up @@ -267,6 +290,14 @@
"type": "string",
"description": "Markdown notes for documentation and design rationale"
},
"data_class": {
"type": "array",
"items": {
"type": "string",
"enum": ["pii", "financial", "credentials", "internal"]
},
"description": "Data classification labels for trace redaction policy"
},
"metadata": {
"type": "object",
"additionalProperties": {
Expand Down Expand Up @@ -333,6 +364,14 @@
"type": "string",
"description": "Markdown notes for documentation and design rationale"
},
"data_class": {
"type": "array",
"items": {
"type": "string",
"enum": ["pii", "financial", "credentials", "internal"]
},
"description": "Data classification labels for trace redaction policy"
},
"metadata": {
"type": "object",
"additionalProperties": {
Expand Down Expand Up @@ -388,6 +427,14 @@
"type": "string",
"description": "Markdown notes for documentation and design rationale"
},
"data_class": {
"type": "array",
"items": {
"type": "string",
"enum": ["pii", "financial", "credentials", "internal"]
},
"description": "Data classification labels for trace redaction policy"
},
"metadata": {
"type": "object",
"additionalProperties": {
Expand Down Expand Up @@ -458,6 +505,14 @@
"type": "string",
"description": "Markdown notes for documentation and design rationale"
},
"data_class": {
"type": "array",
"items": {
"type": "string",
"enum": ["pii", "financial", "credentials", "internal"]
},
"description": "Data classification labels for trace redaction policy"
},
"metadata": {
"type": "object",
"additionalProperties": {
Expand Down Expand Up @@ -500,6 +555,14 @@
"type": "string",
"description": "Markdown notes for documentation and design rationale"
},
"data_class": {
"type": "array",
"items": {
"type": "string",
"enum": ["pii", "financial", "credentials", "internal"]
},
"description": "Data classification labels for trace redaction policy"
},
"metadata": {
"type": "object",
"additionalProperties": {
Expand Down Expand Up @@ -540,6 +603,14 @@
"type": "string",
"description": "Markdown notes for documentation and design rationale"
},
"data_class": {
"type": "array",
"items": {
"type": "string",
"enum": ["pii", "financial", "credentials", "internal"]
},
"description": "Data classification labels for trace redaction policy"
},
"metadata": {
"type": "object",
"additionalProperties": {
Expand Down
Loading
Loading