mind: cover the gh fetcher, record that the point-smoke prompt is overtaken - #166
Merged
Merged
Conversation
…rtaken Two loose ends from the first live run of `lifecycle.py issues`. **`_gh_issue_states` had never executed.** Every online-leg test injects `fetch`, which is what keeps them hermetic — but it also meant the real shim, the one that runs on a machine with gh, had zero coverage, and its first real invocation would have been against production. Six tests drive it with `subprocess.run` stubbed: the `gh api … --jq .state` argv, the strip of gh's trailing newline, FileNotFoundError -> GhUnavailable (the exception, not a state string, so "could not run" never reads as "no findings"), a non-zero exit -> `unreadable: <stderr tail>`, the `or ["error"]` fallback on empty stderr, and non-URL entries costing no subprocess call. Each was confirmed to fail under a matching mutation of the shim. **The point-source smoke prompt is overtaken by events.** `issues --drafts` flagged it for citing closed PyAutoLens#514; chasing that found three things against upstream main: the target file moved (`scripts/jax_likelihood_functions/point_source/` -> `scripts/point_source/jax_likelihood/`), the reported mechanism — `FitPositionsImagePairAll` returning NaN, which fitness.py converts to the -1e99 `resample_figure_of_merit` — is what PyAutoLens 2a3f1a63 (PR #662) fixed on 2026-07-28 as phase 1 of the rhayes audit epic, and d838ca59 then changed `AnalysisPoint`'s default fit class out from under the script. Recorded on the prompt rather than closed: the surviving `-83.38049778` literal proves nothing either way (the prompt's own doctrine leaves a failing literal in place while the bug is open), so it needs one laptop run to settle. Incidental repair nobody folded back into the Mind is precisely the drift this tooling exists to catch. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XqCY1yLfdB4SR97SXjTutq
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two loose ends from the first live run of
lifecycle.py issues, which #164 shipped but never executed.That run is now done:
checkOK,orphansnone,issuesOK (5 tracking issues, all open),issues --drafts→ 3 advisory notes. No drift in the registries.One caveat worth stating plainly: the session that ran it had no
gheither, so states came from the GitHub API and were injected via thefetchparameter.issue_problemsanddraft_issue_notes— the actual logic — did execute against real GitHub state._gh_issue_statesdid not. Hence the first half of this PR._gh_issue_stateshad never executedEvery online-leg test injects
fetch. That is what keeps them hermetic, and it is the right design — but it also meant the real shim, the one that runs on a machine that has gh, had zero coverage, and its first real invocation would have been against production.Six tests drive it with
subprocess.runstubbed. It doesimport subprocessinside the function body, which rebinds the same module object fromsys.modules, so patching the attribute on the real module reaches it — no import surgery needed.Pinned:
gh api repos/<owner>/<repo>/issues/<n> --jq .stateargv, exactlyFileNotFoundError→GhUnavailableas the exception type rather than a state string — the entire reason that class exists is so "could not run" never reads as "no findings"unreadable: {stderr tail}, asserted!= "closed", sinceissue_problemsgrades every non-openstate and the stored string must not be mistakable for oneor ["error"]fallback on empty stderr, which otherwiseIndexErrors out of the whole check"(no issue — a release drive)") costing no subprocess callEach was confirmed to fail under a matching mutation of the shim — dropping
.strip(), corrupting the jq filter, swallowingGhUnavailable, removing theor ["error"]fallback, disabling theif not m: continueguard. Per this file's standing rule that a check which cannot fail is decoration.The point-source smoke prompt is overtaken by events
issues --draftsflaggeddraft/bug/autolens/jax_point_source_point_smoke_sentinel.mdfor citing closed PyAutoLens#514. Chasing that flag against upstreammainfound the prompt overtaken on three axes:scripts/jax_likelihood_functions/point_source/point.pyis a 404 onautolens_workspace_test@main; it is nowscripts/point_source/jax_likelihood/point.py. Every path in the prompt's task section is stale.2a3f1a63(PR #662, 2026-07-28) — "giveFitPositionsImagePairAlla no-image floor" — describes exactly the reported mechanism:PairAll.chi_squaredreturning NaN, whichfitness.pyconverts intoresample_figure_of_merit. That is the-1e99sentinel, andPairAllis the class the script exercises. It landed as phase 1 of the @rhayes777 audit epic (PyAutoArray#415), not from this prompt.d838ca59(2026-08-01, breaking) switchedAnalysisPointtoFitPositionsImagePairAllSolved. The script constructsal.AnalysisPoint(...)with no explicitfit_positions_cls, so it no longer tests the class the prompt is about — andpoint.pyon main has gained a second block pinned at a finite-82.33883111.Recorded on the prompt, not closed out. The surviving
-83.38049778literal proves nothing either way: the prompt's own doctrine is to leave a failing assertion in place while the bug is open, so its presence is equally consistent with "still broken" and "fixed but never re-run". Settling it needs one laptop run of the relocated script — a cloud session can't (JAX stack plus the committed seed dataset, which the standing "do not run underPYAUTO_SMALL_DATASETS=1" warning exists to protect).Status:is amended todraft — NEEDS RE-VERIFICATION before any workand the next step is written down.Incidental repair that nobody folded back into the Mind is precisely the drift this tooling exists to catch — same shape as the M0–M3 chain, caught this time.
Minor correction to #164
That PR recorded "9 of 152 drafts cite an issue". Live count is 8 of 150 — no code change, just noting the figure since it sets expectations for how thin the
--draftsnet is. It remains a partial net by construction; the 150-draft sweep still needs acceptance criteria read against upstream code.lifecycle check→ OK ·lifecycle orphans→ none ·lifecycle index --check→ OK ·pytest tests/→ 118 passed (112 + 6 new).