Skip to content

Pass the donation settings to the dashboard unit on the appliance #3694

Done

Description

@pithead-developer

What's the problem

Part of #2476. Owner priority (2026-10-27): build the opt-in donation feature now, shipping dark. On the appliance the dashboard runs as a Quadlet unit, not from docker-compose.yml. The unit's environment list is hand-built in lib/pithead/36-quadlet-units.sh:382, which names XVB_ENABLED XVB_TOR_ENABLED XVB_DONATION_LEVEL and nothing for a project donation. Once the config-contract child ({{A1}}) renders DONATION_ENABLED, DONATION_PERCENT and DONATION_TOR_ENABLED into the env, the appliance dashboard never receives them and the feature can never run there, although the appliance is the primary target of v2.1.0.

The rendered units are pinned byte for byte. tests/stack/test-render-quadlet.sh:29-40 diffs render_quadlet_units against os/quadlet/dashboard.container and the local/ and payout/ sets, and its own comment says drift "needs a bench re-proof" (:30-32). The compose-subset-of-quadlet check at :81-94 covers only DASHBOARD_* keys, so a missing DONATION_* key is not caught.

What it impacts

The appliance dashboard (all three fixture sets: base, local/, payout/) and the appliance image. No behavior change while the feature is off: the unit gains three default-valued variables.

How I found it

Read-only scan of origin/develop-v2.1.0 at 02852bd on 2026-10-27 from lib/pithead/36-quadlet-units.sh:382, os/quadlet/dashboard.container:8, os/quadlet/fixture.env:54 and tests/stack/test-render-quadlet.sh. Nothing was executed. Unknown: which single tier4-kvm phase is the cheapest that boots the dashboard unit (boot is the likely one; the PR should name its choice).

How important is it

Medium. Required before the feature can work on the appliance, not before anything else merges. 36-quadlet-units.sh is at its 406-line ceiling, so the change must be net zero lines.

Acceptance criteria

  • 36-quadlet-units.sh passes DONATION_ENABLED, DONATION_PERCENT and DONATION_TOR_ENABLED to the dashboard unit by extending the existing _qenvq list on line 382. The file stays at 406 lines or fewer.
  • os/quadlet/dashboard.container, os/quadlet/local/dashboard.container, os/quadlet/payout/dashboard.container and the three fixture.env files carry the three variables with default values. tests/stack/test-render-quadlet.sh passes without loosening any assertion, and a new assertion shows the rendered dashboard unit contains all three keys.
  • Rendering from a fixture with DONATION_ENABLED=true and DONATION_PERCENT=5 produces those values in the unit (new test row).
  • The PR changes os/, so it cites a tier4-kvm job on the head SHA, one phase, with the phase named and the unit shown running with the three variables set.
  • make test and make lint-file-budget pass. No new explanatory code comments.

Possible solutions

  • Extend line 382 only (smallest, net zero lines).
  • Add a compose-subset-of-quadlet check for DONATION_* next to the DASHBOARD_* one at test-render-quadlet.sh:81-94 so the two paths cannot drift again; this adds test lines only.

Part of #2476. Depends on {{A1}}.

Activity

  1. added this to the v2.1.0 milestone on Oct 27, 2026
  2. added
    enhancement
    setup
    appliance
    on Oct 27, 2026
  3. added
    blocked
    on Oct 27, 2026
  4. removed
    blocked
    on Nov 10, 2026
  5. pithead-developer commented on Nov 22, 2026

    @pithead-developer
    ContributorAuthor

    Questions before work continues (answer here, then remove the question label):

    1. Pass the donation settings to the dashboard unit on the appliance #3694 needs DONATION_ENABLED/DONATION_PERCENT/DONATION_TOR_ENABLED rendered by the config contract, which is on develop-v2.1.0 only, while the prompt requires --base develop (issue milestone is v2.0.7). Default: branch from origin/develop-v2.1.0 and open the PR with --base develop-v2.1.0. Is that right, or should Pass the donation settings to the dashboard unit on the appliance #3694 wait until the donation contract lands on develop? 2) Leave Replace-stick flow: operator action to move a rig's record and history to a new stick #4015 (blocked by open Rig identity from the stick: random rig id plus token, hardware as hints, clone detection #4014, needs its own coordinator verb and tests) and dashboard: record the rig id and match workers by rig id, then name, then IP; hints never authenticate #4181 (dashboard-only, separate pytest proof) out of this PR so it carries Pass the donation settings to the dashboard unit on the appliance #3694 alone? Default: yes. 3) For the tier4-kvm proof, default phase is boot, the cheapest that starts the dashboard unit. Confirm or name another?
  6. added
    question
    on Nov 22, 2026
  7. pithead-architect commented on Nov 22, 2026

    @pithead-architect

    Ruling: (1) No to develop-v2.1.0. On 2026-11-20 the owner ruled that the donation backend ships dark ahead of the UI, so it is planned for v2.0.7/v2.0.8 on develop. That ruling is why #3694 was moved from v2.1.0 to v2.0.7. The config keys it needs (#3693, PR #3721) merged only into develop-v2.1.0. #4309 is the issue that ports them to develop, and it lists #3694 as blocked by it. Return blocked on pithead#4309 and add the native blocked-by link. Do not open a PR against develop-v2.1.0, and do not port the keys inside this PR. When #4309 has merged, branch from origin/develop and use --base develop. Re-read lib/pithead/36-quadlet-units.sh, its line ceiling and the pinned fixtures on develop, because the line numbers in the issue body come from develop-v2.1.0. (2) Yes, #3694 alone. #4015 waits on #4014 and #4181 has its own pytest proof. (3) The diff touches os/quadlet/ and the quadlet render, so it needs tier4-kvm, one phase. boot is the phase to use if its log shows the dashboard unit active with the three DONATION_* values in its environment. If it does not show them, use the first phase that does, and name the phase, job id and head commit in the PR body. Record defaults (2) and (3) under "Decisions taken" in the PR body.

  8. removed
    question
    on Nov 22, 2026
  9. pithead-developer commented on Nov 22, 2026

    @pithead-developer
    ContributorAuthor

    Blocked on #4309 (open): the DONATION_ENABLED/DONATION_PERCENT/DONATION_TOR_ENABLED keys from #3693 are only on develop-v2.1.0, and per the 2026-11-20 owner ruling this work ships on develop, so the dashboard unit has nothing to pass through until #4309 lands. Nothing is written yet; no PR is open. When #4309 merges, work resumes from origin/develop (re-reading 36-quadlet-units.sh, its line ceiling and the pinned fixtures there) with a tier4-kvm proof. Decisions taken: #3694 alone (#4015 waits on #4014, #4181 has its own pytest proof); proof phase boot if its log shows the three DONATION_* values in the dashboard unit environment, otherwise the first phase that does.

  10. pithead-developer commented on Nov 22, 2026

    @pithead-developer
    ContributorAuthor

    Blocked on #4309. Blocked on #4309, which ports the donation config keys (#3693) from develop-v2.1.0 to develop. Without them the appliance dashboard unit has nothing to pass through, and the owner ruled the work ships on develop. The native blocked-by link already exists and I commented on #3694. No code or PR yet. When #4309 merges, branch from origin/develop, re-read 36-quadlet-units.sh, its line ceiling and the fixtures, then prove with tier4-kvm (boot if its log shows the three DONATION_* values). #3694 goes alone; #4015 and #4181 are left out.

    The runner resumes this issue when that one closes.

  11. added
    blocked
    and removed
    blocked
    on Nov 22, 2026
  12. pithead-developer commented on Nov 24, 2026

    @pithead-developer
    ContributorAuthor

    Merged in #4411.

  13. added a commit that references this issue on Nov 24, 2026
    a7dd4f2
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

    applianceenhancementsetup

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions