Skip to content

docs: add buildstream skill for factory-wide BST patterns - #979

Draft
castrojo wants to merge 2 commits into
mainfrom
docs/buildstream-skill
Draft

docs: add buildstream skill for factory-wide BST patterns#979
castrojo wants to merge 2 commits into
mainfrom
docs/buildstream-skill

Conversation

@castrojo

@castrojo castrojo commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

What

Adds docs/skills/buildstream/ — a factory-level skill capturing the BuildStream 2 patterns that are true for every factory BST repo (today: dakota and fsdk-containers), harvested from both repos' docs/skills/.

  • SKILL.md — scope rule, the per-repo divergence table, 7 core patterns, red flags, verification
  • references/cache-keys-and-junctions.md — strong/weak key model, invalidation cones, junction drift-control policy
  • references/element-authoring.md — element/source kinds, dependency types, variables, conditionals, sandbox constraints, overlap rules
  • Registered in docs/SKILL.md router; index.json/index.md regenerated; /apache/buildstream added to the known Context7 IDs in context7.md

Junction patch queues: drift control, not "never patch"

A junction's patch_queue is part of its source hash, so the queue determines which upstream artifact cache your keys align with:

  • Patches diverging from the parent project's own queue are cache-destroying → prohibited.
  • Patches replicating the parent's queue byte-for-byte at the pinned ref are cache-aligning → mandatory when the parent carries one.
  • The enforceable rule is drift control against the parent's queue (dakota: just patch-drift-check in CI); the per-repo parameter is which upstream queue to match (currently gnome-build-meta at the pinned ref in both repos).

Note: dakota's own docs/skills/patch-junctions.md states an absolute "NO LOCAL JUNCTION PATCH QUEUES" rule that is contradicted by dakota's current state (patches/freedesktop-sdk/ carries 0001–0007) and by its own bst-overrides.md (byte-identity requirement). That inconsistency is reported for correction at the source in dakota — this skill deliberately does NOT repeat the absolute rule.

The general-vs-repo-specific line

Promoted only what holds in both repos. Explicitly documented as per-repo decisions, not factory rules:

Decision dakota fsdk-containers
Composition bootable OS, platform content in scope components/* only, platform.bst banned
Micro-arch opt-in x86_64_v3 banned (broad-compat baseline)
Output bootc OS (systemd/shell/dconf/ldconfig) distroless, no shell, SLIM + just verify

Not promoted: dakota's packaging templates (packaging-*.md), systemd/preset/dconf/bootc-ldconfig rules, GNOME/GL specifics; fsdk-containers' SLIM recipe, no-shell rule, verify gates, FSDK-tag versioning.

Evidence

  • BST behavior verified via Context7 /apache/buildstream (arch_cachekeys.md, format_public.md, format_project.md, handling-files/composition.md, downloadablefilesource.py); cited inline.
  • Repo claims verified against source: project.conf options in both repos, fsdk integration/ldconfig.bst usage, dakota elements/freedesktop-sdk.bst v3 conditional, both repos' junction patch queues.
  • pre-commit run --all-files green (front-matter, index staleness, doc links).

Docs-only change (docs/**); opened as draft for review per factory PR policy.

Jorge Castro and others added 2 commits August 9, 2026 01:51
Capture the BuildStream 2 patterns that are true for every factory BST
repo (dakota and fsdk-containers) as a new docs/skills/buildstream/
skill: graph-first debugging, element-kind and dependency-type
semantics, cache-key invalidation cones, upstream-first junction
hygiene, and source/ref discipline.

Per-repo product decisions (platform.bst vs components/* composition,
x86_64_v3, distroless SLIM recipe) are explicitly documented as NOT
factory-general, with pointers to each repo's own skills.

BST behavior claims verified against /apache/buildstream docs
(arch_cachekeys.md, format_public.md, format_project.md,
handling-files/composition.md). Registers the skill in docs/SKILL.md,
regenerates the skill index, and adds /apache/buildstream to the known
Context7 library IDs in context7.md.

Assisted-by: Claude via GitHub Copilot
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The first draft repeated dakota patch-junctions.md's absolute "no local
junction patch queues" rule. That rule is false in practice: dakota
carries 7 patches in patches/freedesktop-sdk/ and fsdk-containers
carries 0001+0002, both deliberately replicating the parent project's
queue so cache keys align with the parent's published artifact cache.

Restate the principle as drift control: a junction's patch_queue is
part of its source hash, so patches diverging from the parent's queue
are cache-destroying (prohibited) while patches replicating it
byte-for-byte are cache-aligning (mandatory). The per-repo parameter is
which upstream project's queue to match; dakota enforces it with
just patch-drift-check in CI.

Evidence: dakota/patches/freedesktop-sdk/ (7 patches, incl. patch_queue
in elements/freedesktop-sdk.bst), fsdk-containers
elements/{freedesktop-sdk,gnome-build-meta}.bst, dakota
docs/skills/bst-overrides.md.

Assisted-by: Claude via GitHub Copilot
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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