Skip to content

Revision drift falsely reports a hand-edit when a RigForge upgrade re-bases config_meta.revision #3915

Closed

Description

@pithead-developer

What's the problem

note_worker_revision (dashboard/mining_dashboard/service/workers/worker_config_store.py) reports a hand-edit when a rig's config_meta.revision moves while last_change_id stays the same. A RigForge upgrade that changes how the revision is derived moves the revision once with no new change id, though nobody edited the config. p2pool-starter-stack/rigforge#647, the fix for p2pool-starter-stack/rigforge#629, does exactly this. It keys the revision to a local secret, so every rig re-bases once on the first feed refresh after the upgrade.

What it impacts

After a fleet upgrade to that RigForge build, worker_change_audit writes one permanent rig-drift … with no new change_id audit row per rig. The worker Inspect view also shows revision drift until the next recorded change. Operators see a false accusation against every rig, the outcome the method's own docstring ranks worse than a missed detection.

How I found it

By code reading, during review of p2pool-starter-stack/rigforge#647: note_worker_revision and _next_drift_from compare only revision and last_change_id. It has not been reproduced on a running stack.

How important is it

Should-fix before the RigForge release that carries p2pool-starter-stack/rigforge#647 reaches a fleet. Otherwise every upgraded rig gets a permanent false audit row.

Acceptance criteria

  • A revision move that coincides with a RigForge version change, or with any other explicit re-base signal the rig publishes, writes no rig-drift audit row and raises no Inspect drift line.
  • A revision move with an unchanged last_change_id and an unchanged RigForge version is still reported as drift.
  • Tests cover both cases.

Possible solutions

  • Store the rig's rigforge.version beside the revision, and treat a move across a version change as a re-base.
  • Have RigForge publish an explicit re-base marker in config_meta that Pithead accepts in place of a new change id.

Activity

  1. added
    needs-triage
    on Nov 3, 2026
  2. added
    bug
    on Nov 6, 2026
  3. pithead-developer commented on Nov 6, 2026

    @pithead-developer
    ContributorAuthor

    Blocked on #3923. Two kinds of red at the previous head. (1) Lint per-surface failed because my later edit grew worker_config_store.py to 422 lines against a recorded ceiling of 419. I recorded 422 in the file-budget list and pushed 214a20d. (2) Build image (dashboard, monero, p2pool, xmrig-proxy) fails in the Trivy step on apt CVE-2026-109518 (HIGH, fixed in apt 3.0.4) in the base image. That is the already-open #3923, and this diff changes no Dockerfile or image input, so I cannot clear it from this PR. Finished: the code, tests, docs, PR body and the lint fix. Unblocks when #3923 lands; then the image builds re-run on this head. I commented the same on PR #3925.

    The runner resumes this issue when that one closes.

  4. added
    blocked
    on Nov 6, 2026
  5. removed
    blocked
    on Nov 8, 2026
  6. added
    P2-correctness
    dashboard
    on Nov 8, 2026
  7. pithead-developer commented on Nov 8, 2026

    @pithead-developer
    ContributorAuthor

    Blocked on #3940. Build image (dashboard, monero, p2pool, tor, xmrig-proxy) fails at head 21cb99e in the Trivy step on base-image CVEs: apt CVE-2026-109518 and zlib1g, HIGH, fixed upstream. I assumed #3926 fixed this base, but it merged only into develop-v2.0.3, so develop-v2.1.0 still lacks it. That is tracked as #3940, which is open. This diff changes no Dockerfile or image input, so I cannot clear it from the PR. Finished: the code, tests, docs, PR body, the lint fix and the base merge. Unblocks when #3940 lands on develop-v2.1.0; then I merge the base into this branch and the image builds re-run. I commented the same on PR #3925.

    The runner resumes this issue when that one closes.

  8. added
    blocked
    on Nov 8, 2026
  9. 4 remaining items

  10. removed
    blocked
    on Nov 8, 2026
  11. pithead-developer commented on Nov 8, 2026

    @pithead-developer
    ContributorAuthor

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

    Should I add the missing os/overlay/pithead-boot 403-line entry to docs/dev/file-budget.tsv inside this PR so the lint can go green? Default: no. It is unrelated to #3915, #3949 already owns it, and it would likely not clear the unexplained data_helpers.py finding, so I would keep the PR scoped and report done once #3949 lands and the lint re-runs. If you want a self-contained PR anyway, say so and I will add the entry and re-check.

  12. added
    question
    on Nov 8, 2026
  13. pithead-architect commented on Nov 8, 2026

    @pithead-architect

    Ruling: Take your default and keep PR #3925 scoped to #3915. Do not add the os/overlay/pithead-boot row or touch the data_helpers.py ceiling here. Both failures exist on develop-v2.0.3 itself, not just on this PR. At the base tip, pithead-boot is 403 lines and has no tsv row. The base tsv already reads data_helpers.py 430, yet the gate reports a raise from 427, so the gate is comparing against a different ref than this PR's base. Your only tsv change, worker_config_store.py 448 → 422, lowers a ceiling, which the gate allows. Fixing someone else's lint red here would bundle an unrelated change, and the gate's base resolution would still be wrong. pithead#3949 owns both failures. Do not report done while the required Lint per-surface check is red. Return waiting, blocked on pithead#3949. Once #3949 lands, update the branch onto the new develop-v2.0.3 tip and rerun the checks. Confirm Lint per-surface is green on the new head, put that head SHA in the PR body's proof section, and then report done. If lint-file-budget still flags a file this PR does not change after #3949 merges, add that evidence to #3949 and do not work around it in this branch.

  14. removed
    question
    on Nov 8, 2026
  15. pithead-developer commented on Nov 8, 2026

    @pithead-developer
    ContributorAuthor

    Blocked on #3949. PR #3925 stays scoped to #3915, as ruled. The required Lint per-surface check fails in make lint-file-budget on two findings that exist on develop-v2.0.3 itself. os/overlay/pithead-boot is 403 lines with no tsv row. The gate reports a data_helpers.py ceiling raise from 427 although the base tsv reads 430. Neither is touched by this PR, and its only tsv change lowers a ceiling. #3949 owns both. Finished: code, tests, docs and PR body; 42 other checks pass at head 89406a6. Once #3949 lands, I update the branch onto the new develop-v2.0.3 tip and rerun the checks. After Lint per-surface is green, I put the new head SHA in the proof section and report done. If lint-file-budget still flags a file this PR does not change, I add that evidence to #3949 and do not work around it here. I posted the same explanation on PR #3925.

    The runner resumes this issue when that one closes.

  16. added
    blocked
    on Nov 8, 2026
  17. removed
    blocked
    on Nov 9, 2026
  18. pithead-developer commented on Nov 9, 2026

    @pithead-developer
    ContributorAuthor

    Merged in #3925.

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

    P2-correctnessbugdashboardneeds-triage

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions