Skip to content

test(provider-gen): wire the live-authority evidence into the suite - #35

Draft
k08200 wants to merge 1 commit into
spike/gen-provider-renamefrom
spike/gen-provider-e2e
Draft

test(provider-gen): wire the live-authority evidence into the suite#35
k08200 wants to merge 1 commit into
spike/gen-provider-renamefrom
spike/gen-provider-e2e

Conversation

@k08200

@k08200 k08200 commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

Stacked on #34#33#29. Closes the last unwired evidence claim in gridaco/uhura#29.

That issue's live-server evidence — snapshot query accepted with exact seed counts, like/unlike round trip restoring state, unauthenticated refusal matching the generated whitelist — was a manual run. e2e.mjs sat in tests/provider_runtime/ invoked by no test, CI job, or just target; the issue body has carried a "not reproducible from the repository as it stands" qualifier since 2026-07-26.

Now it is the suite's fifteenth test, generated_tables_drive_a_live_authority:

  • boots the canonical Instagram authority (uhura/examples/instagram/backend/app.spock) in-process via StandaloneRun — in-memory database rebuilt from seed, so the counts the harness asserts are the contract's own, never leftover state;
  • serves it with spock_runtime::http::serve on an ephemeral loopback port — no fixed port, no collision with a dev server;
  • runs the unchanged e2e.mjs against it: seed counts, like/unlike round trip and restore, refusal-whitelist admission;
  • shuts the server down through a oneshot and joins its task, so a server-side failure fails the test instead of hiding behind a passing harness.

No #[ignore]: CI's test job already builds the Uhura provider bundle and has node, so this runs on every push (0.4s locally).

run_node gains a raw variant because this harness takes <base> <module> rather than the trailing runtime path every other harness uses.

Type

test

Checklist

Test plan

On the pinned toolchain (1.92.0) and node 24.18.0, after pnpm -C uhura/web build:provider:

  • cargo test --locked -p spock-cli --test provider_gen15 passed, 0 failed, 0 ignored (generated_tables_drive_a_live_authority in 0.44s)
  • cargo fmt --all --check — exit 0
  • cargo clippy --locked --workspace --all-targets -- -D warnings — exit 0
  • cargo test --locked --workspace — exit 0
  • node scripts/check-doc-snippets.mjs — exit 0

The spike's live-server evidence — the generated snapshot query is accepted
and returns exact seed counts, a like/unlike round trip lands and restores
state, and an unauthenticated refusal matches the generated whitelist — was a
manual run: `e2e.mjs` was invoked by no test, CI job, or `just` target, so
nothing re-checked it.

The harness is now the suite's fifteenth test. It boots the canonical
Instagram authority in-process through `StandaloneRun` (in-memory database,
rebuilt from seed, so the asserted counts are the contract's own), serves it
on an ephemeral loopback port, and runs the unchanged `e2e.mjs` against it.
The server is shut down through a oneshot and its task joined, so a server
failure surfaces instead of being masked by a passing harness.

`run_node` gains a raw variant because this harness takes `<base> <module>`
rather than a trailing runtime path.

Verified: `provider_gen` 15 passed, 0 ignored; fmt, clippy -D warnings,
`cargo test --locked --workspace`, and the doc snippets all exit 0.
@vercel

vercel Bot commented Aug 1, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
spock Ready Ready Preview Aug 1, 2026 12:05am

Request Review

@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 2656b686-d7b7-4353-87e8-bd0280530ab1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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