Skip to content

mind: cover the gh fetcher, record that the point-smoke prompt is overtaken - #166

Merged
Jammy2211 merged 1 commit into
mainfrom
claude/pyautomind-registry-validation-ymxmcu
Aug 9, 2026
Merged

mind: cover the gh fetcher, record that the point-smoke prompt is overtaken#166
Jammy2211 merged 1 commit into
mainfrom
claude/pyautomind-registry-validation-ymxmcu

Conversation

@Jammy2211

@Jammy2211 Jammy2211 commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

Two loose ends from the first live run of lifecycle.py issues, which #164 shipped but never executed.

That run is now done: check OK, orphans none, issues OK (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 gh either, so states came from the GitHub API and were injected via the fetch parameter. issue_problems and draft_issue_notes — the actual logic — did execute against real GitHub state. _gh_issue_states did not. Hence the first half of this PR.

_gh_issue_states had never executed

Every 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.run stubbed. It does import subprocess inside the function body, which rebinds the same module object from sys.modules, so patching the attribute on the real module reaches it — no import surgery needed.

Pinned:

  • the gh api repos/<owner>/<repo>/issues/<n> --jq .state argv, exactly
  • the strip of gh's trailing newline
  • FileNotFoundErrorGhUnavailable as the exception type rather than a state string — the entire reason that class exists is so "could not run" never reads as "no findings"
  • a non-zero exit → unreadable: {stderr tail}, asserted != "closed", since issue_problems grades every non-open state and the stored string must not be mistakable for one
  • the or ["error"] fallback on empty stderr, which otherwise IndexErrors out of the whole check
  • non-URL entries ("(no issue — a release drive)") costing no subprocess call

Each was confirmed to fail under a matching mutation of the shim — dropping .strip(), corrupting the jq filter, swallowing GhUnavailable, removing the or ["error"] fallback, disabling the if not m: continue guard. Per this file's standing rule that a check which cannot fail is decoration.

The point-source smoke prompt is overtaken by events

issues --drafts flagged draft/bug/autolens/jax_point_source_point_smoke_sentinel.md for citing closed PyAutoLens#514. Chasing that flag against upstream main found the prompt overtaken on three axes:

  • The target file moved. scripts/jax_likelihood_functions/point_source/point.py is a 404 on autolens_workspace_test@main; it is now scripts/point_source/jax_likelihood/point.py. Every path in the prompt's task section is stale.
  • The root cause looks fixed. PyAutoLens 2a3f1a63 (PR #662, 2026-07-28) — "give FitPositionsImagePairAll a no-image floor" — describes exactly the reported mechanism: PairAll.chi_squared returning NaN, which fitness.py converts into resample_figure_of_merit. That is the -1e99 sentinel, and PairAll is the class the script exercises. It landed as phase 1 of the @rhayes777 audit epic (PyAutoArray#415), not from this prompt.
  • The fit class changed default. d838ca59 (2026-08-01, breaking) switched AnalysisPoint to FitPositionsImagePairAllSolved. The script constructs al.AnalysisPoint(...) with no explicit fit_positions_cls, so it no longer tests the class the prompt is about — and point.py on main has gained a second block pinned at a finite -82.33883111.

Recorded on the prompt, not closed out. The surviving -83.38049778 literal 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 under PYAUTO_SMALL_DATASETS=1" warning exists to protect). Status: is amended to draft — NEEDS RE-VERIFICATION before any work and 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 --drafts net 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).

…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
@Jammy2211
Jammy2211 merged commit f25e154 into main Aug 9, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants