Skip to content
rlsbl.resolved_target
On this page

Resolution of a member's release surface into ResolvedTarget records, linking separately-configured targets and pipelines for the release flow.

#rlsbl.resolved_target

#rlsbl.resolved_target

Resolution of a member's release surface into ResolvedTarget records, linking separately-configured targets and pipelines for the release flow.

Targets and pipelines are configured separately-but-linked (Phase 6.1): each pipeline entry declares an explicit target link (a target name, or null for a target-less publisher such as a docs/site deploy). This module turns that linked configuration into the flat, per-pipeline view the release flow wants.

A :class:ResolvedTarget is one publishable (target, pipeline) pair:

  • A target served by N pipelines produces N ResolvedTargets -- the release flow

publishes once per pipeline, so per-pair records let it iterate directly without re-deriving the target for each pipeline.

  • A pipeline-less target (e.g. plain / spec, which version-bump but do

not publish through a pipeline) produces a single ResolvedTarget with pipeline=None.

Target-less pipelines (target: null) are NOT targets and must never be faked into a ResolvedTarget. They are surfaced separately as deploys by :func:partition_pipelines (and MemberContext.deploy_pipelines).

Kept dependency-light: imports only :mod:rlsbl.errors. The caller supplies already-detected targets and already-loaded pipelines, so this module never touches disk or the pipeline registry.

#ResolvedTarget

One publishable (target, pipeline) pair.

Fields: target: the detected target entry (a TargetEntry). path: the target's resolved directory path (same value as MemberContext.target_paths[name] -- carried here so consumers need not re-resolve it). pipeline: the linked pipeline object, or None for a pipeline-less target (version-bump-only targets like plain / spec). publish_mode: the member's effective publish_mode string, carried verbatim from config ("ci" / "none") -- never collapsed to a private boolean. artifact_kind: the pipeline config's artifact value where present (e.g. Go's library / binary, wired in a later phase), or None. Carried as the raw config value. primary: whether this record is the release's primary/registry target. At most one record in a resolved list is primary; the release flow derives the registry name, registry-target instance, and primary path from it. Defaults to False; set by :func:resolve_targets when a primary_name is supplied.

#name

python
def name(self) -> str

The target's name (convenience for self.target.name).

python
def _pipeline_target_link(pipeline) -> Optional[str]

The pipeline's explicit target link (Phase 6.1's .target attribute).

load_pipelines sets instance.target from the entry's target key (a target name string, or None for a target-less publisher). This is the single point of coupling to that wiring; getattr keeps the resolver from crashing un-actionably on a pipeline built outside load_pipelines.

#partition_pipelines

python
def partition_pipelines(pipelines: dict) -> tuple[dict, list]

Split loaded pipelines by their target link.

Returns (by_target, deploys) where:

  • by_target maps a target name to the list of pipelines linking it

(insertion order preserved -- a target served by multiple pipelines keeps its pipelines in config order).

  • deploys is the list of target-less pipelines (target: null), in

config order.

Args:

  • pipelines: the dict returned by load_pipelines (name -> pipeline).

#resolve_targets

python
def resolve_targets(targets: list, pipelines: dict, publish_mode: str, primary_name: Optional[str]=None) -> list

Resolve targets + linked pipelines into a flat list of ResolvedTargets.

One :class:ResolvedTarget is produced per (target, linked pipeline) pair. A pipeline-less target yields a single record with pipeline=None. Target-less pipelines are excluded here (see partition_pipelines / deploys).

When primary_name is given (the release file's include[0]), exactly one record is marked primary=True: the FIRST record (in config / detection order) whose name equals primary_name. When a target is served by multiple pipelines, the records for that target are contiguous and the first is chosen -- a deterministic, config-order choice. If no record matches primary_name (or it is None), nothing is marked; non-release contexts (version sync, workspace checks) leave it unset.

Args:

  • targets: detected target entries (list of TargetEntry).
  • pipelines: loaded pipelines (dict name -> pipeline, from

load_pipelines).

  • publish_mode: the member's effective publish_mode string, carried

verbatim onto every produced record.

  • primary_name: the primary/registry target name (include[0] from the

release file), or None when no primary is known.

Raises:

  • ConfigError: if a pipeline links a target name absent from targets

(a dangling reference). validate_pipeline_target_links catches this earlier at config-validation time; this is a loud backstop so the resolver never produces a silently-incomplete view from unvalidated input.

More tools from this site

  • claudestream Drive Claude Code from Python: run it as a subprocess and read its output as typed events, with async and sync sessions, sandbox policies, and tools you define in Python
  • claudewheel A TUI Claude Code Launcher that lets you have more than one profile, manage sessions lifecycle, pick the exact CC version, model to use (even older unlisted ones), pick which GitHub account to use, etc.
  • dirstat Fast, single-binary directory statistics CLI: every file under a tree grouped by format, with counts, sizes, and lines of code, as a colored terminal table or as JSON
  • fastware A batteries-included ASGI framework: msgspec JSON, a managed Granian server, dependency injection, SSE, WebSockets, auth, and a test client
  • go-toml-edit Zero-dep TOML editing library for Go with comment preservation
  • howmuchleft The fastest Claude Code statusline: context window, 5-hour, and weekly limit usage as three customizable gradient bars, rendering in about 6 ms
  • orxtra
  • pgdesign
  • predraw Declarative rendering pipeline: describe a scene in JSON and get SVG, PNG and WebP out, with light and dark style tokens, reusable components and text converted to path outlines
  • reposummary Turn a git repository's history into a Markdown journal: pick a time window or revision range and get a readable digest of what changed, optionally narrated by an LLM
  • safegit git wrapper CLI that gives each commit its own temporary index and retries ref updates on conflict, so concurrent agents share one repository
  • saferm Command-line replacement for rm that archives every deletion with a mandatory reason and the context it ran in, so deleted files can be listed, inspected and restored
  • selfdoc Static Site Generator that builds a project's documentation site directly from its source code, so the docs can never drift from the code they describe, with SEO/AEO, first-class blog, search, and cross-project linking built in
  • strictcli
  • stricttest An always-on test-isolation floor: a pytest plugin and a Go env-hygiene module that make a test suite structurally unable to reach real credentials, the real HOME, the network, or the development repository.
  • wesktop A Python framework that turns an ASGI web app into a desktop application, serving it from a local Granian server and displaying it in a native OS window via pywebview
Search