Skip to content

fix: restore aggregator output contracts #1324

Description

@Jammy2211

Overview

Release-profile validation exposed seven scripts whose result discovery or generated-output contracts depend on state from earlier runs. Reproduce them from clean output trees, distinguish PyAutoFit regressions from script assumptions, and make every script’s prerequisites explicit and reliable.

Plan

  • Reproduce all seven scripts in release CI order and independently.
  • Classify failures by aggregator discovery, sample assumptions, or output paths.
  • Fix PyAutoFit when valid completed searches are undiscoverable.
  • Otherwise update workspace scripts minimally, preserving tutorial narrative.
  • Add focused tests and rerun the seven-script release surface.
Detailed implementation plan

Affected Repositories

  • PyAutoFit (primary)
  • autogalaxy_workspace
  • autolens_workspace
  • autolens_workspace_test

Work Classification

Both — library investigation first, followed by workspace changes where required.

Branch Survey

Repository Branch State
PyAutoFit main clean
autogalaxy_workspace main generated datasets modified
autolens_workspace main generated datasets modified
autolens_workspace_test main datasets modified; notebooks deleted

No registered worktree conflict exists. Adjacent work is present on feature/latent-jax-release-failures.

Suggested branch: feature/aggregator-output-contracts
Worktree root: ~/Code/PyAutoLabs-wt/aggregator-output-contracts/

Implementation Steps

  1. Create an isolated worktree and reproduce each parent directory from a clean output tree using its release profile.
  2. Rerun each target script independently and document required predecessor outputs.
  3. Inspect PyAutoFit/autofit/aggregator/ and database scraping when completed searches are absent.
  4. Add focused PyAutoFit regression tests only where valid output is incorrectly excluded.
  5. Correct invalid result-count assumptions and create generated-output directories within the responsible workspace scripts.
  6. Preserve user-facing prose and regenerate notebooks for modified tutorial scripts.
  7. Run focused unit tests, script-size guards, and all seven release-profile scripts.
  8. Ship library changes before dependent workspace changes.

Key Files

  • PyAutoFit/autofit/aggregator/aggregator.py
  • PyAutoFit/autofit/aggregator/search_output.py
  • PyAutoFit/autofit/database/aggregator/scrape.py
  • autogalaxy_workspace/scripts/guides/results/start_here.py
  • autogalaxy_workspace/scripts/guides/results/aggregator/samples_via_aggregator.py
  • autolens_workspace/scripts/guides/results/start_here.py
  • autolens_workspace/scripts/guides/results/aggregator/galaxies_fits.py
  • autolens_workspace/scripts/guides/results/aggregator/samples_via_aggregator.py
  • autolens_workspace/scripts/guides/results/workflow/csv_make.py
  • autolens_workspace_test/scripts/imaging/convolution.py

Original Prompt

Click to expand starting prompt

Fix release aggregator and generated-output contracts

Context

Seven release failures involve results that are absent, shorter than examples assume,
or written to a different location. Several pass in a stateful local checkout, so the
first task is a clean, directory-ordered reproduction. Primary owners are @PyAutoFit,
@autogalaxy_workspace, @autolens_workspace, and @autolens_workspace_test.

Scripts

  • autogalaxy_workspace/scripts/guides/results/start_here.py
  • autogalaxy_workspace/scripts/guides/results/aggregator/samples_via_aggregator.py
  • autolens_workspace/scripts/guides/results/start_here.py
  • autolens_workspace/scripts/guides/results/aggregator/galaxies_fits.py
  • autolens_workspace/scripts/guides/results/aggregator/samples_via_aggregator.py
  • autolens_workspace/scripts/guides/results/workflow/csv_make.py
  • autolens_workspace_test/scripts/imaging/convolution.py

Required work

  1. Run each parent directory in CI order from a clean output tree under the release
    profile, then rerun each script independently to document prerequisites.
  2. Determine whether failures are library output/aggregator regressions, invalid script
    assumptions about sample counts, or missing directory creation for generated files.
  3. Fix PyAutoFit when valid completed searches are not discoverable. Otherwise update
    scripts minimally while preserving their teaching narrative.
  4. Ensure scripts create their own output directories and do not depend on unrelated
    earlier legs or developer-local artifacts.
  5. Add the narrowest appropriate tests and rerun all seven release-profile scripts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions