Skip to content

Port the root-side control-apply path to Rust #719

Open

Description

@pithead-developer

What's the problem

The privileged half of config apply is Bash: control_apply, _control_commit (atomic commit with fsync and backups), _control_claim_staged (symlink and ownership checks), _with_control_lock and util/control-guards.sh (6 h throttle, root-owned 0:0 700/600 modes, flock).

What it impacts

Remote config apply for every rig and the spool consumed from the control receiver. ADR 0001 is the boundary. Blocked on #713 and on any root handoff the #684 update API adds.

How I found it

Reading the functions above and the tests (tests/test-control-revocation.sh, test-control-replay.sh, test-config-apply-state.sh, the control phase of tests/e2e-real.sh) at ea41133.

How important is it

Medium to high for care: must not widen privilege.

Acceptance criteria

  • With RIGFORGE_IMPL=rust, control-apply runs natively under the same lock and make test-suite passes unchanged.
  • Each of these is refused as today, with a native test per refusal: symlink spool entry, wrong owner, wrong mode, throttle directory not 0:0 700.
  • Config commit is atomic with file and directory fsync and backups; status records use exactly the vocabulary pinned in tests/contract/v1/control-status.json (applied, busy, failed, noop, pending, rolled_back, rejected, started, throttled).
  • The Rust root code never reads a path a non-root user can write without the claim checks.
  • A real apply under RIGFORGE_IMPL=rust is linked from the PR (bench-ci job or make e2e-real control phase); if no lane exists, the ledger records not run and why.
  • PARITY.md updated. make check passes.

Possible solutions

Activity

  1. added this to the v1.20.0 milestone on Nov 17, 2026
  2. added
    enhancement
    refactor
    security
    blocked
    P3-hardening
    size:L
    on Nov 17, 2026
  3. pithead-architect commented on Nov 27, 2026

    @pithead-architect

    Blocked by #713 and #714 (native links present).

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

    P3-hardeningblockedenhancementrefactorsecuritysize:L

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions