fix(fence): the cross-project permission prompt says what changes and where first, in plain words
CI & Build / Python lint (push) Successful in 2s
CI & Build / Plugin hooks (push) Successful in 15s
CI & Build / TypeScript typecheck (push) Successful in 33s
CI & Build / Python tests (push) Successful in 2m2s
CI & Build / integration (push) Successful in 2m40s
CI & Build / Build & push image (push) Successful in 25s

The first line names the act and the project it lands in against the one the
session works in; the second says when to approve; the agent's issue-filing
call moves to a last line in parentheses. Tool names are spelled out and
project ids dropped from the operator's text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-27 09:56:19 -05:00
co-authored by Claude Opus 5.5
parent 2903b090a1
commit 706f49a12a
2 changed files with 32 additions and 16 deletions
+7 -6
View File
@@ -147,9 +147,10 @@ async def test_a_write_in_another_project_asks_and_says_how_to_file_an_issue_ins
out = await check_act(1, 2, tool="update_task", args={"task_id": 5})
assert out["allowed"] is False
assert out["targets"] == [{"id": 9, "title": "Elsewhere"}]
assert "Home (project 2)" in out["reason"]
assert "Elsewhere (project 9)" in out["reason"]
assert 'create_task(project_id=9, kind="issue")' in out["reason"]
first, ask, agent = out["reason"].split("\n")
assert first == "Update task in Elsewhere, but this session is working in Home."
assert ask == "Approve only if you asked for this change to Elsewhere."
assert 'create_task(project_id=9, kind="issue")' in agent
async def test_a_rule_edit_in_another_project_names_the_rule_and_suggests_no_issue():
@@ -157,12 +158,12 @@ async def test_a_rule_edit_in_another_project_names_the_rule_and_suggests_no_iss
with a, b, c:
out = await check_act(1, 2, tool="update_rule", args={"rule_id": 130, "salience": "low"})
assert out["allowed"] is False
assert "rule 130 of Elsewhere (project 9)" in out["reason"]
assert out["reason"].startswith("Changing rule 130 in Elsewhere, but this session is working in Home.")
assert "create_task" not in out["reason"]
with a, b, c:
related = await check_act(1, 2, tool="relate_rules",
args={"from_rule_id": 4, "to_rule_id": 130, "kind": "overrides"})
assert "rule 4, rule 130 of" in related["reason"]
assert related["reason"].startswith("Changing rule 4, rule 130 in Elsewhere")
async def test_filing_an_issue_in_another_project_goes_ahead():
@@ -192,7 +193,7 @@ async def test_a_directory_in_another_project_asks_in_the_words_of_the_act():
out = await check_act(1, 2, target_project=9, act="git push in")
same = await check_act(1, 2, target_project=2, act="git push in")
assert out["allowed"] is False
assert "git push in Elsewhere (project 9)" in out["reason"]
assert out["reason"].startswith("Git push in Elsewhere, but this session is working in Home.")
assert same["allowed"] is True