← Back to Pull requests

Prepare documentation for the v4 release #481

Merged
ingydotnet merged 39 files (3090 lines) on Nov 04, 2026 18:36 UTC
View on GitHub
ingydotnet ingydotnet commented on Nov 03, 2026 20:45 UTC
Author

Present v4.0.0 as the stable release and describe all six plugin APIs. Correct option defaults, compatibility guidance, CLI help, and examples. Clarify external plugin builds and verify the JSON-comments command.

Replace obsolete architecture notes and repair documentation links and contributor commands.
Preserve the Loader-Limits guide after the deprecated API cleanup. Document current canonical output and YAML configuration limitations.

Validation: full tests, Go lint, YAML lint, formatting, and whitespace checks pass.
All 17 executable examples and 93 local documentation links were checked.
The YAML Test Suite retains its 66 known failures.

Diff: 3090 lines (+1087 / -2003) across 39 files Reviewer: dims Review duration: 1311m
All Vouch review confidence checks passed
Residual risk 0.26 = Change Risk (0.72) × (1 − Review Confidence (0.63)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.72 · 3090 lines diff across 39 files
0.72
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.31 · 1 substantive comment(s)
0.31
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 50%
63%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.400
Shallow Review Depth shallow_review_depth
0.243
Mass File Touch mass_file_touch
0.080
Real PR Conversation Timeline
6 items
dims dims approved these changes on Nov 03, 2026 20:55 UTC
Approved Reviewer

Approved these changes.

ccoVeille ccoVeille approved these changes on Nov 03, 2026 21:28 UTC
Approved Reviewer

Approved these changes.

Copilot Copilot commented on code on Nov 03, 2026 21:46 UTC
Code Review
yaml.go:1
@@ -122,8 +122,8 @@ var (
 	//
 	// When called without arguments, defaults to true.
 	//
-	// This is useful when you expect exactly one document and want behavior
-	// similar to [Unmarshal].
+	// This ignores later documents, including their syntax errors.

With a YAML-parser plugin, later syntax errors can still fail the first Load because the complete input is parsed and its events validated before composition. Qualify this guarantee and describe the option as stopping document loading, not leaving trailing input unread (even the built-in parser can buffer ahead). Same issue in internal/libyaml/options.go:199, docs/dev/go-yaml-internals.md:24–25, and docs/releases/v4.0.0.md:107.

copilot-pull-request-reviewer[bot] copilot-pull-request-reviewer[bot] commented on Nov 03, 2026 21:46 UTC
Reviewer

<!-- ccr-overview-v2 -->

🟡 Changes recommended

The option documentation overstates first-document loading guarantees, since parser plugins can reject later syntax errors and parsers may buffer trailing input.

<details open>
<summary><strong>1 open issue</strong></summary>

  • <picture><source media="(prefers-color-scheme: dark)" srcset="https://github.githubassets.com/static/images/icons/copilot-code-review/low-v2-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://github.githubassets.com/static/images/icons/copilot-code-review/low-v2-light.svg"><img src="https://github.githubassets.com/static/images/icons/copilot-code-review/low-v2-light.png" alt="Low severity" width="62" height="18" align="texttop"></picture> Clarify stop-on-first-document behavior with YAML parser plugins · New

  • </details>

    <details>
    <summary><strong>What changed in this PR</strong></summary>

    Prepares go-yaml’s documentation for stable v4.0.0, aligning public API guidance, examples, and internal architecture descriptions with the current implementation.

    Changes:

  • Documents all six plugin APIs, option defaults, compatibility behavior, and configuration limitations.

  • Corrects runnable examples, CLI guidance, documentation links, and contributor commands.

  • Adds release notes and a draft-release Make target with mock-based tests.
  • | File | Description |
    | ---- | ----------- |
    | yaml.go | Corrects public option documentation and API examples. |
    | util/​release.t | Tests release validation and GitHub CLI invocation. |
    | README.md | Presents v4 as stable and updates plugin and migration guidance. |
    | plugin/​loaderlimits/​plugin.go | Corrects loader constructor examples. |
    | plugin/​doc.go | Updates plugin examples to use readers. |
    | plugin.go | Fixes constructor usage in interface documentation. |
    | internal/​libyaml/​README.md | Replaces obsolete architecture and testing guidance. |
    | internal/​libyaml/​options.go | Clarifies option defaults and output behavior. |
    | internal/​libyaml/​node.go | Documents node option boundaries and unused interfaces. |
    | internal/​libyaml/​loader.go | Corrects the multi-document option name in a comment. |
    | internal/​libyaml/​dumper.go | Corrects the multi-document option name in a comment. |
    | internal/​libyaml/​doc.go | Updates the internal package description. |
    | GNUmakefile | Adds draft-release creation and release tests. |
    | example/​version_options/​main.go | Clarifies the v3 indentation comment. |
    | example/​README.md | Repairs example commands and behavior descriptions. |
    | example/​node_programmatic_build/​main.go | Applies output formatting during serialization. |
    | example/​node_load_strict_unmarshaler/​main.go | Clarifies explicit strict-checking comments. |
    | example/​node_load_decode_comparison/​main.go | Fixes Decode comparison and inline field handling. |
    | example/​node_dump_with_options/​main.go | Demonstrates stored styles versus serialization options. |
    | example/​dumper_indent_comparison/​main.go | Corrects printed execution commands. |
    | docs/​v3-to-v4-migration.md | Clarifies custom hooks and preferred line width. |
    | docs/​releases/​v4.0.0.md | Adds the stable release announcement and adoption guidance. |
    | docs/​README.md | Updates the documentation index descriptions. |
    | docs/​plugin/​README.md | Expands plugin links and distinguishes selection from registration. |
    | docs/​plugin/​loader-limits.md | Explains depth and alias-work safety limits. |
    | docs/​plugin.md | Corrects plugin defaults, disabling semantics, and build guidance. |
    | docs/​options.md | Corrects defaults, examples, and configuration limitations. |
    | docs/​dev/​README.md | Updates the internals guide description. |
    | docs/​dev/​pipeline-overview.mmd | Clarifies unresolved node tags. |
    | docs/​dev/​how-go-yaml-works.md | Corrects stage responsibilities and extension boundaries. |
    | docs/​dev/​go-yaml-internals.md | Replaces outdated notes with current pipeline guidance. |
    | docs/​dev/​dump-load-api.md | Updates compatibility guidance, error handling, and node examples. |
    | docs/​dev/​call-hierarchy.mmd | Corrects method names and stage ownership. |
    | doc.go | Recommends Load/Dump and clarifies compatibility defaults. |
    | CONTRIBUTING.md | Repairs commands and documents release preparation. |
    | cmd/​go-yaml/​yaml.go | Changes API terminology from deprecated to classic in comments. |
    | cmd/​go-yaml/​README.md | Updates plugin semantics and JSON-comments build instructions. |
    | cmd/​go-yaml/​main.go | Labels supported older APIs as classic in CLI help. |
    | cmd/​go-yaml/​json.go | Changes Decoder terminology to classic in a comment. |
    </details>

    <sub>Review effort: Balanced</sub>

    ccoVeille ccoVeille approved these changes on Nov 03, 2026 22:06 UTC
    Approved Reviewer

    Approved these changes.

    Reviewers
    Assignees
    ingydotnet ingydotnet
    Labels
    risk: low confidence: 63.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 71.5% (HIGH) · Higher = larger blast radius
    71.5%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 63.5% · Lower = rushed or shallow review
    63.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 26.1% · Safe to merge
    26.1%
    Repository