examples: add parallel research planner registry - #115
Shashankss1205 merged 2 commits into
Conversation
|
Apologies for the long silence on this — the delay is on us, not on your branch. I re-ran CI and dug into what was actually failing. Your code is fine. The only failure is one assertion, on all three Python versions: Your four new tests move the suite from 2,151 to 2,155, and The fixOne number, on line 257 of -**Verified this pass:** `pytest` → green, 2,151 selected and 13 deselected (the live ones);
+**Verified this pass:** `pytest` → green, 2,155 selected and 13 deselected (the live ones);The deselected count stays at 13 — you added no That should take the run green. Sorry you had to wait on a stale figure in a paragraph; that this can happen to a contributor is a problem with the guard's ergonomics rather than with anything you did, and I'm looking at making the figure re-derive itself instead of failing a newcomer's first PR. Thanks for the contribution — a fan-out example is exactly what #51 asked for. |
|
Following up on the ergonomics half of this, since it was our problem and not yours: #119 makes that figure refreshable with one command instead of a hand edit. GRAPHARC_UPDATE_FIGURES=1 uv run pytest tests/test_deep_dive.pyOnce it lands, a branch that adds tests — like this one — runs that and commits the result, and Your branch doesn't need to wait for it. The single-number edit in my earlier comment still takes this green today, and I'd rather review your example than have you rebase onto process changes. |
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>
2,214: the four tests the parallel research registry brought with it. Pushed straight to main rather than through a pull request because #115's own branch could not carry it. The figure has to equal the count *after* the merge, and their branch was one commit of docs away from being green -- but writing to a fork's branch needs a git push, and fetching that branch here is not something this environment permits. So the choice was a briefly-red main or a contributor waiting a second month on a number in a docs file. Their four tests and the registry were green on every Python version; this line was the only failure. Written by GRAPHARC_UPDATE_FIGURES, which is what #119 added for exactly this. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Merged — thank you, and sorry it took a month to get there. To be straight about what happened, because none of it was your branch's fault:
I brought your branch up to date with Since then the figure is refreshable with one command instead of a hand edit, which is #119, filed because this happened to you: GRAPHARC_UPDATE_FIGURES=1 uv run pytest tests/test_deep_dive.py
Your registry does exactly what #51 asked for, verified on the merged code: 4-way fan-out from |
…#129) Closes #103. #116 already covered most of what that issue asked for -- a weekly resolve that ignores `uv.lock`, reporting to the issue tracker, not gating pull requests. What it did not cover is the criterion's other half: importing every subpackage from the *built wheel*. The distinction is the one #101 was: `mcp>=1.2` resolved to 2.0.0 for anyone installing fresh, `mcp.server.fastmcp` had gone, and `grapharc[mcp]` was broken on arrival while every locked job stayed green. A suite run from the source tree does not see a packaging break that only shows in an installed wheel -- a subpackage dropped from the build, or an extra whose new major moves a module the package imports at import time. The walk moves out of `ci.yml`'s heredoc into `scripts/wheel_import_walk.py`, because two jobs now need exactly this check and two copies would drift apart. Same logic, two parameters: which checkout to compare against, and the prefix the import must come from. `scripts/` holds no `grapharc` package, so running it by path does not put the checkout on `sys.path` -- the property the old `cd /tmp` was there for, kept and now asserted with a message rather than a bare `assert`. Verified by running it for real rather than reasoning about it, and it earned its keep immediately: against the wheel then sitting in `dist/` it reported `grapharc.examples.plan_research` missing -- correctly, because that wheel was built before #115 merged. Rebuilt, it walks 132 modules clean. Deliberately **not** done: putting a ceiling on the eight unbounded extras. The issue asks for a decision on that and argues a bound should be "a ceiling with a reason attached, not a reflex" -- so adding eight of them at once is the reflex it warns against, and it would refuse users upgrades that are fine. Detection is what this closes; the policy is left open. Verified: 2214 selected, 13 deselected, ruff clean; the sdist's required-files and secret-leak checks still pass with `scripts/` added. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
#115 and #129 merged after the release commit. 0.1.8 is still unpublished and untagged, so folding them into its notes is right for the same reason #124 and #128 did it. The research registry gets a full entry: it is a shipped module and it closes the gap that the planner's headline capability -- decomposition -- was the one with no runnable example, while the only registry in the box demonstrated refusal. Credited to @only-ouc, whose pull request it is. The drift job's wheel walk goes in the tooling paragraph beside the styling gate: it changes nothing shipped, it changes what a break in shipped behaviour would be caught by. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Summary
plan_researchregistry demonstrating fan-out, join, fork, and fan-inpage_oncallTesting
uv run pytest tests/test_plan_research.py -quv run pytest tests/test_readme.py tests/test_cookbook_governance.py -quv run pytest tests/test_cli.py -q -k planuv run pytest tests/test_planner_loop.py -quv run ruff check .The full suite was also attempted on Windows; existing platform-dependent tests requiring symlink privileges, POSIX process semantics, or the Claude CLI fail in this environment.
Fixes #51