Skip to content

[architect] Add-on export commands are copy-pasted per add-on and have drifted (Kubernetes export wipes the others) #638

Closed

Description

@hivecommons-hive

Summary: The developer commands that copy the optional add-ons (ZFS, NVIDIA, Tailscale, NetBird and others) out of a local build are written out by hand, one near-identical copy per add-on. The copies have already drifted once (a ZFS copy step that never matched its file, #306), and today the Kubernetes (k0s) command deletes whatever the other commands already exported. Folding the copies into one shared step, checked by a test, stops each new add-on from bringing its own variant.


Architecture Finding

Type: tech-debt / duplication with drift
Affected area: Justfile (export-*sysext recipes), tests/unit/test_sysext_export_contract.py

Every opt-in sysext export recipe repeats the same 7-line body (checkout into a scratch dir, copy <prefix>*.raw.zst to dist/sysext/, append its SHA256SUMS line, remove scratch, list). There are five byte-for-byte copies differing only in name and prefix — export-zfs-sysext, export-nvidia-sysext, export-nvidia-container-toolkit-sysext, export-tailscale-sysext, export-netbird-sysext — plus a loop variant (export-homelab-sysext) and a divergent one (export-sysext, k0s). NetBird (#555) added the latest copy.

Drift already present:

  1. export-sysext (k0s) runs rm -rf dist/sysext and overwrites dist/sysext/SHA256SUMS with cp; every other recipe mkdir -p and appends. So just export-zfs-sysext export-sysext leaves only k0s in dist/sysext/ — the result depends on call order.
  2. The glob contract test (test_export_recipes_copy_globs_match_the_element_image_names) pins only zfs and nvidia-open-595. The tailscale, netbird and nvidia-container-toolkit globs are unchecked, which is exactly how Review backlog (correctness): export-zfs-sysext cp glob never matches the zfs artifact #306 (zfs glob never matched) shipped.
  3. The appending recipes add a duplicate SHA256SUMS line on every re-run.

Impact

Each new opt-in sysext copies one of the existing bodies, choosing whichever variant it starts from; the test has to be extended by hand for each one or the new glob is unguarded.

Recommendation

  • One private recipe _export-sysext-element NAME PREFIX holds the body; the five single-element recipes call it (pure refactor, no behaviour change), and a unit test checks every caller's PREFIX against the element's sysext-image and fails if a new export-*-sysext recipe re-inlines the body instead of calling the helper.
  • export-sysext (k0s) stops wiping dist/sysext/ and appends its SHA256SUMS line like the others, then calls the same helper; the helper drops a stale line for the same file before appending so re-runs do not duplicate. This changes what the command does, so it is left to the fix lane rather than the refactor PR.

Decision taken by hive: the refactor PR covers the first box only; the k0s ordering and duplicate-line fix are behaviour changes and stay open here for a fix PR.


Filed by architect agent (ACMM L6 — full mode)

— hive: agent=architect backend=copilot model=claude-opus-5.5 copilot=1.0.88

Activity

  1. added
    agent/architectFiled or owned by the architect agent.
    architectureCreated by Hive for agent-filed issue provenance
    tech-debtCreated by Hive for agent-filed issue provenance
    on Nov 7, 2026
  2. added
    needs-kindMissing required label matching ^kind/
    needs-triageMissing required label matching ^triage/
    on Nov 7, 2026
  3. jeefy commented on Nov 7, 2026

    @jeefy
    Collaborator

    Issue triage

    Next action: a triager or maintainer reviews this issue.

    Reporter or contributor

    • If no kind/* label is set, categorize the issue with one of: /kind bug, /kind regression, /kind security, /kind feature, /kind documentation or /kind cleanup.
    • Optionally add an area with /area <area>: desktop, flatpak, gaming, hardware, installer or dx.

    Triager or maintainer

    • Review the report and ask the reporter for any missing information.
    • When the scope is accepted and the issue is ready for work, comment /triage accepted. Only triagers and maintainers can do this; acceptance does not assign an implementer.

    needs-kind clears when a kind is set. needs-triage and this post clear when triage is accepted.

    See Triage & Prow Commands for all available commands.

  4. jeefy commented on Nov 7, 2026

    @jeefy
    Collaborator

    Issue triage

    Next action: a triager or maintainer reviews this issue.

    Reporter or contributor

    • If no kind/* label is set, categorize the issue with one of: /kind bug, /kind regression, /kind security, /kind feature, /kind documentation or /kind cleanup.
    • Optionally add an area with /area <area>: desktop, flatpak, gaming, hardware, installer or dx.

    Triager or maintainer

    • Review the report and ask the reporter for any missing information.
    • When the scope is accepted and the issue is ready for work, comment /triage accepted. Only triagers and maintainers can do this; acceptance does not assign an implementer.

    needs-kind clears when a kind is set. needs-triage and this post clear when triage is accepted.

    See Triage & Prow Commands for all available commands.

  5. jeefy commented on Nov 7, 2026

    @jeefy
    Collaborator

    Issue triage

    Next action: a triager or maintainer reviews this issue.

    Reporter or contributor

    • If no kind/* label is set, categorize the issue with one of: /kind bug, /kind regression, /kind security, /kind feature, /kind documentation or /kind cleanup.
    • Optionally add an area with /area <area>: desktop, flatpak, gaming, hardware, installer or dx.

    Triager or maintainer

    • Review the report and ask the reporter for any missing information.
    • When the scope is accepted and the issue is ready for work, comment /triage accepted. Only triagers and maintainers can do this; acceptance does not assign an implementer.

    needs-kind clears when a kind is set. needs-triage and this post clear when triage is accepted.

    See Triage & Prow Commands for all available commands.

  6. 5 remaining items

  7. removed
    needs-kindMissing required label matching ^kind/
    needs-triageMissing required label matching ^triage/
    on Nov 9, 2026
  8. hivecommons-hive commented on Nov 9, 2026

    @hivecommons-hive
    ContributorAuthor

    🌱 Good first issue — bring your own coding agent

    Hi! This repository is maintained with hive and welcomes contributions made with your own AI coding agent (Claude Code, Codex, Copilot CLI, Bob, …). hosted-projectbluefin-knuckle-gjvq picked this issue as a good place to start because:

    • a concrete, reproducible bug report
    • has clear steps or acceptance criteria

    How to land it (no waiting on a human):

    1. Claim it through the relay: open https://hosted-projectbluefin-common-nmq5.hive.hivecommons.dev/contribute?issue=projectbluefin%2Fserver%23638 and sign in with GitHub. Claiming stamps the issue so hive leaves it to you.
    2. Fork or branch, make the change with your agent, and sign each commit with DCO (git commit -s).
    3. Open a PR whose description says Fixes #638 — that closing keyword is how hive's contributor lane links the PR to your claim.
    4. Hive runs CI and merges green PRs from claimed contributors automatically.
    Paste this to your agent
    Fix #638 in github.com/projectbluefin/server (https://github.com/projectbluefin/server/issues/638). First open https://hosted-projectbluefin-common-nmq5.hive.hivecommons.dev/contribute?issue=projectbluefin%2Fserver%23638 and claim the issue through the hive relay (sign in with GitHub). Work on a fork/branch; keep the change scoped to the issue; sign every commit with DCO (git commit -s); open a PR whose description contains the line 'Fixes #638' so the hive's contributor lane can auto-merge it once CI is green. Read and follow https://github.com/projectbluefin/server/blob/HEAD/AGENTS.md before changing code.
    

    Prefer not to drive the loop by hand? Run your own hive (we call them clankers) — a relay on your machine that claims, opens the PR and handles review fixes for you, and earns you a contributor profile and a leaderboard place: see https://hosted-projectbluefin-common-nmq5.hive.hivecommons.dev/contribute.

    If nobody claims it, hive may pick it up itself — claiming first prevents that. Docs: contributor relay · contributor lane auto-merge · trust tiers · AGENTS.md.

  9. added
    good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.
    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
    on Nov 9, 2026
  10. added a commit that references this issue on Nov 17, 2026
    a23e0e4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/architectFiled or owned by the architect agent.approved-directionarchitectureCreated by Hive for agent-filed issue provenancegood first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/bugSomething is broken.tech-debtCreated by Hive for agent-filed issue provenancetriage/acceptedScope accepted; ready for work. Use `/triage accepted`.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions