Skip to content

Package migrations, add installed-wheel smoke tests, and prepare v0.1.1 #99

Description

@jmcte

Problem

A wheel built from current main omits src/mailplus_intelligence/migrations/*.sql. The installed package fails in apply_all_migrations() with FileNotFoundError, so the package cannot initialize its database outside an editable checkout.

The public v0.1.0 tag points to a documentation-only commit that predates pyproject.toml and src/; it must not be silently moved.

Relevant code

  • pyproject.toml:25-26
  • src/mailplus_intelligence/schema.py:9-16,26-35
  • scripts/release/dry-run.sh:52-58
  • .github/workflows/release.yml
  • CHANGELOG.md
  • docs/versioning.md

Scope

  • Include all migration SQL in both wheel and sdist.
  • Prefer resource-safe loading that works from an installed package.
  • Add a clean-build smoke path that installs the built wheel into an isolated environment.
  • Exercise mpi --version, database migration, fixture seed, search, queue, and dry-run export from the installed artifact.
  • Confirm the sdist can produce the same valid wheel.
  • Update release documentation to mark v0.1.0 as a broken/non-software release without rewriting its public tag.
  • Prepare the version/changelog/release notes for v0.1.1.

Non-goals

Implementation guidance

  • Add explicit setuptools package-data configuration for migrations/*.sql.
  • Consider importlib.resources.files() rather than assuming a filesystem-relative package path.
  • Extend release validation to install the wheel rather than only build and hash it.
  • Keep build output and temporary databases outside the repository during tests.

Acceptance criteria

  • Wheel contains all three current migration files.
  • Sdist contains the migrations and builds a valid wheel.
  • Fresh wheel installation can run all migrations into an empty database.
  • Installed mpi can complete fixture seed, search, queue inspection, and dry-run export.
  • Release validation fails if a migration or required package resource is missing.
  • v0.1.0 release notes clearly identify its limitations; the tag is unchanged.
  • pyproject.toml, runtime version, changelog, and proposed v0.1.1 tag agree.
  • PR includes the exact built artifact names and smoke-test results.

Validation

At minimum, the PR should report:

bash scripts/ci/run-fast-checks.sh
bash scripts/release/dry-run.sh
# install dist/*.whl into a fresh temporary venv
mpi --version
mpi doctor --project-root .
# fresh DB fixture seed/search/queue/export smoke

Dependency notes

Implementation can start immediately. Final publication is blocked by the other Phase A issues linked from #98.

Exact dependencies

Package/resource implementation can start immediately. Publishing the proposed v0.1.1 is blocked on #100, #101, #102, #103, #104, and #105.

Parent

Part of #98.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:infraInfrastructure, CI, release, governance, scripts, or repo setup.bugSomething isn't workingpriority:P1Codex Connector P1; blocks execution until Athena and Ares validate.ready-for-agentIssue is approved for worker-lane execution.risk:highHigh-risk change; validation required.status:ready-for-agentIssue is approved for worker-lane execution.

    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