Skip to content

Grep fallback tests distinguish responses from pre-dispatch timeouts - #1093

Open
zlareb1 wants to merge 1 commit into
mainfrom
test/grep-shim-response-evidence
Open

zlareb1 wants to merge 1 commit into
mainfrom
test/grep-shim-response-evidence

Conversation

@zlareb1

@zlareb1 zlareb1 commented Nov 21, 2026

Copy link
Copy Markdown
Member

Changelog category

  • CI Fix or Improvement

Changelog entry

Not required.

Why

The grep fallback test requires a request to reach its local HTTP server even when its deadline can expire before dispatch. A controlled delay demonstrates that native output and exit status remain correct while that assertion fails.

Scope and risk

Two test files separate transport timeout coverage from response handling. The existing HTTP cases retain their three modes, mode order, native output and exit checks, 300 ms request deadline and 3000 ms elapsed bound. Their unconditional request-arrival assertion moves to deterministic child-process response cases.

A test-only preload supplies real refusal and malformed JSON response objects before the shim deadline begins. The cases require request invocation, validate the request and record whether JSON parsing ran and rejected. Copies that ignore the response status or JSON parsing fail those controls. Existing successful annotation cases still exercise the real HTTP path.

The historical macOS failure has no transport-phase trace. This fixes the fixture contract without claiming a measured scheduling cause or a production defect.

Compatibility, rollout and rollback

  • Wire, schema, settings and operator steps: none.
  • Production code, plugin manifests and versions are unchanged.
  • Rollback: revert the two test files. No stored data changes.

Tests

  • A controlled pre-dispatch delay makes the original arrival assertion fail. The corrected HTTP fallback test passes with the same 300 ms deadline.
  • Independent status-ignored and JSON-ignored controls both fail the deterministic response test.
  • The two directly related fallback and response cases pass. Scoped syntax, pinned formatting, whitespace and public-body prose checks pass.
  • Full exact-head hosted CI, including the plugin platform matrix, and a fresh independent whole review remain required before merge.

AI assistance in the code

  • AI-generated: Codex investigated the fixture, wrote the response controls and checked the unchanged timeout boundaries.

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

Checklist

  • Native output, exit status and timeout coverage are retained.
  • No production, generated, wire or configuration changes.
  • Commits are signed off.
  • Full required exact-head hosted CI passes.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
@vercel

vercel Bot commented Nov 21, 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 12:32am UTC

Request Review

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