diff --git a/tests/test_agent_mention_downstream_idempotency.py b/tests/test_agent_mention_downstream_idempotency.py index c9b6ab86ea..3ec9322137 100644 --- a/tests/test_agent_mention_downstream_idempotency.py +++ b/tests/test_agent_mention_downstream_idempotency.py @@ -12,7 +12,7 @@ def test_router_can_read_durable_central_artifacts() -> None: - """Both local routing and sibling sweeping receive actions read access.""" + """Target reads and central dispatch keep distinct least-privilege authorities.""" text = ROUTER_WORKFLOW.read_text(encoding="utf-8") local, sweep = text.split("\n sweep-organization-agent-mentions:\n", 1) @@ -20,6 +20,7 @@ def test_router_can_read_durable_central_artifacts() -> None: assert "permissions:\n actions: read" in sweep assert "AGENT_DISPATCH_TOKEN: ${{ github.token }}" in local assert "AGENT_DISPATCH_TOKEN: ${{ github.token }}" in sweep + assert 'export AGENT_DISPATCH_TOKEN="$TARGET_REPOSITORY_TOKEN"' not in sweep def test_downstream_workflows_claim_artifacts_and_coalesce_by_pull_request() -> None: diff --git a/tests/test_agent_mention_workflow_contract.py b/tests/test_agent_mention_workflow_contract.py index c5fc4cae54..f5d6e13272 100644 --- a/tests/test_agent_mention_workflow_contract.py +++ b/tests/test_agent_mention_workflow_contract.py @@ -48,6 +48,7 @@ def test_workflow_uses_local_event_and_central_sweep_with_job_scoped_writes() -> assert "secrets.OPENCODE_APPROVE_TOKEN" in sweep assert "TARGET_REPOSITORY_SOURCE" in sweep assert "AGENT_DISPATCH_TOKEN: ${{ github.token }}" in sweep + assert 'export AGENT_DISPATCH_TOKEN="$TARGET_REPOSITORY_TOKEN"' not in sweep assert "agent_mention_sweep.py" in sweep