Skip to content

Commit 746e62f

Browse files
committed
pyDuckHunt: tidy the common room and chart the road to release 🦆📚🪄
1 parent 3b78d20 commit 746e62f

14 files changed

Lines changed: 342 additions & 29 deletions

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,29 @@ body:
2525
- Partyline
2626
- Packaging and service
2727
- Documentation
28+
- Translation or message language
2829
- Other
2930
validations:
3031
required: true
32+
- type: textarea
33+
id: environment
34+
attributes:
35+
label: Environment
36+
description: OS, Python version and launch method (foreground or systemd). No server address or private configuration is needed.
37+
placeholder: Linux distribution, Python 3.x, foreground pilot
38+
validations:
39+
required: true
40+
- type: dropdown
41+
id: language
42+
attributes:
43+
label: Message language
44+
options:
45+
- English (en)
46+
- French (fr)
47+
- Both
48+
- Not applicable
49+
validations:
50+
required: true
3151
- type: textarea
3252
id: reproduce
3353
attributes:

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
blank_issues_enabled: false
22
contact_links:
3+
- name: Installation and troubleshooting
4+
url: https://github.com/teuk/pyDuckHunt/blob/main/docs/TROUBLESHOOTING.md
5+
about: Check language settings, first launch and common problems before reporting a bug.
36
- name: Private security report
47
url: https://github.com/teuk/pyDuckHunt/security/advisories/new
58
about: Report vulnerabilities privately; never post credentials or private IRC data.

.github/ISSUE_TEMPLATE/feature_request.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ body:
2121
id: replay
2222
attributes:
2323
label: Determinism and replay
24-
description: Identify any clock, random, network or persistence boundary involved.
25-
validations:
26-
required: true
24+
description: Optional technical context. If known, identify a clock, random, network or persistence boundary; player suggestions do not need an implementation plan.
2725
- type: checkboxes
2826
id: safety
2927
attributes:

.github/pull_request_template.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,18 @@
22

33
Describe the observable change and its bounded scope.
44

5+
Link a related issue if applicable. Explain any configuration or update step.
6+
57
## Validation
68

79
- [ ] Public-tree policy passes.
810
- [ ] Relevant targeted tests pass.
911
- [ ] Fast lane passes with `--progress`.
1012
- [ ] Full lane passes when the change is ready to merge.
1113

14+
State which languages and environments were checked, and what remains untested.
15+
For message changes, confirm that formatting fields and private routing still work.
16+
1217
## Safety
1318

1419
- [ ] No credential, private configuration, runtime state, log or real identity is included.

.github/workflows/ci.yml

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,13 @@ jobs:
8282
run: python tools/validate.py --lane full --progress
8383

8484
package:
85-
name: Package smoke test
85+
name: Install ${{ matrix.language }} / Python 3.13
8686
runs-on: ubuntu-latest
8787
timeout-minutes: 10
88+
strategy:
89+
fail-fast: false
90+
matrix:
91+
language: [en, fr]
8892

8993
steps:
9094
- name: Check out source
@@ -96,7 +100,29 @@ jobs:
96100
python-version: "3.13"
97101

98102
- name: Run the safe beta installer
99-
run: ./install.sh
103+
run: ./install.sh --language ${{ matrix.language }}
100104

101105
- name: Exercise installed command
102106
run: .venv/bin/pyduckhunt --help
107+
108+
- name: Check installed package and disabled private configuration
109+
run: .venv/bin/python -B tools/check_installed.py --language ${{ matrix.language }}
110+
111+
- name: Preserve configuration on reinstall and reject a conflicting language
112+
env:
113+
EXPECTED_LANGUAGE: ${{ matrix.language }}
114+
shell: bash
115+
run: |
116+
set -Eeuo pipefail
117+
saved_config="$RUNNER_TEMP/pyduckhunt-config-before.toml"
118+
install -m 600 config/pyduckhunt.toml "$saved_config"
119+
./install.sh
120+
cmp --silent "$saved_config" config/pyduckhunt.toml
121+
other_language=en
122+
if [[ "$EXPECTED_LANGUAGE" == en ]]; then other_language=fr; fi
123+
if ./install.sh --language "$other_language"; then
124+
echo '[KO] Conflicting language was accepted.'
125+
exit 1
126+
fi
127+
cmp --silent "$saved_config" config/pyduckhunt.toml
128+
.venv/bin/python -B tools/check_installed.py --language "$EXPECTED_LANGUAGE"

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,19 @@ these changes do not create a stable release or a tag.
55

66
## Unreleased
77

8+
### Public beta onboarding and release preparation
9+
10+
- Keep the English-first README concise and add a documentation index,
11+
troubleshooting guide and evidence-based beta exit roadmap.
12+
- Add language and environment fields to bug reports, simplify player feature
13+
requests, and document the contribution and translation workflow.
14+
- Exercise fresh English and French editable installs separately in CI,
15+
including installed messages, disabled private configuration, reinstall
16+
preservation and rejection of conflicting language choices.
17+
- Correct the installer's final instructions: review the target and enable
18+
the game before the connection-free pilot check, then launch separately.
19+
- Preserve game behavior, instance state, version and the no-release boundary.
20+
821
### French and English messages
922

1023
- Add a complete English presentation catalogue, using the supplied Tcl 2.11

CONTRIBUTING.md

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,45 @@
11
# Contributing
22

3-
pyDuckHunt is developed in small, reviewable rounds.
3+
Bug reports, translation corrections and small pull requests are welcome.
4+
Check the [roadmap](docs/ROADMAP.md) and [existing issues](https://github.com/teuk/pyDuckHunt/issues)
5+
before starting a larger change. English and French reports are both welcome.
6+
7+
## Report a problem
8+
9+
Use the [bug form](https://github.com/teuk/pyDuckHunt/issues/new?template=bug_report.yml)
10+
with a commit, Python version, OS, message language and minimal reproduction.
11+
Replace people and channels with synthetic examples. See
12+
[troubleshooting](docs/TROUBLESHOOTING.md) before attaching diagnostics.
13+
Vulnerabilities belong in the [private security channel](SECURITY.md).
14+
15+
## Prepare a change
16+
17+
Fork the repository, clone your fork and create a topic branch from `main`.
18+
Run `./install.sh --language en` as your normal account to prepare `.venv`;
19+
installation does not connect to IRC. Use `--language fr` for a new French setup.
20+
21+
Keep changes small and explain the player or operator problem they solve.
22+
Update the relevant guide and changelog when observable behavior changes.
23+
Retain the original author's attribution and project license.
24+
25+
For translations, follow [catalogue maintenance](docs/LANGUAGES.md#maintaining-the-catalogue):
26+
preserve formatting fields, privacy routing and dynamic values. French and
27+
English use the same rules, entropy and replay state. Do not add a language fork
28+
to the game engine. Add a regression test when it demonstrates a real defect;
29+
simple wording corrections do not need tests that only repeat the new sentence.
430

531
## Local validation
632

733
```bash
834
export PYTHONPATH=src
935
.venv/bin/python tools/project_guard.py
10-
.venv/bin/python -m compileall -q src tools tests
36+
.venv/bin/python tools/validate.py --lane targeted --progress \
37+
--test tests.unit.test_i18n
1138
.venv/bin/python tools/validate.py --lane fast --progress
1239
```
1340

14-
The full lane is reserved for an explicitly approved precommit round:
41+
Replace the targeted module with the tests relevant to your change. The full
42+
lane is reserved for the final precommit round; run it once with progress visible:
1543

1644
```bash
1745
export PYTHONPATH=src
@@ -23,3 +51,6 @@ material, generated exports or local helper scripts.
2351

2452
Use a pull request for review. CI must pass on every supported Python version,
2553
and the full lane must pass before merge.
54+
Record what ran and what remains untested in the pull request. Live IRC acceptance
55+
is a separate check on an authorized test channel. Ordinary contributions create
56+
no tag or release; see [release workflow](docs/RELEASING.md).

README.md

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ A Duck Hunt game bot for IRC, with **English and French messages**, persistent
99
scores, a shop and private administrator tools. Both languages share the same
1010
game rules and code.
1111

12+
[Install](#install-in-english) · [Documentation](docs/README.md) ·
13+
[Roadmap](docs/ROADMAP.md) · [Report a bug](https://github.com/teuk/pyDuckHunt/issues/new/choose)
14+
1215
## Install in English
1316

1417
Requires **Python 3.11+**, its `venv` module and Git. Run as your normal bot
@@ -30,18 +33,10 @@ to enable the game and launch it. No system service is installed automatically.
3033
**French:** use `./install.sh --language fr`. French is also the default for a
3134
new installation when `--language` is omitted.
3235

33-
### Switching an existing instance to English
34-
35-
Update the existing `[game]` section in **that instance's private configuration**:
36-
37-
```toml
38-
language = "en"
39-
```
40-
41-
Then restart that instance. Scores, inventory and scheduled flights are
42-
preserved. Re-running the installer never overwrites an existing configuration;
43-
it refuses an explicit language choice that conflicts with it.
44-
See [language settings](docs/LANGUAGES.md) for separate FR/EN instances.
36+
**Already installed?** Set `language = "en"` in the existing `[game]` section
37+
of your instance's private configuration, then restart it. Scores and inventory
38+
are preserved. See [switching languages](docs/INSTALL.md#change-the-language-of-an-existing-instance).
39+
The installer preserves existing configuration and refuses a conflicting language choice.
4540

4641
## Play
4742

@@ -62,17 +57,21 @@ and [channel items](docs/CHANNEL_ACTIONS.md) for the details.
6257

6358
## Documentation
6459

65-
- [Installation, first launch and updates](docs/INSTALL.md)
66-
- [Configuration](docs/CONFIGURATION.md) · [Languages](docs/LANGUAGES.md)
67-
- [Partyline and Owner commands](docs/PARTYLINE.md)
68-
- [Systemd service setup](docs/SYSTEMD_SERVICE.md)
69-
- [Web rankings](docs/RANKING_PAGE.md) · [Metrics](docs/METRICS_GRAFANA.md)
70-
- [Architecture](docs/ARCHITECTURE.md) · [Changelog](CHANGELOG.md)
60+
| You want to… | Start here |
61+
| --- | --- |
62+
| Install, configure or update a bot | [Installation](docs/INSTALL.md) · [Troubleshooting](docs/TROUBLESHOOTING.md) |
63+
| Understand the game | [Player profiles](docs/PLAYER_PROFILE.md) · [Shop](docs/SHOP.md) |
64+
| Run and administer an instance | [Operator guides](docs/README.md#run-and-administer) |
65+
| Fix a bug or improve a translation | [Contributing](CONTRIBUTING.md) · [Languages](docs/LANGUAGES.md) |
66+
67+
[All documentation](docs/README.md) · [Changelog](CHANGELOG.md) · [Security](SECURITY.md)
7168

7269
## Beta status
7370

7471
This is **beta software**, distributed from `main`, and no tag or GitHub Release
7572
has been published yet. Back up your private configuration and state before updating.
73+
The [roadmap](docs/ROADMAP.md#before-a-release) lists the remaining acceptance
74+
work; there is no release date yet. Linux is the current deployment target.
7675

7776
For development validation:
7877

docs/README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Documentation
2+
3+
New to pyDuckHunt? Start with [installation in English](INSTALL.md#install-in-english).
4+
Use `./install.sh --language fr` for French. Both instances use the same game engine.
5+
6+
## Install and play
7+
8+
| Guide | What it answers |
9+
| --- | --- |
10+
| [Install and update](INSTALL.md) | Prerequisites, language, first connection and updates |
11+
| [Configuration](CONFIGURATION.md) · [Languages](LANGUAGES.md) | Private settings and independent FR/EN instances |
12+
| [Troubleshooting](TROUBLESHOOTING.md) | Installation, connection, messages and recovery problems |
13+
| [Player profiles](PLAYER_PROFILE.md) · [Shot engine](SHOT_ENGINE.md) | Progression, fatigue, accuracy and shooting |
14+
| [Shop](SHOP.md) · [Channel items](CHANNEL_ACTIONS.md) | Equipment, bread and duck calls |
15+
| [Collection and carry](COLLECTION_AND_CARRY.md) | Letters, duck bags and capacity |
16+
| [Rare events](RARE_EVENTS.md) · [Legendary protection](LEGENDARY_PROTECTION.md) | Unusual ducks, loot and protection |
17+
| [Incidents](INCIDENTS.md) · [Nuisances](NUISANCES.md) · [Curses](CURSES.md) | Cross-player effects and countermeasures |
18+
19+
## Run and administer
20+
21+
| Guide | What it answers |
22+
| --- | --- |
23+
| [Operator pilot](OPERATOR_PILOT.md) · [Controlled pilot](CONTROLLED_PILOT.md) | Target allowlists and live acceptance |
24+
| [Systemd](SYSTEMD_SERVICE.md) · [Unit templates](../packaging/systemd/README.md) | Background services; adapt the supplied pilot paths |
25+
| [Partyline](PARTYLINE.md) | Owner authentication, private planning and administration |
26+
| [Persistence](PERSISTENCE.md) · [Privacy](PRIVACY.md) | Journal, snapshots and private data boundaries |
27+
| [Web rankings](RANKING_PAGE.md) · [Metrics](METRICS_GRAFANA.md) | Optional publication and monitoring |
28+
29+
## Develop and review
30+
31+
- [Contributing](../CONTRIBUTING.md): reproduce a bug, submit a change or a translation.
32+
- [Architecture](ARCHITECTURE.md): module responsibilities and deterministic state.
33+
- [Behavioral replay](BEHAVIORAL_REPLAY.md) · [Rendering](RENDERING.md): behavior and presentation contracts.
34+
- [IRC transport](IRC_TRANSPORT.md) · [Process shell](PROCESS_SHELL.md): connection and process boundaries.
35+
- [Runtime lifecycle](RUNTIME_LIFECYCLE.md) · [Runtime policy](RUNTIME_POLICY.md): dispatch, pacing and shutdown.
36+
- [Runtime adapters](RUNTIME_ADAPTERS.md) · [Settlement adapters](SETTLEMENT_ADAPTERS.md): clock, entropy and persistence integration.
37+
- [Roadmap](ROADMAP.md) · [Release workflow](RELEASING.md) · [Changelog](../CHANGELOG.md): current status and remaining work.
38+
- [Security policy](../SECURITY.md): report a vulnerability privately.
39+
40+
Some detailed guides document the existing pilot deployment. Its account, paths
41+
and service names are examples, not requirements for your own server. Begin with
42+
the installation guide before adapting an optional integration.

docs/RELEASING.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ Release.
77
pyDuckHunt remains development software until a stable version is explicitly
88
approved. A normal commit must not create a tag or GitHub Release.
99

10-
## Candidate contract
10+
## Ordinary beta commits
1111

1212
1. Start from a clean `main` branch and a reviewed public source tree.
1313
2. Run `tools/project_guard.py` and the relevant targeted tests.
1414
3. Run the fast lane while iterating.
15-
4. Run the full lane exactly once, visibly and immediately before the candidate
15+
4. Run the full lane exactly once, visibly and immediately before the final
1616
commit:
1717

1818
```bash
@@ -24,6 +24,24 @@ approved. A normal commit must not create a tag or GitHub Release.
2424
6. Verify the staged diff and scan it for credentials before committing.
2525
7. Push without rewriting public history and require GitHub Actions to pass.
2626

27+
## Release acceptance
28+
29+
The open gates are tracked in [the roadmap](ROADMAP.md#before-a-release).
30+
For a candidate, record its commit, tested OS/Python versions, fresh-install
31+
results in both languages, live IRC acceptance, persistence recovery, update and
32+
rollback results. Retain sensitive evidence privately and publish only a sanitized
33+
summary. A passing offline suite alone is not a live deployment qualification.
34+
35+
Current CI runs fast validation on Python 3.11, 3.12 and 3.13, one full job on
36+
3.13, and separate fresh editable-install checks for English and French on 3.13.
37+
The install checks validate the generated configuration, packaged catalogue and
38+
configuration preservation without connecting to IRC. This is not yet a wheel
39+
or source-archive installation test, nor a claim that every Python/OS pair is qualified.
40+
41+
GitHub branch protection, required checks and private vulnerability reporting
42+
are repository settings: maintainers must verify them on GitHub. Their presence
43+
cannot be inferred from checked-in templates or links.
44+
2745
## Stable releases
2846

2947
A stable release additionally requires an explicit stable version, matching

0 commit comments

Comments
 (0)