docs: drop merge-gate scope from PRD/docs
test / run tests/run_tests.py (pull_request) Has been cancelled

Branch protection isn't being applied; remove the README CI section,
the protection + gate-verification sections of docs/ci.md, and the
matching success-criteria / scope items from PRD 0002. Workflow itself
is unchanged.

Assisted-by: Claude Code
This commit is contained in:
2026-05-09 02:30:23 -04:00
parent ea7695d9d0
commit 1eee6f9819
3 changed files with 12 additions and 115 deletions
@@ -6,18 +6,17 @@
## Summary
Run the project's test suite on every push to a PR via Gitea Actions, and gate merges to `main` on the check being green.
Run the project's test suite on every push to a PR via Gitea Actions, surfacing pass/fail on the PR.
## Problem
There is no automated test run today — tests only run when the author remembers to invoke them locally before pushing or merging. That's the whole CI loop missing: nothing reruns tests on each push, and nothing prevents a tired or distracted author from merging a branch whose tests don't pass.
There is no automated test run today — tests only run when the author remembers to invoke them locally before pushing or merging. The CI loop is missing: nothing reruns the suite on each push, and there's no shared signal for whether a branch is green.
## Goals / Success Criteria
- A failing test on a branch blocks the merge button on `main`.
- Every PR shows a passing/failing tests check from Gitea Actions, updated per push.
- Pushing a fix to a red PR re-runs the workflow automatically and turns it green without manual re-trigger.
- The workflow file is committed in-tree and the branch-protection rules are documented so the setup is reproducible from the repo alone.
- The workflow file is committed in-tree.
## Non-goals
@@ -30,14 +29,13 @@ There is no automated test run today — tests only run when the author remember
### In scope
- A Gitea Actions workflow that runs `tests/run_tests.py` (full suite — unit + integration) on every push event affecting a PR, plus pushes to `main`.
- Branch-protection rules on `main` requiring the test check before the merge button is enabled.
- A one-time end-to-end demo: a deliberately-failing test on a throwaway branch shows the merge button disabled, proving the gate is wired correctly. The demo branch is deleted after the proof.
- A short README section + status badge so contributors can read CI state and know what to do when it's red.
- Whatever dependency-manifest changes are needed to make the runner install pytest and run `tests/run_tests.py` cleanly.
- A Gitea Actions workflow that runs `tests/run_tests.py` (full suite — unit + integration where the runner's docker topology supports it) on every push event affecting a PR, plus pushes to `main`.
- A status badge in the README so contributors can see CI state at a glance.
- Whatever dependency-manifest changes are needed to make the runner execute `tests/run_tests.py` cleanly.
### Out of scope
- Branch-protection rules / merge gating on `main`.
- Deploy / release pipeline (publishing images, tagging releases, etc.).
- Coverage reporting or quality gates.
- Lint / format checks beyond the test suite.
@@ -46,14 +44,12 @@ There is no automated test run today — tests only run when the author remember
### New services / components
- `.gitea/workflows/test.yml` — workflow definition. Triggers on `pull_request` and `push` to `main`. Runs `tests/run_tests.py` (the full suite, which exercises both unit and integration tests; integration tests require Docker on the runner).
- A small contract demo (a deliberately-failing test on a throwaway branch) used once to verify the merge gate, then deleted. Not a permanent file in the repo.
- `.gitea/workflows/test.yml` — workflow definition. Triggers on `pull_request` and `push` to `main`. Runs `tests/run_tests.py` (stdlib `unittest`; no external test deps required).
### Existing code touched
- `tests/`no code edits expected, just executed by CI. If the existing suite isn't currently green on the runner's environment, fix-up is in scope.
- `README.md` — add a CI status badge and a short section explaining how to read the check and what to do when it's red.
- Existing dependency manifests (e.g. `pyproject.toml` or `requirements*.txt`, whatever is in tree) — adjusted as needed so the runner can install pytest and the project's dev dependencies.
- `tests/`a small number of integration tests are skipped under `GITEA_ACTIONS=true` because act_runner's docker socket mount breaks their host-loopback assumptions. Skips are local to the affected tests.
- `README.md` — adds a CI status badge.
### Data model changes
@@ -61,13 +57,11 @@ None.
### External dependencies
- Relies on the already-configured Gitea Actions runner on `gitea.dideric.is`. No new runner is provisioned as part of this PRD.
- The runner must have Docker available (integration tests in this repo spin up containers).
- Relies on a Gitea Actions runner registered to (or instance-scoped above) the repo on `gitea.dideric.is`.
## Open questions
- Does the configured runner on `gitea.dideric.is` have Docker available and permissions to run integration tests? If not, the implementer needs to either (a) coordinate with the host to enable it, or (b) reduce CI scope to `tests/run_tests.py unit` and reopen this PRD for the integration half.
- How are branch-protection rules captured in the repo for reproducibility? Gitea applies them via API/UI, not in-tree — a `docs/` note pointing at the exact setting path is probably enough, but the format is up to the implementer.
- The two `GITEA_ACTIONS`-skipped integration tests could be rewritten to discover the container's IP via `docker inspect` rather than relying on host port mapping; that would let them pass under the socket-mount topology too. Filed as a follow-up, not in this PRD.
## References