Skip to content

📝 docs(version-release): enforce git-derived PR refs and metrics#14575

Merged
Innei merged 3 commits into
canaryfrom
chore/version-release-skill-hardening
May 9, 2026
Merged

📝 docs(version-release): enforce git-derived PR refs and metrics#14575
Innei merged 3 commits into
canaryfrom
chore/version-release-skill-hardening

Conversation

@Innei

@Innei Innei commented May 9, 2026

Copy link
Copy Markdown
Member

Summary

Hardens the version-release skill so release-note drafting derives every fact from git, then splits the resulting 426-line file into a router + per-flow references.

Motivated by #14563, where the body cited 7 unmerged/non-existent PRs, 9 PR numbers had drifted off the underlying commits, and the "Since v…" base was set to v2.1.53 while main was already at v2.1.56.

Hard-rules (commit 1)

  • New Computing Inputs (Verify, Never Guess) section codifies:
    • $PREV_TAG = git describe --tags --abbrev=0 origin/main --match 'v*.*.*' … — the only correct compare base; picking the previous weekly's tag silently drops hotfixes.
    • Every (#XXXX) in the body must come from git log "$PREV_TAG..HEAD" --pretty='%s' --no-merges | grep -oE '\(#[0-9]+\)$'. Inferring PR numbers from feature descriptions is banned.
    • Metrics (PR_COUNT, COMMIT_COUNT, CONTRIBUTOR_COUNT) come from wc -l on the computed sets.
    • Author handles must be resolved via gh pr view --json author, not assumed from %an.
    • Pre-publish comm -23 body_prs actual_prs must be empty before gh pr edit.
    • Notes terminal-truncation pitfall (e.g. token-saving wrappers) and how to detect it.
  • Quick Checklist prepended with the five verification gates.
  • Patch action guide updated to use $PREV_TAG..weekly instead of main..canary for changelog inputs.
  • Team roster adds @cy948, plus commit-author-name aliases for @sudongyuer (Tsuki) and @rivertwilight (René Wang).

Split into router + references (commit 2)

SKILL.md was 426 lines covering three distinct flows. Each flow now lives next to its own checklist:

File Role Lines
SKILL.md Router: scope, overview, CI triggers, post-release automation, precheck, shared hard rules, routing pointers 98
reference/minor-release.md Minor flow (lifted from SKILL.md) 47
reference/patch-release-scenarios.md Patch flows (weekly / hotfix / model / DB migration) 127
reference/release-notes-style.md Long-form changelog standard, template, and Computing Inputs hard rules (lifted from SKILL.md) 264

Cross-links replace previous in-file jumps. Also fixes a prettier-mangled placeholder (< some-pr-by-them > was being parsed as shell redirect) by using $PR_NUMBER instead of an angle-bracket placeholder.

Why this matters

Both failure modes in #14563 were one verification command away from being caught at draft time. Encoding those commands as hard rules in the skill turns "the writer remembered to check" into "the skill can't be followed without checking." The split keeps SKILL.md short enough to be the entry point an agent actually reads end-to-end, with deep details paged in only for the active flow.

Test plan

  • Re-run the verification commands against 🚀 release: 20260509 #14563 with this skill loaded — comm -23 should be empty, metrics should match
  • Use the skill on the next weekly release and confirm $PREV_TAG resolves to the latest semver tag (not the previous weekly)
  • Confirm contributor classification handles new community contributors not in the roster (default to community + ask)

Add the skill's first-class hard rules for computing release-note inputs
from git instead of memory: latest-tag base via `git describe`, PR refs
from commit subjects, metric counts from `wc -l`, handle resolution via
`gh pr view`, and a pre-publish `comm -23` diff that must be empty.
Also adds @cy948 to the team roster and notes Tsuki / René Wang's
commit-author aliases so contributor classification stops drifting.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sorry @Innei, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@vercel

vercel Bot commented May 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lobehub Ready Ready Preview, Comment May 9, 2026 0:01am

Request Review

@dosubot dosubot Bot added the size:L This PR changes 100-499 lines, ignoring generated files. label May 9, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d648f9d8a6

ℹ️ 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".

Comment thread .agents/skills/version-release/SKILL.md Outdated
Comment on lines +249 to +250
gh pr view lobehub/lobe-chat --json author --jq '.author.login' < some-pr-by-them > --repo
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Fix invalid gh command for author handle lookup

The new mandatory author-resolution command is not executable as written: gh pr view expects [<number>|<url>|<branch>] [flags] and --repo requires a repository value, but this example passes lobehub/lobe-chat as the PR argument and leaves --repo valueless; additionally < some-pr-by-them > is parsed by the shell as redirection. In practice this step fails immediately, so contributors cannot be reliably mapped to GitHub handles during release-note generation.

Useful? React with 👍 / 👎.

…rences

SKILL.md was 426 lines covering three distinct flows. Split it so each
flow lives next to its own checklist:

- reference/minor-release.md — minor workflow (lifted from SKILL.md)
- reference/patch-release-scenarios.md — patch flows (existing)
- reference/release-notes-style.md — long-form changelog standard,
  template, and Computing Inputs hard rules (lifted from SKILL.md)

SKILL.md now reads as a router (~100 lines) with shared CI trigger
rules, post-release automation, precheck, and hard rules. Cross-links
between references replace the previous in-file jumps. Also fixes a
prettier-mangled redirect (`< some-pr-by-them >`) by using a `$PR`
variable instead of an angle-bracket placeholder.
@dosubot dosubot Bot added size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels May 9, 2026
@codecov

codecov Bot commented May 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.86%. Comparing base (c374892) to head (8725ce5).
⚠️ Report is 1 commits behind head on canary.

Additional details and impacted files
@@            Coverage Diff             @@
##           canary   #14575      +/-   ##
==========================================
- Coverage   68.86%   68.86%   -0.01%     
==========================================
  Files        2634     2634              
  Lines      232167   232167              
  Branches    29518    29519       +1     
==========================================
- Hits       159884   159883       -1     
- Misses      72133    72134       +1     
  Partials      150      150              
Flag Coverage Δ
app 63.53% <ø> (ø)
database 91.98% <ø> (ø)
packages/agent-runtime 80.50% <ø> (ø)
packages/builtin-tool-lobe-agent 83.41% <ø> (ø)
packages/context-engine 83.93% <ø> (ø)
packages/conversation-flow 92.43% <ø> (ø)
packages/file-loaders 87.60% <ø> (ø)
packages/memory-user-memory 74.74% <ø> (ø)
packages/model-bank 99.94% <ø> (ø)
packages/model-runtime 83.72% <ø> (ø)
packages/prompts 70.16% <ø> (ø)
packages/python-interpreter 92.90% <ø> (ø)
packages/ssrf-safe-fetch 0.00% <ø> (ø)
packages/types 4.86% <ø> (ø)
packages/utils 88.02% <ø> (ø)
packages/web-crawler 88.29% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
Store 66.90% <ø> (ø)
Services 54.16% <ø> (ø)
Server 70.62% <ø> (ø)
Libs 54.03% <ø> (ø)
Utils 79.95% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…ase-notes-style

The Canonical Structure was implicitly long-form (Minor / Weekly), and
hotfix authors had to read `changelog-example/hotfix.md` to learn it
existed. Make the divergence explicit:

- New § Variants for Shorter Releases describes Hotfix structure
  (Scope / What's Fixed / Upgrade / Owner) and DB Migration structure
  (Migration overview / Operator impact / Rollback) as overrides of the
  canonical long-form layout.
- Renamed the canonical section to "Canonical Structure (Long-Form:
  Minor / Weekly)" so the boundary is visible.
- Added Hotfix entry to Release Size Heuristics.
- Added a Hotfix subsection to Quick Checklist so the verification
  gates differ from long-form (no metric line / no Contributors / Owner
  resolved via gh).
@Innei Innei merged commit a09991a into canary May 9, 2026
35 checks passed
@Innei Innei deleted the chore/version-release-skill-hardening branch May 9, 2026 12:32
@arvinxx arvinxx mentioned this pull request May 12, 2026
Innei added a commit to Innei/lobehub that referenced this pull request May 12, 2026
…ehub#14575)

* 📝 docs(version-release): enforce git-derived PR refs and metrics

Add the skill's first-class hard rules for computing release-note inputs
from git instead of memory: latest-tag base via `git describe`, PR refs
from commit subjects, metric counts from `wc -l`, handle resolution via
`gh pr view`, and a pre-publish `comm -23` diff that must be empty.
Also adds @cy948 to the team roster and notes Tsuki / René Wang's
commit-author aliases so contributor classification stops drifting.

* ♻️ refactor(version-release): split skill into router + per-flow references

SKILL.md was 426 lines covering three distinct flows. Split it so each
flow lives next to its own checklist:

- reference/minor-release.md — minor workflow (lifted from SKILL.md)
- reference/patch-release-scenarios.md — patch flows (existing)
- reference/release-notes-style.md — long-form changelog standard,
  template, and Computing Inputs hard rules (lifted from SKILL.md)

SKILL.md now reads as a router (~100 lines) with shared CI trigger
rules, post-release automation, precheck, and hard rules. Cross-links
between references replace the previous in-file jumps. Also fixes a
prettier-mangled redirect (`< some-pr-by-them >`) by using a `$PR`
variable instead of an angle-bracket placeholder.

* 📝 docs(version-release): add Hotfix and DB Migration variants to release-notes-style

The Canonical Structure was implicitly long-form (Minor / Weekly), and
hotfix authors had to read `changelog-example/hotfix.md` to learn it
existed. Make the divergence explicit:

- New § Variants for Shorter Releases describes Hotfix structure
  (Scope / What's Fixed / Upgrade / Owner) and DB Migration structure
  (Migration overview / Operator impact / Rollback) as overrides of the
  canonical long-form layout.
- Renamed the canonical section to "Canonical Structure (Long-Form:
  Minor / Weekly)" so the boundary is visible.
- Added Hotfix entry to Release Size Heuristics.
- Added a Hotfix subsection to Quick Checklist so the verification
  gates differ from long-form (no metric line / no Contributors / Owner
  resolved via gh).
arvinxx pushed a commit that referenced this pull request May 12, 2026
)

* 📝 docs(version-release): enforce git-derived PR refs and metrics

Add the skill's first-class hard rules for computing release-note inputs
from git instead of memory: latest-tag base via `git describe`, PR refs
from commit subjects, metric counts from `wc -l`, handle resolution via
`gh pr view`, and a pre-publish `comm -23` diff that must be empty.
Also adds @cy948 to the team roster and notes Tsuki / René Wang's
commit-author aliases so contributor classification stops drifting.

* ♻️ refactor(version-release): split skill into router + per-flow references

SKILL.md was 426 lines covering three distinct flows. Split it so each
flow lives next to its own checklist:

- reference/minor-release.md — minor workflow (lifted from SKILL.md)
- reference/patch-release-scenarios.md — patch flows (existing)
- reference/release-notes-style.md — long-form changelog standard,
  template, and Computing Inputs hard rules (lifted from SKILL.md)

SKILL.md now reads as a router (~100 lines) with shared CI trigger
rules, post-release automation, precheck, and hard rules. Cross-links
between references replace the previous in-file jumps. Also fixes a
prettier-mangled redirect (`< some-pr-by-them >`) by using a `$PR`
variable instead of an angle-bracket placeholder.

* 📝 docs(version-release): add Hotfix and DB Migration variants to release-notes-style

The Canonical Structure was implicitly long-form (Minor / Weekly), and
hotfix authors had to read `changelog-example/hotfix.md` to learn it
existed. Make the divergence explicit:

- New § Variants for Shorter Releases describes Hotfix structure
  (Scope / What's Fixed / Upgrade / Owner) and DB Migration structure
  (Migration overview / Operator impact / Rollback) as overrides of the
  canonical long-form layout.
- Renamed the canonical section to "Canonical Structure (Long-Form:
  Minor / Weekly)" so the boundary is visible.
- Added Hotfix entry to Release Size Heuristics.
- Added a Hotfix subsection to Quick Checklist so the verification
  gates differ from long-form (no metric line / no Contributors / Owner
  resolved via gh).
lezi-fun pushed a commit to lezi-fun/lobehub that referenced this pull request May 13, 2026
…ehub#14575)

* 📝 docs(version-release): enforce git-derived PR refs and metrics

Add the skill's first-class hard rules for computing release-note inputs
from git instead of memory: latest-tag base via `git describe`, PR refs
from commit subjects, metric counts from `wc -l`, handle resolution via
`gh pr view`, and a pre-publish `comm -23` diff that must be empty.
Also adds @cy948 to the team roster and notes Tsuki / René Wang's
commit-author aliases so contributor classification stops drifting.

* ♻️ refactor(version-release): split skill into router + per-flow references

SKILL.md was 426 lines covering three distinct flows. Split it so each
flow lives next to its own checklist:

- reference/minor-release.md — minor workflow (lifted from SKILL.md)
- reference/patch-release-scenarios.md — patch flows (existing)
- reference/release-notes-style.md — long-form changelog standard,
  template, and Computing Inputs hard rules (lifted from SKILL.md)

SKILL.md now reads as a router (~100 lines) with shared CI trigger
rules, post-release automation, precheck, and hard rules. Cross-links
between references replace the previous in-file jumps. Also fixes a
prettier-mangled redirect (`< some-pr-by-them >`) by using a `$PR`
variable instead of an angle-bracket placeholder.

* 📝 docs(version-release): add Hotfix and DB Migration variants to release-notes-style

The Canonical Structure was implicitly long-form (Minor / Weekly), and
hotfix authors had to read `changelog-example/hotfix.md` to learn it
existed. Make the divergence explicit:

- New § Variants for Shorter Releases describes Hotfix structure
  (Scope / What's Fixed / Upgrade / Owner) and DB Migration structure
  (Migration overview / Operator impact / Rollback) as overrides of the
  canonical long-form layout.
- Renamed the canonical section to "Canonical Structure (Long-Form:
  Minor / Weekly)" so the boundary is visible.
- Added Hotfix entry to Release Size Heuristics.
- Added a Hotfix subsection to Quick Checklist so the verification
  gates differ from long-form (no metric line / no Contributors / Owner
  resolved via gh).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant