Skip to content

Implement canonical changelog area hierarchy (/) with filename encoding (~) - #5227

Closed
phlax with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-change-log-area-validation
Closed

Implement canonical changelog area hierarchy (/) with filename encoding (~)#5227
phlax with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-change-log-area-validation

Conversation

Copilot AI commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Changelog tooling documented hierarchical areas (dns/cares in config, dns~cares in filenames) but never implemented the mapping, causing valid nested areas to fail validation and emit incorrect area: values in generated YAML. This change wires the convention through parsing, checking, and docs.

  • Shared area encoding contract (envoy.base.utils)

    • Added canonical/filename separators and helpers:
      • AREA_SEPARATOR = "/"
      • AREA_FILENAME_SEPARATOR = "~"
      • area_from_filename(), area_to_filename()
    • Updated AChangelog.data_from_entry_map() to decode filename areas before emitting entry data, so generated YAML uses canonical IDs (e.g. dns/cares).
  • Checker behavior (envoy.code.check)

    • check_entry_filename() now validates filename-area syntax with encoded charset ([a-z0-9_\-~]+), decodes ~ -> /, then validates against configured areas.
    • Unknown-area errors now show decoded + filename form when they differ:
      • Invalid area 'dns/cares' (from filename 'dns~cares')
  • Areas config/title validation

    • Kept canonical area-key rule unchanged ([a-z0-9_\-/]+; ~ remains invalid in keys).
    • Added title rules:
      • title must not contain ~
      • if area key contains /, explicit non-empty title is required
  • Documentation

    • Added a concise “Changelog entry areas” section to py/envoy.code.check/README.rst describing canonical IDs, filename encoding, and title requirements.
# canonical config key
area = "dns/cares"

# filename form
filename_area = area_to_filename(area)   # "dns~cares"

# checker/data path canonicalization
canonical = area_from_filename(filename_area)  # "dns/cares"

@netlify

netlify Bot commented Sep 11, 2026

Copy link
Copy Markdown

Deploy Preview for nifty-bassi-e26446 ready!

Name Link
🔨 Latest commit f915b82
🔍 Latest deploy log https://app.netlify.com/projects/nifty-bassi-e26446/deploys/6aa3e244bf81f20008434bc4
😎 Deploy Preview https://deploy-preview-5227--nifty-bassi-e26446.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Co-authored-by: phlax <454682+phlax@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix changelog area validation for filenames Implement canonical changelog area hierarchy (/) with filename encoding (~) Sep 11, 2026
Copilot AI requested a review from phlax September 11, 2026 11:14
@phlax phlax closed this Sep 11, 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