-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/100 chapters can be defined by labels combination #202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/100 chapters can be defined by labels combination #202
Conversation
WalkthroughCentralizes governance principles into .specify/memory/principles.md and replaces inline principle text with PID references across constitution and templates. Adds multi-label custom-chapters support with label normalization and intersection-based population, adjusts verbose/defaults and generator since handling, updates docs, and adds unit/integration tests. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant YAML as YAML Chapters Input
participant CC as CustomChapters
participant Norm as _normalize_labels
participant Records as Records Map
User->>CC: from_yaml_array(chapters)
CC->>YAML: iterate entries
CC->>Norm: normalize "label" / "labels"
Norm-->>CC: ordered, deduped label list
CC->>CC: merge labels per title (preserve order, warn on unknown keys)
User->>CC: populate(records)
CC->>Records: for each record read record.labels
CC->>CC: if record.labels ∩ chapter.labels != ∅ → include record once in that chapter
CC-->>User: populated chapters (records may appear in multiple chapters)
sequenceDiagram
autonumber
participant Gen as ReleaseNotesGenerator
participant Data as MinedData
participant CC as CustomChapters
Gen->>Data: read data.since
Gen->>CC: CC.since = data.since or datetime.min
Note right of CC: deterministic baseline when since is None
sequenceDiagram
autonumber
participant AI as ActionInputs
participant Env as ENV (RUNNER_DEBUG)
participant Inp as Input(VERBOSE)
AI->>Inp: read VERBOSE (default "false")
AI->>AI: normalize to "true"/"false"
AI->>Env: check RUNNER_DEBUG == "1"
alt RUNNER_DEBUG == "1"
AI-->>AI: verbose = True
else VERBOSE == "true"
AI-->>AI: verbose = True
else
AI-->>AI: verbose = False
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used🧬 Code graph analysis (1)release_notes_generator/chapters/custom_chapters.py (5)
🔇 Additional comments (4)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
README.md (1)
83-89: Update requirements text to match multi-label supportThe requirements table still says “Each chapter must have a
titleand alabel…”, which contradicts the new multi-label examples just above. Please update the wording to reflect that chapters now accept either the legacy singlelabelor the newlabelsforms to avoid confusing readers.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (16)
.specify/constitution.md(7 hunks).specify/memory/constitution.md(3 hunks).specify/memory/principles.md(1 hunks).specify/templates/plan-template.md(2 hunks).specify/templates/spec-template.md(1 hunks).specify/templates/tasks-template.md(9 hunks)CONTRIBUTING.md(1 hunks)DEVELOPER.md(1 hunks)README.md(4 hunks)docs/configuration_reference.md(2 hunks)docs/features/custom_chapters.md(1 hunks)release_notes_generator/action_inputs.py(1 hunks)release_notes_generator/chapters/custom_chapters.py(2 hunks)release_notes_generator/generator.py(2 hunks)tests/integration/test_release_notes_snapshot.py(1 hunks)tests/unit/release_notes_generator/chapters/test_custom_chapters.py(4 hunks)
🧰 Additional context used
🧬 Code graph analysis (5)
release_notes_generator/action_inputs.py (1)
release_notes_generator/utils/gh_action.py (1)
get_action_input(26-38)
tests/integration/test_release_notes_snapshot.py (3)
release_notes_generator/chapters/custom_chapters.py (3)
CustomChapters(71-173)from_yaml_array(107-173)populate(76-105)tests/unit/release_notes_generator/chapters/test_custom_chapters.py (3)
R(179-191)contains_change_increment(187-188)to_chapter_row(190-191)release_notes_generator/model/record/record.py (2)
skip(76-78)is_present_in_chapters(49-55)
release_notes_generator/chapters/custom_chapters.py (5)
release_notes_generator/action_inputs.py (2)
ActionInputs(64-518)get_verbose(220-229)release_notes_generator/chapters/base_chapters.py (3)
BaseChapters(28-116)add_row(67-78)populated_record_numbers_list(43-49)release_notes_generator/model/chapter.py (1)
Chapter(23-63)release_notes_generator/model/record/commit_record.py (2)
contains_change_increment(77-78)to_chapter_row(63-75)release_notes_generator/model/record/record.py (4)
contains_change_increment(166-172)skip(76-78)labels(81-90)to_chapter_row(154-163)
release_notes_generator/generator.py (1)
release_notes_generator/chapters/base_chapters.py (2)
since(52-61)since(64-65)
tests/unit/release_notes_generator/chapters/test_custom_chapters.py (4)
tests/unit/conftest.py (1)
custom_chapters(74-80)release_notes_generator/chapters/custom_chapters.py (4)
CustomChapters(71-173)_normalize_labels(33-68)from_yaml_array(107-173)populate(76-105)release_notes_generator/model/record/commit_record.py (2)
CommitRecord(13-87)commit(54-59)release_notes_generator/action_inputs.py (1)
ActionInputs(64-518)
🪛 LanguageTool
.specify/memory/constitution.md
[grammar] ~16-~16: There might be a mistake here.
Context: ...m instead of embedding the full text to: - Reduce duplication during amendments - S...
(QB_NEW_EN)
[grammar] ~21-~21: There might be a mistake here.
Context: ...rinciples independently) Editing Rules: - Add / modify / remove a principle ONLY in `...
(QB_NEW_EN)
[grammar] ~22-~22: There might be a mistake here.
Context: ...ove a principle ONLY in principles.md. - Bump the constitution version (MINOR or ...
(QB_NEW_EN)
[grammar] ~23-~23: There might be a mistake here.
Context: ... rules) here referencing the relocation. - If a principle is materially redefined, ...
(QB_NEW_EN)
[grammar] ~24-~24: There might be a mistake here.
Context: ...If a principle is materially redefined, update Sync Impact Report and any affected tem...
(QB_NEW_EN)
[grammar] ~60-~60: There might be a mistake here.
Context: ... Branch naming check enforced (PID:H-1). - Typing coverage gate (PID:K-1). - TODO a...
(QB_NEW_EN)
[grammar] ~63-~63: There might be a mistake here.
Context: ... in verbose mode (PID:E-1) when enabled. - Documentation rule sync: PR review check...
(QB_NEW_EN)
[grammar] ~71-~71: There might be a mistake here.
Context: ...int global score ≥9.5 (no fatal errors). 3. Typing: mypy (0 blocking errors); justif...
(QB_NEW_EN)
[grammar] ~75-~75: There might be a mistake here.
Context: ... Dead Code: remove or justify (PID:G-1). 7. Determinism: repeat test run yields iden...
(QB_NEW_EN)
[grammar] ~76-~76: There might be a mistake here.
Context: ...ields identical sample output (PID:B-2). 8. Branch Naming: enforced allowed prefix (...
(QB_NEW_EN)
[grammar] ~77-~77: There might be a mistake here.
Context: ...ming: enforced allowed prefix (PID:H-1). 9. TODO Governance: all TODOs issue-linked ...
(QB_NEW_EN)
[grammar] ~80-~80: There might be a mistake here.
Context: ...mative doc changes reconciled (PID:J-1). 12. Example Reuse Discipline (PID:J-2). Qua...
(QB_NEW_EN)
[grammar] ~90-~90: There might be a mistake here.
Context: ...BLOCKING until reconciliation (PID:J-1). - Example duplication violation → BLOCKING...
(QB_NEW_EN)
[grammar] ~106-~106: There might be a mistake here.
Context: ...ty: Input names & placeholder semantics require MAJOR bump if changed. - Enforcement: C...
(QB_NEW_EN)
[grammar] ~106-~106: There might be a mistake here.
Context: ...semantics require MAJOR bump if changed. - Enforcement: CI automates formatting, li...
(QB_NEW_EN)
[grammar] ~109-~109: There might be a mistake here.
Context: ...025-10-12 | Last Amended: 2025-10-15
(QB_NEW_EN)
docs/features/custom_chapters.md
[grammar] ~6-~6: There might be a mistake here.
Context: ... the generated release notes. ## Basics Each chapter entry requires a title an...
(QB_NEW_EN)
[grammar] ~7-~7: There might be a mistake here.
Context: ...ter entry requires a title and either: - label: (legacy) single label string - `labels...
(QB_NEW_EN)
[grammar] ~8-~8: There might be a mistake here.
Context: ... - label: (legacy) single label string - labels: (new) multi-label definition (comma se...
(QB_NEW_EN)
[grammar] ~9-~9: Use a hyphen to join words.
Context: ...ls`: (new) multi-label definition (comma separated string OR YAML list) ```yaml ...
(QB_NEW_EN_HYPHEN)
[grammar] ~23-~23: There might be a mistake here.
Context: ...moved preserving first occurrence order. 5. If both label and labels present, `l...
(QB_NEW_EN)
[grammar] ~24-~24: There might be a mistake here.
Context: ...bels` takes precedence (single warning). 6. Invalid types (non-string/non-list) caus...
(QB_NEW_EN)
[grammar] ~30-~30: There might be a mistake here.
Context: ...ays suppressed. ## Deterministic Output Chapter rendering order = order of first...
(QB_NEW_EN)
[grammar] ~33-~33: There might be a mistake here.
Context: ...ue title in the YAML input. ## Warnings - Missing title - Both label & `labels...
(QB_NEW_EN)
[grammar] ~34-~34: There might be a mistake here.
Context: ... the YAML input. ## Warnings - Missing title - Both label & labels (precedence noti...
(QB_NEW_EN)
[grammar] ~35-~35: There might be a mistake here.
Context: ...h label & labels (precedence notice) - Invalid labels type - Empty label set ...
(QB_NEW_EN)
[grammar] ~36-~36: There might be a mistake here.
Context: ...ecedence notice) - Invalid labels type - Empty label set after normalization - Un...
(QB_NEW_EN)
[grammar] ~37-~37: There might be a mistake here.
Context: ...pe - Empty label set after normalization - Unknown extra keys (ignored) All warnin...
(QB_NEW_EN)
[grammar] ~42-~42: There might be a mistake here.
Context: ...able) for traceability. ## Verbose Mode Set verbose: true to log normalized la...
(QB_NEW_EN)
[grammar] ~45-~45: There might be a mistake here.
Context: ...lized label sets at DEBUG level. ## FAQ **Q: Does duplicity-scope stop a record ...
(QB_NEW_EN)
[grammar] ~46-~46: There might be a mistake here.
Context: ...d appearing in multiple custom chapters?** A: No. Cross-chapter duplication is alwa...
(QB_NEW_EN)
.specify/templates/tasks-template.md
[grammar] ~8-~8: There might be a mistake here.
Context: ...uments from /specs/[###-feature-name]/ Prerequisites: plan.md (required), s...
(QB_NEW_EN)
[grammar] ~26-~26: There might be a mistake here.
Context: ...r TODO(<issue-id>): pattern (PID:G-3). - Performance: If feature affects mining/d...
(QB_NEW_EN)
[grammar] ~27-~27: There might be a mistake here.
Context: ...d>):` pattern (PID:G-3). - Performance: If feature affects mining/data fetch loops...
(QB_NEW_EN)
[grammar] ~27-~27: There might be a mistake here.
Context: ...eature affects mining/data fetch loops, add measurement & API budget validation tas...
(QB_NEW_EN)
[grammar] ~36-~36: There might be a mistake here.
Context: ...ucture for new/relocated tests (PID:A-2) - [ ] T003 Verify branch prefix matches re...
(QB_NEW_EN)
[grammar] ~37-~37: There might be a mistake here.
Context: .../` (PID:H-1) or rename before proceeding - [ ] T004 [P] Add initial failing unit te...
(QB_NEW_EN)
[grammar] ~38-~38: There might be a mistake here.
Context: ... for new logic (Test‑First gate PID:A-1) - [ ] T005 [P] Configure/verify linting, t...
(QB_NEW_EN)
[grammar] ~39-~39: There might be a mistake here.
Context: ...y) and formatting tools (PIDs: A-1, K-1) - [ ] T006 [P] Add TODO pattern linter or ...
(QB_NEW_EN)
[grammar] ~40-~40: There might be a mistake here.
Context: ... TODO pattern linter or script (PID:G-3) - [ ] T007 [P] Add performance baseline/me...
(QB_NEW_EN)
[grammar] ~74-~74: There might be a mistake here.
Context: ...s_generator/.py` (full typing - PID:K-1) - [ ] T016 [US1] Logging additions (I...
(QB_NEW_EN)
[grammar] ~74-~74: There might be a mistake here.
Context: ...tor/.py` (full typing - PID:K-1) - [ ] T016 [US1] Logging additions (INFO l...
(QB_NEW_EN)
[grammar] ~75-~75: There might be a mistake here.
Context: ...ails) without secrets (PID:D-1, PID:I-1) - [ ] T017 [US1] Ensure deterministic orde...
(QB_NEW_EN)
[grammar] ~76-~76: There might be a mistake here.
Context: ...rministic ordering adjustments (PID:B-2) - [ ] T018 [US1] Capture performance metri...
(QB_NEW_EN)
[grammar] ~95-~95: There might be a mistake here.
Context: ...c in existing module (maintain typing - PID:K-1) - [ ] T021 [US2] Update records build...
(QB_NEW_EN)
[grammar] ~95-~95: There might be a mistake here.
Context: ...sting module (maintain typing - PID:K-1) - [ ] T021 [US2] Update records builder en...
(QB_NEW_EN)
[grammar] ~96-~96: There might be a mistake here.
Context: ...ing no cross-module exceptions (PID:F-1) - [ ] T022 [US2] Update/extend performance...
(QB_NEW_EN)
[grammar] ~116-~116: There might be a mistake here.
Context: ...ments (concise, logic-focused) (PID:G-2) - [ ] T026 [US3] Add/adjust TODOs with iss...
(QB_NEW_EN)
[grammar] ~117-~117: There might be a mistake here.
Context: ...st TODOs with issue references (PID:G-3) - [ ] T027 [US3] Re-run performance snapsh...
(QB_NEW_EN)
[grammar] ~128-~128: There might be a mistake here.
Context: ...zation / confirm within budget (PID:E-1) - [ ] TXXX Security/robustness improvement...
(QB_NEW_EN)
[grammar] ~129-~129: There might be a mistake here.
Context: ...curity/robustness improvements (PID:I-1) - [ ] TXXX TODO sweep: ensure all TODOs ha...
(QB_NEW_EN)
.specify/templates/spec-template.md
[grammar] ~5-~5: There might be a mistake here.
Context: ...<prefix> ∈ {feature, fix, docs, chore} Created: [DATE] Status: Draft ...
(QB_NEW_EN)
[grammar] ~6-~6: There might be a mistake here.
Context: ... fix, docs, chore} Created: [DATE] Status: Draft Input: User descri...
(QB_NEW_EN)
[grammar] ~7-~7: There might be a mistake here.
Context: ... Created: [DATE] Status: Draft Input: User description: "$ARGUMENTS" ...
(QB_NEW_EN)
[grammar] ~10-~10: There might be a mistake here.
Context: ..." ## Constitution Alignment (Mandatory) *Refer to .specify/memory/principles.md...
(QB_NEW_EN)
[grammar] ~11-~11: There might be a mistake here.
Context: ...vant numbers and compliance notes here.* List how this feature will comply with c...
(QB_NEW_EN)
.specify/constitution.md
[grammar] ~112-~112: There might be a mistake here.
Context: .../ fix / docs / chore PRs MUST originate from correctly prefixed branch (PID:H-1); CI...
(QB_NEW_EN)
[grammar] ~132-~132: There might be a mistake here.
Context: ...ee PID:G-1) — introduce usage or delete in same PR. - Branch naming compliance (PI...
(QB_NEW_EN)
[grammar] ~132-~132: There might be a mistake here.
Context: ... — introduce usage or delete in same PR. - Branch naming compliance (PID:H-1) — all...
(QB_NEW_EN)
[grammar] ~210-~210: There might be a mistake here.
Context: ...endments tracked via Sync Impact Report at top of this file. ## Core Principles ...
(QB_NEW_EN)
[grammar] ~214-~214: There might be a mistake here.
Context: ...en externalized to a single source file: /.specify/memory/principles.md. Princ...
(QB_NEW_EN)
docs/configuration_reference.md
[grammar] ~52-~52: There might be a mistake here.
Context: ...een order. ### Custom Chapters Behavior - A record (issue / PR / hierarchy issue) ...
(QB_NEW_EN)
[grammar] ~53-~53: There might be a mistake here.
Context: ...igible for a user-defined chapter if it: - Is not skipped (no skip label), and - ...
(QB_NEW_EN)
[grammar] ~54-~54: There might be a mistake here.
Context: ... - Is not skipped (no skip label), and - Contains a change increment, and - Has...
(QB_NEW_EN)
[grammar] ~55-~55: There might be a mistake here.
Context: ...and - Contains a change increment, and - Has at least one label intersecting the ...
(QB_NEW_EN)
[grammar] ~56-~56: There might be a mistake here.
Context: ...el intersecting the chapter’s label set. - Direct commits are excluded (no labels)....
(QB_NEW_EN)
[grammar] ~58-~58: There might be a mistake here.
Context: ...bels` is used and a warning logged once. - Multi-label tokens may be separated by c...
(QB_NEW_EN)
[grammar] ~63-~63: There might be a mistake here.
Context: ...abled, normalized label sets are logged at DEBUG level. ### Issue ↔ PR Linking Li...
(QB_NEW_EN)
CONTRIBUTING.md
[grammar] ~28-~28: There might be a mistake here.
Context: ...ant Issue. ## Branch Naming (PID:H-1) Branches MUST start with one of the allo...
(QB_NEW_EN)
.specify/memory/principles.md
[grammar] ~7-~7: There might be a mistake here.
Context: ...roduced later). - A. Testing & Quality - [B. Configuration & Determinism](#b-confi...
(QB_NEW_EN)
[grammar] ~8-~8: There might be a mistake here.
Context: ...ality) - B. Configuration & Determinism - [C. Architecture & Extensibility](#c-arch...
(QB_NEW_EN)
[grammar] ~9-~9: There might be a mistake here.
Context: ...nism) - C. Architecture & Extensibility - [D. Observability & Diagnostics](#d-obser...
(QB_NEW_EN)
[grammar] ~10-~10: There might be a mistake here.
Context: ...ility) - D. Observability & Diagnostics - [E. Performance & Resource Efficiency](#e...
(QB_NEW_EN)
[grammar] ~11-~11: There might be a mistake here.
Context: ... - E. Performance & Resource Efficiency - [F. Error Handling & Resilience](#f-error...
(QB_NEW_EN)
[grammar] ~12-~12: There might be a mistake here.
Context: ...iency) - F. Error Handling & Resilience - [G. Code Hygiene & Technical Debt](#g-cod...
(QB_NEW_EN)
[grammar] ~13-~13: There might be a mistake here.
Context: ...nce) - G. Code Hygiene & Technical Debt - [H. Workflow & Version Control](#h-workfl...
(QB_NEW_EN)
[grammar] ~14-~14: There might be a mistake here.
Context: ...l-debt) - H. Workflow & Version Control - [I. Security & Compliance](#i-security--c...
(QB_NEW_EN)
[grammar] ~15-~15: There might be a mistake here.
Context: ...ion-control) - I. Security & Compliance - [J. Documentation & Knowledge Management]...
(QB_NEW_EN)
[grammar] ~16-~16: There might be a mistake here.
Context: ...J. Documentation & Knowledge Management - K. Python Specific ...
(QB_NEW_EN)
[grammar] ~23-~23: There might be a mistake here.
Context: ...iple 1: Test‑First Reliability [PID:A-1] All core logic (mining, filtering, recor...
(QB_NEW_EN)
[grammar] ~24-~24: There might be a mistake here.
Context: ...unit tests written before implementation and passing after. Refactors MUST preser...
(QB_NEW_EN)
[grammar] ~28-~28: There might be a mistake here.
Context: ...inciple 2: Test Path Mirroring [PID:A-2] Unit tests MUST mirror source file paths...
(QB_NEW_EN)
[grammar] ~38-~38: There might be a mistake here.
Context: ...Minimal Narrative in Test Code [PID:A-3] Unit test files MUST NOT include narrati...
(QB_NEW_EN)
[grammar] ~39-~39: There might be a mistake here.
Context: ...bing the “latest change”, PR summary, or revision history. Tests SHOULD communica...
(QB_NEW_EN)
[grammar] ~40-~40: There might be a mistake here.
Context: ...HOULD communicate intent purely through: - Descriptive test function / fixture name...
(QB_NEW_EN)
[grammar] ~41-~41: There might be a mistake here.
Context: ...escriptive test function / fixture names - Clear given/when/then structure in code ...
(QB_NEW_EN)
[grammar] ~42-~42: There might be a mistake here.
Context: ...ode (optionally via blank line grouping) - Focused inline comments ONLY for non-obv...
(QB_NEW_EN)
[grammar] ~43-~43: There might be a mistake here.
Context: ...r non-obvious setup or domain invariants Rules: - Prohibited: headers like `# Add...
(QB_NEW_EN)
[grammar] ~44-~44: There might be a mistake here.
Context: ...bvious setup or domain invariants Rules: - Prohibited: headers like `# Added in PR ...
(QB_NEW_EN)
[grammar] ~45-~45: There might be a mistake here.
Context: ... changes`, or date-stamped change notes. - Historical rationale belongs in commit m...
(QB_NEW_EN)
[grammar] ~46-~46: There might be a mistake here.
Context: ...sages / PR description, not test bodies. - If a complex regression scenario require...
(QB_NEW_EN)
[grammar] ~51-~51: There might be a mistake here.
Context: ...meral Change Comments in Tests [PID:A-4] Unit tests MUST NOT contain comments tha...
(QB_NEW_EN)
[grammar] ~52-~52: There might be a mistake here.
Context: ...); tests express enduring behavior only. Rules: - Allowed comments: clarify domai...
(QB_NEW_EN)
[grammar] ~53-~53: There might be a mistake here.
Context: ...s express enduring behavior only. Rules: - Allowed comments: clarify domain intent,...
(QB_NEW_EN)
[grammar] ~54-~54: There might be a mistake here.
Context: ...etup rationale, edge-case justification. - Prohibited markers: dates, “recent”, “ne...
(QB_NEW_EN)
[grammar] ~55-~55: There might be a mistake here.
Context: ...s unless part of a reproducible fixture. - Historical context belongs in PR descrip...
(QB_NEW_EN)
[grammar] ~67-~67: There might be a mistake here.
Context: ...flags or undeclared env vars prohibited. Add inputs → MINOR version bump; rename/...
(QB_NEW_EN)
[grammar] ~73-~73: There might be a mistake here.
Context: ...consistent (additions allowed; removals require MAJOR bump). Rationale: Stable diffs & ...
(QB_NEW_EN)
[grammar] ~73-~73: There might be a mistake here.
Context: ...s allowed; removals require MAJOR bump). Rationale: Stable diffs & reliable downs...
(QB_NEW_EN)
[grammar] ~86-~86: There might be a mistake here.
Context: ...breaking behavior. Provide opt-in flags if impact uncertain. Document additions in...
(QB_NEW_EN)
[grammar] ~86-~86: There might be a mistake here.
Context: ...behavior. Provide opt-in flags if impact uncertain. Document additions in README ...
(QB_NEW_EN)
[grammar] ~95-~95: There might be a mistake here.
Context: ... build done → finish. Errors logged with context; verbose flag unlocks extra diag...
(QB_NEW_EN)
[grammar] ~96-~96: There might be a mistake here.
Context: ...a diagnostics without altering behavior. Rationale: Fast debugging in ephemeral C...
(QB_NEW_EN)
[grammar] ~105-~105: There might be a mistake here.
Context: ...cumented soft performance budget. Rules: - Disable hierarchy expansion when feature...
(QB_NEW_EN)
[grammar] ~106-~106: There might be a mistake here.
Context: ... feature off to avoid unnecessary calls. - Avoid redundant fetches (cache IDs once ...
(QB_NEW_EN)
[grammar] ~108-~108: There might be a mistake here.
Context: ...ed, PRs processed, remaining rate limit. - Soft API call target: ≤ 3 * (issues + PR...
(QB_NEW_EN)
[grammar] ~110-~110: There might be a mistake here.
Context: ...hierarchy mining with a warning (do not fail build). - Performance baselines MUST be...
(QB_NEW_EN)
[grammar] ~110-~110: There might be a mistake here.
Context: ...ning with a warning (do not fail build). - Performance baselines MUST be periodical...
(QB_NEW_EN)
[grammar] ~120-~120: There might be a mistake here.
Context: ....g., missing auth token) may exit early at entry point. Rationale: Predictable act...
(QB_NEW_EN)
[grammar] ~120-~120: There might be a mistake here.
Context: ...th token) may exit early at entry point. Rationale: Predictable action completion...
(QB_NEW_EN)
[grammar] ~127-~127: There might be a mistake here.
Context: ...ciple 1: Dead Code Prohibition [PID:G-1] Unused functions/methods (except propert...
(QB_NEW_EN)
[grammar] ~128-~128: There might be a mistake here.
Context: ...ired inherited methods) MUST be removed in same PR that obsoletes them. Utility fi...
(QB_NEW_EN)
[grammar] ~128-~128: There might be a mistake here.
Context: ... removed in same PR that obsoletes them. Utility files contain ONLY invoked logic...
(QB_NEW_EN)
[grammar] ~145-~145: There might be a mistake here.
Context: ...tention & Context Preservation [PID:G-4] Do NOT remove a still-valid explanatory ...
(QB_NEW_EN)
[grammar] ~146-~146: There might be a mistake here.
Context: ... explanation, domain constraint) unless: 1. The underlying code it clarifies is remo...
(QB_NEW_EN)
[grammar] ~147-~147: There might be a mistake here.
Context: ...so the comment is no longer accurate; OR 2. The comment’s information has been reloc...
(QB_NEW_EN)
[grammar] ~148-~148: There might be a mistake here.
Context: ...and an inline pointer is left if needed. Rules: - Deleting a comment that explain...
(QB_NEW_EN)
[grammar] ~149-~149: There might be a mistake here.
Context: ...inline pointer is left if needed. Rules: - Deleting a comment that explains a non-o...
(QB_NEW_EN)
[grammar] ~150-~150: There might be a mistake here.
Context: ...the PR description if the logic remains. - Transformational refactors SHOULD migrat...
(QB_NEW_EN)
[grammar] ~164-~164: There might be a mistake here.
Context: ...g a comment solely to reduce line count. - Replacing a specific rationale with a va...
(QB_NEW_EN)
[grammar] ~177-~177: There might be a mistake here.
Context: ...nts, refactors without behavioral change Examples: - `feature/add-hierarchy-suppo...
(QB_NEW_EN)
[grammar] ~184-~184: There might be a mistake here.
Context: ...e allowed set; otherwise branch renamed before PR. - Descriptor: lowercase kebab-case;...
(QB_NEW_EN)
[grammar] ~184-~184: There might be a mistake here.
Context: ...set; otherwise branch renamed before PR. - Descriptor: lowercase kebab-case; hyphen...
(QB_NEW_EN)
[grammar] ~188-~188: There might be a mistake here.
Context: ...mixing categories, uppercase, camelCase. - Scope alignment: PR description MUST ali...
(QB_NEW_EN)
[grammar] ~197-~197: There might be a mistake here.
Context: ...ent access limited to documented inputs. Rules: - Mask potentially sensitive subs...
(QB_NEW_EN)
[grammar] ~208-~208: There might be a mistake here.
Context: ...n‑Derived Rule Synchronization [PID:J-1] Normative statements (MUST/SHOULD/SHALL/...
(QB_NEW_EN)
[grammar] ~209-~209: There might be a mistake here.
Context: ...roject Markdown docs (e.g., README.md, CONTRIBUTING.md, DEVELOPER.md, any `...
(QB_NEW_EN)
[grammar] ~210-~210: There might be a mistake here.
Context: ...iled with this constitution & templates. Rules: - Every PR modifying *.md files t...
(QB_NEW_EN)
[grammar] ~211-~211: There might be a mistake here.
Context: ...th this constitution & templates. Rules: - Every PR modifying *.md files that adds/...
(QB_NEW_EN)
[grammar] ~213-~213: There might be a mistake here.
Context: ...ng Principle X” (explicit reference), OR 2. A Constitution amendment (new/updated pr...
(QB_NEW_EN)
[grammar] ~214-~214: There might be a mistake here.
Context: ...on amendment (new/updated principle), OR 3. Justification that wording is purely exp...
(QB_NEW_EN)
[grammar] ~215-~215: There might be a mistake here.
Context: ...new rule) using phrase: NON-NORMATIVE in PR description. - If conflict between d...
(QB_NEW_EN)
[grammar] ~215-~215: There might be a mistake here.
Context: ...rase: NON-NORMATIVE in PR description. - If conflict between doc text and a princ...
(QB_NEW_EN)
[grammar] ~216-~216: There might be a mistake here.
Context: ... either patch docs or amends principles in same PR. - Introduced process steps (e....
(QB_NEW_EN)
[grammar] ~216-~216: There might be a mistake here.
Context: ...ch docs or amends principles in same PR. - Introduced process steps (e.g., “run scr...
(QB_NEW_EN)
[grammar] ~217-~217: There might be a mistake here.
Context: ...vernance or quality gates section, OR (b) tasks template if feature-scoped. - A D...
(QB_NEW_EN)
[grammar] ~217-~217: There might be a mistake here.
Context: ...OR (b) tasks template if feature-scoped. - A Doc Rule Scan Script (planned) parses ...
(QB_NEW_EN)
[grammar] ~218-~218: There might be a mistake here.
Context: ...|SHOULD|SHALL|REQUIRED)\b` and fails CI unless reconciliation note present. - Template...
(QB_NEW_EN)
[grammar] ~218-~218: There might be a mistake here.
Context: ...s CI unless reconciliation note present. - Template Propagation: When new normative...
(QB_NEW_EN)
[grammar] ~219-~219: There might be a mistake here.
Context: ...n note present. - Template Propagation: When new normative doc rule is adopted, upda...
(QB_NEW_EN)
[grammar] ~219-~219: There might be a mistake here.
Context: ...lets, tasks-template path/quality gates. - Quarterly Audit: Run scan across repo; p...
(QB_NEW_EN)
[grammar] ~221-~221: There might be a mistake here.
Context: ...ibutor docs and enforceable governance; ensures single source of truth & predictable au...
(QB_NEW_EN)
[grammar] ~228-~228: There might be a mistake here.
Context: ... NON-DUPLICATIVE-JUSTIFICATION. Rules: - Prefer amending the primary example in Q...
(QB_NEW_EN)
[grammar] ~229-~229: There might be a mistake here.
Context: ... Start / dedicated feature doc sections. - If adding a variant (e.g., multi-label v...
(QB_NEW_EN)
[grammar] ~231-~231: There might be a mistake here.
Context: ...l lines rather than new isolated blocks at document tail. - Remove or consolidate ...
(QB_NEW_EN)
[grammar] ~231-~231: There might be a mistake here.
Context: ...an new isolated blocks at document tail. - Remove or consolidate superseded example...
(QB_NEW_EN)
[grammar] ~247-~247: There might be a mistake here.
Context: ...oad Any disallowed unless interacting with third-party library lacking stubs (just...
(QB_NEW_EN)
[grammar] ~247-~247: There might be a mistake here.
Context: ...y library lacking stubs (justify in PR). - Progressive enforcement: expand mypy cov...
(QB_NEW_EN)
[grammar] ~251-~251: There might be a mistake here.
Context: ...rinciple 2: Lean Python Design [PID:K-2] Prefer pure functions; introduce classes...
(QB_NEW_EN)
[grammar] ~253-~253: There might be a mistake here.
Context: ...nce; favor composition. Utility modules keep narrow surface. Rationale: Improves rea...
(QB_NEW_EN)
[grammar] ~253-~253: There might be a mistake here.
Context: ...on. Utility modules keep narrow surface. Rationale: Improves readability, testabi...
(QB_NEW_EN)
[grammar] ~259-~259: There might be a mistake here.
Context: ...el under Attributes). Scope Separation: - Class Docstrings: describe purpose, and ...
(QB_NEW_EN)
[grammar] ~260-~260: There might be a mistake here.
Context: ... describe purpose, and responsibilities. - Function / Method / init Docstrings:...
(QB_NEW_EN)
[grammar] ~263-~263: There might be a mistake here.
Context: ...unction / Method Template (RECOMMENDED): """ ...
(QB_NEW_EN)
[grammar] ~267-~267: There might be a mistake here.
Context: ...ntence imperative summary.> Parameters: - : - ... Returns: - <Description of value se...
(QB_NEW_EN)
[grammar] ~274-~274: There might be a mistake here.
Context: ...of value semantics.> Raises: (optional) - : """ Canonical Class Templ...
(QB_NEW_EN)
[grammar] ~275-~275: There might be a mistake here.
Context: ...optional) - : """ Canonical Class Template: """ <Clas...
(QB_NEW_EN)
[grammar] ~278-~278: There might be a mistake here.
Context: ...ondition> """ Canonical Class Template: """ <Class purpose in one sentence (decl...
(QB_NEW_EN)
[grammar] ~279-~279: There might be a mistake here.
Context: ...tion> """ Canonical Class Template: """ <Class purpose in one sentence (declarat...
(QB_NEW_EN)
[grammar] ~280-~280: There might be a mistake here.
Context: ...e sentence (declarative is acceptable).> """ Rules: - Triple double quotes; summ...
(QB_NEW_EN)
[grammar] ~286-~286: There might be a mistake here.
Context: ...state; avoid Parameters: / Returns:. - Either document init semantics in class ...
(QB_NEW_EN)
[grammar] ~287-~287: There might be a mistake here.
Context: ...rns:. - Either document init semantics in class docstring OR in init` docstr...
(QB_NEW_EN)
[grammar] ~287-~287: There might be a mistake here.
Context: ...ng OR in __init__ docstring, not both. - Generators: describe yielded semantics u...
(QB_NEW_EN)
[grammar] ~289-~289: There might be a mistake here.
Context: ...ngs when signatures / attributes change in same PR. - Avoid repeating obvious type...
(QB_NEW_EN)
[grammar] ~289-~289: There might be a mistake here.
Context: ...gnatures / attributes change in same PR. - Avoid repeating obvious type info alread...
(QB_NEW_EN)
[grammar] ~297-~297: There might be a mistake here.
Context: ...nd free of inline business logic. Rules: - Group order (separated by single blank l...
(QB_NEW_EN)
[grammar] ~298-~298: There might be a mistake here.
Context: ...order (separated by single blank lines): 1. Standard library 2. Third-party packag...
(QB_NEW_EN)
[grammar] ~299-~299: There might be a mistake here.
Context: ...ngle blank lines): 1. Standard library 2. Third-party packages 3. Local project ...
(QB_NEW_EN)
[grammar] ~300-~300: There might be a mistake here.
Context: ...andard library 2. Third-party packages 3. Local project modules (relative or absol...
(QB_NEW_EN)
[grammar] ~301-~301: There might be a mistake here.
Context: ...l project modules (relative or absolute) - Within each group, alphabetical (case-in...
(QB_NEW_EN)
[grammar] ~302-~302: There might be a mistake here.
Context: ...x import (...)` allowed for readability. - New imports MUST be inserted into their ...
(QB_NEW_EN)
[grammar] ~303-~303: There might be a mistake here.
Context: ...oup/location—never appended mid-file or at usage site. - Prohibited: late/function...
(QB_NEW_EN)
[grammar] ~303-~303: There might be a mistake here.
Context: ...ever appended mid-file or at usage site. - Prohibited: late/function-scope imports ...
(QB_NEW_EN)
[grammar] ~304-~304: There might be a mistake here.
Context: ...rt: circular dependency with `). - Remove unused imports in same PR that re...
(QB_NEW_EN)
[grammar] ~305-~305: There might be a mistake here.
Context: ...ith `). - Remove unused imports in same PR that renders them unused. - Wil...
(QB_NEW_EN)
[grammar] ~305-~305: There might be a mistake here.
Context: ...rts in same PR that renders them unused. - Wildcard imports (from x import *) for...
(QB_NEW_EN)
[grammar] ~306-~306: There might be a mistake here.
Context: ...d imports (from x import *) forbidden. Rationale: Improves clarity, reduces mer...
(QB_NEW_EN)
[grammar] ~311-~311: There might be a mistake here.
Context: ...ng the entire file unnecessarily. Rules: - Insert minimal diff: add the line in cor...
(QB_NEW_EN)
[grammar] ~312-~312: There might be a mistake here.
Context: ...es: - Insert minimal diff: add the line in correct alphabetical spot inside its gr...
(QB_NEW_EN)
[grammar] ~312-~312: There might be a mistake here.
Context: ...alphabetical spot inside its group only. - Do not reorder untouched neighboring imp...
(QB_NEW_EN)
[grammar] ~314-~314: There might be a mistake here.
Context: ...required (avoid churn-only diffs). - If introducing first member of a new group (e.g., firs...
(QB_NEW_EN)
[grammar] ~314-~314: There might be a mistake here.
Context: ...ducing first member of a new group (e.g., first third-party import in file), crea...
(QB_NEW_EN)
[grammar] ~314-~314: There might be a mistake here.
Context: ...w group (e.g., first third-party import in file), create the group with a single b...
(QB_NEW_EN)
[grammar] ~314-~314: There might be a mistake here.
Context: ...line separation consistent with PID:K-4. - Late imports inside functions require an...
(QB_NEW_EN)
[grammar] ~318-~318: There might be a mistake here.
Context: ...tire import block for a single addition. - Adding import adjacent to usage site mid...
(QB_NEW_EN)
README.md
[grammar] ~160-~160: There might be a mistake here.
Context: ...tc. | | [Duplicity Handling](docs/features/dup...
(QB_NEW_EN)
🔇 Additional comments (15)
release_notes_generator/generator.py (1)
23-23: LGTM! Defensive default aligns with BaseChapters property.The addition of
datetime.minas a fallback whendata.sinceis falsy provides a safe default that aligns with theBaseChapters.sinceproperty getter (which also returnsdatetime.minwhen_sinceis None). This ensures consistent behavior across the chapter filtering flow.Also applies to: 87-87
DEVELOPER.md (1)
183-202: Excellent documentation enhancement with PID-based governance.The updated branch naming section provides clear, actionable guidance with:
- Explicit allowed prefixes and their purposes
- Concrete examples for each prefix type
- Verification command for self-checking
- Forward-compatibility notes for future prefixes
This aligns with the broader shift to PID-based governance references and improves developer experience.
.specify/memory/principles.md (1)
1-323: Excellent governance centralization with clear PID-based structure.This new principles file successfully centralizes governance into a single source of truth with several strengths:
- Well-organized categorical structure (A-K) enabling cross-project reuse
- Each principle includes PID identifier, rationale, and detailed rules
- Comprehensive coverage from testing to Python-specific concerns
- Clear examples and anti-patterns where applicable
The static analysis grammar warnings on anchor links (e.g.,
#a-testing--quality) are false positives and can be safely ignored—this is standard Markdown anchor syntax.Note: The principle definitions are thorough and maintainable. Consider adding a table of contents at the top for easier navigation (already present at lines 7-17).
.specify/constitution.md (1)
3-10: Clean externalization of principles to single source of truth.The refactoring successfully:
- Moves principle definitions to
.specify/memory/principles.md- Replaces embedded text with a PID index for quick reference
- Maintains semantic governance unchanged (PATCH version 1.4.1)
- Updates cross-references throughout to use PID notation
This improves maintainability by establishing a single authoritative source for principles while keeping the constitution focused on project-specific governance structure.
Also applies to: 214-237
release_notes_generator/action_inputs.py (1)
220-229: Improved defensive handling for verbose input.The updated
get_verbose()function adds robustness:
- Explicit default
"false"for unset inputs (safe for test contexts)- Normalization handles None, whitespace, and case variations
- Preserves existing
RUNNER_DEBUGoverride behavior- Clear docstring documents safe non-GitHub usage
This prevents potential issues in unit/integration tests where GitHub Action inputs may not be populated.
docs/features/custom_chapters.md (1)
1-76: Comprehensive documentation for multi-label chapter support.The rewritten documentation excels in clarity and structure:
Strengths:
- Clear backward compatibility guidance (legacy
labelvs newlabels)- Explicit normalization rules with numbered steps (lines 19-26)
- Intersection-based inclusion logic clearly explained
- FAQ addresses common edge cases
- Examples cover comma-separated strings, YAML lists, and legacy format
- Deterministic output ordering guaranteed
The rules-based structure makes it easy for users to understand label parsing, validation, and chapter assignment behavior.
tests/integration/test_release_notes_snapshot.py (1)
1-74: Comprehensive integration tests for custom chapters feature.The new integration tests provide excellent coverage:
test_legacy_single_label_snapshot (lines 24-49):
- Validates backward compatibility with single-label format
- Verifies exact output matching for regression detection
- Tests label filtering (record with non-matching label excluded)
test_multi_label_integration_snapshot (lines 52-74):
- Exercises various label input formats (comma-separated, YAML list, newline-separated)
- Validates cross-chapter duplication (same record in multiple chapters)
- Confirms intra-chapter uniqueness
- Uses count-based assertions for flexible snapshot validation
The
build_mock_recordhelper (lines 7-21) provides a clean, minimal mock that matches theCustomChapters.populate()contract.Minor note: Test IDs (T001, T019) in comments are helpful for traceability if they align with your task tracking system.
.specify/templates/tasks-template.md (1)
5-5: Systematic PID-based reference update across task template.The template successfully migrates from numbered principles to PID notation:
Key improvements:
- HTML comment (line 5) prevents principle restatement in task files
- Consistent PID references throughout (A-1, G-3, E-1, K-1, etc.)
- Maintains all existing guidance and structure
- Clear cross-references to centralized principles.md
The conversion spans all phases (Setup, Foundational, User Stories 1-3, Polish) and the Notes section, ensuring developers can quickly look up principle details while keeping task files focused on implementation steps.
Also applies to: 11-11, 25-27, 36-41, 74-78, 95-97, 116-118, 128-130, 157-165
.specify/memory/constitution.md (1)
15-44: LGTM! Excellent governance refactoring.The externalization of principles to
principles.mdwith PID-based references is a clean architectural improvement that reduces duplication and enables independent principle scanning. The version bump to 1.7.1 is appropriate for this organizational change.tests/unit/release_notes_generator/chapters/test_custom_chapters.py (4)
178-193: LGTM! Helper reduces test duplication.The
_build_basic_recordhelper is a clean solution to avoid duplicating record setup logic across the new multi-label tests.
196-330: Excellent test coverage for multi-label functionality.The new tests comprehensively cover:
- Multi-label input variants (string, comma-separated, newline-separated, list)
- Label precedence (
labelsoverlabel)- Duplicate suppression within chapters
- Cross-chapter record appearance
- Invalid input handling (empty labels, wrong types)
- Missing required fields
- Unknown keys warnings
- Verbose debug logging
- Edge cases in
_normalize_labelsThe parametrized tests and explicit validation of warning messages demonstrate thorough testing discipline.
332-365: LGTM! Population edge cases well-covered.The tests properly verify the gating logic in
populate():
- Records without change increments are skipped
CommitRecordinstances are skipped (no labels)- Records with empty label lists are skipped
These align with the documented behavior in
docs/configuration_reference.mdlines 53-57.
126-128: Cross-chapter duplication is always allowed
Custom chapters ignoreduplicity-scope, so records matching multiple labels appear in every corresponding chapter.docs/configuration_reference.md (2)
11-11: LGTM! Clear documentation of multi-label syntax.The updated description and examples effectively communicate both the legacy single-label form and the new multi-label capabilities. The aggregation semantics explanation (whitespace trimming, duplicate removal, order preservation) is precise.
Also applies to: 42-50
52-63: Excellent comprehensive behavior documentation.The Custom Chapters Behavior section thoroughly documents:
- Eligibility criteria (all three conditions must be met)
- Exclusions (direct commits, skip labels)
- Precedence rules (
labelsoverlabel)- Tokenization (comma separation)
- Error handling (warnings for invalid definitions)
- Cross-chapter and intra-chapter duplication rules
- Ordering guarantees
- Debug logging in verbose mode
This level of detail will significantly help users understand and configure the feature correctly. The documentation aligns perfectly with the test coverage and implementation changes visible in the related code snippets.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
README.md(4 hunks)release_notes_generator/chapters/custom_chapters.py(2 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
release_notes_generator/chapters/custom_chapters.py (7)
release_notes_generator/action_inputs.py (2)
ActionInputs(64-518)get_verbose(220-229)release_notes_generator/chapters/base_chapters.py (3)
BaseChapters(28-116)add_row(67-78)populated_record_numbers_list(43-49)release_notes_generator/model/chapter.py (1)
Chapter(23-63)release_notes_generator/model/record/commit_record.py (3)
CommitRecord(13-87)contains_change_increment(77-78)to_chapter_row(63-75)release_notes_generator/model/record/record.py (5)
Record(32-258)contains_change_increment(166-172)skip(76-78)labels(81-90)to_chapter_row(154-163)release_notes_generator/model/record/issue_record.py (2)
contains_change_increment(158-162)to_chapter_row(130-156)release_notes_generator/model/record/pull_request_record.py (2)
contains_change_increment(148-149)to_chapter_row(124-146)
🪛 LanguageTool
README.md
[grammar] ~86-~86: There might be a mistake here.
Context: ...ing, ensure this version is available. | | Repository Permissions | The actio...
(QB_NEW_EN)
[grammar] ~160-~160: There might be a mistake here.
Context: ...tc. | | [Duplicity Handling](docs/features/dup...
(QB_NEW_EN)
🔇 Additional comments (8)
README.md (5)
52-54: Examples cover both legacy and multi-label inputs
Thanks for illustrating the legacy single-label path alongside the new comma-separated and list variants—this mirrors the parser’s backward compatibility and keeps readers grounded.
83-89: Requirements table now captures label semantics
The added guidance aboutlabelvslabels(with a concrete example) ties the docs to the new matching logic nicely.
94-99: Configuration matrix aligns with updated parser expectations
Calling out thatchaptersaccepts either key variant is spot-on and keeps the inputs table authoritative.
135-136: Workflow sample demonstrates mixed label definitions
Great to see both multi-label and single-label chapters in the same snippet—confirms users can blend them without surprises.
155-166: Feature index description matches new aggregation behavior
The Custom Chapters row now reflects multi-label aggregation accurately, keeping the feature catalog consistent.release_notes_generator/chapters/custom_chapters.py (3)
33-68: LGTM! Well-designed label normalization.The
_normalize_labelshelper correctly handles both string and list inputs, splits on newlines before commas (as documented), deduplicates while preserving order, and gracefully handles edge cases like empty tokens and non-string items.
76-105: LGTM! Simplified and correct population logic.The intersection-based approach (
any(lbl in ch.labels for lbl in record_labels)) correctly implements the spec requirement that "if a row contains any of the chapter's defined labels, it is added to that chapter." The check on line 101 ensures each record appears only once per chapter, even if it has multiple matching labels.
127-176: Comprehensive validation and backward compatibility.The method correctly handles:
- Both legacy single
labeland new multilabelskeys with clear precedence- Type validation for labels (str or list only)
- Empty label definitions after normalization
- Unknown keys with warnings
- Merging labels for existing chapters while preserving order
The verbose logging on lines 165-166 aids debugging, and the overall design maintains backward compatibility while enabling the new multi-label feature.
Summary by CodeRabbit
New Features
Documentation
Tests
Fixes #100