From a61d77b1bfad59d65240dc9a4e8cea114ca1768e Mon Sep 17 00:00:00 2001 From: Randy <857271370@qq.com> Date: Wed, 4 Nov 2026 14:31:09 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=F0=9F=93=84=20chore:=20license=20under=20M?= =?UTF-8?q?IT?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LICENSE | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..6e5a0e7 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Randy + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. From c62b98edefa010f51c94377b5ca910b63cf61a2f Mon Sep 17 00:00:00 2001 From: Randy <857271370@qq.com> Date: Wed, 4 Nov 2026 14:31:09 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=F0=9F=93=9D=20docs:=20add=20contribution?= =?UTF-8?q?=20and=20security=20guides=20with=20issue=20forms?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/ISSUE_TEMPLATE/bug_report.yml | 41 ++++++++++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 11 ++++++ .github/ISSUE_TEMPLATE/feature_request.yml | 22 ++++++++++++ .github/pull_request_template.md | 4 +++ CONTRIBUTING.md | 36 +++++++++++++++++++ SECURITY.md | 17 +++++++++ 6 files changed, 131 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml create mode 100644 .github/pull_request_template.md create mode 100644 CONTRIBUTING.md create mode 100644 SECURITY.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..ee58151 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,41 @@ +name: Bug report +description: Report incorrect behavior with a reproducible example. +body: + - type: markdown + attributes: + value: | + For security vulnerabilities, use [private reporting](https://github.com/batchstream/weir-protocol/security/advisories/new). + Remove credentials, private endpoints and document data from logs and configuration. + - type: input + id: version + attributes: + label: Protocol version + description: Module version from `go.mod`, or commit SHA. + validations: + required: true + - type: textarea + id: environment + attributes: + label: Environment + description: Go version and the server or SDK version that consumes this protocol. + validations: + required: true + - type: textarea + id: reproduction + attributes: + label: Steps to reproduce + description: Include the smallest request, script or test case that reproduces the problem. + validations: + required: true + - type: textarea + id: expected + attributes: + label: Expected and actual behavior + validations: + required: true + - type: textarea + id: diagnostics + attributes: + label: Logs and configuration + description: Relevant, redacted diagnostics. For performance issues, include the workload and resource limits. + render: text diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..a2e8bf2 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,11 @@ +blank_issues_enabled: true +contact_links: + - name: Documentation + url: https://github.com/batchstream/weir-protocol#readme + about: Usage and development guide for this repository. + - name: Weir server issues + url: https://github.com/batchstream/weir/issues + about: Report problems specific to the Weir server. + - name: Security vulnerability + url: https://github.com/batchstream/weir-protocol/security/advisories/new + about: Report a vulnerability privately. diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..027c13c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,22 @@ +name: Feature request +description: Propose an improvement to the Weir protocol. +body: + - type: textarea + id: problem + attributes: + label: Problem or use case + description: What are you trying to achieve, and what is difficult today? + validations: + required: true + - type: textarea + id: proposal + attributes: + label: Proposed behavior + description: Describe the desired API or user experience, with an example if possible. + validations: + required: true + - type: textarea + id: alternatives + attributes: + label: Alternatives and constraints + description: Existing workarounds, affected backends and operational constraints. diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..17c254e --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,4 @@ + + + diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..01bb513 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,36 @@ +# Contributing to the Weir protocol + +Focused fixes, documentation improvements, tests and proposals are welcome. Schema +changes reach every client and server, so open an +[issue](https://github.com/batchstream/weir-protocol/issues/new/choose) first and link the coordinated +[server](https://github.com/batchstream/weir) and [SDK](https://github.com/batchstream/weir-go) changes. + +## Report a problem + +Use the issue forms and include the protocol version, the server or SDK that +consumes it, the expected result and a minimal reproduction. Remove credentials and +private data from logs and configuration. + +For vulnerabilities, follow [SECURITY.md](SECURITY.md). + +## Work locally + +Install the Go version declared in [go.mod](go.mod). + +```sh +git clone https://github.com/batchstream/weir-protocol.git +cd weir-protocol +go test -race ./... +go vet ./... +``` + +Default tests use in-memory protocol data. To regenerate code, install the +[exact tool versions](README.md#generate), then run `./scripts/generate.sh` and +`git diff --exit-code`. + +## Prepare a pull request + +- Keep the change focused and explain the observed problem and resulting behavior. +- Add a regression test when fixing behavior. +- Commit generated code from `scripts/generate.sh` together with the `.proto` change. +- Keep the dependency direction one-way: this module depends on neither the server nor the SDK. diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..78caf63 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,17 @@ +# Security policy + +## Report a vulnerability + +Use GitHub's private +[Report a vulnerability](https://github.com/batchstream/weir-protocol/security/advisories/new) +form. Include the affected protocol version or commit, reproduction steps, impact, +and relevant deployment settings with credentials and private data removed. +Please keep exploit details out of public issues while a report is being +investigated. + +## Versions + +Check whether an issue is still present on the +[latest release](https://github.com/batchstream/weir-protocol/releases/latest). Older releases do not have +a guaranteed security backport schedule. Report suspected vulnerabilities even if +you cannot reproduce them on the latest release. From 7bc0e1e3e1a0fed6094e86ef605da05097b3d5b1 Mon Sep 17 00:00:00 2001 From: Randy <857271370@qq.com> Date: Wed, 4 Nov 2026 14:31:09 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=F0=9F=93=9D=20docs:=20open=20the=20README?= =?UTF-8?q?=20with=20a=20banner,=20badges=20and=20project=20links?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/assets/banner.svg | 63 +++++++++++++++++++++++++++++++++++++++ README.md | 22 ++++++++++++++ 2 files changed, 85 insertions(+) create mode 100644 .github/assets/banner.svg diff --git a/.github/assets/banner.svg b/.github/assets/banner.svg new file mode 100644 index 0000000..df2b13e --- /dev/null +++ b/.github/assets/banner.svg @@ -0,0 +1,63 @@ + + weir-protocol: Shared schemas and validation for Weir. + Many small packets converge on a weir and leave through its notch as larger, bounded batches. + + + + + + + + + + + + + + + + + + + + + + + + + PUBLIC CONTRACT + weir-protocol + Shared schemas and validation for Weir. + Protobuf · gRPC · Go + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/README.md b/README.md index 8a0a5de..32fb58a 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,19 @@ +

+ weir-protocol: shared schemas and validation for Weir. +

+ +

+ CI + Vulnerabilities + Go Reference + Latest release + MIT license +

+ +

+ Server  ·  Go SDK  ·  Protocol  ·  Helm chart  ·  System tests +

+ # Weir public protocol Shared public schemas, generated Go types and validation for Weir servers and @@ -214,3 +230,9 @@ The workflow accepts only stable `vMAJOR.MINOR.PATCH` versions, runs CI on the `main` commit, then creates the version tag at that commit and its GitHub release. It refuses a version already tagged at another commit. Protocol consumers should pin the published version rather than a branch name. + +## Contributing and license + +Read [CONTRIBUTING.md](CONTRIBUTING.md) before opening a pull request, and report +vulnerabilities as described in [SECURITY.md](SECURITY.md). This repository is +released under the [MIT License](LICENSE). From 7aa18ece86f744aaedc1a606100ec5175b0515eb Mon Sep 17 00:00:00 2001 From: Randy <857271370@qq.com> Date: Wed, 4 Nov 2026 14:38:49 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=F0=9F=93=9D=20docs:=20keep=20the=20README?= =?UTF-8?q?=20plain=20with=20a=20single=20line=20of=20badges?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/assets/banner.svg | 63 --------------------------------------- README.md | 24 ++------------- 2 files changed, 2 insertions(+), 85 deletions(-) delete mode 100644 .github/assets/banner.svg diff --git a/.github/assets/banner.svg b/.github/assets/banner.svg deleted file mode 100644 index df2b13e..0000000 --- a/.github/assets/banner.svg +++ /dev/null @@ -1,63 +0,0 @@ - - weir-protocol: Shared schemas and validation for Weir. - Many small packets converge on a weir and leave through its notch as larger, bounded batches. - - - - - - - - - - - - - - - - - - - - - - - - - PUBLIC CONTRACT - weir-protocol - Shared schemas and validation for Weir. - Protobuf · gRPC · Go - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/README.md b/README.md index 32fb58a..5e7706c 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,7 @@ -

- weir-protocol: shared schemas and validation for Weir. -

- -

- CI - Vulnerabilities - Go Reference - Latest release - MIT license -

- -

- Server  ·  Go SDK  ·  Protocol  ·  Helm chart  ·  System tests -

- # Weir public protocol +[![CI](https://github.com/batchstream/weir-protocol/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/batchstream/weir-protocol/actions/workflows/ci.yml) [![Go Reference](https://pkg.go.dev/badge/github.com/batchstream/weir-protocol.svg)](https://pkg.go.dev/github.com/batchstream/weir-protocol) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE) + Shared public schemas, generated Go types and validation for Weir servers and clients. Requires Go 1.27.3. @@ -230,9 +216,3 @@ The workflow accepts only stable `vMAJOR.MINOR.PATCH` versions, runs CI on the `main` commit, then creates the version tag at that commit and its GitHub release. It refuses a version already tagged at another commit. Protocol consumers should pin the published version rather than a branch name. - -## Contributing and license - -Read [CONTRIBUTING.md](CONTRIBUTING.md) before opening a pull request, and report -vulnerabilities as described in [SECURITY.md](SECURITY.md). This repository is -released under the [MIT License](LICENSE).