Skip to content

[authentication/2.6.1] Commit enrollment decisions transactionally - #71

Merged
omry merged 1 commit into
pr70from
pr71
Oct 27, 2026
Merged

omry merged 1 commit into
pr70from
pr71

Conversation

@omry

@omry omry commented Oct 25, 2026 •

Copy link
Copy Markdown
Owner

Persist exact approved enrollment results in one SQLite transaction. Recheck live approval and account state at the commit decision, preserve cancellation and rejection ordering, and recover private rollback journals under exclusive instance ownership. Retain that ownership until real workers settle during shutdown.

Add transaction, crash-recovery and lifespan regressions. Public enrollment remains at the prepared-only boundary for the following client-promotion slice.

Validation: 1,609 Python unit tests passed (43 skipped), 43 Python/Go integration tests passed, Go test/vet, Pyrefly, Black and website build passed. DBB and fresh independent Sol review completed for this exact candidate.


@omry
omry changed the base branch from main to pr70 October 25, 2026 22:00
@omry
omry added this pull request to stack #54 October 25, 2026 22:01
Comment thread server/src/arbiter_server/enrollment.py Resolved
@omry

omry commented Oct 25, 2026 •

Copy link
Copy Markdown
Owner Author

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

Mechanical PR-cycle state (JSON)
{
  "approval": {
    "candidate_revision_fingerprint": "sha256:e6f23f5c9bedd09185ed4738a6f28134c013aa8d1b8324ff4fb06f4c2bad15e2",
    "evidence": {
      "attestations": [
        {
          "baseline_identity": "sha256:95080c8129b4da2db4db318d829532ce16d721ef805c4a756c90a714c0262483",
          "closure_identity": "sha256:ab048d47d3230ba34878b66be78564fee7fb0b5ec900df411b7d5dbd4665d7b4",
          "document_identity": "sha256:b6511414b3a9b485542df83c8f7abfc499dc8d06e522819b48e162a562d21c57",
          "sidecar_identity": "sha256:79c904f72e578226e1651232379c453990fac14a2735deda6b872acf2cd1d28c"
        },
        {
          "baseline_identity": "sha256:ad1ec634421f4d4b16b5cb61c07844e945fa11d0737e7e59757b3b3aabbf21ce",
          "closure_identity": "sha256:ab048d47d3230ba34878b66be78564fee7fb0b5ec900df411b7d5dbd4665d7b4",
          "document_identity": "sha256:c576091af919c3ec99f0e0edb5795cf4e7bd37a44415ae24742393822317ad3d",
          "sidecar_identity": "sha256:3c969d1c7722b7db806221b23c15d19e577c5e6ad472ba56f7714af25d9cba19"
        },
        {
          "closure_identity": "sha256:ab048d47d3230ba34878b66be78564fee7fb0b5ec900df411b7d5dbd4665d7b4",
          "document_identity": "sha256:d56e92a7cb01f131ba499650c4a5d7b2c8d17adf2cdc7d612eee7c5f53d07929",
          "sidecar_identity": "sha256:b02245b52befcecf939bd2373a16912cad483a5a100c7f5733856cd39b4921b5"
        }
      ],
      "candidate_revision_fingerprint": "sha256:e6f23f5c9bedd09185ed4738a6f28134c013aa8d1b8324ff4fb06f4c2bad15e2",
      "check_conclusions": [
        {
          "conclusion": "SUCCESS",
          "name": "Gitar",
          "run_id": 121695975646
        },
        {
          "conclusion": "SUCCESS",
          "name": "Platform Linux arm64",
          "run_id": 121696016946
        },
        {
          "conclusion": "SUCCESS",
          "name": "Platform Linux x64",
          "run_id": 121696017036
        },
        {
          "conclusion": "SUCCESS",
          "name": "Platform Windows arm64",
          "run_id": 121696016906
        },
        {
          "conclusion": "SUCCESS",
          "name": "Platform Windows x64",
          "run_id": 121696017405
        },
        {
          "conclusion": "SUCCESS",
          "name": "Platform macOS arm64",
          "run_id": 121696016979
        },
        {
          "conclusion": "SUCCESS",
          "name": "Platform macOS x64",
          "run_id": 121696017165
        },
        {
          "conclusion": "SUCCESS",
          "name": "Python 3.10",
          "run_id": 121696017333
        },
        {
          "conclusion": "SUCCESS",
          "name": "Python 3.11",
          "run_id": 121696017236
        },
        {
          "conclusion": "SUCCESS",
          "name": "Python 3.12",
          "run_id": 121696016880
        },
        {
          "conclusion": "SUCCESS",
          "name": "Python 3.14",
          "run_id": 121696016927
        },
        {
          "conclusion": "SUCCESS",
          "name": "Python lint",
          "run_id": 121696016557
        },
        {
          "conclusion": "SUCCESS",
          "name": "Website",
          "run_id": 121696016936
        }
      ],
      "delivery_deferral_ledger_digest": "sha256:4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945",
      "finding_dispositions_digest": "sha256:e12ac4a79842e8b675fa24204b3a56b91568de503ed07bc34dddcfec63b8a96e",
      "operation_identity": "sha256:ac379c6b031bf6bf0a4675750ba9deedc651943d24782d02f528a1f14abbdeb3",
      "review_request": {
        "body_digest": "sha256:a7b6fc228e6d1321c2e147fa5700c377bc2291a1fd1b96bdd5128479fbb1a39f",
        "id": 6421893726
      },
      "review_result": {
        "body_digest": "sha256:d6eead4c170640c44b2525b85797c4e09fb27e92d45b514630c9374658a5588b",
        "id": 6421946168
      }
    },
    "evidence_fingerprint": "sha256:1a02a3bd1c3df07dcc8fe62524ba3c7f3a986ab7c18a6a4bfe25ac602caf88e9",
    "head_sha": "04d468578c9219e87546944ca5bc9c64dc0a9ef8",
    "operation_identity": "sha256:ac379c6b031bf6bf0a4675750ba9deedc651943d24782d02f528a1f14abbdeb3",
    "review_request_id": 6421893726,
    "review_result_id": 6421946168,
    "status": "approved-evidence-recorded"
  },
  "candidate_revision_fingerprint": "sha256:e6f23f5c9bedd09185ed4738a6f28134c013aa8d1b8324ff4fb06f4c2bad15e2",
  "check_conclusions": [
    {
      "conclusion": "SUCCESS",
      "name": "Gitar",
      "run_id": 121695975646
    },
    {
      "conclusion": "SUCCESS",
      "name": "Platform Linux arm64",
      "run_id": 121696016946
    },
    {
      "conclusion": "SUCCESS",
      "name": "Platform Linux x64",
      "run_id": 121696017036
    },
    {
      "conclusion": "SUCCESS",
      "name": "Platform Windows arm64",
      "run_id": 121696016906
    },
    {
      "conclusion": "SUCCESS",
      "name": "Platform Windows x64",
      "run_id": 121696017405
    },
    {
      "conclusion": "SUCCESS",
      "name": "Platform macOS arm64",
      "run_id": 121696016979
    },
    {
      "conclusion": "SUCCESS",
      "name": "Platform macOS x64",
      "run_id": 121696017165
    },
    {
      "conclusion": "SUCCESS",
      "name": "Python 3.10",
      "run_id": 121696017333
    },
    {
      "conclusion": "SUCCESS",
      "name": "Python 3.11",
      "run_id": 121696017236
    },
    {
      "conclusion": "SUCCESS",
      "name": "Python 3.12",
      "run_id": 121696016880
    },
    {
      "conclusion": "SUCCESS",
      "name": "Python 3.14",
      "run_id": 121696016927
    },
    {
      "conclusion": "SUCCESS",
      "name": "Python lint",
      "run_id": 121696016557
    },
    {
      "conclusion": "SUCCESS",
      "name": "Website",
      "run_id": 121696016936
    }
  ],
  "check_observations": [
    {
      "checks": [
        {
          "conclusion": "SUCCESS",
          "name": "Gitar",
          "run_id": 121695975646,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/arbiter/runs/121695975646"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Platform Linux arm64",
          "run_id": 121696016946,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/arbiter/actions/runs/40358137940/job/121696016946"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Platform Linux x64",
          "run_id": 121696017036,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/arbiter/actions/runs/40358137940/job/121696017036"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Platform Windows arm64",
          "run_id": 121696016906,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/arbiter/actions/runs/40358137940/job/121696016906"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Platform Windows x64",
          "run_id": 121696017405,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/arbiter/actions/runs/40358137940/job/121696017405"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Platform macOS arm64",
          "run_id": 121696016979,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/arbiter/actions/runs/40358137940/job/121696016979"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Platform macOS x64",
          "run_id": 121696017165,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/arbiter/actions/runs/40358137940/job/121696017165"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Python 3.10",
          "run_id": 121696017333,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/arbiter/actions/runs/40358137940/job/121696017333"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Python 3.11",
          "run_id": 121696017236,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/arbiter/actions/runs/40358137940/job/121696017236"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Python 3.12",
          "run_id": 121696016880,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/arbiter/actions/runs/40358137940/job/121696016880"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Python 3.14",
          "run_id": 121696016927,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/arbiter/actions/runs/40358137940/job/121696016927"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Python lint",
          "run_id": 121696016557,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/arbiter/actions/runs/40358137940/job/121696016557"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Website",
          "run_id": 121696016936,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/arbiter/actions/runs/40358137940/job/121696016936"
        }
      ],
      "head_sha": "04d468578c9219e87546944ca5bc9c64dc0a9ef8",
      "id": "sha256:2611f579eab5e677687a82839b8dba7ef099ab7fbe154fc4b15f6f2abd9fe622",
      "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": 121305884842,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/arbiter/runs/121305884842"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Platform Linux arm64",
          "run_id": 121304091369,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/arbiter/actions/runs/40238165969/job/121304091369"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Platform Linux x64",
          "run_id": 121304091111,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/arbiter/actions/runs/40238165969/job/121304091111"
        },
        {
          "name": "Platform Windows arm64",
          "run_id": 121304091201,
          "run_status": "in_progress",
          "status": "pending",
          "url": "https://github.com/omry/arbiter/actions/runs/40238165969/job/121304091201"
        },
        {
          "conclusion": "FAILURE",
          "name": "Platform Windows x64",
          "run_id": 121304091066,
          "run_status": "completed",
          "status": "failure",
          "url": "https://github.com/omry/arbiter/actions/runs/40238165969/job/121304091066"
        },
        {
          "name": "Platform macOS arm64",
          "run_id": 121304091246,
          "run_status": "in_progress",
          "status": "pending",
          "url": "https://github.com/omry/arbiter/actions/runs/40238165969/job/121304091246"
        },
        {
          "name": "Platform macOS x64",
          "run_id": 121304091263,
          "run_status": "in_progress",
          "status": "pending",
          "url": "https://github.com/omry/arbiter/actions/runs/40238165969/job/121304091263"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Python 3.10",
          "run_id": 121304091194,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/arbiter/actions/runs/40238165969/job/121304091194"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Python 3.11",
          "run_id": 121304091148,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/arbiter/actions/runs/40238165969/job/121304091148"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Python 3.12",
          "run_id": 121304091123,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/arbiter/actions/runs/40238165969/job/121304091123"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Python 3.14",
          "run_id": 121304091134,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/arbiter/actions/runs/40238165969/job/121304091134"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Python lint",
          "run_id": 121304090975,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/arbiter/actions/runs/40238165969/job/121304090975"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Website",
          "run_id": 121304091114,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/arbiter/actions/runs/40238165969/job/121304091114"
        }
      ],
      "head_sha": "b39e7e7df89be4eedb77b775a06eb891450dd457",
      "id": "sha256:e87279729a72f7db24c3f6de6afb090b8921acf79cb5297b416a76333253b6b4",
      "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_deferral_ledger_digest": "sha256:4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945",
  "delivery_deferrals": [],
  "findings": [
    {
      "disposition": "Verified underlying fix in published 04d4685: native platform tests, exact-head full local validation, regression review and preserved correction provenance confirm the invariant.",
      "evidence": [
        "https://github.com/omry/arbiter/actions/runs/40238165969/job/121304091066",
        "/home/omry/.local/state/awd/swe-review-authority/runs/run_2cxrbaaem3mby3fxyc6d5ftecm-l01a01-f01-f02/pr71-cycle/windows-x64-ci-defect-evidence.json",
        "/home/omry/.local/state/awd/swe-review-authority/runs/run_4nxa0tketekanbfzd7f54htfpj-f01-f02/correction3/native-job-steps.json",
        "/home/omry/.local/state/awd/swe-review-authority/runs/run_4nxa0tketekanbfzd7f54htfpj-f01-f02/correction3/pr71-cycle2-e6f23f5c9bedd09185ed4738a6f28134c013aa8d1b8324ff4fb06f4c2bad15e2/local-validation-result.json",
        "/home/omry/.local/state/awd/swe-review-authority/runs/run_4nxa0tketekanbfzd7f54htfpj-f01-f02/correction3/pr71-cycle2-e6f23f5c9bedd09185ed4738a6f28134c013aa8d1b8324ff4fb06f4c2bad15e2/local-general-review.json",
        "/home/omry/.local/state/awd/swe-review-authority/runs/run_4nxa0tketekanbfzd7f54htfpj-f01-f02/correction3/source-verification.json"
      ],
      "head_sha": "b39e7e7df89be4eedb77b775a06eb891450dd457",
      "id": "CI-71-NATIVE-SHUTDOWN-HOOK-001",
      "invariant": "Native cancellation tests must pause the actual platform control implementation and exercise exclusive writer lifetime without replacing product behavior.",
      "locations": [
        "server/tests/unit/test_enrollment_activation.py:test_lifespan_holds_instance_lock_until_cancelled_writer_settles"
      ],
      "proposed_paths": [
        "server/tests/unit/test_enrollment_activation.py"
      ],
      "rationale": "Windows uses WindowsControl; current fixture patches POSIX LocalControl.close, so its event never signals. Actual Windows x64 logs show both deterministic timeouts.",
      "response_urls": [],
      "severity": "medium",
      "source": "required-check-failure",
      "status": "addressed",
      "thread_ids": []
    },
    {
      "disposition": "Verified underlying fix in published 04d4685: native platform tests, exact-head full local validation, regression review and preserved correction provenance confirm the invariant.",
      "evidence": [
        "https://github.com/omry/arbiter/actions/runs/40238165969/job/121304091066",
        "/home/omry/.local/state/awd/swe-review-authority/runs/run_2cxrbaaem3mby3fxyc6d5ftecm-l01a01-f01-f02/pr71-cycle/windows-x64-ci-defect-evidence.json",
        "/home/omry/.local/state/awd/swe-review-authority/runs/run_4nxa0tketekanbfzd7f54htfpj-f01-f02/correction3/native-job-steps.json",
        "/home/omry/.local/state/awd/swe-review-authority/runs/run_4nxa0tketekanbfzd7f54htfpj-f01-f02/correction3/pr71-cycle2-e6f23f5c9bedd09185ed4738a6f28134c013aa8d1b8324ff4fb06f4c2bad15e2/local-validation-result.json",
        "/home/omry/.local/state/awd/swe-review-authority/runs/run_4nxa0tketekanbfzd7f54htfpj-f01-f02/correction3/pr71-cycle2-e6f23f5c9bedd09185ed4738a6f28134c013aa8d1b8324ff4fb06f4c2bad15e2/local-general-review.json",
        "/home/omry/.local/state/awd/swe-review-authority/runs/run_4nxa0tketekanbfzd7f54htfpj-f01-f02/correction3/source-verification.json"
      ],
      "head_sha": "b39e7e7df89be4eedb77b775a06eb891450dd457",
      "id": "CI-71-WINDOWS-RESTART-FIXTURE-001",
      "invariant": "A process restart uses a fresh app while preserving durable authority and recovery-key custody; a closed app fails closed.",
      "locations": [
        "server/tests/unit/test_windows_control.py:test_installed_cli_setup_status_restart_and_namespace_cleanup"
      ],
      "proposed_paths": [
        "server/tests/unit/test_windows_control.py"
      ],
      "rationale": "Windows-only restart fixture still enters the same closed responder; source guard correctly rejects it.",
      "response_urls": [],
      "severity": "medium",
      "source": "required-check-failure",
      "status": "addressed",
      "thread_ids": []
    },
    {
      "disposition": "Verified underlying fix in published 04d4685: native platform tests, exact-head full local validation, regression review and preserved correction provenance confirm the invariant.",
      "evidence": [
        "https://github.com/omry/arbiter/pull/71#discussion_r4372644117",
        "/home/omry/.local/state/awd/swe-review-authority/runs/run_2cxrbaaem3mby3fxyc6d5ftecm-l01a01-f01-f02/pr71-cycle/gitar-commit-reaping-probe-result.json",
        "/home/omry/.local/state/awd/swe-review-authority/runs/run_4nxa0tketekanbfzd7f54htfpj-f01-f02/correction3/native-job-steps.json",
        "/home/omry/.local/state/awd/swe-review-authority/runs/run_4nxa0tketekanbfzd7f54htfpj-f01-f02/correction3/pr71-cycle2-e6f23f5c9bedd09185ed4738a6f28134c013aa8d1b8324ff4fb06f4c2bad15e2/local-validation-result.json",
        "/home/omry/.local/state/awd/swe-review-authority/runs/run_4nxa0tketekanbfzd7f54htfpj-f01-f02/correction3/pr71-cycle2-e6f23f5c9bedd09185ed4738a6f28134c013aa8d1b8324ff4fb06f4c2bad15e2/local-general-review.json",
        "/home/omry/.local/state/awd/swe-review-authority/runs/run_4nxa0tketekanbfzd7f54htfpj-f01-f02/correction3/source-verification.json"
      ],
      "head_sha": "b39e7e7df89be4eedb77b775a06eb891450dd457",
      "id": "GH-71-4372644117",
      "invariant": "Unrelated pairing calls must not retire the lease of a transaction already authorized to commit or suppress its successful receipt.",
      "locations": [
        "server/src/arbiter_server/enrollment.py:230",
        "server/src/arbiter_server/pairing.py:252"
      ],
      "proposed_paths": [
        "server/src/arbiter_server/enrollment.py",
        "server/src/arbiter_server/pairing.py",
        "server/tests/unit/test_enrollment_activation.py"
      ],
      "rationale": "Independent real SQLite/native probe confirms another rejected start reaps the committing session after approval consumption: durable row is inserted but caller gets failure. Review text treated only as a claim, independently reproduced.",
      "response_urls": [],
      "severity": "medium",
      "source": "github-review-comment",
      "status": "addressed",
      "thread_ids": [
        "PRRT_kwDOSmRaHM6wFjK3"
      ]
    }
  ],
  "pr": {
    "base_ref": "pr70",
    "base_sha": "d85932a4ec18fcbe976403e2497dc6d18b2009ed",
    "body_digest": "sha256:d4579f4584188d3739806fd2ff85269300009f0837f853f20ca414f0e9f93c29",
    "body_identity_version": 2,
    "diff_digest": "sha256:8d3eaedeb1108e27132a94a48bec074e222d1afeb5cd67420ce27a5483ce52eb",
    "head_ref": "pr71",
    "head_sha": "04d468578c9219e87546944ca5bc9c64dc0a9ef8",
    "pr": 71,
    "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:0fd7df762f2b0fffaf46d34c9c9a98aa49e651e47d44d320b745c8f1f07781c8"
  },
  "record_version": 8,
  "review_observations": [],
  "review_requests": [
    {
      "base_established_at": "2026-10-25T22:00:53Z",
      "base_ref": "pr70",
      "base_sha": "d85932a4ec18fcbe976403e2497dc6d18b2009ed",
      "body_digest": "sha256:42612ccdea0affee96fe13949b143d6cfdbc267a473967249b1410aaea8d71aa",
      "created_at": "2026-10-25T22:15:02Z",
      "head_sha": "b39e7e7df89be4eedb77b775a06eb891450dd457",
      "id": 6404110154,
      "kind": "regular-review"
    },
    {
      "base_established_at": "2026-10-25T22:00:53Z",
      "base_ref": "pr70",
      "base_sha": "d85932a4ec18fcbe976403e2497dc6d18b2009ed",
      "body_digest": "sha256:a7b6fc228e6d1321c2e147fa5700c377bc2291a1fd1b96bdd5128479fbb1a39f",
      "created_at": "2026-10-26T16:50:45Z",
      "head_sha": "04d468578c9219e87546944ca5bc9c64dc0a9ef8",
      "id": 6421893726,
      "kind": "regular-review"
    }
  ],
  "review_results": [
    {
      "base_ref": "pr70",
      "base_sha": "d85932a4ec18fcbe976403e2497dc6d18b2009ed",
      "body_digest": "sha256:e1c7415bae87622de38146042672d6f4572944a37d4dbf4c07015d310674eef2",
      "commit_id": "b39e7e7df89be4eedb77b775a06eb891450dd457",
      "id": 6404126101,
      "inline_message_ids": [],
      "request_comment_id": 6404110154,
      "result_kind": "clean",
      "status": "result",
      "submitted_at": "2026-10-25T22:16:17Z",
      "unresolved_thread_ids": [
        "PRRT_kwDOSmRaHM6wFjK3"
      ]
    },
    {
      "base_ref": "pr70",
      "base_sha": "d85932a4ec18fcbe976403e2497dc6d18b2009ed",
      "body_digest": "sha256:d6eead4c170640c44b2525b85797c4e09fb27e92d45b514630c9374658a5588b",
      "commit_id": "04d468578c9219e87546944ca5bc9c64dc0a9ef8",
      "id": 6421946168,
      "inline_message_ids": [],
      "request_comment_id": 6421893726,
      "result_kind": "clean",
      "status": "result",
      "submitted_at": "2026-10-26T16:52:34Z",
      "unresolved_thread_ids": []
    }
  ],
  "revision_fingerprint": "sha256:e6f23f5c9bedd09185ed4738a6f28134c013aa8d1b8324ff4fb06f4c2bad15e2",
  "rounds": [
    {
      "applied_fix_paths": [
        "server/src/arbiter_server/pairing.py",
        "server/tests/unit/test_enrollment_activation.py",
        "server/tests/unit/test_windows_control.py"
      ],
      "disposition_changes": [
        "CI-71-NATIVE-SHUTDOWN-HOOK-001",
        "CI-71-WINDOWS-RESTART-FIXTURE-001",
        "GH-71-4372644117"
      ],
      "effective_diff_digest": "sha256:27218f67e4480e4f0d543d1793184f425cb8077205bcd34b2abbbe3515037d98",
      "finding_ids": [
        "CI-71-NATIVE-SHUTDOWN-HOOK-001",
        "CI-71-WINDOWS-RESTART-FIXTURE-001",
        "GH-71-4372644117"
      ],
      "invariants": [
        "Native cancellation tests must pause the actual platform control implementation and exercise exclusive writer lifetime without replacing product behavior.",
        "A process restart uses a fresh app while preserving durable authority and recovery-key custody; a closed app fails closed.",
        "Unrelated pairing calls must not retire the lease of a transaction already authorized to commit or suppress its successful receipt."
      ],
      "outcome": "corrected",
      "proposed_fix_paths": [
        "server/src/arbiter_server/pairing.py",
        "server/tests/unit/test_enrollment_activation.py",
        "server/tests/unit/test_windows_control.py"
      ],
      "resulting_head": "5c52f5a5f9b9c309bc533f713ad44513d402a0ea",
      "review_observation_id": null,
      "review_request_id": 6404110154,
      "review_result_id": 6404126101,
      "reviewed_head": "b39e7e7df89be4eedb77b775a06eb891450dd457",
      "root_cause": "Reaping treated a consumed approval as idle while its writer was still busy, suppressing a committed receipt; preserve existing busy lease through actual completion. Native test fixtures targeted POSIX-only close on Windows and reused a closed app for restart.",
      "round": 1,
      "unresolved_current_slice_findings": 3,
      "unresolved_design_blockers": 0
    },
    {
      "applied_fix_paths": [],
      "disposition_changes": [
        "CI-71-NATIVE-SHUTDOWN-HOOK-001",
        "CI-71-WINDOWS-RESTART-FIXTURE-001",
        "GH-71-4372644117"
      ],
      "effective_diff_digest": "sha256:8d3eaedeb1108e27132a94a48bec074e222d1afeb5cd67420ce27a5483ce52eb",
      "finding_ids": [
        "CI-71-NATIVE-SHUTDOWN-HOOK-001",
        "CI-71-WINDOWS-RESTART-FIXTURE-001",
        "GH-71-4372644117"
      ],
      "invariants": [
        "Native cancellation tests must pause the actual platform control implementation and exercise exclusive writer lifetime without replacing product behavior.",
        "A process restart uses a fresh app while preserving durable authority and recovery-key custody; a closed app fails closed.",
        "Unrelated pairing calls must not retire the lease of a transaction already authorized to commit or suppress its successful receipt."
      ],
      "outcome": "clean",
      "proposed_fix_paths": [],
      "resulting_head": "04d468578c9219e87546944ca5bc9c64dc0a9ef8",
      "review_observation_id": null,
      "review_request_id": 6421893726,
      "review_result_id": 6421946168,
      "reviewed_head": "04d468578c9219e87546944ca5bc9c64dc0a9ef8",
      "root_cause": "No new actionable current-head finding. Preserved historical defects are fixed in published source; deterministic native tests and exact-head full local validation verify busy-writer ownership, actual Windows close hooks, fresh-app restart and expiry behavior. No correction was applied during this review cycle.",
      "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 25, 2026 22:10
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 25, 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-26T16:52:36.384003Z 04d4685 Manual request
🔒 Security Review 🔄 Running since 2026-10-25T22:10:50.242759Z b39e7e7 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 25, 2026

Copy link
Copy Markdown
Owner Author

@codex review

Exact head: b39e7e7

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: b39e7e7df8

ℹ️ 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".

Comment thread server/src/arbiter_server/pairing.py Resolved
@omry

omry commented Oct 25, 2026

Copy link
Copy Markdown
Owner Author

@codex review

Exact head: 5c52f5a

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: 5c52f5a5f9

ℹ️ 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".

Persist exact approved enrollment results in one SQLite transaction. Recheck live approval and account state at the commit decision, preserve cancellation and rejection ordering, and recover private rollback journals under exclusive instance ownership. Retain that ownership until real workers settle during shutdown.

Add transaction, crash-recovery and lifespan regressions. Public enrollment remains at the prepared-only boundary for the following client-promotion slice.

Validation: 1,609 Python unit tests passed (43 skipped), 43 Python/Go integration tests passed, Go test/vet, Pyrefly, Black and website build passed. DBB and fresh independent Sol review completed for this exact candidate.
@gitar-bot

gitar-bot Bot commented Oct 26, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 2 closed / 2 findings

🔴 High risk · Persisting approved enrollment identities and grants transactionally changes stored trust state; stale or mismatched approval handling could authorize unintended client access.

Commits enrollment decisions in a single SQLite transaction, rechecking live approval and account state at the commit point and recovering private rollback journals under exclusive instance ownership. No open issues found; two closed-without-fix items remain noted for this PR.

✅ 2 closed
Closed: Bug: Other sessions' _state reaping closes the committing lease after decision

📄 server/src/arbiter_server/enrollment.py:230-243 📄 server/src/arbiter_server/pairing.py:516-530
EnrollmentRequests.complete's check() pops the approval from _approved as soon as the commit decision is made, and SQLite I/O (db.commit() with synchronous=FULL) then runs without the responder lock held. In that window, any other pairing call goes through PairingResponder._state (start, _live, prepare, ... for any selector). _state loops over every entry in _attempts. For this selector, approval_is_current(state.approval) now returns False, so it calls state.active.lease.close() on the lease that is mid-commit. Once the commit lands, the post-check self._check(lease) in _run.work() raises _failed(). The enrollment is now stored durably, but the client gets a failure instead of the receipt, purely because some unrelated session made a call at the same moment. Fix: have _state skip reaping (or skip closing the lease of) any selector that is currently in EnrollmentRequests._committing. Another option is to have complete keep a 'committing' marker that approval_is_current/reaping treats as live until the write settles.

Closed: Bug: Busy-lease skip removes the approval check from the caller's own _live

📄 server/src/arbiter_server/pairing.py:256-257 📄 server/src/arbiter_server/pairing.py:274-278
_live() runs inside each _run worker, so session.lease._busy is always True for the caller. With the new continue, _state() no longer pops the caller's own entry when its approval goes stale. Before this change, the reap is what made _live fail on a revoked approval. Here is the trigger: while prove/prepare/ready is running, the operator rejects the request, the client registers the same selector again, and the operator approves it. approved(selector) now returns the new approval. The old _Attempts is still in the map, so state.active is session and state.approval is session.approval both pass. The stale session keeps going: it can still run prepare(root, session.approval, …) and mint a prepared result for a revoked approval. complete() only catches this at activation. The stale entry also hides the new approval from new start() callers until the old worker finishes. Fix: keep the busy skip for closing other leases, but have _live check self._requests.approval_is_current(session.approval) itself.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

For more verification details, comment gitar display:verbose.

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 26, 2026

Copy link
Copy Markdown
Owner Author

@codex review

Exact head: 04d4685

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: 04d468578c

ℹ️ 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 added the approved PR passed review and required checks label Oct 26, 2026
@omry
omry merged commit 5d1646a into main Oct 27, 2026
14 checks passed
@omry
omry deleted the pr71 branch October 27, 2026 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved PR passed review and required checks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant