Skip to content

Add verify skill and 1-tile fixture runner (workflow/scripts/verify.py) - #1008

Merged
cailmdaley merged 2 commits into
developfrom
feat/verify-skill
Dec 3, 2026
Merged

cailmdaley merged 2 commits into
developfrom
feat/verify-skill

Conversation

@cailmdaley

Copy link
Copy Markdown
Contributor

Gemini 4 Neon on behalf of Cail.

Adds a verify skill (.claude/skills/verify/SKILL.md) and a single self-contained runner (workflow/scripts/verify.py) so any human or agent can run the stage a change touches through the real launcher (workflow/bin/sp) on a 1-tile, 3-exposure fixture and inspect the output beside a known-good baseline before committing.

What it adds

  • .claude/skills/verify/SKILL.md — stage table, fixture staging instructions (Fir paths and CADC/VOSpace recipe elsewhere), and what to check before committing.
  • workflow/scripts/verify.py — PEP-723 standalone script (uv run workflow/scripts/verify.py --stage <prepare|detect|psf|vignets|all>). Runs through workflow/bin/sp (--executor local), compares catalogues per column against --baseline, prints counts and star/galaxy metrics, and writes verify_summary.json + verify_<stage>.png. Pass --strict to exit non-zero on any difference.

Fixture & cost

Default tile 592.232 (3 exposures: 2514827 at 0.86″ seeing, 2780860 and 2780862 at 0.49″ seeing; ~1.6 GB inputs, 33,810 detected objects, 2,081 v2.0.0-selected galaxies, 5,083 good reserve stars). Pixels are not committed.

Stage Wall time (16 cores) Core-hours
detect ~1–5 min ~0.5–1.5
psf 2.7 min 0.7
all 14–20 min 3.7–5.3

Verification

Run live on Fir (def-waerbeke_cpu, 16 cores):

  1. Unchanged develop (--stage detect --strict and --stage psf --strict vs baseline_develop): NO_DIFFERENCE — 47/47 tile_detect columns and 22/22 reserve-star columns bit-identical on all 3 exposures.
    Unchanged develop PSF check

  2. variant/phase-validation-only (--stage all vs baseline_run1, 834 s): DIFFERENCES_DETECTED — only the 6 HSM_*_PSF star-validation columns moved (de1: −0.0041 → −0.0011/−0.0009 on the two 0.49″ exposures; dT: −0.0063 → −0.0020 on 2514827), while all 296/296 galaxy catalogue columns on all 33,810 objects stayed bit-identical (rms(Δg) = 0).
    phase-validation-only vs baseline_run1

  3. variant/psf-sampling-0p5-galaxy-centred (--stage all vs baseline_run1, 1187 s): DIFFERENCES_DETECTED — reserve-star de1 dropped to −0.00014/−0.00015 (6/22 star columns changed), 142/296 galaxy PSF/ngmix columns changed (rms(Δg) = 4.03e-3, 2,075 vs 2,081 selected), and all 154 detection/mask/position columns stayed bit-identical.
    psf-sampling-0p5-galaxy-centred vs baseline_run1

cailmdaley and others added 2 commits November 22, 2026 06:46
Adds .claude/skills/verify/SKILL.md and workflow/scripts/verify.py to run
any ShapePipe stage (prepare, detect, psf, vignets, all) through
workflow/bin/sp on a 1-tile, 3-exposure real-data fixture (592.232:
exposures 2514827 at 0.86", 2780860 and 2780862 at 0.49"), compare
columns and star/galaxy metrics against a baseline, and save a summary
figure.

Verified on Fir (def-waerbeke_cpu, 16 cores):
- develop (--stage detect --strict, --stage psf --strict) vs baseline_develop:
  NO_DIFFERENCE (47/47 detect cols, 22/22 star cols bit-identical)
- variant/phase-validation-only (--stage all) vs baseline_run1:
  6/22 HSM_*_PSF star cols changed (de1 -0.0041 -> -0.0011/-0.0009),
  296/296 galaxy cols bit-identical (rms(dg) = 0)
- variant/psf-sampling-0p5-galaxy-centred (--stage all) vs baseline_run1:
  6/22 star cols changed (de1 -> -0.00014/-0.00015), 142/296 galaxy
  PSF/ngmix cols changed (rms(dg) = 4.03e-3), 154 detection/mask cols
  bit-identical.
…and exposures

A product the selected stage compares (exposure index; tile sexcat for
detect/vignets; star catalogue for psf/vignets/all; final catalogue for all)
that is missing from the run or the baseline gives verdict INCOMPLETE, naming
each missing product and side, and --strict exits 1. A mistyped
--compare-only directory lands here.

compare_columns reports rows on each side and the number unmatched; detect
and final-catalogue comparisons count unmatched rows as a difference.
Baseline stars load from the baseline's own exposure index and compare_stars
counts an exposure present on only one side as a difference.

SKILL.md says to create a baseline with --no-baseline --keep-work (the tile
sexcat lives in the work dir) and documents INCOMPLETE.

Co-Authored-By: Claude Opus <noreply@anthropic.com>
@cailmdaley cailmdaley added the agent-merged Merged by an agent under the risk-tier policy, without human review label Dec 3, 2026
@cailmdaley
cailmdaley merged commit 743b4dd into develop Dec 3, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-merged Merged by an agent under the risk-tier policy, without human review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant