ADR-0001: A separate distribution¶
Status: Superseded by lattice ADR-0026 Date: 2026-10-17 Deciders: Alex Nodeland
Records lattice RFC-0003's D5.
Context¶
Native files need types, a blob store with its own tables and migrations, a check-out record, an app port and, in later phases, a worker program, a router and a dependency on an external application in alpha. artifactr ADR-0034 puts each adapter in an extra of the package whose port it implements, but none of this implements an artifactr port: it is a domain built on artifactr.
Decision¶
- A package of its own,
packages/artifactr-files, as a deliberate departure from artifactr ADR-0034. artifactr's dependencies and migration chain stay as they are for every application that doesn't edit native files. relayr is the precedent for a package that builds on artifactr from outside. - Its PyPI name is
artifactr-files-ai, with the suffix artifactr's own distribution has, and it is imported asartifactr_files. Nothing in its name uses an app's brand. - It depends inward only. It imports the names in
__all__ofartifactr,artifactr.coreandartifactr.workspace, and its SQL layerlattice_core.sql; artifactr imports nothing of it.tests/test_layering.pyholds both. - It lives in the monorepo, so CI runs its tests on every change to artifactr (lattice ADR-0002). Its
artifactr-aifloor is raised by hand. - Its first release is staged. It joins release-please at
0.0.0in the manifest, so its first release is 0.1.0 (lattice ADR-0006), and the third publishing stage, after artifactr. Its release pull request stays unqueued until itsartifactr-aifloor names the artifactr release with the lease. Nothing publishes it to PyPI: a release run never does, and a dispatch needsPYPI_PUBLISHand a trusted publisher on PyPI forartifactr-files-ai, which no one has added; itspypi-artifactr-files-aienvironment is created, with its reviewers and tag restriction, before its first dispatch (lattice ADR-0023's amendment, "a package added unreleased").
Options considered¶
Option A: A separate distribution (chosen)¶
| Dimension | Assessment |
|---|---|
| Complexity | Medium: a package's configuration, docs and release |
| artifactr | Unchanged for applications without native files |
| Coupling | artifactr's public API only, held by a test |
Pros: its tables, migrations and an alpha dependency stay out of artifactr. Cons: a second package to release, whose floor on artifactr is raised by hand.
Option B: An extra of artifactr¶
Cons: its tables and migrations would join artifactr's chain for every application, and its worker and router would be in artifactr's wheel.
Option C: A name built on an app's brand¶
Cons: WordCraft's brand licence forbids it, and the package isn't about one app.
Trade-off analysis¶
The package is a domain, not an adapter, and keeping it out of artifactr costs a release and a floor. Option B makes every application carry what few use.
Consequences¶
- Easier: artifactr is unchanged for applications that don't edit native files; its only change for them is the lease (artifactr ADR-0071).
- Harder: the package's
artifactr-aifloor must rise to the release withWorkspace.lease_artifactbefore the package's first release. - Harder: until its environment and pending publisher exist, its release is attached to GitHub and published nowhere.
Action items¶
- The package, its
pyproject.toml, amoon.ymlthat depends on artifactr and lattice-core, its entries inrelease-please-config.jsonand the manifest, and its publishing stage. - Raise the
artifactr-aifloor to the release with the lease, once it is onmain. - The maintainer, before the first dispatch: the
pypi-artifactr-files-aienvironment and the pending trusted publisher on PyPI.
Superseded (2026-10-17): an extra of artifactr¶
Before its first release, the maintainer decided that artifactr's integrations, native files among them, are extras of artifactr-ai, not distributions of their own, each turned on per workspace by the shared Integrations switch (lattice ADR-0026). The package is now artifactr's files extra, artifactr-ai[files], imported as artifactr.files; nothing was ever published as artifactr-files-ai. The decision above is kept as it was made:
- What holds: it depends inward only, on the names in
__all__ofartifactr.coreandartifactr.workspace, and onlattice_core.sqlin its SQL layer, and the rest of artifactr imports nothing of it. Its tables keep their own Alembic chain and version table,artifactr_files_alembic_version, apart from artifactr's storage's. - Why: lattice ADR-0026 says it: the integration needs no dependency the base must keep out beyond its extra, and has no consumers or release cadence of its own, so a distribution's ceremony buys it nothing.
- The action items are void: there is no floor to raise, and no environment or publisher to add.