Skip to content

feat(polyfill-connectors): bless github, github/schemas, and fixture-samples exports - #70

Merged
tnunamak merged 1 commit into
mainfrom
waspflow/bless-github-fixture-exports-0902
Sep 3, 2026
Merged

feat(polyfill-connectors): bless github, github/schemas, and fixture-samples exports#70
tnunamak merged 1 commit into
mainfrom
waspflow/bless-github-fixture-exports-0902

Conversation

@tnunamak

@tnunamak tnunamak commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Summary

data-connect#55 (re-vendoring onto #68's fix, 262c7bd8) surfaced 5 places data-connect reaches past this package's blessed exports into raw source/fixtures. The full enumeration and classification is posted on that PR: PDP-Connect/data-connect#55 (comment)

This PR addresses the 2 that are genuine, narrow consumer needs (not internals being tested from the wrong repo), additively:

  • connectors/github/schemas.ts (regex-scraped by data-connect's test/github-manifest-connector-parity.test.ts to verify manifest-declared streams have schema coverage — ties into data-connect's own rs-read.ts:buildOwnerReadGrantForManifest). Fixed by blessing ./connectors/github (same pattern as the 8 other per-connector exports) and ./connectors/github/schemas.
  • fixtures/{gmail,codex}/scrubbed/pilot-real-shape/records/*.jsonl (hardcoded raw path in data-connect's test/owner-source-to-mcp-closure.test.ts, needing one real-shaped sample record per connector to exercise MCP-closure ingest). Fixed by adding a new ./fixture-samples export: readSampleRecord(connectorKey, stream), reading this package's own shipped fixtures internally — no raw paths exposed to the consumer.

Not addressed here (flagged as a separate, bigger decision in the data-connect#55 PR comment): a whole-connector-tree forbidden-import scan and data-connect's production connector-path-discovery mechanism both need ALL 45 manifest-listed connectors' source present, not a named few — only 12 are currently compiled by tsconfig.build.json. That's a real scope/cost decision (compile all 45, or redesign the discovery mechanism), not a small additive export.

Verification

  • npm run typecheck: clean.
  • npm run pack-install-run (this package's own real npm pack + plain npm install regression harness): extended with 3 new consumer-entrypoint probes (fixture-samples — actually calls readSampleRecord, not just imports; connectors/github; connectors/github/schemas) — all pass from a freshly-installed consumer.
  • New unit test src/fixture-samples.test.ts: exercises readSampleRecord against the real shipped gmail/codex fixtures, plus an unknown-connector error case.
  • files widened by exactly one glob: fixtures/**/*.jsonl (844KB, already-scrubbed sample data — not source, not test files).

Test plan

  • npm run typecheck clean
  • npm run pack-install-run — all consumer entrypoints including the 3 new ones pass from a real installed tarball
  • New unit test passes
  • Confirmed check-published-entrypoints.mjs (runs as part of build) validates all 43 exports resolve to real .js files, not raw .ts

Assisted-by: AI

…samples exports

data-connect#55's own re-vendor onto #68's fix (262c7bd) narrowed the
published tarball to a files allowlist, correctly excluding raw source
and test fixtures a consumer should not reach into directly. That exposed
three real, narrow needs data-connect has past its blessed exports:

- connectors/github/schemas.ts: a manifest/schema parity test needs
  stream-schema coverage, tied to data-connect's own read-grant logic.
- fixtures/{gmail,codex}/scrubbed/pilot-real-shape: an MCP-closure test
  needs one real-shaped sample record per connector for realistic ingest.

Both are legitimate consumer needs, not data-connectors internals being
tested from the wrong repo, so add small additive exports rather than
widen files back to raw source:

- ./connectors/github -> connectors/github/index.js (same pattern as the
  8 other blessed per-connector exports), plus tsconfig.build.json now
  compiles it.
- ./connectors/github/schemas -> connectors/github/schemas.js.
- ./fixture-samples -> a new src/fixture-samples.ts exposing
  readSampleRecord(connectorKey, stream), reading this package's own
  shipped fixtures internally -- no raw file paths exposed to consumers.
  files now ships fixtures/**/*.jsonl (844KB, already-scrubbed sample
  data, not source or test files).

Verified via the package's own regression harness: pack-install-run.mjs
(a real npm pack + plain npm install cycle) now probes all three new
exports from a freshly-installed consumer, plus a unit test exercising
readSampleRecord against the real shipped fixtures.

Two other paths data-connect reaches past blessed exports (a whole-tree
forbidden-import scan and the production connector-path-discovery
mechanism, both needing all 45 manifest-listed connectors' source, not a
named few) are NOT addressed here -- flagged as a separate, bigger
decision in data-connect#55's own PR comment.

Assisted-by: AI
Signed-off-by: Tim Nunamaker <tnunamak@gmail.com>
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

Schema Health Check — All Clear

All 73 scopes have consistent local schema files.

@tnunamak
tnunamak merged commit dc4008c into main Sep 3, 2026
18 checks passed
@tnunamak
tnunamak deleted the waspflow/bless-github-fixture-exports-0902 branch September 3, 2026 08:40
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