docs: Bring all documentation up to date for v2.10.1
- architecture/: overview, technology stack, auth (OIDC + built-in IndieAuth), syndication (POSSE) rewritten; new database.md, deployment.md and indieweb-protocols.md; legacy stack marked historical - decisions/: reconstructed ADR-060 and ADR-063; 31 status corrections (superseded auth ADRs, proposed -> accepted); INDEX rebuilt - design/: reconstructed the v1.6.0 documents the webmention code cites; reports for 18 v2 releases without a design folder; INDEX rebuilt - projectplan/: BACKLOG rewritten (shipped items removed, open issues from the reviews added); RELEASE.md for v2.0.0-v2.10.1; INDEX - standards/: development setup (uv, tests, DEV_MODE), testing (CI test stage), git and release flow, versioning, coding standards, cookies - README, CLAUDE.md, .env.example (every setting the code reads, with defaults) brought up to date - 137 broken links repaired (old absolute paths, moved files); stale ADR references in code comments corrected (comments only) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
fa551de197
commit
0716984958
143 files changed
+6222
-8660
No files matched your search
@@ -1,127 +1,116 @@
|
||||
# Testing Checklist
|
||||
|
||||
This document provides a comprehensive checklist for testing StarPunk functionality before release.
|
||||
**Status**: Active
|
||||
**Last Updated**: 2026-11-03 (v2.10.1)
|
||||
|
||||
## Manual Testing Checklist
|
||||
What to test, how to run the tests, and what CI does with them. Setup and
|
||||
the environment variables the tests need are in
|
||||
[development-setup.md](development-setup.md#running-the-tests).
|
||||
|
||||
### Core Functionality
|
||||
- [ ] Create notes via web interface
|
||||
- [ ] Create notes via Micropub JSON
|
||||
- [ ] Create notes via Micropub form-encoded
|
||||
- [ ] Notes display with proper microformats
|
||||
- [ ] Markdown renders correctly
|
||||
- [ ] Slugs generate uniquely
|
||||
- [ ] Timestamps record accurately
|
||||
## How tests run
|
||||
|
||||
### Authentication & Security
|
||||
- [ ] IndieAuth login flow works
|
||||
- [ ] Micropub client authentication
|
||||
- [ ] Token expiration works
|
||||
- [ ] Rate limiting functions
|
||||
**Locally**
|
||||
|
||||
### Syndication & Standards
|
||||
- [ ] RSS feed validates (W3C validator)
|
||||
- [ ] API returns correct status codes
|
||||
```bash
|
||||
SESSION_SECRET=test uv run pytest # everything
|
||||
SESSION_SECRET=test uv run pytest --ignore=tests/test_migration_race_condition.py # fast loop
|
||||
```
|
||||
|
||||
### Automated Testing
|
||||
- [ ] All unit tests pass
|
||||
- [ ] All integration tests pass
|
||||
- [ ] Test coverage >80%
|
||||
`tests/test_migration_race_condition.py` takes about 5 minutes; skip it
|
||||
while iterating, never before a release.
|
||||
|
||||
## Validation Tools
|
||||
**In CI** (`.gitea/workflows/build-container.yml`), on every pushed
|
||||
`vX.Y.Z` tag (or a manual run):
|
||||
|
||||
### IndieWeb Standards
|
||||
- **IndieWebify.me**: https://indiewebify.me/
|
||||
- Verify microformats (h-entry, h-card, h-feed)
|
||||
- Check IndieAuth implementation
|
||||
1. `docker buildx build --target test -f Containerfile .` builds the
|
||||
Containerfile's `test` stage: the runtime dependencies plus pytest and
|
||||
pytest-mock, with `SESSION_SECRET=ci-test-secret`,
|
||||
`SITE_URL=http://localhost:5000` and `ADMIN_ME=https://test.example.com`,
|
||||
then `python -m pytest -q -p no:cacheprovider tests`.
|
||||
2. Only if that succeeds is the runtime image built and pushed as
|
||||
`:vX.Y.Z` and `:latest`.
|
||||
|
||||
- **IndieAuth Validator**: https://indieauth.com/validate
|
||||
- Test IndieAuth flow
|
||||
- Validate token handling
|
||||
So a failing test blocks the release image; it does not block the merge or
|
||||
the tag. Run the full suite before merging (see
|
||||
[git-branching-strategy.md](git-branching-strategy.md#release-process)).
|
||||
To reproduce CI locally: `docker build --target test -f Containerfile .`
|
||||
(pytest-cov is not installed in that stage, so don't depend on it in
|
||||
tests).
|
||||
|
||||
- **Micropub Test Suite**: https://micropub.rocks/
|
||||
- Comprehensive Micropub endpoint testing
|
||||
- Verify spec compliance
|
||||
## Every change
|
||||
|
||||
### Web Standards
|
||||
- **W3C Feed Validator**: https://validator.w3.org/feed/
|
||||
- Validate RSS 2.0 feed structure
|
||||
- Check date formatting
|
||||
- Verify CDATA wrapping
|
||||
- [ ] Full suite passes locally
|
||||
- [ ] New behaviour has tests; a bug fix has a test that failed before the fix
|
||||
- [ ] Tests use the `app` / `client` fixtures from `tests/conftest.py`
|
||||
(temporary data directory, `TESTING=True`); nothing touches `./data`
|
||||
- [ ] No test makes real network requests (see below)
|
||||
- [ ] Schema changes: a numbered migration in `migrations/`, plus a test
|
||||
that it applies to an existing database (`tests/test_migrations.py`)
|
||||
|
||||
- **W3C HTML Validator**: https://validator.w3.org/
|
||||
- Validate HTML5 markup
|
||||
- Check semantic structure
|
||||
- Verify accessibility
|
||||
## Conventions
|
||||
|
||||
- **JSON Validator**: https://jsonlint.com/
|
||||
- Validate API responses
|
||||
- Check Micropub payloads
|
||||
- **Where**: one file per module or feature (`tests/test_websub.py`). Work
|
||||
driven by a spec review or an incident gets its own file named for the
|
||||
release, with a docstring saying what it covers, e.g.
|
||||
`test_micropub_v290.py`, `test_microformats_v280.py`,
|
||||
`test_websub_hardening.py` ("one test per finding of the v2.10.0 review").
|
||||
- **Outbound HTTP**: everything StarPunk fetches from or sends to other
|
||||
servers goes through `starpunk/webmention_ssrf.py`. Tests replace its
|
||||
transport and DNS instead of mocking callers:
|
||||
|
||||
## Testing Resources
|
||||
```python
|
||||
monkeypatch.setattr("starpunk.webmention_ssrf.socket.getaddrinfo", lambda *a, **k: PUBLIC)
|
||||
monkeypatch.setattr("starpunk.webmention_ssrf.TRANSPORT", httpx.MockTransport(handler))
|
||||
```
|
||||
|
||||
### Specifications
|
||||
- IndieWeb Notes: https://indieweb.org/note
|
||||
- Micropub Spec: https://micropub.spec.indieweb.org
|
||||
- IndieAuth Spec: https://www.w3.org/TR/indieauth/
|
||||
- Microformats2: http://microformats.org/wiki/h-entry
|
||||
- RSS 2.0 Spec: https://www.rssboard.org/rss-specification
|
||||
(see the `web` fixture in `tests/test_websub.py`). Test the private
|
||||
address rejection by making `getaddrinfo` return e.g. `10.0.0.2`.
|
||||
- **Background workers** don't run under `TESTING=True`. Drive them
|
||||
directly, e.g. `WebSubWorker(app)` inside `app.app_context()`
|
||||
(`run_worker` in `tests/test_websub.py`).
|
||||
- **Crossposting** targets are configured per test with app config
|
||||
overrides and mocked HTTP; never with real credentials.
|
||||
- **Concurrency** fixes need a test that reproduces the race with real
|
||||
processes or threads (`tests/test_migration_concurrency.py`).
|
||||
|
||||
### Testing & Validation
|
||||
- Micropub Test Suite: https://micropub.rocks/
|
||||
- IndieAuth Testing: https://indieauth.com/
|
||||
- Microformats Parser: https://pin13.net/mf2/
|
||||
## New or changed protocol work
|
||||
|
||||
### Example Implementations
|
||||
- IndieWeb Examples: https://indieweb.org/examples
|
||||
- Micropub Clients: https://indieweb.org/Micropub/Clients
|
||||
StarPunk implements Micropub, IndieAuth, Webmention, WebSub and
|
||||
microformats2. For changes to any of them:
|
||||
|
||||
## Pre-Release Validation Workflow
|
||||
- [ ] Read the W3C Recommendation (or the living spec) and cite section
|
||||
numbers in the ADR and in test names or docstrings
|
||||
- [ ] Test each MUST that the change touches, including the error responses
|
||||
(status codes, `error` values, headers) and not only the happy path
|
||||
- [ ] Test discovery: `Link` headers and `<link>` elements still advertise
|
||||
the endpoint on every page and feed that should have them
|
||||
- [ ] Test what a strict client sends: form-encoded and JSON (Micropub),
|
||||
case and percent-encoding variants (WebSub topics), relative URLs
|
||||
(Webmention sources)
|
||||
- [ ] Test that requests to user-supplied URLs are refused for private
|
||||
addresses and time out
|
||||
- [ ] Rendered markup: parse the page with `mf2py` and assert on the parsed
|
||||
properties (`tests/test_microformats*.py`), not on raw HTML strings
|
||||
- [ ] Manual check against the live site after deploy with the external
|
||||
validators below
|
||||
|
||||
1. **Run Automated Tests**
|
||||
```bash
|
||||
uv run pytest
|
||||
```
|
||||
## Validation tools (manual, after deploy)
|
||||
|
||||
2. **Validate HTML**
|
||||
- Test homepage output
|
||||
- Test note permalink output
|
||||
- Run through W3C HTML Validator
|
||||
| Protocol | Tool |
|
||||
|---|---|
|
||||
| Micropub | [micropub.rocks](https://micropub.rocks/), a real client (Quill, Indigenous) |
|
||||
| IndieAuth | Sign in to a Micropub client; [indieauth.rocks](https://indieauth.rocks/) |
|
||||
| Webmention | [webmention.rocks](https://webmention.rocks/) |
|
||||
| WebSub | [websub.rocks](https://websub.rocks/) (publisher and hub tests) |
|
||||
| Microformats2 | [pin13.net/mf2](https://pin13.net/mf2/), [IndieWebify.me](https://indiewebify.me/) |
|
||||
| Feeds | [W3C Feed Validator](https://validator.w3.org/feed/) (RSS, Atom), [JSON Feed validator](https://validator.jsonfeed.org/) |
|
||||
| HTML | [W3C HTML validator](https://validator.w3.org/) |
|
||||
|
||||
3. **Validate RSS Feed**
|
||||
- Access /feed.xml
|
||||
- Run through W3C Feed Validator
|
||||
- Verify in actual RSS reader
|
||||
## Specifications
|
||||
|
||||
4. **Validate Microformats**
|
||||
- Test homepage with IndieWebify.me
|
||||
- Test note permalinks
|
||||
- Use microformats parser
|
||||
|
||||
5. **Validate Micropub**
|
||||
- Run micropub.rocks test suite
|
||||
- Test with real Micropub client (Quill)
|
||||
|
||||
6. **Manual Browser Testing**
|
||||
- Chrome/Chromium
|
||||
- Firefox
|
||||
- Safari (if available)
|
||||
- Mobile browsers
|
||||
|
||||
7. **Security Verification**
|
||||
- CSRF protection working
|
||||
- XSS prevention verified
|
||||
- SQL injection tests pass
|
||||
- Path traversal prevention works
|
||||
|
||||
## Success Criteria
|
||||
|
||||
All checklist items must pass before V1 release. If any validation tool reports errors, they must be fixed before proceeding.
|
||||
|
||||
## Related Documentation
|
||||
|
||||
- [Testing Strategy](/home/phil/Projects/starpunk/docs/architecture/overview.md#testing-strategy)
|
||||
- [Implementation Plan](/home/phil/Projects/starpunk/docs/projectplan/v1/implementation-plan.md)
|
||||
- [Feature Scope](/home/phil/Projects/starpunk/docs/projectplan/v1/feature-scope.md)
|
||||
|
||||
**Last Updated**: 2025-11-24
|
||||
- Micropub: https://www.w3.org/TR/micropub/
|
||||
- IndieAuth: https://indieauth.spec.indieweb.org/
|
||||
- Webmention: https://www.w3.org/TR/webmention/
|
||||
- WebSub: https://www.w3.org/TR/websub/
|
||||
- Microformats2 h-entry: https://microformats.org/wiki/h-entry
|
||||
- RSS 2.0: https://www.rssboard.org/rss-specification, Atom: RFC 4287, JSON Feed 1.1: https://www.jsonfeed.org/version/1.1/
|
||||
Reference in new issue
Block a user