Skip to content

Tests: follow the thread-list guard flag and the RAG WAL keeper - #15778

Merged
danielhanchen merged 1 commit into
mainfrom
ci-tests-follow-thread-flag-and-wal-keeper
Oct 28, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
ci-tests-follow-thread-flag-and-wal-keeper

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Summary

(Python 3.13, a-f) fails on main and on every PR based on it (seen on the #15693 and #15761 staging runs) with two stale tests. Both product changes are intentional; the tests had not caught up.

1. test_account_chat_settings.py::test_list_export_and_delete_stay_in_the_account

assert {'threads': [...Guards': True} == {'threads': []}
  Left contains 1 more item: {'threadPatchGuards': True}

#15685 advertises the chat-title repair guards on the thread lists (threadPatchGuards on the /chat/threads reply). This test checks that another account's thread stays invisible, but compared the whole reply to {"threads": []}. It now asserts the thread list itself is empty, which is the privacy claim.

2. test_checkpoint_compaction.py::test_the_reachability_probe_closes_the_connection_it_opens

assert _open_archive_handles() <= before + 1
E   assert 4 <= (0 + 1)

#15719 keeps one WAL keeper connection per rag.db for the life of the process (storage/rag_db._ensure_wal_keeper), holding rag.db plus its -wal and -shm sidecars. The first probe in a fresh process creates it, so the test counted the keeper's descriptors as a leak. It also failed when run alone, not only under xdist.

The test now probes once to warm the keeper up, takes its baseline after that, and requires no growth at all over 50 probes. That is stricter than the old before + 1, and it is the leak the test exists for: one leaked probe connection per call.

Testing

  • Both tests fail on main (75555ccb54) and pass with this change; test_account_chat_settings.py 93 passed.
  • Sabotage: replacing the conn.close() in conversation_archive.reachable() with a no-op makes the probe test fail with assert 23 <= 5.

#15685 added threadPatchGuards to the /chat/threads reply, and the account
privacy test compared the whole reply to {"threads": []}; it now checks the
thread list it is about.

#15719 keeps one WAL keeper connection on rag.db for the life of the process,
so the reachability probe test saw three to four new descriptors and failed.
It now warms the keeper up before taking its baseline and requires no growth
over 50 probes, which still catches a probe that leaks its connection.
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-28T13:53:18.016887Z 5edeca7 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: 5edeca7ad5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielhanchen
danielhanchen merged commit a16fb4f into main Oct 28, 2026
1 of 35 checks passed
@danielhanchen
danielhanchen deleted the ci-tests-follow-thread-flag-and-wal-keeper branch October 28, 2026 13:59
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