Skip to content

feat: add xport lock-step manifest tooling#1284

Open
John-David Dalton (jdalton) wants to merge 2 commits intomainfrom
chore/xport-manifest
Open

feat: add xport lock-step manifest tooling#1284
John-David Dalton (jdalton) wants to merge 2 commits intomainfrom
chore/xport-manifest

Conversation

@jdalton
Copy link
Copy Markdown
Contributor

@jdalton John-David Dalton (jdalton) commented Apr 27, 2026

Self-landable split from #1279.

Files

  • scripts/xport.mts — runner
  • scripts/xport-schema.mts — TypeBox source of truth
  • scripts/xport-emit-schema.mts — generates xport.schema.json
  • xport.schema.json — machine-generated

@sinclair/typebox is already in the pnpm-workspace.yaml catalog (consumed by .claude/hooks/setup-security-tools and packages/build-infra), so root-level imports resolve through hoisting — no new dep needed at the root.

Test plan

  • CI passes

Note

Medium Risk
Adds new harness that reads manifests, shells out to git, and exits with CI-significant codes; while isolated to new files, incorrect validation or drift detection could cause false failures in downstream automation.

Overview
Introduces the xport lock-step manifest tooling: a new scripts/xport.mts runner that loads xport.json (plus optional includes[]), validates it, performs per-kind drift checks (file-fork, version-pin, feature-parity, spec-conformance, lang-parity), and emits either human output or --json summaries with standardized exit codes.

Adds a single-source-of-truth TypeBox schema in scripts/xport-schema.mts for all supported manifest row types and top-level keys, plus scripts/xport-emit-schema.mts to emit the generated draft-2020-12 xport.schema.json.

Reviewed by Cursor Bugbot for commit fa3c38d. Configure here.

Adds the xport tooling shared across the Socket fleet for declaring
cross-repo lockstep dependencies (gitlinks, package versions).

Files:
  scripts/xport.mts             — runner
  scripts/xport-schema.mts      — TypeBox source of truth
  scripts/xport-emit-schema.mts — generates xport.schema.json
  xport.schema.json             — machine-generated, used by validators

@sinclair/typebox is already in the pnpm-workspace.yaml catalog
(consumed by .claude/hooks/setup-security-tools and packages/build-
infra), so root-level imports resolve through hoisting — no new
dep needed at the root.

Self-landable split from #1279.
Comment thread scripts/xport-emit-schema.mts
Comment thread scripts/xport.mts
…rade

- Swap spread order in xport-emit-schema.mts so the comment matches the
  code: spread XportManifestSchema first, then layer the canonical
  $schema / $id / title on top. Previously the explicit headers came
  first and were silently overridden by any matching key the TypeBox
  schema might gain (TypeBox's SchemaOptions supports title/$schema/$id).
- Guard the rejected-loop in xport.mts checkLangParity so a 'rejected'
  anti-pattern message cannot downgrade an already-'error' severity to
  'drift'. Structural problems (port not in sites map, opt-out missing
  reason) keep their error severity even when the row also matches the
  rejected anti-pattern.
@jdalton
Copy link
Copy Markdown
Contributor Author

bugbot run

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit fa3c38d. Configure here.

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