Skip to content

Sovereign: add bounded, resumable bulk worker configuration jobs #2519

Open

Description

@VijitSingh97

What's the problem

Pithead changes one worker at a time. The dashboard apply route takes one worker and a set of the six writable keys (pools, DONATION, autotune, watchdog, watchdog_interval_min, max_temp_c), the host control runner applies it, and the dashboard waits inline for a terminal result. Nothing applies one reviewed patch to many workers: there is no job record, canary, batch pacing, pause or cancel, resume after a reload, or per-worker audit of a fleet change. A search of dashboard/ and lib/ for bulk jobs and canaries on develop and develop-v2.1.0 finds nothing. This is a missing capability, not a defect.

The old gate on this issue (#2514 and #2518) is stale: both are closed and folded into the lean UI spec #3566 (#2514 into #2530, #2518 into #2517). The current gate is the architect ruling on this issue: durable jobs bind to the approved v2.1.0 configuration contract tracked by #3557, not to the six-field contract alone and not to completion of the #2478 umbrella.

Scope is the backend job only. Selection, review and progress screens belong to #2520.

What it impacts

  • Operators with several managed workers, who today edit each rig one by one with no safe staged rollout and no durable record if a reload interrupts.
  • Security: a path that mutates many rigs at once must keep the existing authority split (the container only asks, the host runner validates and executes, the rig enforces its own allowlist), secret redaction and authorization.
  • Sovereign: build fleet configuration selection, review and progress #2520, the selection, review and progress UI, which cannot start without this contract and would otherwise invent it inline.

How I found it

  • The investigator brief on this issue (2026-09-23) read the single-worker synchronous path (handle_worker_apply, submit_worker_apply, wait_result, history through add_worker_config_version) and found no bulk-job code. I re-read the same names on origin/develop (37c3bb2) and origin/develop-v2.1.0 (7cb2266) on 2026-10-27; nothing was run.
  • Owner roadmap alignment (2026-10-06): this issue stays the single owner of durable bulk configuration. Start with explicit, ungrouped selection; named reusable profiles or grouping are a later bounded extension, with no inheritance language and no inferred topology. Enterprise policy Define a bounded enterprise-pilot access, device and update policy #3184 is not implemented RBAC and does not change the authority model.
  • Architect ruling and developer comments: wait for the approved configuration contract, recorded as Implement the approved v2.1.0 configuration model and migration contract #3557.
  • The lean roadmap rates it P4 (later, only on demand, defer).
  • Not established: whether pacing belongs to the host runner or the dashboard, whether an existing durable-job mechanism can be reused, and how the Implement the approved v2.1.0 configuration model and migration contract #3557 mappings change the reviewed-field set.

How important is it

Low for the release, and deferred. The lean roadmap puts it in P4: pull it in when a real user asks. The owner's 2026-10-27 direction lifts the pause on post-GA work, but this issue stays blocked behind #3557. It is security-sensitive because it mutates many rigs, so correctness and proof matter more than speed. It is not a blocker for 2.0.x or v2.1.0. The milestone stays v2.x - post-GA.

Acceptance criteria

All proof uses fake workers; no live fleet change and no deployment.

  • Starts only after the implementation children of Implement the approved v2.1.0 configuration model and migration contract #3557 document the approved configuration contract. The job's reviewed-change schema is defined against it and names the writable worker fields (today the six above). It reuses the existing worker validation (validate_worker_changes), not a second allowlist.
  • A job accepts a frozen list of explicit worker identities (no groups, tags or inferred topology) and only the selected writable fields. Unchanged mixed values and secrets stay untouched. Before any dispatch it returns per-worker eligibility and validation outcomes (eligible, excluded with reason, invalid with reason). Test: a mixed-validation fake fleet.
  • Execution is bound to the reviewed target identity, config version and the reviewer's authorization, and is revalidated per worker at dispatch. Drift, a changed identity or lost authorization marks the target stale and requires a new review; it never retargets silently. Tests: stale version, changed identity, revoked authorization.
  • A named canary runs first (the operator picks it at review time), then bounded batches with a stated maximum size. A failed canary stops further dispatch and is reported. Offline or unsupported workers are excluded with a reason and are not queued for a later change. Tests: canary failure, partial success.
  • Job state and per-worker outcomes persist. After a page reload, an interrupted request or a dashboard restart, a repeated submit or a resumed job dispatches to no worker that was already dispatched. Reuse an existing durable-job mechanism if one exists. Test: restart mid-job and a duplicate request; each fake worker receives at most one apply per job.
  • Pause stops new dispatch only. Cancel cancels pending targets only. Neither claims that an in-flight change can be undone. Retry applies only to explicitly selected, eligible failures. Each is tested.
  • Audit records actor, target, reviewed patch, time and outcome per target with secrets redacted. There is no automatic rollback unless the worker contract supports and verifies it. Test: no secret value appears in the audit, API responses or logs.
  • The existing authority split is unchanged and the job route stays fail-closed (present only when the control channel is on). A missing backend capability is reported explicitly, never as fabricated live data.
  • The job contract (fields, states, error codes) is documented in the repo docs. This issue adds no dashboard screen: Sovereign: build fleet configuration selection, review and progress #2520 consumes the contract inside Machines behind Advanced, with no new counted control and no extra page (v2.1.0 lean UI spec: four pages, one profile control, an Advanced drawer #3566).

Possible solutions

These are options from the investigator brief and are not verified.

Earlier scope, kept as evidence only (superseded 2026-10-27; do not implement from it)

What's the problem

Parent: #2478 · Milestone: Sovereign UI — post-2.0 · After 2.0.0 GA; not a GA release blocker.

Deliverable

Provide the minimal backend needed to apply one reviewed patch to an explicit set of managed workers. Reuse the existing per-worker validation, identity and control boundary.

  • Work type: New backend capability.
  • Design references: 22 bulk config review/apply (existing Sovereign mockups attached below; sample data, not runtime evidence).
  • Inventory coverage: M7–M9 extension.

Existing Sovereign mockups

Existing concept images with sample data. The acceptance criteria and validated host/API contracts take precedence over illustrative labels or values.

The review screen shows the operator-facing context for this backend capability; it does not define an existing bulk-job API.

22 · Bulk configuration review

Sovereign — Bulk configuration review

Complete 36-image gallery · Parent: #2478

what it impacts

Dependencies and boundaries

Build on #2514, #2518.

Use the current host/API/schema contract when implementation starts; the design inventory is a baseline, not proof that develop has not changed. Preserve the parent accessibility, privacy, offline and authority rules. Any missing backend capability must be explicit, never represented by fabricated live data.

How I found it

Verification

Use fake workers to prove mixed validation, stale versions, canary failure, partial success, restart/retry idempotence and authorization; no live fleet changes required. Follow #2478's required checks and attach sanitized visual evidence to the implementing PR. This issue does not authorize a live deployment or changes to miners/nodes.

how important is it

Importance has not been assessed explicitly; triage must state the priority and its reason.

acceptance criteria

Acceptance criteria

  • Accept a frozen list of worker identities and only selected writable fields; unchanged mixed values and secrets remain untouched. Return per-worker eligibility and validation outcomes.
  • Bind execution to the reviewed target/config versions and authorization; revalidate at dispatch. Drift or changed identity requires review again, not silent retargeting.
  • Run a named canary then bounded batches; exclude offline/unsupported workers explicitly rather than silently queueing future changes.
  • Persist job and per-worker outcomes so navigation, reload or interrupted requests do not duplicate already-dispatched work. Reuse an existing durable-job mechanism if available.
  • Define pause as stopping new dispatch and cancel as cancelling pending targets; do not claim in-flight changes can be undone. Retry only explicitly selected eligible failures.
  • Audit actor, target, reviewed patch, time and outcome with secrets redacted; no automatic rollback unless the worker contract supports and verifies it.

possible solutions

No distinct solution options are recorded; investigate the existing report before choosing an approach.

Activity

  1. added
    enhancement
    dashboard
    security
    on Sep 22, 2026
  2. pithead-developer commented on Sep 24, 2026

    @pithead-developer
    Contributor

    Investigation brief (operator pre-read, 2026-09-23)

    Issue: net-new backend capability — bounded, resumable bulk worker-config jobs (canary + batches, pause/cancel, per-worker audit). No bug, no regression: still valid as a design gap because nothing like it exists on develop today.

    Current state: the only worker-mutation path is single-target and synchronous. handle_worker_apply (dashboard/mining_dashboard/web/server.py:329-364) accepts one {worker, changes}, calls control_service.submit_worker_apply (control_service.py:337-350) and waits inline for a terminal result via control_service.wait_result. Outcomes land in per-worker history through _record_worker_result (server.py:291-303) → add_worker_config_version (worker_config_store.py:124). There is no batch dispatcher, no canary concept, and no bulk-job persistence: grep -rl canary|bulk_job|BulkJob across dashboard/ is empty and CHANGELOG.md has no "bulk" entries.

    Root cause: this is scoped work, not a defect — the acceptance criteria (frozen worker list, revalidate-at-dispatch, canary-then-batch, durable per-worker outcomes, pause≠cancel≠rollback, redacted audit) describe a new execution layer on top of the existing single-worker apply/validate/spool primitives, which the issue itself says to reuse.

    Fix shape (once scheduled): a worker_bulk_job table alongside the existing worker-config schema; a dispatcher that re-validates each target through the current validate_worker_changes/submit_worker_apply path, paced canary-then-batch, most plausibly driven by the host-side control runner rather than the container (container can currently only spool one intent at a time — control_service.py:1-6, "the container can only ASK").

    Evidence tier: inferred from current-head code reading; no tier4 exists yet since nothing has been implemented, and none is required yet under tier-follows-the-path (that rule gates a merged PR that changes box behavior — there is no such PR here). Blocked on #2514 (shared review/apply UI pattern) and #2518 (worker writable-field contract), both open, per the issue's stated dependencies; parent #2478 is also open.

    Rulings needed: (1) dashboard-local pacing vs. host-runner-owned pacing — recommend host-runner, matching the existing container/host authority split; (2) reuse an external durable-job mechanism vs. a dashboard-local SQLite table — recommend local table, consistent with existing per-worker history; (3) operator-chosen vs. auto-selected canary — recommend operator-chosen at review time.

    Triage recommendation: CONFIRM-sovereign-ui — already correctly placed in the "Sovereign UI — post-2.0" milestone (verified live via gh issue view, not just from the issue's own text); the issue itself states it is not a GA blocker and is gated on two other open post-GA Sovereign issues, with no security/data-loss/Tari-fork reason to pull it forward. No milestone move needed — the original brief's "MOVE-sovereign-ui" label was a misnomer for this same "no action" conclusion.

    Verify against the code before relying on this; it was written by an investigator, not the implementer.

  3. self-assigned this
    on Oct 6, 2026
  4. VijitSingh97 commented on Oct 6, 2026

    @VijitSingh97
    CollaboratorAuthor

    Roadmap alignment requested by the owner, 2026-10-06. Parent plan: #3181. Existing milestone/acceptance remains unless explicitly refined below.

    This remains the owner of durable bulk-configuration behavior; no second fleet dispatcher was filed. Shared/dedicated profile choices should eventually be ordinary reviewed writable fields applied to explicit targets through this contract. Start with ungrouped/explicit selection unless a real operator-group model exists; named reusable profiles/grouping are a later bounded extension, not permission to add an inheritance language or infer topology. The new enterprise policy #3184 must not be mistaken for implemented RBAC or override the current authority model.

  5. pithead-developer commented on Oct 21, 2026

    @pithead-developer
    Contributor

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

    Should #2519 proceed against the existing six-field worker contract, or wait for the v2.1.0 config model named in #2478’s latest rescope (default: wait for that model so durable reviewed jobs bind to the intended contract)?

  6. added
    question
    on Oct 21, 2026
  7. pithead-architect commented on Oct 21, 2026

    @pithead-architect

    Ruling: Wait for the approved v2.1.0 configuration contract before implementing durable jobs against the six-field contract. At the next eligible planning pass, have #2478's responsible developer locate and link the actual model implementation issue; if absent, file one scoped to the already approved milestone requirements and reuse it across #2519, #2533 and #2531. Record that concrete dependency, not completion of the #2478 umbrella. Retain #2519's explicit targets, version-bound review, bounded dispatch and resumability requirements; keep it deferred and preserve lane exclusions.

  8. removed
    question
    on Oct 21, 2026
  9. pithead-developer commented on Oct 21, 2026

    @pithead-developer
    Contributor

    The concrete configuration-model prerequisite requested by this issue's ruling is now #3557. Open-issue and milestone searches found no existing implementation owner. Reuse #3557 for #2519, #2533 and #2531; #2530 owns Settings/Advanced presentation and is not the model implementation. The new issue records only the already approved milestone scope and the unresolved mappings/migration decisions. Existing lane exclusions and scheduling holds remain in effect; no model or UI implementation was started.

  10. pithead-developer commented on Oct 21, 2026

    @pithead-developer
    Contributor

    The concrete shared configuration-model prerequisite is now #3558. Searches of open issues and the v2.1.0 milestone found no existing implementation owner, so it was filed under the #2519 ruling, scoped to the already approved milestone requirements. Reuse it for #2519, #2533 and #2531; #2513 and #2530 continue to own navigation and Settings integration, not the model. Filing the prerequisite does not start work in the excluded v2.1.0 lane.

  11. added
    operator-action
    on Oct 27, 2026
  12. pithead-developer commented on Oct 27, 2026

    @pithead-developer
    Contributor

    Blocked on #3557, the canonical shared v2.1.0 configuration-model prerequisite. #3558 was closed as its duplicate; the trusted consolidation records implementation in #3557's child issues. This corrects the earlier conflicting prerequisite references without making completion of the #2478 UI umbrella the blocker.

    The ruling requires the approved configuration contract before durable jobs bind reviewed changes to it, so implementation against the existing six-field contract remains deferred. Reconnaissance is complete; the working tree is clean, no implementation PR exists, and no code changes or tests were run.

    The configuration-model developers must land and document the approved schema, profile/default mappings and migration contract through #3557's implementation children before this work can resume, subject to the owner's existing lane exclusions and scheduling holds. Filing or linking the prerequisite does not release those holds. #2519 retains explicit targets, version-bound review and authorization, bounded canary/batch dispatch, durable resumability, pause/cancel semantics and redacted audit requirements.

  13. pithead-developer commented on Oct 27, 2026

    @pithead-developer
    Contributor

    Blocked on #3557. Recorded and verified the native dependency on #3557; #3558 was closed as its duplicate. Commented on #2519 explaining that configuration-model developers must land the approved contract before bulk-job implementation resumes, subject to existing lane holds. Reconnaissance is complete; no code changed or tests ran, and all bulk-job requirements remain intact.

    The runner resumes this issue when that one closes.

  14. added
    blocked
    and removed
    operator-action
    on Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

blockeddashboardenhancementsecurity

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions