Skip to content

[authentication/1.5] Serve authenticated POSIX local control - #49

Open
omry wants to merge 1 commit into
pr48from
pr49
Open

omry wants to merge 1 commit into
pr48from
pr49

Conversation

@omry

@omry omry commented Oct 21, 2026 •

Copy link
Copy Markdown
Owner

Allow the existing authority init and status commands to reach the running POSIX server through a private Unix socket. Authenticate both peers with kernel credentials, bind the endpoint to the authority directory, and keep live mutations in the process that owns the instance lock. Support the same commands through verified SSH as the service account.

Bound control frames, connections and administrative work. Retain accepted descriptors, transports and actual authority work through disconnects and cancellation; join them before releasing the instance lock. Retry established transient accept errors without a work queue and report unexpected listener failure. Document setup, recovery custody, endpoint failures and interrupted replies.

Validation: 1304 unit tests passed on native Python and Python 3.10 with 14 platform skips each; Black/Pyrefly, Go tests/vet and website build passed. Real CLI, malformed and oversized frames, slow clients, endpoint replacement, cancellation and injected accept failures are covered. Native Linux and macOS CI must run the real different-user rejection test on the published head.


@omry
omry changed the base branch from main to pr48 October 21, 2026 02:44
@omry
omry added this pull request to stack #43 October 21, 2026 02:44
Comment thread server/src/arbiter_server/local_control.py Outdated
Comment thread server/src/arbiter_server/authority.py Outdated
@omry

omry commented Oct 21, 2026 •

Copy link
Copy Markdown
Owner Author

PR-cycle state — maintained automatically. Do not edit by hand.

Mechanical PR-cycle state (JSON)
{
  "check_observations": [
    {
      "checks": [
        {
          "conclusion": "SUCCESS",
          "name": "Gitar",
          "run_id": 119008459341,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/arbiter/runs/119008459341"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Platform Linux arm64",
          "run_id": 119008453966,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/arbiter/actions/runs/39534674498/job/119008453966"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Platform Linux x64",
          "run_id": 119008453805,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/arbiter/actions/runs/39534674498/job/119008453805"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Platform Windows arm64",
          "run_id": 119008453661,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/arbiter/actions/runs/39534674498/job/119008453661"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Platform Windows x64",
          "run_id": 119008453889,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/arbiter/actions/runs/39534674498/job/119008453889"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Platform macOS arm64",
          "run_id": 119008453773,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/arbiter/actions/runs/39534674498/job/119008453773"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Platform macOS x64",
          "run_id": 119008453843,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/arbiter/actions/runs/39534674498/job/119008453843"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Python 3.10",
          "run_id": 119008453750,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/arbiter/actions/runs/39534674498/job/119008453750"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Python 3.11",
          "run_id": 119008453774,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/arbiter/actions/runs/39534674498/job/119008453774"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Python 3.12",
          "run_id": 119008453882,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/arbiter/actions/runs/39534674498/job/119008453882"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Python 3.14",
          "run_id": 119008453885,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/arbiter/actions/runs/39534674498/job/119008453885"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Python lint",
          "run_id": 119008453779,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/arbiter/actions/runs/39534674498/job/119008453779"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Website",
          "run_id": 119008453481,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/arbiter/actions/runs/39534674498/job/119008453481"
        }
      ],
      "head_sha": "42ea194df54f9ba81ef399e0966a0d57b7b1ed87",
      "id": "sha256:db9d813502374a6297762c9b2f778e6826779e5c50cd9bd2e2fab025adb7d7dc",
      "required_checks": [
        "Gitar",
        "Platform Linux arm64",
        "Platform Linux x64",
        "Platform Windows arm64",
        "Platform Windows x64",
        "Platform macOS arm64",
        "Platform macOS x64",
        "Python 3.10",
        "Python 3.11",
        "Python 3.12",
        "Python 3.14",
        "Python lint",
        "Website"
      ],
      "status": "success"
    },
    {
      "checks": [
        {
          "conclusion": "SUCCESS",
          "name": "Gitar",
          "run_id": 119017915679,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/arbiter/runs/119017915679"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Platform Linux arm64",
          "run_id": 119017925328,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/arbiter/actions/runs/39537658862/job/119017925328"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Platform Linux x64",
          "run_id": 119017925494,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/arbiter/actions/runs/39537658862/job/119017925494"
        },
        {
          "name": "Platform Windows arm64",
          "run_id": 119017925260,
          "run_status": "in_progress",
          "status": "pending",
          "url": "https://github.com/omry/arbiter/actions/runs/39537658862/job/119017925260"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Platform Windows x64",
          "run_id": 119017925406,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/arbiter/actions/runs/39537658862/job/119017925406"
        },
        {
          "name": "Platform macOS arm64",
          "run_id": 119017925382,
          "run_status": "in_progress",
          "status": "pending",
          "url": "https://github.com/omry/arbiter/actions/runs/39537658862/job/119017925382"
        },
        {
          "name": "Platform macOS x64",
          "run_id": 119017925421,
          "run_status": "in_progress",
          "status": "pending",
          "url": "https://github.com/omry/arbiter/actions/runs/39537658862/job/119017925421"
        },
        {
          "conclusion": "FAILURE",
          "name": "Python 3.10",
          "run_id": 119017925282,
          "run_status": "completed",
          "status": "failure",
          "url": "https://github.com/omry/arbiter/actions/runs/39537658862/job/119017925282"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Python 3.11",
          "run_id": 119017925438,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/arbiter/actions/runs/39537658862/job/119017925438"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Python 3.12",
          "run_id": 119017925347,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/arbiter/actions/runs/39537658862/job/119017925347"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Python 3.14",
          "run_id": 119017925408,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/arbiter/actions/runs/39537658862/job/119017925408"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Python lint",
          "run_id": 119017925246,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/arbiter/actions/runs/39537658862/job/119017925246"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Website",
          "run_id": 119017925093,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/arbiter/actions/runs/39537658862/job/119017925093"
        }
      ],
      "head_sha": "9dc9e216b53ffcf543d257733056d130fc66b17e",
      "id": "sha256:f889244c9a414c8ec6d2d054dee95fc5e6efe1af355cb9b4e22f6986bc888925",
      "required_checks": [
        "Gitar",
        "Platform Linux arm64",
        "Platform Linux x64",
        "Platform Windows arm64",
        "Platform Windows x64",
        "Platform macOS arm64",
        "Platform macOS x64",
        "Python 3.10",
        "Python 3.11",
        "Python 3.12",
        "Python 3.14",
        "Python lint",
        "Website"
      ],
      "status": "failure"
    }
  ],
  "delivery_deferrals": [],
  "findings": [
    {
      "disposition": "fix-current-slice",
      "evidence": [
        "/tmp/arbiter-auth-m1-run_4k366kj4pkc87k47vavsr5n9m0/pr49-macos-alias-probe.py",
        "/tmp/arbiter-auth-m1-run_4k366kj4pkc87k47vavsr5n9m0/pr49-macos-alias-probe.log"
      ],
      "id": "AUTH-1.5-MACOS-TEMP-ALIAS",
      "proposed_fix_paths": [
        "server/tests/unit/conftest.py"
      ],
      "rationale": "Server unit tmp_path fixture returns /tmp alias without canonicalizing it. On macOS /tmp aliases /private/tmp; exact-boundary wire test sends raw root and receives invalid-root result. Resolve the fixture path once, preserving production canonical-root validation and every test assertion.",
      "severity": "low",
      "source_surface": "local-review",
      "status": "accepted"
    },
    {
      "dbb_id": "AUTH-1.5-DBB-004",
      "disposition": "fixed-current-slice",
      "evidence": [
        "/home/omry/dev/arbiter/temp/authentication-milestone-1/1.5-dbb-pr49-final-validation.md",
        "https://github.com/omry/arbiter/pull/49#discussion_r4332511367",
        "https://github.com/omry/arbiter/pull/49#discussion_r4332684189",
        "https://github.com/omry/arbiter/commit/9dc9e216b53ffcf543d257733056d130fc66b17e",
        "/home/omry/dev/arbiter/temp/authentication-milestone-1/1.5-dbb-pr49-correction1.md",
        "/tmp/arbiter-auth-m1-run_4k366kj4pkc87k47vavsr5n9m0/pr49-correction1-independent-review.json"
      ],
      "id": 4332511367,
      "rationale": "Local authority rendezvous cannot be preclaimed by a foreign local UID to block the complete server. Use existing validated canonical private authority root/control.sock. Keep fail-closed endpoint and peer validation; no shared temporary rendezvous, no silent unavailable-control fallback. Explicit standard Unix path-length diagnostic/docs.",
      "severity": "medium",
      "source_review_id": 5594347047,
      "source_surface": "review-comment",
      "source_url": "https://github.com/omry/arbiter/pull/49#discussion_r4332511367",
      "status": "resolved",
      "thread_id": "PRRT_kwDOSmRaHM6umrhQ"
    },
    {
      "dbb_id": "AUTH-1.5-DBB-005",
      "disposition": "fixed-current-slice",
      "evidence": [
        "/home/omry/dev/arbiter/temp/authentication-milestone-1/1.5-dbb-pr49-final-validation.md",
        "https://github.com/omry/arbiter/pull/49#discussion_r4332511440",
        "https://github.com/omry/arbiter/pull/49#discussion_r4332685876",
        "https://github.com/omry/arbiter/commit/9dc9e216b53ffcf543d257733056d130fc66b17e",
        "/home/omry/dev/arbiter/temp/authentication-milestone-1/1.5-dbb-pr49-correction1.md",
        "/tmp/arbiter-auth-m1-run_4k366kj4pkc87k47vavsr5n9m0/pr49-correction1-independent-review.json"
      ],
      "id": 4332511440,
      "rationale": "Temporary authority-lock contention retains accurate busy diagnostics when no authenticated live endpoint exists. Preserve original AuthorityBusy for absent/refused transport, and currently unavailable Windows live backend. Unsafe endpoint errors remain explicit.",
      "severity": "low",
      "source_review_id": 5594347133,
      "source_surface": "review-comment",
      "source_url": "https://github.com/omry/arbiter/pull/49#discussion_r4332511440",
      "status": "resolved",
      "thread_id": "PRRT_kwDOSmRaHM6umrh9"
    }
  ],
  "pr": {
    "base_ref": "pr48",
    "base_sha": "1c7a22c0a551d6e2dceb95aa66ad0506556fec04",
    "body_digest": "sha256:68edaf792a1e475dca9208decbf9bf5d1e21abc5edb2a094aa911e2f79079598",
    "diff_digest": "sha256:dcaec787659e995af2f786a2df2e080d8b20ebfb4826c43c7025b53ecae5bf68",
    "head_ref": "pr49",
    "head_sha": "f502e85b945774f8c605f5ded28e36bddf08ee28",
    "pr": 49,
    "repository": "omry/arbiter",
    "scope_authority": [
      {
        "digest": "sha256:b6511414b3a9b485542df83c8f7abfc499dc8d06e522819b48e162a562d21c57",
        "path": "docs/authentication/high-level-design.md"
      },
      {
        "digest": "sha256:c576091af919c3ec99f0e0edb5795cf4e7bd37a44415ae24742393822317ad3d",
        "path": "docs/authentication/implementation-plan.md"
      },
      {
        "digest": "sha256:d56e92a7cb01f131ba499650c4a5d7b2c8d17adf2cdc7d612eee7c5f53d07929",
        "path": "docs/authentication/requirements.md"
      }
    ],
    "title_digest": "sha256:65f7b9dd0d45d32637207674d5042c49cfc1bc8c9ac4715bb546118b5ddcc6b9"
  },
  "record_version": 6,
  "review_observations": [],
  "review_requests": [
    {
      "base_established_at": "2026-10-21T02:44:19Z",
      "base_ref": "pr48",
      "base_sha": "1c7a22c0a551d6e2dceb95aa66ad0506556fec04",
      "body_digest": "sha256:c319b8201dff8e88258381b3be9acaca963d45230a9a317dbf5d660a24cc0980",
      "created_at": "2026-10-21T02:56:41Z",
      "head_sha": "42ea194df54f9ba81ef399e0966a0d57b7b1ed87",
      "id": 6306888953,
      "kind": "regular-review"
    },
    {
      "base_established_at": "2026-10-21T02:44:19Z",
      "base_ref": "pr48",
      "base_sha": "1c7a22c0a551d6e2dceb95aa66ad0506556fec04",
      "body_digest": "sha256:bd01e08ce23e33dd28feb06b011b443f97af5ce7c7bf9b079a4cf8c2c58df797",
      "created_at": "2026-10-21T03:22:08Z",
      "head_sha": "9dc9e216b53ffcf543d257733056d130fc66b17e",
      "id": 6307217586,
      "kind": "regular-review"
    }
  ],
  "review_results": [
    {
      "base_ref": "pr48",
      "base_sha": "1c7a22c0a551d6e2dceb95aa66ad0506556fec04",
      "body_digest": "sha256:b6c00acb6dc5b1e4ab50060a1e2c43d87381a23a103bfb6515e43bd65736e034",
      "commit_id": "42ea194df54f9ba81ef399e0966a0d57b7b1ed87",
      "id": 6306953326,
      "inline_message_ids": [],
      "request_comment_id": 6306888953,
      "result_kind": "clean",
      "status": "result",
      "submitted_at": "2026-10-21T03:01:33Z",
      "unresolved_thread_ids": [
        "PRRT_kwDOSmRaHM6umrh9",
        "PRRT_kwDOSmRaHM6umrhQ"
      ]
    },
    {
      "base_ref": "pr48",
      "base_sha": "1c7a22c0a551d6e2dceb95aa66ad0506556fec04",
      "body_digest": "sha256:450b8bbd2cdde639612c4ba0b8f8f0d8035a0f555e2f9cf4773e4ff4a55b1de9",
      "commit_id": "9dc9e216b53ffcf543d257733056d130fc66b17e",
      "id": 6307256645,
      "inline_message_ids": [],
      "request_comment_id": 6307217586,
      "result_kind": "clean",
      "status": "result",
      "submitted_at": "2026-10-21T03:25:23Z",
      "unresolved_thread_ids": []
    }
  ],
  "revision_fingerprint": "sha256:5eb812c0328447d39d9131061c86c69e607633fcb6689f5074680d6d24b049e4",
  "rounds": [
    {
      "applied_fix_paths": [
        "server/news/+posix-local-control.feature.md",
        "server/src/arbiter_server/authority.py",
        "server/src/arbiter_server/local_control.py",
        "server/tests/unit/conftest.py",
        "server/tests/unit/test_local_control.py",
        "website/docs/operate/credentials.md",
        "website/docs/operate/security.md"
      ],
      "disposition_changes": [
        4332511367,
        4332511440
      ],
      "effective_diff_digest": "sha256:5325de67c2206b1c41c63b8230f040b6e5eed4afaef941b0ad6e3540752034ea",
      "finding_ids": [
        4332511367,
        4332511440
      ],
      "invariants": [
        "Foreign OS UID cannot preclaim local-control rendezvous to deny server startup",
        "Temporary lock contention without a live endpoint remains an accurate busy error; unsafe endpoints fail explicitly",
        "All native peer identity, admission, resource ownership and cancellation boundaries stay intact"
      ],
      "outcome": "corrected-head-needs-review",
      "proposed_fix_paths": [
        "server/news/+posix-local-control.feature.md",
        "server/src/arbiter_server/authority.py",
        "server/src/arbiter_server/local_control.py",
        "server/tests/unit/conftest.py",
        "server/tests/unit/test_local_control.py",
        "website/docs/operate/credentials.md",
        "website/docs/operate/security.md"
      ],
      "resulting_head": "9dc9e216b53ffcf543d257733056d130fc66b17e",
      "review_observation_id": null,
      "review_request_id": 6306888953,
      "review_result_id": 6306953326,
      "reviewed_head": "42ea194df54f9ba81ef399e0966a0d57b7b1ed87",
      "root_cause": "Predictable shared /tmp parent allowed foreignUID preclaim; socket now inside canonical private authority root with standard Unix address limit and explicit diagnostics. Busy routing wrongly treated all locks as live server; narrowly restore original error for absent/refused or currently unsupported Windows control. Truth fixes confirmed by DBB and independent exact r2 review, complete Python1304/14 on native3.13+3.10, lint/type/Go/vet/website all0. Independent macOS alias assertion fixed via root.resolve. Same native998 authoredlines. Governing stamps unchanged; final correctedheadnativecrossUID CI and fresh regularreview required.",
      "round": 1,
      "unresolved_current_slice_findings": 0,
      "unresolved_design_blockers": 0
    },
    {
      "applied_fix_paths": [
        "server/tests/unit/conftest.py"
      ],
      "disposition_changes": [
        "AUTH-1.5-MACOS-TEMP-ALIAS"
      ],
      "effective_diff_digest": "sha256:dcaec787659e995af2f786a2df2e080d8b20ebfb4826c43c7025b53ecae5bf68",
      "finding_ids": [
        "AUTH-1.5-MACOS-TEMP-ALIAS"
      ],
      "invariants": [
        "Test temporary roots must be canonical on macOS before exact root-bound protocol requests",
        "Final-head regular review and every applicable native CI must pass before approval; no failed/pending intermediate check is reused as success"
      ],
      "outcome": "corrected-head-needs-review",
      "proposed_fix_paths": [
        "server/tests/unit/conftest.py"
      ],
      "resulting_head": "f502e85b945774f8c605f5ded28e36bddf08ee28",
      "review_observation_id": null,
      "review_request_id": 6307217586,
      "review_result_id": 6307256645,
      "reviewed_head": "9dc9e216b53ffcf543d257733056d130fc66b17e",
      "root_cause": "Native alias reproduction proved unresolved/tmpfixture sendsdifferentroot than canonical/private/tmp endpoint; one-line yieldPath(directory).resolve() truthfix preservesallassertions and production. Fullprofile1304/14 plus4checksall0; Python3.10full1304/14; independentSolandDBBfinalcandidate78be74cleanconditionalnativeCI. Existing SMTP3s localfuturetimeoutretained thenfocused+fullretry passed. Existing artifact2case6s Python3.10 CI failure retained; sameheadfocused6pass and full3.10pass, unchangedproduction/testhashesproven. No CI retry was performed before this new correctedhead; finalnewheadmatrixmustpass. Prior security/diagnostic findingsalreadyresolved and remainclosed. Exactnative998size, unchanged governingstamps.",
      "round": 2,
      "unresolved_current_slice_findings": 0,
      "unresolved_design_blockers": 0
    }
  ],
  "schema": "awd:swe:pr-cycle-state",
  "version": 2
}

@omry
omry marked this pull request as ready for review October 21, 2026 02:54
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-21T03:41:54.878164Z f502e85 Manual request
🔒 Security Review ✅ Completed 2026-10-21T03:02:52.507809Z 42ea194 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@omry

omry commented Oct 21, 2026

Copy link
Copy Markdown
Owner Author

@codex, regular review 42ea194

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: 42ea194df5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@omry

omry commented Oct 21, 2026

Copy link
Copy Markdown
Owner Author

@codex, regular review 9dc9e21

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: 9dc9e216b5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Allow the existing authority init and status commands to reach the running POSIX server through a private Unix socket. Authenticate both peers with kernel credentials, bind the endpoint to the authority directory, and keep live mutations in the process that owns the instance lock. Support the same commands through verified SSH as the service account.

Bound control frames, connections and administrative work. Retain accepted descriptors, transports and actual authority work through disconnects and cancellation; join them before releasing the instance lock. Retry established transient accept errors without a work queue and report unexpected listener failure. Document setup, recovery custody, endpoint failures and interrupted replies.

Validation: 1304 unit tests passed on native Python and Python 3.10 with 14 platform skips each; Black/Pyrefly, Go tests/vet and website build passed. Real CLI, malformed and oversized frames, slow clients, endpoint replacement, cancellation and injected accept failures are covered. Native Linux and macOS CI must run the real different-user rejection test on the published head.
@gitar-bot

gitar-bot Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
CI failed: Two separate test failures in the compat nox sessions: a teardown cleanup error (Directory not empty) under Python 3.12 that is unclear relative to this PR, and a cancellation/blocking-worker capacity timeout under Python 3.14 that is unrelated to the PR; neither is confirmed as caused by the authenticated POSIX local control change.

Overview

Analyzed 2 unique error templates across 4 logs (commit f502e85). Both failures are in the server pytest suite run via nox -s compat-3.12 and nox -s compat-3.14, and neither log establishes a clear causal link to this PR. Both are classified as test failures with medium confidence.

Failures

Teardown cleanup error: artifact directory not empty during tmp_path removal (confidence: medium)

  • Type: test
  • Affected jobs: 119023405122
  • Related to change: unclear
  • Root cause: During teardown of test_body_reader_and_cancelled_artifact_lock_wait_share_capacity in server/tests/unit/test_operation_body_admission.py, shutil.rmtree raised OSError: [Errno 39] Directory not empty: '<PATH>'. The log indicates artifact files were still present or being created during cleanup, but does not establish why. The traceback includes the changed test fixture, but that overlap alone does not establish causation.
  • Suggested fix: Inspect the artifact-writing and cancellation cleanup paths in that test, and ensure any tasks or workers that can write into the artifact directory have stopped before tmp_path teardown. Re-run the test to check whether the race reproduces.

Cancellation test timeout waiting for blocking-worker capacity under Python 3.14 (confidence: medium)

  • Type: test
  • Affected jobs: 119023405176
  • Related to change: no
  • Root cause: test_cancelled_request_keeps_capacity_until_its_underlying_work_finishes confirmed the worker was still occupied after cancellation, then its retry loop timed out (TimeoutError) before receiving a 200 response. The log does not establish why capacity was not released in time. A worker-completion or release issue is possible but unconfirmed. The supplied change context does not touch native HTTP blocking-worker capacity or cancellation handling, so this is reported as unrelated to the PR per the analyzer verdict.
  • Suggested fix: Review the cancellation and worker-completion path to confirm capacity is released when underlying blocking work finishes, even after request cancellation. Re-run under Python 3.14. Increase the timeout only if the implementation is shown to be correct and the limit is too short.

Summary

  • Change-related failures: None confirmed. The teardown error is marked unclear and the 3.14 capacity timeout is marked no.
  • Infrastructure/flaky failures: None identified. Neither failure is classified as flaky; both may be timing-sensitive and warrant triage as such.
  • Recommended action: Re-run both failing sessions to check reproducibility. If the teardown race reproduces, inspect artifact cleanup in test_operation_body_admission.py. If the capacity timeout reproduces under 3.14, investigate worker release on cancellation separately from this PR.
Code Review ✅ Approved 2 closed / 2 findings

🔴 High risk · Adding POSIX socket control permits live authority initialization; peer-authentication or request-validation failure could alter credentials and compromise recovery authority.

Serves the existing authority init and status commands to the running POSIX server over a private Unix socket authenticated by kernel credentials, with live mutations kept in the lock-owning process. Resolved the predictable /tmp control directory that let any local user block startup, and the busy fallback that hid the real 'busy' error behind socket/ENOENT errors. No open issues remain.

✅ 2 closed
✅ Security: Predictable /tmp control dir lets any local user block server startup

📄 server/src/arbiter_server/local_control.py:29-38 📄 server/src/arbiter_server/local_control.py:188-191 📄 server/src/arbiter_server/local_control.py:384-392 📄 server/src/arbiter_server/main.py:2278-2282
_runtime_root() always returns /tmp/arbiter-control-<euid>, and the service's UID is easy to learn. LocalControl.__init__ calls _endpoint(..., create=True), which runs a._root. That does mkdir(exist_ok=True) and then _check_path, and _check_path raises AuthorityError when the directory is not owned by this euid or is not 0700. Because /tmp is world-writable, any unprivileged local user can create /tmp/arbiter-control-<service uid> ahead of time. running() then raises inside the HTTP lifespan, and the server cannot start at all, not just its local control. This fails closed, so it is not a compromise, but it turns a convenience feature into a startup denial of service that any local user can trigger. Also, periodic /tmp cleaners such as systemd-tmpfiles can age out the socket or directory under a long-running server. Fix: put the endpoint in a location other users cannot create, such as a directory under the private authority/server data root or a root-provisioned runtime dir like /run/arbiter. Failing that, log the endpoint error and run without live control instead of aborting startup.

✅ Edge Case: Busy fallback hides the real 'busy' error behind socket/ENOENT errors

📄 server/src/arbiter_server/authority.py:442-445 📄 server/src/arbiter_server/local_control.py:117-121
authority_cli treats every AuthorityBusy as "a running server holds the lock" and switches to request(). But the lock is also held by a concurrent offline authority init/status, by a server that is still starting before control.start(), and by a server shutting down after close(). It is also held on Windows, where request always refuses. In those cases the user used to see "authority state is busy; try again later". Now they get an unrelated error, such as [Errno 2] No such file or directory, an "unsafe local control endpoint" message, or "live local control is not yet available on Windows". That suggests something is broken when the real cause is just temporary contention. Fix: when request fails because the endpoint is missing, unsupported, or refusing connections, re-raise the original busy error, for example by catching FileNotFoundError/ConnectionRefusedError and the Windows case and raising the AuthorityBusy exception again.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

For more verification details, comment gitar display:verbose.

Tip

Comment Gitar fix CI or enable auto-apply: gitar auto-apply:on

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@omry

omry commented Oct 21, 2026

Copy link
Copy Markdown
Owner Author

@codex, regular review f502e85

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: f502e85b94

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant