Repository navigation
Description
Overview
The cti-upkeep 3a smoke triage (autocti_workspace#43) found five scripts failing on main. A fresh re-run in dependency order shows that four really fail, all fixable inside the workspace, and one (plot/fpa/imaging_ci/database.py) passes when its simulator and fit run first. This task fixes the four and adds the scripts to smoke_tests.txt, so CI catches them if they break again. Phase 3 of the cti-upkeep epic.
Plan
- Fix the four failing scripts in the workspace. No library change is needed.
- Add each fixed script to
smoke_tests.txtin its group, after the scripts that produce its data. - Time the FPA chain (simulator, fit, database: ~220 s in test mode) and add it only if it fits the smoke budget; otherwise list it commented out, with the timing as the reason.
- Check both smoke profiles (
profile_smoke,profile_release) and CI on 3.12 and 3.13. - Out of scope: the slow
non_uniform_cosmic_rayssimulator, which stays a note on the epic. - Tier: glance. Merge mode: auto-merge on green if the Witness passes, then a post-merge summary.
Detailed implementation plan
Affected Repositories
- autocti_workspace (primary, and the only repo changed)
Branch Survey
| Repository | Current Branch | Dirty? |
|---|---|---|
| ./cti/autocti_workspace | main (a92e524) | clean |
Suggested branch: feature/cti-five-failing-scripts
Re-run evidence (2026-11-06, PyAutoCTI main 804ddebd, profile_smoke env, fresh clone)
| script | result |
|---|---|
| plot/fpa/imaging_ci/simulator.py → fit.py → database.py | all rc=0 (61 s, 71 s, 87 s). The PIXSCAY error does not reproduce. |
| plot/diagnostics/imaging_ci/well_filling.py | TypeError: only 0-dimensional arrays can be converted to Python scalars (float() on a 1-element binned EPER array, raised from autoarray abstract_ndarray.__float__) |
| dataset_1d/advanced/temporal/database.py | AttributeError: 'ModelInstance' object has no attribute 'time' |
| dataset_1d/advanced/temporal/plot.py | AttributeError: 'ModelInstance' object has no attribute 'cti' (the same root cause; the SQLAlchemy error does not reproduce) |
| imaging_ci/advanced/chaining/noise_scaling.py | reads poisson/simple/norm_*, but poisson_traps.py writes poisson/norm_* |
Implementation Steps
scripts/imaging_ci/advanced/chaining/noise_scaling.py: read fromdataset/imaging_ci/poisson/norm_*and drop the stray"simple".scripts/plot/diagnostics/imaging_ci/well_filling.py: take element[0]of thepixels=(0,1)binned array instead of callingfloat(array).scripts/dataset_1d/advanced/temporal/database.py:samps.max_log_likelihood()on the combined fit returns one entry per dataset ([0]–[3]) plusfactor. Use[0](the per-dataset instance carryingtimeandcti, asfit.pydoes withresult_list[0].instance) and explain why in the prose.scripts/dataset_1d/advanced/temporal/plot.py: the same[0]fix formedian_pdfanderrors_at_upper/lower_sigma. The database query also returns the 20 per-dataset sub-fits beside the 5 top-level fits ("25 fits matching"), whose samples fail to load, so restrict it to top-level fits.smoke_tests.txt: addpoisson_traps.py+noise_scaling.py,well_filling.py, andtemporal/database.py+temporal/plot.py, each after its producers. Add the FPA chain only if its timing fits.- Notebooks: follow the workspace AGENTS.md convention; no hand edits to
.ipynbfiles. - Verify: each fixed script from a fresh clone in dependency order,
python .github/scripts/run_smoke.pyunder both profiles, then PR CI.
Key Files
scripts/imaging_ci/advanced/chaining/noise_scaling.py: dataset pathscripts/plot/diagnostics/imaging_ci/well_filling.py: EPER scalar extractionscripts/dataset_1d/advanced/temporal/{database,plot}.py: per-dataset instance from the combined fitsmoke_tests.txt: promoted entries
Original Prompt
Click to expand starting prompt
autocti_workspace: five scripts fail on current main (from the 3a smoke triage)
Type: bug
Target: autocti_workspace
Repos:
- autocti
- autocti_workspace
Themes: - cti
- smoke
Difficulty: medium
Autonomy: supervised
Priority: normal
Status: formalised
Consequence: glance
Witness: each of the five scripts below runs end-to-end underconfig/build/profile_smoke.yamlfrom a fresh clone, run after its producer scripts in dependency order (simulator → fit → database → plot); each is then added tosmoke_tests.txtin its group, and CI smoke stays green.
Review-minutes: 5
Unattended: ready
Epic: cti-upkeep
Phase: 3
Filed: 2026-11-05
Found by the cti-upkeep 3a triage on 2026-11-05 (autocti_workspace#43). The 79 scripts were run under
profile_smoke against PyAutoCTI main 804ddebd, in dependency order. These five fail for reasons other
than ordering:
| script | error |
|---|---|
plot/fpa/imaging_ci/database.py |
KeyError: "Keyword 'PIXSCAY' not found." (FITS header read on the database-loaded dataset) |
plot/diagnostics/imaging_ci/well_filling.py |
TypeError: only 0-dimensional arrays can be converted to Python scalars |
dataset_1d/advanced/temporal/database.py |
AttributeError: 'ModelInstance' object has no attribute 'time' (likely the FactorGraphModel instance structure; see complete/2026/11/cti-database-examples-drift.md) |
dataset_1d/advanced/temporal/plot.py |
SQLAlchemy error (https://sqlalche.me/e/20/gkpj), probably downstream of the database.py failure |
imaging_ci/advanced/chaining/noise_scaling.py |
FileNotFoundError: dataset/imaging_ci/poisson/simple/norm_100/data.fits; no simulator writes that path (simulators/examples/poisson_traps.py writes elsewhere) |
Speed note (not a failure): imaging_ci/simulators/overview/non_uniform_cosmic_rays.py takes ~200–430 s,
which keeps it and overview/overview_4_charge_injection_data.py (which calls it) out of smoke. A faster
simulation (smaller frame or fewer cosmic rays under test mode) would let both be promoted.
Activity
Jammy2211 commentedon Nov 6, 2026
Shipped — 2026-11-06
PRs
Summary
All five scripts run from a fresh clone in dependency order and are in
smoke_tests.txt(36 → 44). Fixes: per-dataset[0]instances from the FactorGraphModel fits (temporal database/plot); scalar EPER via[0](well_filling); noise_scaling's dataset path,dataset_fullwiring and noise-scaling maps on the full datasets (set_noise_scaling_map_dictno longer exists).plot/fpa/imaging_ci/database.pydid not reproduce once run in order and was promoted with its simulator and fit.Session Notes
/ci_speedupcandidate.PyAutoMind/draft/bug/autocti_workspace/database_scripts_stale_sqlite_under_test_mode.md(database scripts delete the wrong .sqlite under test mode, so a second local run fails).