You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tests: the deep dive's figure refreshes itself on request (#119)
The guard is right and stays strict: a number on the **Verified this pass**
line is re-derived by a test, or it does not belong on the line. What was
wrong was who paid for it. Every branch that adds or removes a test moves
the count, so this file failed that branch until someone hand-edited a
figure in a docs file they had no reason to know existed.
PR #115 is what that costs. An outside contributor's first change -- four
tests, the fan-out example #51 asked for -- sat red for a month on
`assert 2151 == 2155`, and nothing in the failure named a fix they could
run. The check did its job; the ergonomics did not.
`GRAPHARC_UPDATE_FIGURES=1 pytest tests/test_deep_dive.py` now rewrites the
line and skips the check that wrote it, so the next run is the one that
verifies. The failure message names that command, and CONTRIBUTING.md has a
section for the case, because a contributor reads the failure and the
contributing guide, not this file's docstring.
Strictness is unchanged where it counts. `_updating()` is false for unset,
empty, "0", "false" and "no", so a leftover `=0` in a shell profile cannot
disarm the guard, and CI sets nothing -- a stale figure still fails there.
That property has its own test, because a self-healing check in CI would
assert nothing at all.
The rewrite is a pure function over the line, tested without touching the
real document: only the capture group's span changes, so the comma grouping
and every surrounding word stay byte-identical. The version the paragraph
says is on PyPI is deliberately not rewritten -- whether a release is
published is not something this tree can re-derive, and a note claiming it
should be written by whoever released it.
Verified: 2156 selected, 13 deselected, ruff clean. Dogfooded -- the figure
in this commit was written by the mechanism it adds.
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/deep-dive.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -254,7 +254,7 @@ A stable system is not one that claims to have no edges — it is one whose edge
254
254
-**`.env` and `grapharc.toml` follow the same discovery rule: the working directory, and nowhere else.** Neither searches parent directories — a run must not be governed by a file you did not know about, and must not be *billed* to one either. **This is a behaviour change:** the credential loader used to walk up to `/`, so a `.env` in an ancestor directory (a `$HOME` one on a shared box, a client project one above a demo checkout) was picked up silently. If you relied on that, move the file into the directory you run from, `export` the variable, or pass `env_file=` to name it explicitly. A real environment variable still beats any file.
255
255
-**`grapharc run` has no budget unless you give it one.** Set any of `--max-tokens`, `--max-iterations`, `--max-seconds`, or `--max-concurrency`; without them each dimension is unlimited and the gate admits a topology of any worst-case cost.
256
256
257
-
**Verified this pass:**`pytest` → green, 2,151 selected and 13 deselected (the live ones); `ruff check .` clean; all eight `grapharc demo` stages green, plus the `trace` / `metrics` / `viz` / `replay` tour against a freshly recorded demo trace; the wheel builds and imports all submodules in a clean virtualenv with `[all]`, and `0.1.7` on PyPI is that wheel. The counts are a snapshot, not a property of the project — `pytest` re-derives them in one command, which is the only reason they are quoted, and `tests/test_deep_dive.py` fails this line rather than letting it drift.
257
+
**Verified this pass:**`pytest` → green, 2,156 selected and 13 deselected (the live ones); `ruff check .` clean; all eight `grapharc demo` stages green, plus the `trace` / `metrics` / `viz` / `replay` tour against a freshly recorded demo trace; the wheel builds and imports all submodules in a clean virtualenv with `[all]`, and `0.1.7` on PyPI is that wheel. The counts are a snapshot, not a property of the project — `pytest` re-derives them in one command, which is the only reason they are quoted, and `tests/test_deep_dive.py` fails this line rather than letting it drift.
258
258
259
259
[ROADMAP.md](../ROADMAP.md) tracks what is built and what is not, item by item.
0 commit comments