Skip to content

chore(release): introduce CHANGELOG + ADR-index fragment files (drop merge-conflict pain)#253

Merged
lusoris merged 1 commit intomasterfrom
chore/dedup-changelog-adr-fragments
May 2, 2026
Merged

chore(release): introduce CHANGELOG + ADR-index fragment files (drop merge-conflict pain)#253
lusoris merged 1 commit intomasterfrom
chore/dedup-changelog-adr-fragments

Conversation

@lusoris
Copy link
Copy Markdown
Owner

@lusoris lusoris commented May 1, 2026

Summary

What's added

CHANGELOG fragments

  • changelog.d/{added,changed,deprecated,removed,fixed,security}/<topic>.md — one Markdown bullet (or block) per PR, lexically sorted within section.
  • changelog.d/_pre_fragment_legacy.md — verbatim archive of pre-fragment Unreleased content.
  • scripts/release/concat-changelog-fragments.sh--check (CI gate) + --write (release-please / pre-push).

ADR-index fragments

  • docs/adr/_index_fragments/<NNNN-slug>.md — one Markdown table row per ADR, slug-keyed (handles legacy ADR-0199 collision).
  • docs/adr/_index_fragments/_order.txt — frozen commit-merge order manifest. New PRs append one slug; trivial conflict resolution.
  • docs/adr/_index_fragments/_header.md — verbatim README prelude.
  • scripts/docs/concat-adr-index.sh--check + --write.

Wiring

  • Makefile: new docs-fragments-check (added to make lint) and docs-fragments-write targets.
  • .github/PULL_REQUEST_TEMPLATE.md updated to instruct fragment-only CHANGELOG/ADR-index workflow.
  • .github/workflows/rule-enforcement.yml: ADR-0108 deliverable check now accepts changelog.d/<section>/*.md as a CHANGELOG entry.
  • AGENTS.md §8 + §9(e) reference ADR-0221.
  • docs/rebase-notes.md §0221 entry for upstream-sync invariance.

Compatibility with in-flight PRs

The legacy direct-edit path still works during migration: a PR that edits CHANGELOG.md directly will pass the ADR-0108 deliverables check. After this PR merges, the rendered Unreleased block matches the in-tree CHANGELOG.md byte-for-byte, so any in-flight PR's CHANGELOG.md hunk applies cleanly. New PRs should switch to fragments going forward.

Test plan

  • bash scripts/release/concat-changelog-fragments.sh --check exits 0 (verified locally).
  • bash scripts/docs/concat-adr-index.sh --check exits 0 (verified locally).
  • make docs-fragments-check exits 0 (new Makefile target).
  • bash scripts/release/concat-changelog-fragments.sh --write is idempotent (no diff after running on the migrated tree).
  • bash scripts/docs/concat-adr-index.sh --write is idempotent.
  • Adding a sample fragment (changelog.d/changed/T7-39-changelog-adr-fragments.md) renders correctly into the Unreleased block.
  • Adding a sample ADR-index fragment (docs/adr/_index_fragments/0221-...md) + appending the slug to _order.txt renders the new row at the bottom of docs/adr/README.md.

Reproducer

# After cloning at this branch:
make docs-fragments-check
bash scripts/release/concat-changelog-fragments.sh --write   # idempotent
bash scripts/docs/concat-adr-index.sh --write                # idempotent
git diff   # should be empty

Deep-dive deliverables (ADR-0108)

  • Research digestdocs/research/0034-changelog-fragment-pattern.md documents the cost-of-merge-conflict measurement and the changie / towncrier / release-please-native alternatives evaluated.
  • Decision matrix — ADR-0221 § Alternatives considered.
  • AGENTS.md invariant noteAGENTS.md §8 (ADR-index fragments) + §9(e) (CHANGELOG fragments).
  • Reproducer / smoke-test command — see "Test plan / Reproducer" above.
  • CHANGELOG fragmentchangelog.d/changed/T7-39-changelog-adr-fragments.md.
  • Rebase notedocs/rebase-notes.md §0221.

Bug-status hygiene (ADR-0165)

no state delta: process / release-tooling change with no bug-status impact.

Netflix golden-data gate (ADR-0024)

  • No assertAlmostEqual(...) modifications.

Known follow-ups

  • T7-39b: wire scripts/release/concat-changelog-fragments.sh --write into .github/workflows/release-please.yml so the rendered Unreleased block is the input release-please consumes. Out of scope for this PR; tracked separately.
  • Legacy archive collapse: at the next release tag, changelog.d/_pre_fragment_legacy.md content rolls into a versioned section and the archive can be deleted. Optional clean-up follow-up.

🤖 Generated with Claude Code


Supersedes #228 (closed by accident in batch-rebase incident, 2026-05-01).

Copilot AI review requested due to automatic review settings May 1, 2026 18:25
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR migrates the fork’s high-conflict documentation surfaces (the CHANGELOG.md Unreleased block and the ADR index table) to a fragment-file workflow rendered by in-tree concatenation scripts, reducing merge conflicts during parallel PR work.

Changes:

  • Added bash scripts to render/check/write CHANGELOG.md Unreleased content from changelog.d/<section>/*.md fragments and to render/check/write docs/adr/README.md from ADR index fragments.
  • Introduced fragment trees (changelog.d/* and docs/adr/_index_fragments/*) plus an ADR order manifest and header prelude for deterministic rendering.
  • Wired the workflow into make lint, the PR template, AGENTS rules, and the ADR-0108 enforcement workflow to recognize fragment-based deliverables.

Reviewed changes

Copilot reviewed 176 out of 177 changed files in this pull request and generated no comments.

Show a summary per file
File Description
scripts/release/concat-changelog-fragments.sh Renders/checks/writes CHANGELOG.md Unreleased block from changelog.d/ fragments.
scripts/docs/concat-adr-index.sh Renders/checks/writes docs/adr/README.md from ADR index fragments + _order.txt.
docs/research/0034-changelog-fragment-pattern.md Research digest documenting the fragment pattern and alternatives.
docs/rebase-notes.md Adds rebase note entry describing the new fragment workflow.
docs/adr/_index_fragments/_order.txt Frozen manifest controlling ADR index row order during rendering.
docs/adr/_index_fragments/_header.md ADR README prelude + table header used by the renderer.
docs/adr/_index_fragments/README.md Contributor documentation for the ADR index fragment workflow.
docs/adr/_index_fragments/0001-stash-benchmark-noise-file.md ADR index row fragment.
docs/adr/_index_fragments/0002-merge-path-master-default.md ADR index row fragment.
docs/adr/_index_fragments/0003-workingdir2-empty-planning-dir.md ADR index row fragment.
docs/adr/_index_fragments/0004-auto-push-after-merges.md ADR index row fragment.
docs/adr/_index_fragments/0005-framework-adaptation-full-scope.md ADR index row fragment.
docs/adr/_index_fragments/0006-cli-precision-17g-default.md ADR index row fragment.
docs/adr/_index_fragments/0007-claude-settings-fresh-rewrite.md ADR index row fragment.
docs/adr/_index_fragments/0008-readme-fork-rebrand.md ADR index row fragment.
docs/adr/_index_fragments/0009-mcp-server-tool-surface.md ADR index row fragment.
docs/adr/_index_fragments/0010-sigstore-keyless-signing.md ADR index row fragment.
docs/adr/_index_fragments/0011-versioning-lusoris-suffix.md ADR index row fragment.
docs/adr/_index_fragments/0012-coding-standards-jpl-cert-misra.md ADR index row fragment.
docs/adr/_index_fragments/0013-local-dev-distro-matrix.md ADR index row fragment.
docs/adr/_index_fragments/0014-vscode-clangd-disable-ms-cpp.md ADR index row fragment.
docs/adr/_index_fragments/0015-ci-matrix-asan-ubsan-tsan.md ADR index row fragment.
docs/adr/_index_fragments/0016-sycl-to-master-merge-conflict-policy.md ADR index row fragment.
docs/adr/_index_fragments/0017-claude-skills-scope.md ADR index row fragment.
docs/adr/_index_fragments/0018-claude-hooks-scope.md ADR index row fragment.
docs/adr/_index_fragments/0019-workingdir2-full-dossier.md ADR index row fragment.
docs/adr/_index_fragments/0020-tinyai-four-capabilities.md ADR index row fragment.
docs/adr/_index_fragments/0021-training-stack-pytorch-lightning.md ADR index row fragment.
docs/adr/_index_fragments/0022-inference-runtime-onnx.md ADR index row fragment.
docs/adr/_index_fragments/0023-tinyai-user-surfaces.md ADR index row fragment.
docs/adr/_index_fragments/0024-netflix-golden-preserved.md ADR index row fragment.
docs/adr/_index_fragments/0025-copyright-handling-dual-notice.md ADR index row fragment.
docs/adr/_index_fragments/0026-workspace-relocated-under-python.md ADR index row fragment.
docs/adr/_index_fragments/0027-non-conservative-image-pins.md ADR index row fragment.
docs/adr/_index_fragments/0028-adr-maintenance-rule.md ADR index row fragment.
docs/adr/_index_fragments/0029-resource-tree-relocated.md ADR index row fragment.
docs/adr/_index_fragments/0030-matlab-sources-relocated.md ADR index row fragment.
docs/adr/_index_fragments/0031-fork-docs-moved-under-docs.md ADR index row fragment.
docs/adr/_index_fragments/0032-unittest-script-moved-to-scripts.md ADR index row fragment.
docs/adr/_index_fragments/0033-codeql-config-moved-to-github.md ADR index row fragment.
docs/adr/_index_fragments/0034-single-patches-directory.md ADR index row fragment.
docs/adr/_index_fragments/0035-claude-hooks-schema-fix.md ADR index row fragment.
docs/adr/_index_fragments/0036-tinyai-wave1-scope-expansion.md ADR index row fragment.
docs/adr/_index_fragments/0037-master-branch-protection.md ADR index row fragment.
docs/adr/_index_fragments/0038-purge-upstream-matlab-mex-binaries.md ADR index row fragment.
docs/adr/_index_fragments/0039-onnx-runtime-op-walk-registry.md ADR index row fragment.
docs/adr/_index_fragments/0040-dnn-session-multi-input-api.md ADR index row fragment.
docs/adr/_index_fragments/0041-lpips-sq-extractor.md ADR index row fragment.
docs/adr/_index_fragments/0042-tinyai-docs-required-per-pr.md ADR index row fragment.
docs/adr/_index_fragments/0100-project-wide-doc-substance-rule.md ADR index row fragment.
docs/adr/_index_fragments/0101-sycl-usm-picture-pool.md ADR index row fragment.
docs/adr/_index_fragments/0102-dnn-ep-selection-and-fp16-io.md ADR index row fragment.
docs/adr/_index_fragments/0103-sycl-d3d11-surface-import.md ADR index row fragment.
docs/adr/_index_fragments/0104-picture-pool-always-on.md ADR index row fragment.
docs/adr/_index_fragments/0105-copyright-handling-dual-notice.md ADR index row fragment.
docs/adr/_index_fragments/0106-adr-maintenance-rule.md ADR index row fragment.
docs/adr/_index_fragments/0107-tinyai-wave1-scope-expansion.md ADR index row fragment.
docs/adr/_index_fragments/0108-deep-dive-deliverables-rule.md ADR index row fragment.
docs/adr/_index_fragments/0109-nightly-bisect-model-quality.md ADR index row fragment.
docs/adr/_index_fragments/0110-coverage-gate-fprofile-update-atomic.md ADR index row fragment.
docs/adr/_index_fragments/0111-coverage-gate-gcovr-with-ort.md ADR index row fragment.
docs/adr/_index_fragments/0112-ort-backend-testability-surface.md ADR index row fragment.
docs/adr/_index_fragments/0113-ort-create-session-fallback-multi-ep-ci.md ADR index row fragment.
docs/adr/_index_fragments/0114-coverage-gate-per-file-overrides.md ADR index row fragment.
docs/adr/_index_fragments/0115-ci-trigger-master-only-and-matrix-consolidation.md ADR index row fragment.
docs/adr/_index_fragments/0116-ci-workflow-naming-convention.md ADR index row fragment.
docs/adr/_index_fragments/0117-coverage-gate-warning-noise-suppression.md ADR index row fragment.
docs/adr/_index_fragments/0118-ffmpeg-patch-series-application.md ADR index row fragment.
docs/adr/_index_fragments/0119-cli-precision-default-revert.md ADR index row fragment.
docs/adr/_index_fragments/0120-ai-enabled-ci-matrix-legs.md ADR index row fragment.
docs/adr/_index_fragments/0121-windows-gpu-build-only-legs.md ADR index row fragment.
docs/adr/_index_fragments/0122-cuda-gencode-coverage-and-init-hardening.md ADR index row fragment.
docs/adr/_index_fragments/0123-cuda-post-cubin-load-regression-32b115df.md ADR index row fragment.
docs/adr/_index_fragments/0124-automated-rule-enforcement.md ADR index row fragment.
docs/adr/_index_fragments/0125-ms-ssim-decimate-simd.md ADR index row fragment.
docs/adr/_index_fragments/0126-ssimulacra2-extractor.md ADR index row fragment.
docs/adr/_index_fragments/0127-vulkan-compute-backend.md ADR index row fragment.
docs/adr/_index_fragments/0128-embedded-mcp-in-libvmaf.md ADR index row fragment.
docs/adr/_index_fragments/0129-tinyai-ptq-quantization.md ADR index row fragment.
docs/adr/_index_fragments/0130-ssimulacra2-scalar-implementation.md ADR index row fragment.
docs/adr/_index_fragments/0131-port-netflix-1382-cumemfree.md ADR index row fragment.
docs/adr/_index_fragments/0132-port-netflix-1406-feature-collector-model-list.md ADR index row fragment.
docs/adr/_index_fragments/0133-ci-clang-tidy-push-delta.md ADR index row fragment.
docs/adr/_index_fragments/0134-port-netflix-1451-meson-declare-dependency.md ADR index row fragment.
docs/adr/_index_fragments/0135-port-netflix-1424-expose-builtin-model-versions.md ADR index row fragment.
docs/adr/_index_fragments/0136-ci-deliverables-checker-strip-markdown.md ADR index row fragment.
docs/adr/_index_fragments/0137-thread-local-locale-for-numeric-io.md ADR index row fragment.
docs/adr/_index_fragments/0138-iqa-convolve-avx2-bitexact-double.md ADR index row fragment.
docs/adr/_index_fragments/0139-ssim-simd-bitexact-double.md ADR index row fragment.
docs/adr/_index_fragments/0140-simd-dx-framework.md ADR index row fragment.
docs/adr/_index_fragments/0141-touched-file-cleanup-rule.md ADR index row fragment.
docs/adr/_index_fragments/0142-port-netflix-18e8f1c5-vif-sigma-nsq.md ADR index row fragment.
docs/adr/_index_fragments/0143-port-netflix-f3a628b4-generalized-avx-convolve.md ADR index row fragment.
docs/adr/_index_fragments/0145-motion-v2-neon-bitexact.md ADR index row fragment.
docs/adr/_index_fragments/0146-nolint-sweep-function-size.md ADR index row fragment.
docs/adr/_index_fragments/0147-thread-pool-job-pool.md ADR index row fragment.
docs/adr/_index_fragments/0148-iqa-rename-and-cleanup.md ADR index row fragment.
docs/adr/_index_fragments/0149-port-netflix-1376-fifo-semaphore.md ADR index row fragment.
docs/adr/_index_fragments/0150-port-netflix-1472-cuda-windows.md ADR index row fragment.
docs/adr/_index_fragments/0151-i686-ci-netflix-1481.md ADR index row fragment.
docs/adr/_index_fragments/0152-vmaf-read-pictures-monotonic-index.md ADR index row fragment.
docs/adr/_index_fragments/0153-float-ms-ssim-min-dim-netflix-1414.md ADR index row fragment.
docs/adr/_index_fragments/0154-score-pooled-eagain-netflix-755.md ADR index row fragment.
docs/adr/_index_fragments/0155-adm-i4-rounding-deferred-netflix-955.md ADR index row fragment.
docs/adr/_index_fragments/0156-cuda-graceful-error-propagation-netflix-1420.md ADR index row fragment.
docs/adr/_index_fragments/0157-cuda-preallocation-leak-netflix-1300.md ADR index row fragment.
docs/adr/_index_fragments/0158-netflix-1486-motion-updates-verified-present.md ADR index row fragment.
docs/adr/_index_fragments/0159-psnr-hvs-avx2-bitexact.md ADR index row fragment.
docs/adr/_index_fragments/0160-psnr-hvs-neon-bitexact.md ADR index row fragment.
docs/adr/_index_fragments/0161-ssimulacra2-simd-bitexact.md ADR index row fragment.
docs/adr/_index_fragments/0162-ssimulacra2-iir-blur-simd.md ADR index row fragment.
docs/adr/_index_fragments/0163-ssimulacra2-ptlr-simd.md ADR index row fragment.
docs/adr/_index_fragments/0164-ssimulacra2-snapshot-gate.md ADR index row fragment.
docs/adr/_index_fragments/0165-state-md-bug-tracking.md ADR index row fragment.
docs/adr/_index_fragments/0166-mcp-server-release-channel.md ADR index row fragment.
docs/adr/_index_fragments/0167-doc-drift-enforcement.md ADR index row fragment.
docs/adr/_index_fragments/0168-tinyai-konvid-baselines.md ADR index row fragment.
docs/adr/_index_fragments/0169-onnx-allowlist-loop-if.md ADR index row fragment.
docs/adr/_index_fragments/0170-vmaf-pre-10bit-chroma.md ADR index row fragment.
docs/adr/_index_fragments/0171-bounded-loop-trip-count.md ADR index row fragment.
docs/adr/_index_fragments/0172-mcp-describe-worst-frames.md ADR index row fragment.
docs/adr/_index_fragments/0173-ptq-int8-audit-impl.md ADR index row fragment.
docs/adr/_index_fragments/0174-first-model-quantisation.md ADR index row fragment.
docs/adr/_index_fragments/0175-vulkan-backend-scaffold.md ADR index row fragment.
docs/adr/_index_fragments/0176-vulkan-vif-cross-backend-gate.md ADR index row fragment.
docs/adr/_index_fragments/0177-vulkan-motion-kernel.md ADR index row fragment.
docs/adr/_index_fragments/0178-vulkan-adm-kernel.md ADR index row fragment.
docs/adr/_index_fragments/0179-float-moment-simd.md ADR index row fragment.
docs/adr/_index_fragments/0180-cpu-coverage-audit.md ADR index row fragment.
docs/adr/_index_fragments/0181-feature-characteristics-registry.md ADR index row fragment.
docs/adr/_index_fragments/0182-gpu-long-tail-batch-1.md ADR index row fragment.
docs/adr/_index_fragments/0183-ffmpeg-libvmaf-sycl-filter.md ADR index row fragment.
docs/adr/_index_fragments/0184-vulkan-image-import-scaffold.md ADR index row fragment.
docs/adr/_index_fragments/0185-vulkan-hide-volk-symbols.md ADR index row fragment.
docs/adr/_index_fragments/0186-vulkan-image-import-impl.md ADR index row fragment.
docs/adr/_index_fragments/0187-ciede-vulkan.md ADR index row fragment.
docs/adr/_index_fragments/0188-gpu-long-tail-batch-2.md ADR index row fragment.
docs/adr/_index_fragments/0189-ssim-vulkan.md ADR index row fragment.
docs/adr/_index_fragments/0190-ms-ssim-vulkan.md ADR index row fragment.
docs/adr/_index_fragments/0191-psnr-hvs-vulkan.md ADR index row fragment.
docs/adr/_index_fragments/0192-gpu-long-tail-batch-3.md ADR index row fragment.
docs/adr/_index_fragments/0193-motion-v2-vulkan.md ADR index row fragment.
docs/adr/_index_fragments/0194-float-ansnr-gpu.md ADR index row fragment.
docs/adr/_index_fragments/0195-float-psnr-gpu.md ADR index row fragment.
docs/adr/_index_fragments/0196-float-motion-gpu.md ADR index row fragment.
docs/adr/_index_fragments/0197-float-vif-gpu.md ADR index row fragment.
docs/adr/_index_fragments/0198-volk-priv-remap-static-archive.md ADR index row fragment.
docs/adr/_index_fragments/0199-float-adm-vulkan.md ADR index row fragment.
docs/adr/_index_fragments/0199-tiny-ai-netflix-training-corpus.md ADR index row fragment.
docs/adr/_index_fragments/0200-volk-priv-remap-pkgconfig-leak-fix.md ADR index row fragment.
docs/adr/_index_fragments/0201-ssimulacra2-vulkan-kernel.md ADR index row fragment.
docs/adr/_index_fragments/0202-float-adm-cuda-sycl.md ADR index row fragment.
docs/adr/_index_fragments/0203-tiny-ai-training-prep-impl.md ADR index row fragment.
docs/adr/_index_fragments/0205-cambi-gpu-feasibility.md ADR index row fragment.
docs/adr/_index_fragments/0206-ssimulacra2-cuda-sycl.md ADR index row fragment.
docs/adr/_index_fragments/0207-tinyai-qat-design.md ADR index row fragment.
docs/adr/_index_fragments/0208-learned-filter-v1-qat-impl.md ADR index row fragment.
docs/adr/_index_fragments/0209-mcp-embedded-scaffold.md ADR index row fragment.
docs/adr/_index_fragments/0210-cambi-vulkan-integration.md ADR index row fragment.
docs/adr/_index_fragments/0211-model-registry-sigstore.md ADR index row fragment.
docs/adr/_index_fragments/0212-hip-backend-scaffold.md ADR index row fragment.
docs/adr/_index_fragments/0213-ssimulacra2-sve2.md ADR index row fragment.
docs/adr/_index_fragments/0214-gpu-parity-ci-gate.md ADR index row fragment.
docs/adr/_index_fragments/0215-fastdvdnet-pre-filter.md ADR index row fragment.
docs/adr/_index_fragments/0216-vulkan-chroma-psnr.md ADR index row fragment.
docs/adr/_index_fragments/0220-sycl-fp64-fallback.md ADR index row fragment.
docs/adr/_index_fragments/0221-changelog-adr-fragment-pattern.md ADR index row fragment for ADR-0221.
docs/adr/README.md Still receives a direct new row (rendered output).
docs/adr/0221-changelog-adr-fragment-pattern.md New ADR describing the fragment workflow decision.
changelog.d/changed/T7-39-changelog-adr-fragments.md New changelog fragment documenting the migration.
changelog.d/README.md Contributor documentation for changelog fragment workflow.
Makefile Adds docs-fragments-check to lint and adds docs-fragments-write.
CHANGELOG.md Rendered Unreleased section updated to include fragment output.
AGENTS.md Updates invariants to reference ADR index + changelog fragment workflows.
.github/workflows/rule-enforcement.yml Updates ADR-0108 deliverables check to accept fragment files.
.github/PULL_REQUEST_TEMPLATE.md Instructs contributors to use fragment-based workflow.
Comments suppressed due to low confidence (12)

scripts/release/concat-changelog-fragments.sh:1

  • This script relies on Bash 4+ features (mapfile). On macOS GitHub runners and many developer machines, /usr/bin/env bash resolves to Bash 3.2, which will hard-fail at runtime. Add an explicit Bash version guard near the top (e.g., check BASH_VERSINFO[0]) with an actionable error message, or refactor to avoid mapfile so make lint remains portable across supported CI OSes.
    scripts/release/concat-changelog-fragments.sh:1
  • This script relies on Bash 4+ features (mapfile). On macOS GitHub runners and many developer machines, /usr/bin/env bash resolves to Bash 3.2, which will hard-fail at runtime. Add an explicit Bash version guard near the top (e.g., check BASH_VERSINFO[0]) with an actionable error message, or refactor to avoid mapfile so make lint remains portable across supported CI OSes.
    scripts/docs/concat-adr-index.sh:1
  • This script requires Bash 4+ (declare -A). If docs-fragments-check runs on macOS (where /usr/bin/env bash is commonly 3.2), the lint target will fail. Either remove the associative array usage (e.g., track seen via a temp file and grep -Fxq), or add a clear Bash-version check that fails with instructions to install/activate Bash 4+.
    scripts/docs/concat-adr-index.sh:1
  • This script requires Bash 4+ (declare -A). If docs-fragments-check runs on macOS (where /usr/bin/env bash is commonly 3.2), the lint target will fail. Either remove the associative array usage (e.g., track seen via a temp file and grep -Fxq), or add a clear Bash-version check that fails with instructions to install/activate Bash 4+.
    scripts/docs/concat-adr-index.sh:1
  • The header comment says rows render oldest-first by ADR ID, but the implementation explicitly states ordering is driven by _order.txt (commit-merge order, not strictly numeric). Please update the earlier comment to match the actual ordering rules to avoid confusing contributors.
    scripts/docs/concat-adr-index.sh:1
  • The header comment says rows render oldest-first by ADR ID, but the implementation explicitly states ordering is driven by _order.txt (commit-merge order, not strictly numeric). Please update the earlier comment to match the actual ordering rules to avoid confusing contributors.
    scripts/release/concat-changelog-fragments.sh:1
  • If changelog.d/_pre_fragment_legacy.md ever lacks a trailing newline, the first emitted ### <Section> heading can be glued onto the last legacy line. Consider mirroring the fragment newline handling here: after cat \"$LEGACY\", ensure the legacy content ends with a newline (and optionally a blank line) before emitting new section headings.
    scripts/docs/concat-adr-index.sh:1
  • The comment claims the fragment newline is validated, but the code does not validate it. A missing trailing newline (or accidental blank line) will silently corrupt the Markdown table rendering. Consider adding a real check (e.g., verify last byte is \\n and optionally reject fragments containing empty lines) and fail --check/--write with a clear error pointing at the offending fragment.
    scripts/release/concat-changelog-fragments.sh:1
  • Temporary files are not reliably cleaned up if the script exits early (e.g., awk/mv failure), which can leave stray files on developer machines/CI runners. Add a trap to remove both $tmp_body and $tmp_out on EXIT/INT/TERM, and clear the trap after a successful mv if needed.
    scripts/release/concat-changelog-fragments.sh:1
  • Temporary files are not reliably cleaned up if the script exits early (e.g., awk/mv failure), which can leave stray files on developer machines/CI runners. Add a trap to remove both $tmp_body and $tmp_out on EXIT/INT/TERM, and clear the trap after a successful mv if needed.
    scripts/release/concat-changelog-fragments.sh:1
  • Temporary files are not reliably cleaned up if the script exits early (e.g., awk/mv failure), which can leave stray files on developer machines/CI runners. Add a trap to remove both $tmp_body and $tmp_out on EXIT/INT/TERM, and clear the trap after a successful mv if needed.
    scripts/release/concat-changelog-fragments.sh:1
  • The end-of-Unreleased detection (^## [^[]) is tailored to release headings that don't start with [; it will fail if the changelog ever switches to a more standard Keep-a-Changelog format like ## [1.2.3]. Consider stopping the block at the next ^## heading that is not Unreleased (e.g., match any ^## once in_block is set, and explicitly exclude the Unreleased header), so the splice logic is robust to header formatting changes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@lusoris lusoris force-pushed the chore/dedup-changelog-adr-fragments branch from 54ec877 to d016673 Compare May 1, 2026 18:52
…merge-conflict pain)

Replace the single-file CHANGELOG.md Unreleased block + docs/adr/README.md
index table with per-PR fragment trees driven by two in-tree concat
scripts. Eliminates the merge-conflict surface that cost ≈16 min per PR
across the 2026-04-28 sprint.

CHANGELOG fragments:
- changelog.d/{added,changed,deprecated,removed,fixed,security}/*.md —
  one Markdown bullet (or block) per PR, lexically sorted within section.
- changelog.d/_pre_fragment_legacy.md — verbatim archive of the existing
  3119-line Unreleased body. Migration is content-preserving end-to-end.
- scripts/release/concat-changelog-fragments.sh renders the Unreleased
  block; --check (CI gate) + --write (release-please / pre-push).

ADR-index fragments:
- docs/adr/_index_fragments/<NNNN-slug>.md — one Markdown table row per
  ADR, slug-keyed (handles legacy ADR-0199 collision: two distinct ADRs
  share the number).
- docs/adr/_index_fragments/_order.txt — frozen commit-merge order
  manifest. New PRs append one slug; trivial conflict-resolution.
- docs/adr/_index_fragments/_header.md — verbatim README prelude.
- scripts/docs/concat-adr-index.sh renders docs/adr/README.md;
  --check + --write.

Wiring:
- Makefile: new docs-fragments-check (added to lint) and -write targets.
- .github/PULL_REQUEST_TEMPLATE.md updated to instruct fragment-only
  CHANGELOG/ADR-index workflow; legacy direct-edit path still works.
- .github/workflows/rule-enforcement.yml: ADR-0108 deliverable check
  now accepts changelog.d/<section>/*.md as a CHANGELOG entry.
- AGENTS.md §8 + §9(e) reference ADR-0221 fragment workflow.
- docs/rebase-notes.md §0221 entry for upstream-sync invariance.

ADR-0221 (Accepted) records the decision; Research-0034 records the
cost-of-merge-conflict measurement and the changie/towncrier/release-
please-native alternatives evaluated.

Verification:
  bash scripts/release/concat-changelog-fragments.sh --check  # exit 0
  bash scripts/docs/concat-adr-index.sh --check               # exit 0
  make docs-fragments-check                                   # exit 0

Closes T7-39 (release-please workflow integration tracked as T7-39b
follow-up).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@lusoris lusoris force-pushed the chore/dedup-changelog-adr-fragments branch from d016673 to 1f1d99f Compare May 2, 2026 01:48
@lusoris lusoris merged commit 1254a5a into master May 2, 2026
54 checks passed
@lusoris lusoris deleted the chore/dedup-changelog-adr-fragments branch May 2, 2026 02:08
@github-actions github-actions Bot mentioned this pull request May 2, 2026
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