Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Bug report
description: Report a validator, catalog, or governance problem.
title: "bug: "
labels: [bug]
body:
- type: textarea
id: observed
attributes:
label: What happened?
description: Include the validator command and its complete diagnostic. Do not include secrets.
validations:
required: true
- type: textarea
id: expected
attributes:
label: What did you expect?
validations:
required: true
12 changes: 12 additions & 0 deletions .github/ISSUE_TEMPLATE/moderation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Moderation request
description: Report an ownership, licensing, safety, or conduct concern privately where possible.
title: "moderation: "
labels: [moderation]
body:
- type: textarea
id: concern
attributes:
label: Concern
description: Describe the bot or account involved and the relevant evidence. Do not disclose personal data unnecessarily.
validations:
required: true
7 changes: 7 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/bot-submission.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## Bot submission

- [ ] I added source only under `bots/<platform>/<BotName>/`.
- [ ] I included `<BotName>.json`, `<BotName>.sh`, and `<BotName>.cmd`.
- [ ] The config declares an allowed SPDX `license` and the source uses an official Tank Royale Bot API.
- [ ] I ran `python scripts/validate_bot.py --root . --owner <my-forge-account> --smoke` successfully.
- [ ] I certify I can publish this source under the declared license.
27 changes: 27 additions & 0 deletions .github/workflows/publish-catalog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Publish bot catalog

on:
pull_request:
types: [closed]

permissions:
contents: write

jobs:
publish:
if: github.event.pull_request.merged && github.event.pull_request.base.ref == 'main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: main
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- run: python scripts/validate_bot.py --root . --owner '${{ github.event.pull_request.user.login }}' --smoke --generate
- run: |
git config user.name 'github-actions[bot]'
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
git add bots/index.json bots/owners.json
git diff --cached --quiet || git commit -m 'chore: regenerate bot catalog'
git push
34 changes: 34 additions & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Validate bot submission

on:
pull_request:
paths:
- bots/**
- scripts/**
- .github/workflows/validate.yml

permissions:
contents: read

jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- run: python -m unittest discover -s tests -v
- name: Reject hand-edited generated catalog files
run: |
if git cat-file -e origin/${{ github.base_ref }}:bots/index.json 2>/dev/null && git diff --name-only origin/${{ github.base_ref }}...HEAD | grep -qx 'bots/index.json'; then
echo 'bots/index.json is generated by CI and cannot be edited in a pull request.'
exit 1
fi
if git cat-file -e origin/${{ github.base_ref }}:bots/owners.json 2>/dev/null && git diff --name-only origin/${{ github.base_ref }}...HEAD | grep -qx 'bots/owners.json'; then
echo 'bots/owners.json is generated by CI and cannot be edited in a pull request.'
exit 1
fi
- run: python scripts/validate_bot.py --root . --owner '${{ github.event.pull_request.user.login }}' --smoke
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
__pycache__/
*.py[cod]
.pytest_cache/
.venv/
1 change: 1 addition & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @flemming-n-larsen
11 changes: 11 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Contributing a ranked bot

Submit source code only. Bots must use an official Tank Royale Bot API for Java, C#, Python, or TypeScript and run through the checked-in booter-convention scripts. Do not submit binary artifacts, generated dependency folders, custom protocol clients, process launchers, raw sockets, or code that writes outside its temporary directory.

Each bot directory's `license` field is its license grant for the complete directory. By opening a pull request, you certify that you have the right to publish the submitted code under that SPDX license, in the spirit of the Developer Certificate of Origin. Include a full license file if it helps users, but it is optional.

The first merged pull request for a bot name reserves that name for its submitting forge account. Only that account, or an account later registered in `bots/owners.json` by an already registered account, may submit later versions. A source change requires a version bump; only the latest version remains active. Each owner has five active entries by default, including a TwinDuel team.

Use `python scripts/validate_bot.py --root . --owner <your-forge-account> --smoke` before opening a pull request. CI is authoritative. A green check does not replace moderator review, especially for a first submission.

Copyright complaints, unsafe code, impersonation, and disputes are handled under [GOVERNANCE.md](GOVERNANCE.md). Do not include secrets in source, bot configuration, issues, or pull-request text.
9 changes: 9 additions & 0 deletions GOVERNANCE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Governance

The `robocode-dev` organization owns this repository. At least three moderators should retain ownership and CODEOWNERS review rights before ranked submissions open. One moderator approval and successful validation are required for a new bot; trusted owners may receive auto-merge eligibility for version bumps after repeated clean submissions.

Moderators maintain `bots/banned.json` through reviewed pull requests. A ban can cover an account or a bot and can be temporary. CI prevents a banned account from submitting and excludes disqualified bots from the generated catalog. Facts in the future `rumble-data` repository are never deleted merely because an entry is disqualified.

Moderators resolve name-squatting, lost-account recovery, license complaints, and appeal requests case by case. A credible copyright complaint removes the bot from the working tree and disqualifies it pending resolution.

Once each quarter, a moderator performs a fork drill: fork the repository, enable Actions, run validation, and regenerate the catalog without credentials other than the forge-provided token. Record the outcome in a GitHub issue.
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,19 @@
# rumble-bots
# Tank Royale Rumble bots

`rumble-bots` is the reviewable, source-only catalog of bots eligible for ranked Tank Royale Rumble battles. Authors submit bots through pull requests; clients consume the generated `bots/index.json` catalog and run exactly the source tree named by its SHA-256 hash.

## Submit a bot

1. Copy [the bot template](.github/PULL_REQUEST_TEMPLATE/bot-submission.md) into `bots/<platform>/<BotName>/`.
2. Include `<BotName>.json`, `<BotName>.sh`, `<BotName>.cmd`, and source code that uses an official Tank Royale Bot API.
3. Declare one permitted SPDX license: `MIT`, `Apache-2.0`, `BSD-3-Clause`, or `GPL-3.0-or-later`.
4. Run `python scripts/validate_bot.py --root . --owner <your-forge-account> --smoke` before opening a pull request.

Read [CONTRIBUTING.md](CONTRIBUTING.md) for the full submission, ownership, licensing, and moderation rules. The current validator proves the source-run entry point starts; connecting the smoke check to a temporary Tank Royale server is the next hardening increment before public ranked submissions open.

## Catalog

`bots/index.json` and `bots/owners.json` are generated by CI and must never be edited in a pull request. A catalog entry contains the bot identity, owner, source path, source-tree SHA-256, and active lifecycle status. Only `active` entries are eligible for matchmaking.

This repository is designed to be forkable: its validator is standard-library Python and GitHub Actions only invokes that script. The only forge seam is the workflow that supplies the pull-request author to the validator and publishes generated files after merge.
Source-only catalog for ranked Tank Royale Rumble bots
5 changes: 5 additions & 0 deletions bots/banned.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"schemaVersion": 1,
"bannedOwners": [],
"disqualifiedBots": []
}
20 changes: 20 additions & 0 deletions bots/index.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"schemaVersion": 1,
"generatedAt": "2026-08-02T14:52:08Z",
"commit": "local",
"bots": [
{
"name": "Orbit",
"version": "1.0.2",
"platform": "Python",
"path": "bots/python/Orbit",
"sourceHash": "sha256:86b63e60f231c8f736ec7dc7867c93966a59a63bb3409326516879236555cf36",
"owner": "flemming-n-larsen",
"authors": [
"Tank Royale Rumble maintainers"
],
"addedAt": "2026-08-02",
"status": "active"
}
]
}
15 changes: 15 additions & 0 deletions bots/owners.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"schemaVersion": 1,
"owners": [
{
"ownerId": "flemming-n-larsen",
"accounts": [
"flemming-n-larsen"
],
"bots": [
"Orbit"
],
"activeSlots": 1
}
]
}
2 changes: 2 additions & 0 deletions bots/python/Orbit/Orbit.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@echo off
python "%~dp0src\Orbit.py" %*
10 changes: 10 additions & 0 deletions bots/python/Orbit/Orbit.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "Orbit",
"version": "1.0.2",
"authors": ["Tank Royale Rumble maintainers"],
"description": "Minimal source-run validation bot.",
"platform": "Python",
"programmingLang": "Python 3",
"gameTypes": ["1v1", "melee", "twinduel"],
"license": "Apache-2.0"
}
10 changes: 10 additions & 0 deletions bots/python/Orbit/Orbit.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env sh
set -eu
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
if [ -n "${RUMBLE_PYTHON:-}" ]; then
exec "$RUMBLE_PYTHON" "$SCRIPT_DIR/src/Orbit.py" "$@"
fi
if command -v python3 >/dev/null 2>&1; then
exec python3 "$SCRIPT_DIR/src/Orbit.py" "$@"
fi
exec python "$SCRIPT_DIR/src/Orbit.py" "$@"
25 changes: 25 additions & 0 deletions bots/python/Orbit/src/Orbit.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
"""Minimal smokeable Rumble bot entry point."""

import os


if os.environ.get("RUMBLE_SMOKE") == "1":
print("RUMBLE_SMOKE_READY Orbit")
raise SystemExit(0)

from robocode_tank_royale.bot_api.bot import Bot


class Orbit(Bot):
"""A deliberately small official-API bot used to exercise the submission pipeline."""

def run(self) -> None:
self.turn_radar_left(360)


def main() -> None:
Orbit().start()


if __name__ == "__main__":
main()
Loading
Loading