Skip to content

validation: surface write-schema redact annotations on projections of split-schema collections#3147

Open
GregorShear wants to merge 2 commits into
masterfrom
greg/skim-redact-write-schema
Open

validation: surface write-schema redact annotations on projections of split-schema collections#3147
GregorShear wants to merge 2 commits into
masterfrom
greg/skim-redact-write-schema

Conversation

@GregorShear

@GregorShear GregorShear commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Fixes redaction bug reported in slack.

A redact annotation reachable only through the write schema is in force — redaction runs at write time — but projections of collections with a standalone readSchema reported redact: UNSET for it, both from full build validation and from skim_projections (the dashboard path via flow-web's skim_collection_projections).

walk_collection_projections now fills in inference.redact from the write schema for any projection whose read-schema inference has no strategy of its own; the read schema wins when both are annotated. Extracts assemble::inference_redact for reuse.

A redact strategy on a key location is still checked against the read schema only: connector-managed write schemas may annotate a key which flow://relaxed-write-schema then strips from the read path (6e58bdd).

Tests: snapshot tests over skim_projections (single schema, ref-style read schema, standalone read schema, error cases) and a WASM acceptance test of the flow-web entry point.

… split-schema collections

Redaction runs at write time against the write schema, so a redact annotation reachable only through the write schema is in force even when a standalone readSchema does not carry it. Both skim_projections (the dashboard path, via flow-web skim_collection_projections) and full build validation reported redact: UNSET for these locations.

walk_collection_projections now fills in inference.redact from the write schema for any projection whose read-schema inference has no strategy of its own; the read schema wins when both are annotated. Extracts assemble::inference_redact for reuse.

A redact strategy on a key location remains checked against the read schema only: connector-managed write schemas may annotate a key which flow://relaxed-write-schema then strips from the read path (6e58bdd).

Adds snapshot tests over skim_projections covering single-schema, ref-style, and standalone read-schema collections plus error cases, and a WASM acceptance test of the flow-web entry point.
The GitHub NPM registry doesn't allow republishing an existing version, so the bump is required for the redact-inference fix to reach the dashboard.

@jgraettinger jgraettinger left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

A bit more new test SLOC than the change warrants IMO 🤷. As a general tip try asking for table driven cases.

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.

2 participants