Skip to content

Domain leak: bump README transposition raises publish-named PublishPreparationError #100

Description

@lodyai

Summary

The lading bump path raises a publish-named error for README transposition
failures, coupling the bump domain to the publish domain and misnaming the
condition.

Evidence

bump.py:13 and bump_readme.py:27 import PublishPreparationError from
publish_manifest and raise it for README-transposition failures during
lading bump (bump.py:301-303, bump_readme.py:152-174). A bump-time failure
surfacing a PublishPreparation error is a domain leak and misnames the failure.

Fix

  • Introduce a bump-domain error (e.g. ReadmeTranspositionError(LadingError)) in a
    bump module and raise that.
  • If a shared staging error is genuinely intended, move it to a neutral module
    (e.g. exceptions.py) with a neutral name rather than leaving it in
    publish_manifest.

Domain ownership mandate

  • Single canonical error per domain: README transposition failures are owned by
    the bump domain; publish staging failures by the publish domain. No cross-domain
    imports of error types for unrelated conditions.
  • Document it: record the error taxonomy (which module owns which LadingError
    subclass) in docs/developers-guide.md.
  • Property/behavioural tests: assert that README-transposition failure paths
    raise the new bump-domain error (missing workspace README; crate outside the
    workspace root). Keep the publish staging tests asserting the publish error.
  • Snapshot assertions: snapshot the user-facing error messages so the rename is
    a reviewed change.
  • Model checking: not applicable.

Acceptance criteria

  • Bump README failures raise a bump-domain error, not PublishPreparationError.
  • No bump module imports a publish-domain error type.
  • Error taxonomy documented in docs/developers-guide.md.
  • Tests assert the new error on both transposition failure paths.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions