Skip to content

Transport properties check credential and header boundaries - #858

Open
zlareb1 wants to merge 4 commits into
mainfrom
test/sdk-transport-properties
Open

zlareb1 wants to merge 4 commits into
mainfrom
test/sdk-transport-properties

Conversation

@zlareb1

@zlareb1 zlareb1 commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Related: #1076

Changelog category (leave one):

  • Build/Testing/Packaging Improvement

Changelog entry (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):

Bounded generated requests check the TypeScript transport's origin binding, credential handling and request-ID header boundary.

Why

Fixed examples cover selected authentication inputs. Property tests combine URL variants, header casing and bounded strings through public transport requests, checking that rejected origins read no credential, requests select one credential and request IDs remain safe header values. Shrinking records a replayable counterexample when an invariant fails.

Scope and risk

Replicated-erasure lease provisioning and its unit regression controls are on main. This branch preserves them unchanged. It also scopes person-query observations to the authorization decision, retaining unbounded-read negative controls. No production authorization, lease or erasure rule changes.

The SDK adds a pinned development-only property-testing dependency, a suite discovered by the existing test runner and documentation of the boundary checks and replay controls. Each property uses 100 generated trials; failures additionally run shrinking and replay evaluations over bounded inputs. Requests and providers are mocked; no network or live credential is needed. The suite complements existing examples without adding a service, deployment or paid provider dependency. Log checks snapshot complete structured arguments at each call, before later mutation. A leak control verifies that the same privacy assertion rejects a nested credential after the original object is overwritten.

Compatibility, rollout and rollback

  • Wire: no operation, field or default changes.
  • Operator steps: none. Set LOOM_FUZZ_SEED and LOOM_FUZZ_PATH from a failure and select its test to replay it.
  • Rollback: removing the development suite and dependency leaves no stored data or runtime changes.

Tests

This head matches the exact three-way composition of the preceding qualified source and current main. The erasure fixture and its canonical unit regression module are inherited from main. On this composed head, all three erasure unit cases, scoped Ruff, Python formatting, committed-range whitespace and public-body prose checks pass. Formatting checks for the affected document or workflow files pass. Full required hosted CI and a fresh independent whole review remain required for this exact head.

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

Earlier feature qualification

The following feature-specific results were recorded before this composition. They are prior-source receipts, not new tests of this composed head.

  • Scoped Markdown formatting, prose and whitespace checks are required.
  • The three generated properties and the structured-log leak control pass locally: vitest run src/transport.property.test.ts --maxWorkers=1 --no-file-parallelism runs four tests. The focused command leaves full SDK typing and the remaining suite to CI.
  • Local properties use the pinned property-test and test-runner versions; no provider or network request runs. The SDK is excluded by the repository Biome configuration.
  • The default seed is fixed; failures report their seed, shrink path and counterexample. Inputs are bounded and retries are disabled.
  • Full SDK typing and test checks run in CI on this head.

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

  • AI-generated: Codex traced the transport boundary, wrote the generated requests and reviewed the dependency graph and replay controls.

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

Checklist

  • Runtime properties and all required checks pass in CI on the final head.
  • The lock is regenerated; the dependency is development-only.
  • No wire models, migrations, plugin behavior or frontend source change.
  • The architecture and test guide describe the boundary invariants and replay controls.
  • Repository text follows the public-copy rules.
  • Commits are signed off.

@zlareb1
zlareb1 marked this pull request as ready for review November 18, 2026 11:48
@zlareb1
zlareb1 force-pushed the test/sdk-transport-properties branch from 66ec282 to e6aff08 Compare November 20, 2026 20:47
@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 12:11am UTC

Request Review

@zlareb1
zlareb1 force-pushed the test/sdk-transport-properties branch 2 times, most recently from 0c4eb8f to 7b9e6d2 Compare November 20, 2026 23:02
…quests

Bound the property cases and preserve replay seeds while using mocked fetch and token providers inside the existing SDK test runner.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
The configured trial count does not cap additional evaluations while shrinking or replaying a failed example.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Keep nested credentials visible to the privacy oracle and prove that it rejects an unredacted header even when the original object changes later.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Shared client schema reads run with an independent context. Record only decision-tagged statements while retaining unbounded decision reads as failures.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
(cherry picked from commit 57327d5)
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
@zlareb1
zlareb1 force-pushed the test/sdk-transport-properties branch from 7b9e6d2 to 2aeaae4 Compare November 21, 2026 00:08

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