Skip to content

bug(tests): live-tier fixtures change an agent the suite did not create, and put it back incompletely #4801

Backlog

Description

@pavshulin

Summary

Several places in the live tier write to state on the target stack that the suite does not own, and do not restore all of it.

Context

Found while fixing #4620.

  • tests/test_public_links.py: the fixtures link_with_email_required and scoped_link, and four test bodies of TestUnifiedAccessPolicy, take the first agent docker ps lists and PUT its access policy with two fields (require_email, open_access). The route replaces the whole policy, and an omitted group_auth_mode defaults to none (AccessPolicyUpdate in src/backend/models.py). An agent that was on any_verified is left on none after a green run. The status of the restoring PUT is not checked.
  • tests/test_settings.py::TestOpsSettingsReset: POST /api/settings/ops/reset deletes every stored non-retention ops setting on the target, and the tests never put them back.
  • On a CI stack this is harmless. Run against an instance with real agents, it changes their access policy and the operator's ops settings.
  • The dev-nightly red: Tier 3 failed on dev #4620 work moves TestPublicChat.public_link onto the suite's own created_agent and sends the whole policy. The same change fits the others.

Acceptance Criteria

  • No fixture or test in tests/test_public_links.py writes to an agent the suite did not create.
  • Every access-policy PUT in that file sends the whole policy.
  • TestOpsSettingsReset restores the ops settings it found, or is limited to a stack the suite booted.

Activity

  1. added
    priority-p3
    type-bug
    theme-devex
    on Nov 27, 2026
  2. pavshulin commented on Nov 27, 2026

    @pavshulin
    ContributorAuthor

    Also from the review of #4805 (note I1): the public_link fixture added there restores the access policy in finally without checking the status of that PUT. Fix it with this issue: assert the restore status.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority-p3theme-devextype-bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions