Skip to content

DOCS-090: fold --format json with a versioned, published schema - #48

Merged
Wilson421 merged 2 commits into
mainfrom
feat/fold-json
Oct 16, 2026
Merged

Wilson421 merged 2 commits into
mainfrom
feat/fold-json

Conversation

@Wilson421

Copy link
Copy Markdown
Contributor

DOCS-090: fold --format json, so a CI wrapper never parses this tool's English. Asked for by the owner, with contract versioning and a stored schema.

  • One document on stdout in every fold mode (dry run, --write, --check, --check-message, --commits-from). Exit codes unchanged; ok == exit 0.
  • The schema is a file: schema/fold.v1.schema.json (JSON Schema 2020-12), added to the npm package. Every document names it: "schema": "ewc3-docs/fold@1".
  • Versioning: additive within v1; a rename or removal is fold.v2.schema.json beside v1.
  • Stable codes (20), set by one problem(code, message) constructor where each problem is raised. No classifier reading messages afterwards.
  • Did not run is JSON however early: unknown flag, bad config, missing commit list, crash.
  • from: null for a first state (asked by the wrapper author).
  • Text output byte-for-byte unchanged.

How it is held: tests validate real output from every mode against the closed schema (additionalProperties: false) with an in-file validator; a test refuses schema keywords the validator does not implement; the schema's code list is compared with the codes in the source. A stray output field fails 3 tests (measured).

358 tests pass. check, index --check, values --check, fold --check --since clean.

🤖 Generated with Claude Code

Wilson421 and others added 2 commits October 16, 2026 01:10
…never parse English (DOCS-090)

One JSON document on stdout in every fold mode, naming schema
ewc3-docs/fold@1 and matching schema/fold.v1.schema.json (JSON Schema 2020-12,
shipped in the package). Additive within v1; a rename or removal is v2.
Every problem carries a stable code, set where it is raised. Did-not-run is
JSON however early the tool stops. Text output is unchanged. Tests validate
real output against the closed schema, and compare its codes with the source.

Slice: DOCS-090
State: tested
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 16, 2026 06:10
@Wilson421

Copy link
Copy Markdown
Contributor Author

@codex review

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-16T06:16:08.495577Z 8af459c Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: 8af459cb4d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Wilson421
Wilson421 merged commit eb2451a into main Oct 16, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants