F                                                                        [100%]
=================================== FAILURES ===================================
______________ test_each_lane_is_gated_separately_before_backend _______________

bound = ({'id': 'test-lane', 'org': 'coulomb', 'repo': 'team-repo', 'stage': 'test', ...}, PosixPath('/tmp/secrets-canonical-b...para0/owner'), PosixPath('/tmp/secrets-canonical-baseline-unsandboxed/test_each_lane_is_gated_separa0/owner/owner.sh'))
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x702646f9f440>
tmp_path = PosixPath('/tmp/secrets-canonical-baseline-unsandboxed/test_each_lane_is_gated_separa0')

    def test_each_lane_is_gated_separately_before_backend(bound, monkeypatch, tmp_path):
        data, _, _ = bound
        entry = validate_entry(_with_companion(data))
        lane = validate_entry(_companion())
        table = {entry.id: entry, lane.id: lane}
        monkeypatch.setattr(cli, "get_entry", lambda _dir, cid: table[cid])
        gated = []
        def gate(cfg, e, action, evidence, *, fields=()):
            gated.append((e.id, action, fields))
            if e.id == "test-worker":
                raise DeliveryError("companion lane denied")
            return SimpleNamespace(status="approved")
        monkeypatch.setattr(cli, "_require_lane_approval", gate)
        monkeypatch.setattr(cli, "require_delivery_state", lambda *a: None)
        monkeypatch.setattr(cli, "_open_backend", lambda *a, **k: pytest.fail("no backend after a lane refusal"))
        command = data["delivery_config"]["exec_owner"]["command"]
        with pytest.raises(DeliveryError, match="companion lane denied"):
>           cli.cmd_exec(_cfg(tmp_path), SimpleNamespace(field=None, catalog=entry.id, command=command, mode="exec-env"))

tests/test_exec_owner_companions.py:165: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

cfg = Config(catalog_dir=PosixPath('/tmp/secrets-canonical-baseline-unsandboxed/test_each_lane_is_gated_separa0'), policy_di...authorization_policy_version='', authorization_min_approvals=1, pdp_url='', pdp_token_file=None, clock_trust_file=None)
args = namespace(field=None, catalog='test-lane', command=['/tmp/secrets-canonical-baseline-unsandboxed/test_each_lane_is_gat.../dash', '/tmp/secrets-canonical-baseline-unsandboxed/test_each_lane_is_gated_separa0/owner/owner.sh'], mode='exec-env')

    def cmd_exec(cfg: Config, args) -> int:
        from contextlib import ExitStack
    
        from secrets_engine.exec_delivery import exec_with_secret
        from secrets_engine.exec_owner import resolve_companions, validate_delivery_target
        entry = get_entry(cfg.catalog_dir, args.catalog)
        field = args.field or (entry.fields[0] if entry.fields else "")
        session_detail: dict[str, object] = {}
        companion_sessions: dict[str, dict[str, object]] = {}
        # Refuse a substituted recipient before consuming approval or opening Bao.
        owner_digest = validate_delivery_target(entry, field, args.command, args.mode)
        companions = resolve_companions(entry, lambda cid: get_entry(cfg.catalog_dir, cid))
        command_name = args.command[0] if args.command else ""
        with ExitStack() as stack:
            evidence = stack.enter_context(_privileged_evidence(
                cfg,
                entry,
                "exec",
                detail={
                    "command": command_name,
                    "mode": args.mode,
                    "field": field,
                    "session": session_detail,
                    "exec_owner_sha256": owner_digest,
                    "companions": [lane.id for lane, _, _ in companions],
                },
            ))
            # require approval + readiness before running.
>           decision = _require_lane_approval(
                cfg, entry, "exec", evidence, fields=(field,) if field else (),
                auth_args=args,
            )
E           TypeError: test_each_lane_is_gated_separately_before_backend.<locals>.gate() got an unexpected keyword argument 'auth_args'

src/secrets_engine/cli.py:588: TypeError
=========================== short test summary info ============================
FAILED tests/test_exec_owner_companions.py::test_each_lane_is_gated_separately_before_backend
