Skip to content

Require witnessed requests in hook failure tests - #888

Merged
zlareb1 merged 1 commit into
mainfrom
fix/plugin-failopen-request-witness
Nov 18, 2026
Merged

zlareb1 merged 1 commit into
mainfrom
fix/plugin-failopen-request-witness

Conversation

@zlareb1

@zlareb1 zlareb1 commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Related: #884

Changelog category (leave one):

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

Why

A hook request can abort before the test server observes it and still exit successfully in less than 1.5 seconds. The failure tests treated that valid silent exit as impossible. Reusing the same file-context session for another attempt also suppresses its lookup through the hook's existing deduplication.

Scope and risk

The two failure fixtures require a witnessed request within the existing three attempts. Each attempt keeps the zero-exit and empty-output checks and must finish within seven seconds. The final witnessed request keeps its 1.5-second completion bound. Each file-context attempt uses a fresh session fixture so deduplication cannot replace the request being tested.

Compatibility, rollout and rollback

  • Wire and operator steps: none. Only one test file changes; shipped hooks, request timeouts and retry policies are unchanged.
  • Generated copies remain current. Test fixtures are not included in the plugin sync or published plugin package.
  • Rollback restores the fixture assumptions without changing stored data or deployment state.

Tests

  • A private pre-dispatch abort witness makes the original fixture fail its lower-bound assumption. The corrected fixture passes both selected cases with a first aborted request followed by an observed request, and both cases pass without injection.

  • A control aborting all three attempts still fails the required arrival assertion. No timeout, final arrival assertion or attempt limit is increased.

  • The two selected cases pass on Node 22.23.2. Node syntax, plugin-sync and diff checks pass. Full remote platform and repository CI remain required; this does not identify the exact stage of the earlier WSL failure.

  • All remote checks pass on the exact source head, including the WSL platform leg. Later target changes were reviewed separately for composition; that review does not represent a new combined CI run.

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

  • AI-generated: Codex prepared the fixture correction and checked its source, controlled failure witnesses and unchanged hook behavior.

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

Checklist

  • All applicable remote CI checks pass for the exact pushed head; later target changes have a separate composition review.
  • The focused checks preserve the zero-exit, silent-output, arrival and deadline requirements.
  • Generated plugin copies are current; shipped plugin behavior and versions are unchanged.
  • No wire, migration, frontend or documentation change requires additional generated files.
  • A fresh independent review of the pushed source and complete public body has no findings or nits.
  • Commits are signed off.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
@zlareb1 zlareb1 mentioned this pull request Nov 18, 2026
6 tasks done
@zlareb1
zlareb1 merged commit bed76cc into main Nov 18, 2026
57 of 58 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