Skip to content

Private-query capture tests isolate their request context - #1089

Open
zlareb1 wants to merge 2 commits into
mainfrom
fix/private-log-capture-observation
Open

zlareb1 wants to merge 2 commits into
mainfrom
fix/private-log-capture-observation

Conversation

@zlareb1

@zlareb1 zlareb1 commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Related: #1090

Changelog category

  • CI Fix or Improvement (changelog entry is not required)

Changelog entry

Not required.

Why

The private native-query test observes a process-wide capture file while awaiting one private query. An unrelated public task can create that file. The event-controlled regression reproduces the original absence failure with only public SQL in the file. The exact writer and contents of the hosted failure remain unknown.

The fixture selects its capture sink with an inherited request context. The request and its children retain the capture boundary; pre-existing unrelated tasks retain their original sink. Forced private captures from the request or a child still fail the original assertion.

Scope and risk

Only the integration capture observer and its unit controls change. The private result, absence assertion, positive public capture control, native query-log proof and SQL and analyst permission checks remain strict. The wrapper delegates to the existing capture writer. No production privacy behavior or permissions change.

Compatibility, rollout and rollback

  • Wire and operator steps: none.
  • Rollback: revert the test fixture and controls.

Tests

env LOOM_ENV_FILE= .venv-312/bin/python -m pytest tests/unit/test_private_capture_observation.py -q

Six controls pass on this current-main composition. Scoped Ruff, formatting, prose and committed-range whitespace pass. Both concern files retain their exact prior qualified source, including all original integration assertions. The earlier valid fail-first control produced two original-assertion failures and four passes; the same six pass with the fixture repair.

The fake boundary stops before native database checks. Original hosted capture contents and writer remain unknown; this is no production leak-fix claim. Earlier CI and reviews belong to earlier heads. Fresh independent entire review and complete exact-head hosted CI remain required.

AI assistance in the code

  • AI-generated: Codex wrote the fixture and regression controls.
  • I can explain every line of this diff and how it interacts with the rest of Loom.

Checklist

  • Commits are signed off.
  • No wire, schema, setting or operator change.
  • Full exact-head hosted CI passes.
  • Fresh independent entire review has no unresolved findings or nits.

@vercel

vercel Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
loom-docs Ready Ready Preview Nov 21, 2026 5:41am UTC

Request Review

@zlareb1
zlareb1 force-pushed the fix/private-log-capture-observation branch from 5a604a2 to 0f5fe33 Compare November 21, 2026 00:08
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
@zlareb1
zlareb1 force-pushed the fix/private-log-capture-observation branch from 0f5fe33 to 92f7309 Compare November 21, 2026 01:25
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>

This branch has not been deployed

No deployments
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