Skip to content

Operator and reviewer setup

Workspace bootstrap credentials, registered agent sessions and human operator credentials have different authority. Provision the operator explicitly; registering a worker grants no review or operator permissions. Run these commands from an initialized workspace with the daemon running.

Choose OPERATOR_PRINCIPAL explicitly for the human who will authorize privileged operations. It is not inferred from Git email, the OS display name, a branch or a message. Preview first:

Terminal window
majlis init --preview-only --operator-principal "$OPERATOR_PRINCIPAL"
majlis init --operator-principal "$OPERATOR_PRINCIPAL"

This provisions a separate private operator credential. The CLI uses it only when you pass --operator. The dashboard bridge uses the same operator credential.

Supply the actual native session ID and explicit actor, checkout and harness references:

Terminal window
majlis session register "$NATIVE_SESSION_ID" \
--actor "$ACTOR_REFERENCE" --checkout "$CHECKOUT_ROOT" \
--harness "$HARNESS_NAME" --idempotency-key "$REGISTRATION_KEY"

The default role is worker. The output includes a session_file path. Select exactly that file:

Terminal window
export MAJLIS_SESSION_FILE="$RETURNED_SESSION_FILE"
majlis doctor --json

Session files are separate per session; registration never replaces a global session marker. Keep one registration key and payload for retries of the same logical registration. Registration alone does not establish native harness compatibility.

Provision and assign an independent reviewer

Section titled “Provision and assign an independent reviewer”

An operator registers the reviewer’s session with the reviewer role:

Terminal window
majlis --operator session register "$REVIEWER_NATIVE_SESSION_ID" \
--actor "$REVIEWER_REFERENCE" --checkout "$REVIEWER_CHECKOUT_ROOT" \
--harness "$REVIEWER_HARNESS_NAME" --role reviewer \
--idempotency-key "$REVIEWER_REGISTRATION_KEY"

Keep the returned reviewer actor ID and session-file path. Workers cannot self-select the reviewer or operator role.

Read the task’s current revision, then assign the reviewer:

Terminal window
majlis --operator task show "$TASK_ID"
majlis --operator task update "$TASK_ID" --revision "$TASK_REVISION" \
--reviewer "$REVIEWER_ACTOR_ID" --idempotency-key "$ASSIGNMENT_KEY"

Assignment increments the task revision. --clear-reviewer clears an assignment and requires --operator. Neither assignment nor submission is acceptance.

After the owner verifies and submits, the assigned reviewer selects their own session, inspects that same artifact and reads the current revision:

Terminal window
MAJLIS_SESSION_FILE="$REVIEWER_SESSION_FILE" majlis task show "$TASK_ID"
MAJLIS_SESSION_FILE="$REVIEWER_SESSION_FILE" majlis task accept "$TASK_ID" \
--revision "$CURRENT_REVIEW_REVISION" --artifact "$SUBMITTED_ARTIFACT_DIGEST" \
--reviewer "$REVIEWER_ACTOR_ID" --idempotency-key "$ACCEPTANCE_KEY"

The daemon verifies the principal, assigned actor, active incarnation, review capability, exact artifact and passing verification. An owner cannot satisfy independent review by accepting their own artifact.

Open the single-use majlis ui link, choose the workspace, then select Claim operator identity and confirm the principal shown from the authenticated credential. Claiming never creates a harness execution lifetime or accepts repository policy. A fresh browser cookie needs a fresh claim.

These local credentials do not isolate hostile processes running under the same OS account. See Security.