Skip to content

Commit 030941f

Browse files
k-wallclaude
andcommitted
Implement PR-number-based proposal workflow
This change simplifies the proposal numbering system by using PR numbers as proposal identifiers, eliminating number collisions and removing the need for a separate allocation process. Changes: - Simplified proposals/README.md to focus on author workflow - Removed index tables (directory listing serves as the index) - Streamlined instructions for creating and renaming proposals - Updated proposal template with workflow instructions - Added GitHub workflow to automatically check proposal numbering - Updates PR description when proposal files don't match PR number - Provides exact commands to fix naming issues - Removes warning once corrected - Added MIGRATION_GUIDE.md with specific instructions for open PRs Proposals 001-019 retain their original numbers. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent f78133a commit 030941f

4 files changed

Lines changed: 304 additions & 55 deletions

File tree

Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
name: Check Proposal Numbering
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
paths:
7+
- 'proposals/*.md'
8+
9+
permissions:
10+
pull-requests: write
11+
contents: read
12+
13+
jobs:
14+
check-numbering:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
22+
- name: Check proposal file numbering
23+
id: check
24+
env:
25+
PR_NUMBER: ${{ github.event.pull_request.number }}
26+
run: |
27+
# Find all .md files directly in proposals directory (not subdirectories)
28+
ALL_PROPOSAL_FILES=$(git diff --name-only origin/${{ github.base_ref }}...HEAD | grep '^proposals/[^/]*\.md$' || true)
29+
30+
# Filter out non-proposal files (README.md and template)
31+
PROPOSAL_FILES=""
32+
for file in $ALL_PROPOSAL_FILES; do
33+
# Skip README.md and the template
34+
if [[ "$file" == "proposals/README.md" ]] || [[ "$file" == "proposals/000-template.md" ]]; then
35+
continue
36+
fi
37+
PROPOSAL_FILES="$PROPOSAL_FILES $file"
38+
done
39+
40+
if [ -z "$PROPOSAL_FILES" ]; then
41+
echo "No proposal files found in this PR"
42+
echo "has_proposal=false" >> $GITHUB_OUTPUT
43+
exit 0
44+
fi
45+
46+
echo "has_proposal=true" >> $GITHUB_OUTPUT
47+
48+
# Expected filename pattern: proposals/0{PR_NUMBER}-*.md
49+
EXPECTED_PREFIX=$(printf "proposals/%03d-" $PR_NUMBER)
50+
51+
INCORRECT_FILES=""
52+
for file in $PROPOSAL_FILES; do
53+
if [[ ! "$file" =~ ^${EXPECTED_PREFIX} ]]; then
54+
INCORRECT_FILES="$INCORRECT_FILES\n- \`$file\`"
55+
fi
56+
done
57+
58+
if [ -n "$INCORRECT_FILES" ]; then
59+
echo "incorrect=true" >> $GITHUB_OUTPUT
60+
echo "files<<EOF" >> $GITHUB_OUTPUT
61+
echo -e "$INCORRECT_FILES" >> $GITHUB_OUTPUT
62+
echo "EOF" >> $GITHUB_OUTPUT
63+
echo "expected_prefix=$EXPECTED_PREFIX" >> $GITHUB_OUTPUT
64+
else
65+
echo "incorrect=false" >> $GITHUB_OUTPUT
66+
fi
67+
68+
- name: Update PR description if numbering is incorrect
69+
if: steps.check.outputs.incorrect == 'true'
70+
uses: actions/github-script@v7
71+
with:
72+
script: |
73+
const prNumber = context.payload.pull_request.number;
74+
const expectedPrefix = '${{ steps.check.outputs.expected_prefix }}';
75+
const incorrectFiles = `${{ steps.check.outputs.files }}`;
76+
77+
const warningSection = `
78+
---
79+
80+
## ⚠️ Proposal File Numbering
81+
82+
This PR contains proposal files that don't follow the expected numbering scheme:
83+
84+
${incorrectFiles}
85+
86+
**Expected naming:** \`${expectedPrefix}<descriptive-name>.md\`
87+
88+
Please rename your proposal file to use PR #${prNumber}:
89+
90+
\`\`\`bash
91+
git mv proposals/000-<name>.md ${expectedPrefix}<name>.md
92+
# or rename from current name to correct name
93+
git commit -m "Rename proposal to use PR number ${prNumber}"
94+
git push
95+
\`\`\`
96+
97+
See [proposals/README.md](https://github.com/kroxylicious/design/blob/main/proposals/README.md) for the complete workflow.
98+
99+
<!-- proposal-numbering-check -->`;
100+
101+
// Get current PR
102+
const { data: pr } = await github.rest.pulls.get({
103+
owner: context.repo.owner,
104+
repo: context.repo.repo,
105+
pull_number: prNumber,
106+
});
107+
108+
let currentBody = pr.body || '';
109+
110+
// Remove existing warning section if present
111+
const markerRegex = /---\s*\n\s*##\s*⚠️\s*Proposal File Numbering[\s\S]*?<!-- proposal-numbering-check -->/;
112+
currentBody = currentBody.replace(markerRegex, '').trim();
113+
114+
// Append new warning section
115+
const newBody = currentBody + '\n' + warningSection;
116+
117+
await github.rest.pulls.update({
118+
owner: context.repo.owner,
119+
repo: context.repo.repo,
120+
pull_number: prNumber,
121+
body: newBody
122+
});
123+
124+
- name: Remove warning from PR description if numbering is correct
125+
if: steps.check.outputs.has_proposal == 'true' && steps.check.outputs.incorrect == 'false'
126+
uses: actions/github-script@v7
127+
with:
128+
script: |
129+
const prNumber = context.payload.pull_request.number;
130+
131+
// Get current PR
132+
const { data: pr } = await github.rest.pulls.get({
133+
owner: context.repo.owner,
134+
repo: context.repo.repo,
135+
pull_number: prNumber,
136+
});
137+
138+
let currentBody = pr.body || '';
139+
140+
// Check if warning section exists
141+
const markerRegex = /---\s*\n\s*##\s*⚠️\s*Proposal File Numbering[\s\S]*?<!-- proposal-numbering-check -->/;
142+
143+
if (markerRegex.test(currentBody)) {
144+
// Remove warning section
145+
const newBody = currentBody.replace(markerRegex, '').trim();
146+
147+
await github.rest.pulls.update({
148+
owner: context.repo.owner,
149+
repo: context.repo.repo,
150+
pull_number: prNumber,
151+
body: newBody
152+
});
153+
154+
console.log('Removed numbering warning from PR description - file is now correctly named');
155+
}

MIGRATION_GUIDE.md

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
# Proposal Numbering Migration Guide
2+
3+
This guide contains the migration instructions for existing open proposal PRs to adopt the new PR-number-based numbering system.
4+
5+
## Background
6+
7+
We've adopted a new proposal numbering system where proposal numbers match their PR numbers. This eliminates collisions and simplifies the workflow.
8+
9+
## Migration Instructions by PR
10+
11+
### PR #70 - Routing API
12+
**Current file:** `proposals/004-routing-api.md`
13+
**New file:** `proposals/070-routing-api.md`
14+
15+
```bash
16+
git mv proposals/004-routing-api.md proposals/070-routing-api.md
17+
git commit -m "Rename proposal to use PR number 70"
18+
git push
19+
```
20+
21+
### PR #82 - Kroxylicious 1.0
22+
**Current file:** `proposals/007-kroxylicious-1.0.md`
23+
**New file:** `proposals/082-kroxylicious-1.0.md`
24+
25+
```bash
26+
git mv proposals/007-kroxylicious-1.0.md proposals/082-kroxylicious-1.0.md
27+
git commit -m "Rename proposal to use PR number 82"
28+
git push
29+
```
30+
31+
### PR #83 - Hot Reload Feature
32+
**Current file:** `proposals/012-hot-reload-feature.md`
33+
**New file:** `proposals/083-hot-reload-feature.md`
34+
35+
```bash
36+
git mv proposals/012-hot-reload-feature.md proposals/083-hot-reload-feature.md
37+
git commit -m "Rename proposal to use PR number 83"
38+
git push
39+
```
40+
41+
### PR #85 - Audit Logging
42+
**Current file:** `proposals/nnn-audit-logging.md`
43+
**New file:** `proposals/085-audit-logging.md`
44+
45+
```bash
46+
git mv proposals/nnn-audit-logging.md proposals/085-audit-logging.md
47+
git commit -m "Rename proposal to use PR number 85"
48+
git push
49+
```
50+
51+
### PR #88 - Frontend Handler Refactoring
52+
**Current file:** `proposals/014-frontend-handler-refactoring-and-centralised-session-context.md`
53+
**New file:** `proposals/088-frontend-handler-refactoring-and-centralised-session-context.md`
54+
55+
```bash
56+
git mv proposals/014-frontend-handler-refactoring-and-centralised-session-context.md proposals/088-frontend-handler-refactoring-and-centralised-session-context.md
57+
git commit -m "Rename proposal to use PR number 88"
58+
git push
59+
```
60+
61+
### PR #93 - Correlated Request/Response Data API
62+
**Current file:** `proposals/xxx-correlated-request-response-data-api.md`
63+
**New file:** `proposals/093-correlated-request-response-data-api.md`
64+
65+
```bash
66+
git mv proposals/xxx-correlated-request-response-data-api.md proposals/093-correlated-request-response-data-api.md
67+
git commit -m "Rename proposal to use PR number 93"
68+
git push
69+
```
70+
71+
### PR #94 - TLS Configuration Deprecation
72+
**Current file:** `proposals/nnn-tls-configuration.md`
73+
**New file:** `proposals/094-tls-configuration.md`
74+
75+
```bash
76+
git mv proposals/nnn-tls-configuration.md proposals/094-tls-configuration.md
77+
git commit -m "Rename proposal to use PR number 94"
78+
git push
79+
```
80+
81+
## Comment Template for PR Authors
82+
83+
Use this template to comment on each PR:
84+
85+
---
86+
87+
Hi! We've updated the proposal numbering system to use PR numbers instead of sequential allocation. This eliminates number collisions and simplifies the workflow.
88+
89+
**Action required:** Please rename your proposal file to use this PR's number.
90+
91+
**Current file:** `proposals/XXX-name.md`
92+
**New file:** `proposals/0YY-name.md`
93+
94+
```bash
95+
git mv proposals/XXX-name.md proposals/0YY-name.md
96+
git commit -m "Rename proposal to use PR number YY"
97+
git push
98+
```
99+
100+
See [proposals/README.md](https://github.com/kroxylicious/design/blob/main/proposals/README.md) for the updated workflow. Going forward, a GitHub Action will automatically remind you if the filename doesn't match the PR number.
101+
102+
---
103+
104+
## After Migration
105+
106+
Once all open PRs have been renamed:
107+
- The GitHub workflow will automatically check new proposals
108+
- No manual index maintenance is needed - the directory listing is the index
109+
- Proposal numbers will match PR numbers going forward

proposals/000-template.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,21 @@
1-
<!-- This template is provided as an example with sections you may wish to comment on with respect to your proposal. Add or remove sections as required to best articulate the proposal. -->
1+
<!--
2+
PROPOSAL WORKFLOW:
3+
1. Copy this template to: proposals/000-<descriptive-name>.md
4+
2. Fill in your proposal content
5+
3. Open a PR on GitHub
6+
4. Rename the file to use your PR number: proposals/<PR#>-<descriptive-name>.md
7+
Example: git mv proposals/000-my-feature.md proposals/105-my-feature.md
8+
5. Push the rename to your PR
9+
10+
See proposals/README.md for complete instructions.
11+
12+
This template is provided as an example with sections you may wish to comment on with respect to your proposal. Add or remove sections as required to best articulate the proposal.
13+
-->
214

315
# <Title>
416

17+
**Proposal**: #<PR-NUMBER> <!-- Update this after opening your PR -->
18+
519
Provide a brief summary of the feature you are proposing to add to Kroxylicious.
620

721
## Current situation

proposals/README.md

Lines changed: 25 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,37 @@
11
# Kroxylicious Proposals
22

3-
This repository lists proposals for the Kroxylicious project.
3+
This directory contains proposals for the Kroxylicious project.
44

5-
## For Proposal Authors
5+
## Creating a New Proposal
66

7-
When creating a new proposal:
7+
1. **Create your proposal file** using a placeholder name based on the [template](./000-template.md):
8+
```
9+
proposals/000-<descriptive-name>.md
10+
```
811

9-
1. Create your proposal PR with a temporary filename (e.g. `proposals/nnn-my-proposal.md`) based on the [template](./000-template.md).
10-
2. After your proposal PR is created, raise a **separate PR** updating this README file to:
11-
- Allocate your proposal the next sequential number
12-
- Add an entry in the "Open Proposals" table below
13-
- Link to your proposal PR
14-
- Announce your proposal on the mailing list (https://kroxylicious.io/join-us/mailing-lists/)
15-
3. Once the REAME PRs is merged, rename your proposal file to use the allocated number
16-
4. When your proposal is approved and about to to be merged:
17-
- Move your proposal from the "Open Proposals" table to the "Accepted Proposals" table
18-
- Update the link to point to the merged file instead of the PR
12+
2. **Commit and open a Pull Request**:
13+
- Push your branch and open a PR on GitHub
14+
- Note your PR number (e.g., #105)
1915

20-
This process ensures proposal numbers are allocated in chronological order and avoids conflicts.
16+
3. **Rename the file** to use your PR number (three-digit zero-padded):
17+
```bash
18+
git mv proposals/000-<descriptive-name>.md proposals/105-<descriptive-name>.md
19+
git commit -m "Rename proposal to use PR number"
20+
git push
21+
```
2122

22-
## Open Proposals (Pull Requests)
23+
4. **Announce** your proposal on the [mailing list](https://kroxylicious.io/join-us/mailing-lists/)
2324

24-
Proposals are numbered in chronological order by PR creation date.
25+
When your proposal is **accepted and merged**, the proposal number remains the same as the PR number.
2526

26-
⚠️ **Note:** Some proposals have number collisions with accepted proposals and need to be renumbered:
27-
- PR #70 (currently 004) → should be 016
28-
- PR #82 (currently 007) → should be 017
29-
- PR #83 (currently 012) → should be 018
30-
- PR #85 (currently nnn) → should be 019
31-
- PR #88 (currently 014) → should be 020
32-
- PR #89 (currently 016) → should be 021
33-
- PR #92 (currently xxx) → should be 022
34-
- PR #93 (currently xxx) → should be 023
35-
- PR #94 (currently nnn) → should be 024
27+
## Finding Proposals
3628

37-
| # | Title | PR |
38-
|:--:|:----------------------------------------------------------------------|:--:|
39-
| 24 | [Cleaning up TLS configurations](https://github.com/kroxylicious/design/pull/94) | [#94](https://github.com/kroxylicious/design/pull/94) |
40-
| 23 | [Request/Response Contextual Data API](https://github.com/kroxylicious/design/pull/93) | [#93](https://github.com/kroxylicious/design/pull/93) |
41-
| 22 | [Migrate Kroxylicious Operator to Strimzi v1 API](https://github.com/kroxylicious/design/pull/92) | [#92](https://github.com/kroxylicious/design/pull/92) |
42-
| 21 | [Virtual Cluster Lifecycle](https://github.com/kroxylicious/design/pull/89) | [#89](https://github.com/kroxylicious/design/pull/89) ⚠️ |
43-
| 20 | [Frontend Handler Refactoring & Client Session Context](https://github.com/kroxylicious/design/pull/88) | [#88](https://github.com/kroxylicious/design/pull/88) ⚠️ |
44-
| 19 | [Audit logging](https://github.com/kroxylicious/design/pull/85) | [#85](https://github.com/kroxylicious/design/pull/85) |
45-
| 18 | [Changing Active Proxy Configuration (Hot Reload)](https://github.com/kroxylicious/design/pull/83) | [#83](https://github.com/kroxylicious/design/pull/83) ⚠️ |
46-
| 17 | [Kroxylicious 1.0 and patch releases](https://github.com/kroxylicious/design/pull/82) | [#82](https://github.com/kroxylicious/design/pull/82) ⚠️ |
47-
| 16 | [A Routing API](https://github.com/kroxylicious/design/pull/70) | [#70](https://github.com/kroxylicious/design/pull/70) ⚠️ |
29+
- **All proposals:** Browse the directory listing above
30+
- **Open proposals:** [View open proposal PRs](https://github.com/kroxylicious/design/pulls?q=is%3Apr+is%3Aopen+label%3Aproposal)
31+
- **Merged proposals:** Proposal files in this directory (sorted alphabetically)
4832

49-
## Accepted Proposals
33+
## Numbering
5034

51-
| # | Title |
52-
|:--:|:----------------------------------------------------------------------|
53-
| 15 | [Entity Isolation Filter](./015-entity-isolation.md) |
54-
| 14 | [Restrict Operator to a Configurable Set of Namespaces](./014-operator-namespace-restriction.md) |
55-
| 13 | [Upgrade Project JDK to Java 21](./013-upgrade-project-jdk-to-java-21.md) |
56-
| 11 | [Plugin API for selecting TLS client credentials for proxy-to-server connection](./011-plugin-api-to-select-tls-credentials-for-server-connection.md) |
57-
| 10 | [Extend the automatic discovery of bootstrap address feature to handle TLS listeners](./010-automatic-discovery-of-strimzi-bootstrap-server-tls.md) |
58-
| 9 | [Authorization Filter](./009-authorizer.md) |
59-
| 8 | [Resolve Topic Names from Topic IDs in the Filter Framework](./008-topic-name-lookup-facility.md) |
60-
| 7 | [Azure KMS Implementation](./007-azure-kms.md) |
61-
| 6 | [API to expose client SASL information to Filters](./006-filter-api-to-expose-client-sasl-info.md) |
62-
| 5 | [Filter API to expose client and server TLS info](./005-filter-api-to-expose-client-and-server-tls-info.md) |
63-
| 4 | [Terminology for Authentication](./004-terminology-for-authentication.md) |
64-
| 3 | [Improvements to Kroxylicious (Proxy) Metrics](./003-metric-improvements.md) |
65-
| 2 | [Automatically trigger a deployment rollout of affected proxies on Kubernetes config change](./002-Automaticly-reload-on-Kubernetes-config-change.md) |
66-
| 1 | [Kroxylicious Operator API (v1alpha)](./001-kroxylicious-operator-api-v1alpha.md) |
35+
Proposal numbers match PR numbers, using three-digit zero-padding (e.g., `092-`, `105-`).
36+
37+
Proposals 001-019 predate this system and retain their original numbers.

0 commit comments

Comments
 (0)