Skip to content

build: remove Bazel build descriptions, tooling, and docs (#1646) - #1661

Merged
DecisionNerd merged 4 commits into
mainfrom
build/1646-remove-bazel
Sep 30, 2026
Merged

DecisionNerd merged 4 commits into
mainfrom
build/1646-remove-bazel

Conversation

@DecisionNerd

@DecisionNerd DecisionNerd commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1646
Part of #1618

Implements ADR 0048 decision item 4: Bazel is removed. The CI Gate Rust lane (rust-tests, #1649) and Binding RC (#1651) no longer run Bazel. No workflow invokes bazel/bazelisk at the base of this branch, and none of the deleted scripts has a caller outside docs/development/bazel*.md, BUILD.bazel, or the other deleted scripts.

What changed

Deleted: all 46 BUILD.bazel files, MODULE.bazel, MODULE.bazel.lock, cargo-bazel-lock.json, .bazelrc, .bazelversion, and tools/bazel/ (drift fingerprint, parity map and suite, release platforms, perf sample, smoke crate, .bzl files). Also deleted: scripts/ci/{cargo-bazel-drift-check,cargo-bazel-parity-check,bazel-migration-ledger-check,bazel-cache-perf}.py and assemble_bazel_binding_packages.py, each with its test-* counterpart, plus docs/development/bazel{,-bootstrap,-migration}.md.

Moved: tools/bazel/migration-evidence/ci-gate-ruleset-19988544.json to config/ci-gate-ruleset-19988544.json. verify-ci-gate-enforcement.py and its test still read this ruleset fixture, and it now sits next to config/gate-registry.json.

Re-derived, not deleted: property-overlay-contract.py used to check that property_overlay_scale was in the Bazel ci_rust_tests suite. It now checks the same property against Cargo and the nextest lane:

  • graphforge-storage is a workspace member and test autodiscovery is on.
  • The scale target is not renamed, feature-gated, test = false, or custom-harness.
  • The rust-tests job runs exactly one workspace-wide cargo nextest run, with no --exclude/-p and no positional name filter.
  • The job's -E filterset has the recognised not ((package(..) and binary(..)) or ...) shape and excludes neither the storage package nor the scale binary.
  • No nextest default-filter is configured.

The mutation test proves that each of these 13 mutations is refused for its intended reason.

Release version: set_release_version.py no longer reads or writes tools/bazel/gf_version.bzl (#1398). The bazel surface is gone from its tests, from test-release-publish-preflight.py, and from the #1395 Bazel-target check in test-crate-publish-plan.py.

Gates:

  • pre-push-fast drops the bazelisk preflight and the drift check. The bazel-test target is removed.
  • The pre_push_validation.py preflight no longer requires bazelisk.
  • test_environment.py drops its bazelisk adapter.
  • python-build-mode-check.py drops the cargo-bazel-lock.json check. The maturin feature-graph check remains.
  • classify-changes.sh, docs-tree-policy.py, .gitignore, .dockerignore, dependabot.yml, and the PR template lose their Bazel cases.

Docs:

  • agent-environment.md gains a "Rust test gate" section with the exact rust-tests commands.
  • The still-true parts of bazel.md move into testing.md: the differential traversal oracle and the Python test/extension build modes.
  • AGENTS.md, CONTRIBUTING.md, contributing.md, release-process.md, ARCHITECTURE.md, OBSERVABILITY.md, and TESTING.md now describe the Cargo/nextest gate.

Other git grep -i bazel matches:

  • napi-export-surface.json is deleted. Its only consumer was the Bazel loader assembler, and export-surface.test.mjs keeps its ESM/CJS resolution tests.
  • graphforge-cli/build.rs drops the Bazel-only GRAPHFORGE_PROJECT_SKILLS_MANIFEST override.
  • Stale Bazel comments in crates are reworded.
  • The chore: remove opaque mXX milestone shorthand #689 mis-rename M2* -> Bazel-migration* is repaired. It produced "Bazel-migration0" in five Rust doc comments, which now say "knowledge". It also turned the Cypher variable m2 into the invalid bazel-migration in cypher-script-loading.md, restored to m1/m2.
  • The Bazel-absence guards in test-ci-storage-policy.py, test-classify-changes.sh, and test-binding-release-candidate.py are removed. Their positive Cargo/maturin/napi assertions remain.

Remaining git grep -il bazel matches

All five are ADRs or ADR indexes that name Bazel as the replaced system:

  • docs/adr/0048-cargo-is-the-ci-build-authority.md: the ADR that removes Bazel.
  • docs/adr/0030-portable-oci-boundary.md: an ADR body and historical record. Per instructions, it is not edited.
  • docs/adr/README.md, docs/engineering/adrs/README.md, docs-site/astro.config.mjs: ADR 0048's title in the ADR indexes and sidebar.

Evidence

make pre-push-fast without bazelisk on PATH. /usr/local/bin was replaced by a shim directory without bazel/bazelisk:

$ command -v bazelisk || echo "bazelisk: not on PATH"
bazelisk: not on PATH
$ which cargo uv node pnpm   # all resolve
$ make pre-push-fast
✅ Fast checks passed! Run 'make pre-push' to include coverage.   (exit 0)

Other gates, all exit 0:

cargo fmt --all -- --check
cargo clippy --workspace -- -D warnings          # Finished dev profile
make gate-registry-check                          # OK
python3 scripts/ci/test-ci-storage-policy.py
bash scripts/ci/test-classify-changes.sh
python3 scripts/ci/workflow_policy.py
python3 scripts/ci/adr-index.py check             # 45 active and 3 superseded records agree
python3 scripts/ci/docs-tree-policy.py check      # 31 development docs, 0 unreferenced
python3 scripts/ci/property-overlay-contract.py && python3 scripts/ci/test-property-overlay-contract.py
python3 scripts/set_release_version.py --check    # aligned
uv run pytest tests/unit/test_set_release_version.py   # 45 passed

A new Rust test file needs only Cargo. In a scratch commit (6602f6016, dropped and never pushed), I added crates/graphforge-core/tests/scratch_1646.rs with one #[test]. It is also the crate's first tests/ directory, and no other file changed:

$ cargo nextest run -p graphforge-core --test scratch_1646     # cargo-nextest 0.9.145
    Starting 1 test across 1 binary
        PASS [   0.004s] (1/1) graphforge-core::scratch_1646 scratch_1646_is_discovered_by_cargo
     Summary [   0.004s] 1 test run: 1 passed, 0 skipped
$ make pre-push-fast        # at the scratch HEAD, bazelisk not on PATH -> exit 0
$ make gate-registry-check; python3 scripts/ci/test-ci-storage-policy.py; python3 scripts/ci/workflow_policy.py; python3 scripts/ci/docs-tree-policy.py check; cargo fmt --all -- --check   # all exit 0
$ bash scripts/ci/classify-changes.sh HEAD~1 HEAD   # rust=true rust_tests=true

Before this change, the same file would also have needed a BUILD.bazel rule and a migration_target_map.json entry (bazel-migration-ledger-check.py).

Found while doing this (not changed here)

crates/graphforge-exec's differential_traversal test has required-features = ["differential-testing"], and no workspace member enables that feature. Bazel ran it inside //:ci_rust_tests. Since #1649, the CI Gate does not run it; no workflow passes --features differential-testing. testing.md now documents the explicit command. Whether the CI Gate should run it is a separate decision.

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

DecisionNerd and others added 3 commits September 30, 2026 02:13
WIP: remove BUILD.bazel/MODULE.bazel/tools/bazel and the Bazel CI
scripts, move the CI Gate ruleset fixture to config/, drop the Bazel
release-version surface, and re-derive the property-overlay scale-target
check from Cargo and the nextest CI lane.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Drop bazelisk from pre-push-fast and the pre-push preflight, delete the
Bazel docs and fold the still-true content (differential oracle, Python
extension build modes) into testing.md, document the CI Gate Rust lane
commands in agent-environment.md, and remove the remaining Bazel path
cases, guards, comments, and the Bazel-only skills manifest override.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository: CurateLabs/graphforge/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 6a120f53-2ab8-43d7-8901-b3bdc797097f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Warning

Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added parser Changes to Cypher parser planner Changes to query planner executor Changes to query executor core Core source code changes testing Test coverage and testing infrastructure documentation Improvements or additions to documentation ci-cd CI/CD configuration changes tooling Developer tooling and automation labels Sep 30, 2026
@DecisionNerd

DecisionNerd commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor Author

Review correction: original P1 withdrawn.

The exact 19-entry map was regenerated from the napi-built addon and declarations to keep the retired assembler mirror aligned. It is not a fixed public export-count contract, and its aliases intentionally allowed undefined runtime values and multiple declaration forms. Removing this manual map/parity obligation is a valid part of builder retirement.

Independent challenge against f131 confirmed surviving ESM/CommonJS product tests, GraphForge and belief-subject declaration assertions, and native functional coverage for returned handles. No runtime/type disagreement was established by this change. The BDD TypeScript check uses untyped require and is not claimed as index.d.ts agreement proof. The broad old kind scan does disappear, but that is a test-depth observation rather than a demonstrated regression or a requirement to retain an obsolete assembler map. This thread is resolved as a withdrawn finding, not as a claim that source was changed to restore it.

The PR description should say the assembler was the only production generator; these tests also consumed the map for assembler parity. Differential-oracle CI selection and historical measurement retirement remain separate canonical #1618 completion gaps reported in the overview comments. Branch ownership stays with the author.

@DecisionNerd

Copy link
Copy Markdown
Contributor Author

Two additional independently verified canonical #1618 completion gaps at 79cef693:

  1. The Cargo cutover no longer selects the independent fixed-hop differential oracle. In the prior tree, crates/graphforge-exec/BUILD.bazel explicitly enables differential-testing for the test-only library (line 39), runs differential_traversal against it (112–118), and includes it in the integration suite (193), which feeds root ci_rust_tests. Current Cargo metadata shows executor defaults only default, algorithms-core, algorithms-extended; Cargo.toml marks this target required-features = ["differential-testing"], and test.yml passes no enabling feature. The new manual command in testing.md documents the omitted test but does not restore CI evidence. This gap began in ci: make Cargo with nextest the CI Gate Rust lane and retire the Bazel jobs #1649, rather than this deletion PR, and should be corrected under the existing build-authority completion scope before the canonical close gate. Enabling the explicit differential feature for the selected test lane, with a deterministic selection assertion, preserves the independent oracle without changing ordinary product builds.

  2. The completed dispatch-only measurement harness is still live: .github/workflows/build-lane-measurement.yml, registry command/support entries, and artifact/cache/sticky policy counts remain. The reproducible historical method/input digests are also not yet folded into a linked topic page. This is a canonical completion/previously documented retirement-plan gap, not a failure of build: remove Bazel build descriptions, tooling, and docs (#1618) #1646's literal residual-name grep criterion. The finished 20-record qualified cohort and maintenance results are already on decision(build): make one build system the CI authority; measure Bazel remote cache against Cargo with sccache #1618 comment5902091518; no rerun is needed. Preserve immutable historical source references and input digests, then retire the harness and associated registry/policy records together.

The Node export-contract loss is the direct surviving-subject review finding already reported above. All implementation remains with the existing owner; this session does not modify the branch.

@DecisionNerd

Copy link
Copy Markdown
Contributor Author

Implementation note for restoring the differential feature in the existing lane: the new property-overlay CI-selection parser currently treats every non-option value as a positional test-name filter. An explicit --features graphforge-exec/differential-testing therefore also needs correct option-argument handling in that parser and a selection regression, while preserving rejection of real positional filters and narrowed package/workspace selections. This was independently checked in the frozen review at /tmp/graphforge-1661-frozen-review.38u5az9t/review.md; no source edits or native builds were made.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Comment thread crates/graphforge-bindings-node/tests/export-surface.test.mjs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-cd CI/CD configuration changes core Core source code changes documentation Improvements or additions to documentation executor Changes to query executor parser Changes to Cypher parser planner Changes to query planner testing Test coverage and testing infrastructure tooling Developer tooling and automation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

build: remove Bazel build descriptions, tooling, and docs (#1618)

1 participant