Skip to content

refactor(engine): rename package to phase-engine - #6739

Merged
matthewevans merged 3 commits into
mainfrom
codex/phase-engine-rename
Jul 28, 2026
Merged

refactor(engine): rename package to phase-engine#6739
matthewevans merged 3 commits into
mainfrom
codex/phase-engine-rename

Conversation

@matthewevans

@matthewevans matthewevans commented Jul 28, 2026

Copy link
Copy Markdown
Member

Renames the engine package to phase-engine so an external consumer (ManaBrew) can name it unambiguously in a git dependency:

phase-engine = { git = "https://github.com/phase-rs/phase" }

engine is too generic to appear in a third party's manifest, and the name is squatted on crates.io at 0.0.0.

Zero source changes

There are 17,414 engine:: references across 1,573 files. None of them change. Cargo takes the extern crate name from the dependency key, so package = "phase-engine" renames the package while every dependent keeps saying engine:

engine = { path = "../engine", package = "phase-engine" }

[lib] name = "engine" keeps the produced artifact and extern name stable. git diff --name-only contains no .rs file.

Not publishing

crates.io publication was investigated and rejected: the packaged crate is 19.3 MiB compressed — 11 MiB even after excluding every test and snapshot — against a 10 MiB limit. Distribution is by git dependency, so no include/exclude keys were added and no publish step exists.

Beyond the workspace

lobby-worker/broker-wasm is excluded from the root workspace and keeps its own lockfile, so cargo check --workspace cannot see it. Its lock and the cargo update --package engine in nightly-release.yml are both updated here; left alone, the nightly release job would have failed days later with an unmatched package-ID spec.

--features engine/proptest in .githooks/pre-push and .cargo/config.toml is correct as-is and deliberately unchanged — cargo's CLI pkg/feat syntax resolves through the dependency key. Verified against a non-vacuous probe:

bogusdep/proptest      exit=101  none of the selected packages contains this feature
engine/nosuchfeature   exit=101  failed to select a version for `phase-engine`
engine/proptest        exit=0

Docs

The second commit retargets cargo <verb> -p engine in live instructions (skills, agents, workflow scripts, CLAUDE.md, contributor guide). Historical plan records under .claude/wf/ are left alone — they describe commands run at the time. Doc comments inside crates/engine/src/ are untouched to keep the diff free of .rs edits.

Verification

gate exit
cargo fmt --all 0
cargo check --workspace --all-targets 0 (7m27s)
cargo test -p phase-engine 0 — 4,159 passed, 0 failed
cargo clippy --workspace -- -D warnings 0 (4m57s)

Non-vacuity check, since a no-op edit would also pass every gate:

$ cargo metadata --no-deps ... | python3 -c "..."
['phase-engine', 'engine-inventory-gen', 'engine-wasm']

phase-engine present, bare engine absent.

Summary by CodeRabbit

  • Refactor
    • Renamed the Rust engine package to phase-engine and updated related crate wiring to keep the same library interface in place.
  • Documentation
    • Updated developer and verification checklists/workflows to run commands against phase-engine instead of the old package name.
  • Chores
    • Aligned local validation (pre-push), Tilt test/precompile commands, contributor automation, nightly release tagging/lockfile refresh, and interaction-binding tooling to use phase-engine.

The package rename leaves every documented `cargo <verb> -p engine`
invocation pointing at a package that no longer exists. Retarget the ones
that are live instructions — skills, agents, workflow scripts, CLAUDE.md,
the contributor guide.

Historical plan records under `.claude/wf/` are left alone: they describe
commands that were run at the time, and rewriting them would falsify the
record. Doc comments inside `crates/engine/src/` are also untouched, to
keep this commit free of any .rs edit.
@matthewevans
matthewevans enabled auto-merge July 28, 2026 19:42
@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 0ccbcc04-7e8c-4e65-a89a-a9418a0dee8c

📥 Commits

Reviewing files that changed from the base of the PR and between b55e83e and 9de4d01.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (1)
  • crates/manabrew-compat/Cargo.toml
🚧 Files skipped from review as they are similar to previous changes (1)
  • crates/manabrew-compat/Cargo.toml

📝 Walkthrough

Walkthrough

The Rust engine package is renamed from engine to phase-engine while retaining the engine library name. Cargo dependencies, build and release tooling, verification workflows, documentation, and parser coverage commands are updated to reference the new package name.

Changes

Engine package migration

Layer / File(s) Summary
Package metadata and dependency wiring
crates/engine/Cargo.toml, crates/*/Cargo.toml
The package is renamed to phase-engine, the library target remains engine, and local dependencies explicitly map to phase-engine.
Build, test, hook, and release commands
Tiltfile, .githooks/pre-push, scripts/check-interaction-bindings.sh, .github/workflows/nightly-release.yml
Tilt, pre-push, interaction-bindings, and nightly release commands target phase-engine.
Verification workflows and documentation
.claude/agents/*, .claude/skills/*, .claude/workflows/*, CLAUDE.md, docs/AI-CONTRIBUTOR.md, crates/mtgish-import/CLAUDE.md
Verification instructions and generated workflow prompts replace engine package commands with phase-engine commands.
Parser coverage and diagnostic commands
.claude/skills/oracle-parser/SKILL.md, .claude/skills/parser-velocity/SKILL.md
Parser tests and coverage reports target phase-engine, with additional swallowed-clause drilldown commands documented.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested labels: enhancement

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely describes the main change: renaming the engine package to phase-engine.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/phase-engine-rename

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

Preserve the package rename while retaining main’s Manabrew Protocol v3 dependency and AGPL leaf licensing.

Co-authored-by: matthewevans <matthewevans@users.noreply.github.com>
@matthewevans
matthewevans added this pull request to the merge queue Jul 28, 2026
@github-actions

Copy link
Copy Markdown

Parse changes introduced by this PR

✓ No card-parse changes detected.

Merged via the queue into main with commit 2b204df Jul 28, 2026
18 of 19 checks passed
@matthewevans
matthewevans deleted the codex/phase-engine-rename branch July 28, 2026 23:15
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