feat: the test suite no longer ships, and dist upgrade deletes what a release stops shipping (#113)
dist export leaves out tools/chemenu/tests/, tools/pytest.ini and tools/.coveragerc by exact path - the suite tests the origin repository, and 257 of its tests failed in a fresh export. dist upgrade now deletes a no-longer-shipped file that is unchanged since install, with any directory that leaves empty, and blocks one changed since install like any local change (--take-release deletes it, --keep-local keeps it). --prune is accepted and ignored. Files changed: - CHANGES.md - EVALS.md - VERSION - instructions/mcp-read-server.md - instructions/upgrade-instance.md - tools/CONTRACT.md - tools/README.md - tools/chemenu/commands/dist_cmd.py - tools/chemenu/tests/test_dist_cmd.py - tools/chemenu/tests/test_dist_upgrade.py - tools/requirements-mcp.txt Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SnAJ7Z3CpVD3PRbN73QtU2
This commit is contained in:
1 parent
dd565d249f
commit
0d3499ab04
11 files changed
+479
-87
No files matched your search
+9
-4
@@ -2599,7 +2599,7 @@ Write a contentless, distributable copy of this repo's machinery.
|
||||
**NOTES**
|
||||
|
||||
- Writes a contentless, distributable copy of this repo's machinery into an empty or new `<target>` directory.
|
||||
- Ships `AGENTS.md`/`README.md`/`EVALS.md` with any `dist:strip-start`...`dist:strip-end` marker region removed, `instructions/` (minus `instructions/dev/`), `types/` (the `root: kb` page type-specs, their schemas and their subtype templates `types/<type>.<value>.md` re-keyed as `.template`, the stack's own verbatim), `docs/` verbatim, `tools/` (no venv/caches), the `.github/hooks/`+`.vibe/` session-tracing config plus `.claude/settings.json`, `kb/CONTRACT.md` (no pages, no areas) and `VERSION`.
|
||||
- Ships `AGENTS.md`/`README.md`/`EVALS.md` with any `dist:strip-start`...`dist:strip-end` marker region removed, `instructions/` (minus `instructions/dev/`), `types/` (the `root: kb` page type-specs, their schemas and their subtype templates `types/<type>.<value>.md` re-keyed as `.template`, the stack's own verbatim), `docs/` verbatim, `tools/` (no venv/caches, and not the dev-only test suite `tools/chemenu/tests/` with its `pytest.ini`/`.coveragerc`), the `.github/hooks/`+`.vibe/` session-tracing config plus `.claude/settings.json`, `kb/CONTRACT.md` (no pages, no areas) and `VERSION`.
|
||||
- Ships `raw/` and `incoming/` as flat roots, each with a `.gitkeep` and no subdirectories. `incoming/.gitkeep` is trackable and survives becoming a git repository, so a plain clone gets the directory without any bootstrap step.
|
||||
- Ships templates, never the filled files: `USER.md.template`/`SOUL.md.template`, `kb/CONVENTIONS.md.template`, and each collection's contract re-keyed as `kb/<name>/COLLECTION.md.template`. The filled `USER.md`/`SOUL.md`/`kb/CONVENTIONS.md`/`kb/<name>/COLLECTION.md`/`types/<page-type>.md`/`types/<page-type>.<value>.md` bind their instance; `find_leaks` refuses a plan carrying one.
|
||||
- Writes a generated `.wikitool-release.json` stamp: version, export date, origin, and a sha256 per exported file - the base a later upgrade compares against.
|
||||
@@ -2738,9 +2738,10 @@ Apply a stack update `dist export` produced - the write half of `version check`.
|
||||
- Every candidate path is classified against the *local* `.wikitool-release.json`'s recorded digest: unchanged is overwritten silently, absent from the old stamp is created, and locally modified or locally deleted is **never** silently overwritten.
|
||||
- Locally changed files abort the run with the full list; the abort text names the three answers with the command line filled in, and none of them is the default.
|
||||
- `--keep-local` proceeds and leaves every locally changed file untouched. The new stamp is still written whole, recording the release's digest for files that were not written, so a skipped file keeps diverging and is reported again on every later run.
|
||||
- `--take-release <path>` (repeatable) writes the release's version over the named path, discarding the local change, and re-creates it if it was locally deleted. The path then matches the stamp and stops being reported.
|
||||
- `--take-release <path>` (repeatable) writes the release's version over the named path, discarding the local change, re-creates it if it was locally deleted, and deletes it if the release no longer ships it. The path then matches the stamp and stops being reported.
|
||||
- The two are decided per path and compose on one call: without `--keep-local`, a locally changed path that no `--take-release` names still aborts the run.
|
||||
- A path in the old stamp but not the new one is reported as no longer part of the release and left alone, unless `--prune` is passed, which removes it only if it is still unchanged since installation.
|
||||
- A path in the old stamp but not the new one is no longer part of the release. Still unchanged since installation, it is deleted, as silently as an unchanged file is overwritten; changed since, it is locally changed like any other and needs one of the same answers - `--take-release` deletes it, `--keep-local` keeps it as the instance's own file, which no later upgrade reports again. Either way it is decided in this run: the new stamp no longer names the path. What the instance owns (`kb/log.md`, `CHANGES.md`, `.wikitool-kb.json`, ...) is never a candidate, and neither is any file the old stamp does not name.
|
||||
- A directory left holding nothing - at most a `__pycache__/` of `*.pyc` - once those files are deleted is removed with them, up to but never including the instance root. `--prune` is accepted and ignored; it used to switch the deletion on.
|
||||
- Reports the migration chain the new machinery would owe, but never runs any of it - there is no `migrate run`.
|
||||
- Reports, but does not block on, a crossed compatibility boundary.
|
||||
- The local preconditions - `VERSION`, the release stamp, `.wikitool-kb.json`, no outstanding migration, a clean working tree - are checked before the source is read. Not being a git repository at all is a WARN, not a refusal.
|
||||
@@ -3426,6 +3427,10 @@ Check that this instance is correctly configured.
|
||||
|
||||
## Tests
|
||||
|
||||
The suite and its configuration (`chemenu/tests/`, `pytest.ini`, `.coveragerc`) exist in the
|
||||
origin repository only - `dist export` leaves them out, because they test that repository's own
|
||||
type-specs and conventions rather than an instance's. There:
|
||||
|
||||
```bash
|
||||
cd tools
|
||||
.venv/bin/pip install pytest pytest-cov # one time; pytest-cov is optional
|
||||
@@ -3433,7 +3438,7 @@ cd tools
|
||||
```
|
||||
|
||||
Neither is in `requirements.txt`, and `pytest-cov` is CI-only by intent - see
|
||||
[README.md](README.md#tests) and [EVALS.md](../EVALS.md).
|
||||
[EVALS.md](../EVALS.md).
|
||||
|
||||
## Maintenance schedule
|
||||
|
||||
|
||||
Reference in new issue
Block a user