Skip to content

docs(solutions): capture two learnings from CPT path-only Breaks PR#108

Merged
mairas merged 1 commit into
mainfrom
docs/solutions-breaks-and-shared-predicate
May 13, 2026
Merged

docs(solutions): capture two learnings from CPT path-only Breaks PR#108
mairas merged 1 commit into
mainfrom
docs/solutions-breaks-and-shared-predicate

Conversation

@mairas
Copy link
Copy Markdown
Contributor

@mairas mairas commented May 13, 2026

Two new best-practices docs distilled from halos-org/container-packaging-tools#203 (which adds conditional Debian Breaks: auto-injection to CPT-generated .debs for routed visible web apps). Plus bidirectional cross-references in the pre-existing 2026-04-30-skip-apt-depends-pins-sibling-halos-packages.md policy doc.

What's added

2026-05-13-prefer-breaks-over-depends-for-partial-upgrade-gating.md

Companion to the 2026-04-30 Skip-Depends-pins policy. That doc names the Keep-the-pin conditions (silent failure mode, manual partial upgrades are an expected operational pattern) but doesn't recommend a Debian primitive. This doc says: when those conditions fire, use Breaks: peer (<< X), not Depends: peer (>= X). Breaks is conditional on the peer being installed — it doesn't over-constrain devices that don't ship the peer at all. Includes the apt resolver behaviour matrix (Breaks vs Depends vs Conflicts), a worked wrong/right example pulled from PR #203, and the generator-injection pattern.

2026-05-13-shared-predicate-over-parallel-if-chains.md

General code-organisation pattern surfaced during PR #203's CE review. When two call sites must answer the same non-trivial question about the same input, extract a named predicate. Maintainer-discipline comments like "keep this in sync with X" or "the two stay in lock-step" aren't contracts — they fail silently when one site evolves. PR #203's pre-review state had the path-only-emission trigger duplicated between registry.py and template_context.py with exactly such a comment. The fix extracted registry.emits_path_only_url as the shared source of truth. Doc covers when to apply (and when not to — caveats included).

Cross-references in 2026-04-30-skip-apt-depends-pins-sibling-halos-packages.md

Two new lines added to the Related section pointing forward to the new docs. Future PR authors hitting the partial-upgrade pin question will land on whichever angle fits their context first.

Cross-repo nature

Both learnings are cross-repo (Debian packaging hygiene + general code-organisation pattern), so they belong in the workspace, alongside the existing 2026-04-30 doc — not in any individual repo. The workspace AGENTS.md already surfaces docs/solutions/ to agents, so discoverability is intact.

Two new best-practices docs distilled from halos-org/container-packaging-tools#203
(auto-inject Debian Breaks: on Homarr stack for routed visible apps), plus
bidirectional cross-references in the pre-existing 2026-04-30 policy doc.

1. `2026-05-13-prefer-breaks-over-depends-for-partial-upgrade-gating.md`

   When the 2026-04-30 Skip-Depends-pins doc's Keep-the-pin conditions
   fire (silent failure mode OR manual partial upgrades are an expected
   operational pattern), the right Debian primitive is
   `Breaks: peer (<< X)`, not `Depends: peer (>= X)`. `Breaks` is
   conditional on the peer being installed — doesn't over-constrain
   devices that don't ship the peer at all. PR #203 is the worked example.

2. `2026-05-13-shared-predicate-over-parallel-if-chains.md`

   When two call sites must answer the same non-trivial question about
   the same input, extract that question into a named predicate consumed
   by every site. Maintainer-discipline comments like 'stay in lock-step'
   are not contracts; PR #203's pre-review state had drifted between
   the path-only-URL emission trigger in registry.py and the Breaks
   injection trigger in template_context.py. The fix extracted
   `registry.emits_path_only_url` as the shared source of truth.

The 2026-04-30 policy doc gains 'Related' links to both new docs so a
future PR author hitting the same question lands on whichever angle
fits their context first.
@mairas mairas merged commit 9b583db into main May 13, 2026
@mairas mairas deleted the docs/solutions-breaks-and-shared-predicate branch May 13, 2026 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant