Repository navigation
[Kernel OSS Readiness] Restrict published Cargo and Python source package contents - #496
Conversation
Signed-off-by: Rahul Singhal <rahul.singhal@databricks.com>
Signed-off-by: Rahul Singhal <rahul.singhal@databricks.com>
There was a problem hiding this comment.
🔀 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.
There was a problem hiding this comment.
🔀 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.
| "/CHANGELOG.md", | ||
| "/CONNECTION_PARAMETERS.md", | ||
| "/LICENSE", | ||
| "/NOTICE", |
There was a problem hiding this comment.
🟠 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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Signed-off-by: Rahul Singhal <rahul.singhal@databricks.com>
There was a problem hiding this comment.
🔀 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",
Signed-off-by: Rahul Singhal <rahul.singhal@databricks.com>
There was a problem hiding this comment.
🔀 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 likebuild(package): restrict published crate and sdist contents. (Found by Claude Opus 5.5 · the judge couldn't confirm it)
Description
Limit the already-published
databricks-sql-kernelcrate 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-dirtysuccessfully packaged 133 files and built the packaged crate through the Databricks package proxy.bot/,.claude/,.github/,ci/,docs/designs/, or repository-only tool configurationgit diff --checkAdditional notes
This changes only archive contents; it does not change the kernel API, runtime behavior, version, or release workflow.