Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions review/src/oc_review/analyze.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@
# Production federation rule (spec "Auth and cost", "Each release").
# Rule R1 `claude-review-prod-r1` and service account `claude-review`, in
# workspace `claude-review`. Each release names its own rule here.
ANTHROPIC_FEDERATION_RULE_ID = "fdrl_01N2ZktTiVKqUvvXwywBFfys"
ANTHROPIC_FEDERATION_RULE_ID = "fdrl_01AfACzupW3U4Bx361ZUbsyR"
ANTHROPIC_ORGANIZATION_ID = "2bc920f9-977b-43b2-870a-f840e4ce809c"
ANTHROPIC_SERVICE_ACCOUNT_ID = "svac_01PiMgfb6qJgNpLZUV8hprCC"
ANTHROPIC_SERVICE_ACCOUNT_ID = "svac_017eR3ohB6rP5MEAsda6U7X6"

FEDERATION_RULE_ID_RE = re.compile(r"^fdrl_[A-Za-z0-9]{24}$")
ORGANIZATION_ID_RE = re.compile(r"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$")
Expand Down
10 changes: 5 additions & 5 deletions review/tests/unit/test_evals.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,23 +181,23 @@ def test_eval_ids_are_the_real_eval_rule():

def test_production_ids_are_the_real_production_rule():
assert analyze.federation_ids() == analyze.FederationIds(
"fdrl_01N2ZktTiVKqUvvXwywBFfys", "2bc920f9-977b-43b2-870a-f840e4ce809c", "svac_01PiMgfb6qJgNpLZUV8hprCC"
)
SIMULATION_RULE_ID, "2bc920f9-977b-43b2-870a-f840e4ce809c", TEST_SERVICE_ACCOUNT_ID
) # SIMULATION ONLY: S2 names R2 and the test service account


def test_eval_ids_differ_from_production_ids():
ids, prod = evals.eval_federation(), analyze.federation_ids()
assert analyze.ids_valid(prod) and not analyze.ids_are_placeholders(prod)
assert ids.rule_id != prod.rule_id
assert ids.service_account_id != prod.service_account_id
# SIMULATION ONLY: S2 uses the test service account, so only the rule differs
# one organization, so the workspace and service account separate the rules
assert ids.organization_id == prod.organization_id


def test_production_ids_differ_from_every_test_id():
prod = analyze.federation_ids()
assert prod.rule_id not in {evals.eval_federation().rule_id, TEST_RULE_ID, SIMULATION_RULE_ID}
assert prod.service_account_id not in {evals.eval_federation().service_account_id, TEST_SERVICE_ACCOUNT_ID}
# SIMULATION ONLY: S2 production IDs are the simulation rule and the test service account
assert prod.rule_id not in {evals.eval_federation().rule_id, TEST_RULE_ID}


def test_main_uses_the_eval_ids_by_default(tmp_path):
Expand Down
Loading