Skip to content

The audit-v1 and set-from-messages integration tests run under a minted token instead of skipping without self-signup - #376

Merged
zlareb1 merged 6 commits into
mainfrom
fix/integration-tests-mint-tokens
Nov 7, 2026
Merged

zlareb1 merged 6 commits into
mainfrom
fix/integration-tests-mint-tokens

Conversation

@zlareb1

@zlareb1 zlareb1 commented Nov 7, 2026 •

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

Changelog entry (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):

Why

tests/integration/test_audit_v1.py (5 tests) and tests/integration/test_memory_set_from_messages.py (3 tests) got their identity from /v1/auth/self-signup and skipped when it failed. CI does not set LOOM_SELF_SIGNUP, whose default is off, so the endpoint answers 404 and all eight skipped on every run: hybrid lexical search, per-type retention expires_at, outcome evidence counts, list sort-by-score, the audit-v1 namespace.get fields and memory.set_from_messages were never exercised. The tests rule says integration tests never depend on self-signup.

Each test now takes the mint_test_token fixture and a fresh org from unique_org(...), as test_search_keys_resolve_round_trip.py does, through one helper, minted_identity in tests/integration/_resources.py, which returns the org, namespace, subject and token the tests read. The test bodies and every assertion are unchanged. Now that the memory.set_from_messages tests run in CI, their client timeout is 20 s, as in test_search_keys_resolve_round_trip.py, instead of 8 s.

Scope and risk

Two integration test files and one helper in tests/integration/_resources.py. No server code.

Compatibility, rollout and rollback

  • None.

Tests

  • Both files against a server from a recent main, its own ClickHouse, auth off: 8 passed, 0 skipped. Under a load average of about 85 the old 8 s client timeout was hit twice on memory.set_from_messages; the same calls take 1 to 3 s.

AI assistance in the code (leave one; writing this description with AI is fine):

  • AI-generated (an agent wrote most of the diff): Claude Code; the test bodies and assertions were compared with main (unchanged), and both files were run against an isolated server: 8 passed, 0 skipped.

  • I can explain every line of this diff and how it interacts with the rest of Loom.

Checklist

  • make format-check, make lint, make typecheck and make test-unit pass; the integration suite passes if server behaviour changed.
  • Generated files are regenerated in this PR, not by hand.
  • A new migration is additive and numbered after the latest on main; no merged migration is edited.
  • A behaviour change to any file a plugin ships bumps both plugin manifests' version.
  • The frontend builds and its tests pass, if frontend/ changed.
  • Docs under docs/ describe the system as it now is, and this description names any operator steps and wire changes.
  • Repository text has no dates, people, host names, internal namespaces, ticket or decision numbers.
  • Commits are signed off (git commit -s), as CONTRIBUTING.md asks.

🤖 Generated with Claude Code

zlareb1 and others added 6 commits November 7, 2026 13:18
…ed token

test_audit_v1.py (5 tests) and test_memory_set_from_messages.py (3 tests)
got their identity from /v1/auth/self-signup and skipped on a 404. CI does
not set LOOM_SELF_SIGNUP, whose default is off, so all 8 skipped on every
run: lexical search, per-type retention expires_at, outcome evidence
counts, memory.list sort_by=score, the namespace.get audit fields and
memory.set_from_messages were never exercised.

Each test now takes a fresh org from unique_org(...) and a token from the
mint_test_token fixture, as test_search_keys_resolve_round_trip.py does.
The assertions are unchanged.

Run against a local server with auth off and the fake embedder and LLM:
8 passed, 0 skipped, on two consecutive runs. An earlier run on the same
loaded machine had 2 memory.set_from_messages calls exceed the 8 s client
timeout; the passing calls take 1 to 3 s.

Signed-off-by: zlareb1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ages calls get a 20 s client timeout

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…dule docstring names it

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
@zlareb1
zlareb1 merged commit 6c857d0 into main Nov 7, 2026
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant