Skip to content

[Kernel OSS Readiness] Restrict published Cargo and Python source package contents - #496

Merged
rahuls-db merged 6 commits into
mainfrom
rahul-singhal_data/kernel-oss-package-boundary
Nov 24, 2026
Merged

rahuls-db merged 6 commits into
mainfrom
rahul-singhal_data/kernel-oss-package-boundary

Conversation

@rahuls-db

@rahuls-db rahuls-db commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Limit the already-published databricks-sql-kernel crate and the Python source distribution that embeds it to files required by consumers and package verification.

The explicit Cargo allowlist retains source, C headers, declared tests, README-linked public docs, changelog/configuration documentation, and legal/package metadata. It excludes bot and agent state, GitHub automation, proxy configuration, internal design documents, and repository-only tooling. Maturin honors the same boundary when collecting the root path dependency for the Python sdist.

Testing

  • cargo package --allow-dirty successfully packaged 133 files and built the packaged crate through the Databricks package proxy
  • Built the Python wheel and sdist through the Databricks package proxies
  • Verified the wheel contains only the Python module, native library, package metadata, and SBOM
  • Verified the restricted Python sdist contains none of .bot/, .claude/, .github/, ci/, docs/designs/, or repository-only tool configuration
  • git diff --check
  • Databricks pre-commit and commit-message secret scanning

Additional notes

This changes only archive contents; it does not change the kernel API, runtime behavior, version, or release workflow.

Signed-off-by: Rahul Singhal <rahul.singhal@databricks.com>
@rahuls-db rahuls-db changed the title [Kernel OSS Readiness] Restrict published kernel crate contents [Kernel OSS Readiness] Restrict published Cargo and Python source package contents Nov 23, 2026
@rahuls-db
rahuls-db marked this pull request as ready for review November 23, 2026 19:16
@rahuls-db
rahuls-db requested a review from a team as a code owner November 23, 2026 19:16
Signed-off-by: Rahul Singhal <rahul.singhal@databricks.com>

@oss-reviewer-bot oss-reviewer-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).

Verdict: 1 Low

Looks good, no issues found. There is no root build.rs, no benches or examples, and no include_str! outside the allowlist, and the docs linked from README.md are all included. Optional: a CI cargo package --list check would keep the allowlist from going stale.

This overview is Claude Opus 5.5's initial take; GPT-6.1 Sol added findings it doesn't mention — see the findings below.

Comment thread Cargo.toml Resolved

@oss-reviewer-bot oss-reviewer-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).

Verdict: 1 High

One high-severity problem: the allowlist names /NOTICE, but the file in the repo is NOTICE.txt, so the Apache-2.0 NOTICE is left out of the crate and the Python sdist. The rest of the allowlist covers the source, headers, tests and the docs the README links to.

Comment thread Cargo.toml Outdated
"/CHANGELOG.md",
"/CONNECTION_PARAMETERS.md",
"/LICENSE",
"/NOTICE",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟠 High — The include allowlist lists /NOTICE, but the repo file is NOTICE.txt (no NOTICE exists), so the Apache NOTICE is omitted from the published crate/sdist. Change the entry to /NOTICE.txt.

🔀 Found by both reviewers · confirmed by the judge

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Keeping /NOTICE by explicit fleet/legal decision. #500 renames the authoritative root file to NOTICE; I verified its current head contains that file. PR 500 must land before (or together with) this package-boundary PR. Restoring /NOTICE.txt here would reintroduce the known-invalid legal filename and is not an acceptable fix.


This comment was generated with GitHub MCP.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Still open at 41e3d7f: root NOTICE is missing here. Merge PR #500 first, or this crate publishes without a NOTICE (Cargo.toml:37).

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Refined landing-order decision: PR 500 must land first. PR 496 must then be rebased or otherwise updated onto the resulting main, and the bot must re-review that new head. Do not add both filenames, copy Legal NOTICE content into this PR, or restore/reference/package NOTICE.txt; /NOTICE remains authoritative.


This comment was generated with GitHub MCP.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Still open at 41e3d7f: there is no root NOTICE (Cargo.toml:37). Re-review once this PR is rebased onto main after PR #500 lands.

Signed-off-by: Rahul Singhal <rahul.singhal@databricks.com>

@oss-reviewer-bot oss-reviewer-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).

Verdict: 1 Low

Looks good, with 2 low concerns. I checked the allowlist against src/ and tests/ and found no include_str!, include_bytes! or CARGO_MANIFEST_DIR references to files it leaves out. The root crate has no build script, benches or examples.

This overview is Claude Opus 5.5's initial take; some of its points were set aside by the cross-check judge — see the findings below.

🔀 1 finding considered and dismissed by the judge
  • 🔵 Low Cargo.toml:25 — Nothing in CI checks the new archive boundary, so a later edit to the allowlist could start shipping internal files again, or stop shipping needed ones, without
    Judge's evidence: "/docs/release-debuginfo.md",

Comment thread Cargo.toml Resolved
Signed-off-by: Rahul Singhal <rahul.singhal@databricks.com>

@oss-reviewer-bot oss-reviewer-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).

Verdict: 1 Low

Looks good. The include allowlist covers every compiled target (lib and tests only, no build.rs, examples or benches) and every doc the README links to. No remaining src/docs references point at excluded paths. The PR title doesn't follow the conventional-commit format.

Other findings

  • 🔵 Low — The PR title [Kernel OSS Readiness] Restrict published… is not in conventional-commit format, and the repo says CI rejects titles that aren't. Retitle it as something like build(package): restrict published crate and sdist contents. (Found by Claude Opus 5.5 · the judge couldn't confirm it)

This branch was previously deployed

1 inactive deployment
azure-prod — 91b7e3ad Deployed Nov 24, 2026 by rahuls-db via v0 E2E surface #1429
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants