Skip to content

[CTX-0991] chore(plugin-host): remove S5-staged credential shims (S7) - #1745

Merged
Xuepoo merged 1 commit into
mainfrom
ctx-0991/chore-remove-credential-shim
Oct 6, 2026
Merged

Xuepoo merged 1 commit into
mainfrom
ctx-0991/chore-remove-credential-shim

Conversation

@Xuepoo

@Xuepoo Xuepoo commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Priority: P2 | Area: plugin-host | Labels: chore,P2 | Milestone: v0.1.0 | RFC: #1585 Phase 4 | Task: CTX-0991

S7 summary

CTX-0916 Phase 4 step S7: removes the S5-staged credential shims from Core.
S5 moved the provider-schema surface (ProviderCredentialConfig + checks/resolvers) with a deprecated re-export shim kept for one release; S6 established the canonical home in bitty-ai (bitty-ai-slice ai_contrib.rs); this step deletes the staged Core copy.

  • crates/bitty-plugin-host/src/credential_ref.rs: removed the 6 deprecated re-export shims + the deprecated_shim_matches_canonical_path parity test; pure reference mechanism (CredentialRef, resolve_choice, check_project_override) untouched. Module docs now point at bitty-ai.
  • crates/bitty-plugin-host/src/lib.rs: removed pub mod provider_credential + re-export block; OQ-054 row now lists credential_ref only and points the schema surface at bitty-ai.
  • crates/bitty-plugin-host/src/provider_credential.rs: deleted (347 lines).
  • Diff: 3 files, +8/-449. No new unsafe/TODO/FIXME; English-only.

Caller evidence: repo-wide rg finds zero Core-internal callers outside the module itself, the shim, the parity test, and the lib re-exports/docs; no host, grant, effective, roles, or other crate references.

Gate evidence (worktree .worktrees/ctx-0991, base origin/main 3cecd03, commit 02c95e8)

  • cargo fmt --check: exit 0
  • cargo test -p bitty-package -p bitty-plugin-host --locked: exit 0
  • cargo clippy -p bitty-package -p bitty-plugin-host --all-targets --locked -- -D warnings: exit 0
  • cargo check --workspace --all-targets --locked: exit 0
  • just check: best-effort per PX-4955; initial run hit worktree-layout artifact (default BITTY_PERF_DIR=../bitty-perf missing under .worktrees/); re-running with BITTY_PERF_DIR=<workspace>/bitty-perf. Remote CI is arbiter.

Review

Independent review verdict: APPROVE — CarryCtx PX-5025 on CTX-0991 (reviewer ctx-0991-reviewer). Merging under program standing policy (merge on substantive gates without per-PR owner approve).

Note on Closes

No Closes trailer yet: issue #1585 closes after the docs-sync follow-up lands — stated explicitly per shepherding instructions.

Summary by CodeRabbit

  • Breaking Changes

    • The plugin host no longer exposes its provider-credential configuration and resolution API. The credential-reference behavior remains unchanged.
    • Use bitty-ai for the provider-credential configuration surface.
  • Documentation

    • Updated credential documentation to point to bitty-ai and clarify the credential-reference entry point.

@Xuepoo Xuepoo added this to the v0.1.0 milestone Oct 6, 2026
@Xuepoo Xuepoo added chore Chore / maintenance area:plugin Area: plugin host P2 Priority: medium labels Oct 6, 2026
@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI (base), Organization UI (inherited)
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 936a2d45-bbb5-442b-9501-823c198b96f4
📥 Commits

Reviewing files that changed from the base of the PR and between 3cecd03 and 02c95e8.

📒 Files selected for processing (3)
  • crates/bitty-plugin-host/src/credential_ref.rs
  • crates/bitty-plugin-host/src/lib.rs
  • crates/bitty-plugin-host/src/provider_credential.rs
💤 Files with no reviewable changes (1)
  • crates/bitty-plugin-host/src/provider_credential.rs

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.


📝 Walkthrough

Walkthrough

bitty-plugin-host no longer exposes its provider credential module or deprecated re-exports. Its credential-reference documentation now points to the provider schema and resolution surface in bitty-ai.

Changes

Provider credential API removal

Layer / File(s) Summary
Remove provider credential module and exports
crates/bitty-plugin-host/src/lib.rs, crates/bitty-plugin-host/src/provider_credential.rs
The public module and exports were removed. The deleted module contained the provider credential schema, environment and command resolution, override checks, command execution, and related tests.
Remove credential-reference shim
crates/bitty-plugin-host/src/credential_ref.rs
The deprecated re-exports and their equivalence test were removed. Documentation now directs callers to bitty-ai.

Priority: ⬇️ Low

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

Change: Other

Merge Risk: ⚪ Minimal · up to 02c95

No actionable issue is established for this change; it is ready to merge after normal checks.

Architecture Summary

Architecture risk: 🔵 Low · up to 02c95

The change affects 1 system.

Changed systems: crates

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — crates (service) was modified; 3 changed files map to changed impact.

Before / after behavior

  • observed — Modified behavior in crates/bitty-plugin-host/src/credential_ref.rs: The module documentation now identifies ProviderCredentialConfig and actual resolution as residing in bitty-ai, and directs new callers there instead of describing the Core provider-credential path and its deprecated re-export shim.
  • observed — Modified behavior in crates/bitty-plugin-host/src/credential_ref.rs: The deprecated re-export shim for the provider credential configuration, override check, resolution functions, command executor, and output-size constant was removed.
  • observed — Modified behavior in crates/bitty-plugin-host/src/credential_ref.rs: The documentation now says the selected reference is resolved through the provider-schema surface in bitty-ai, replacing the link to the Core provider-credential resolver and configuration.
  • observed — Modified behavior in crates/bitty-plugin-host/src/credential_ref.rs: The test comparing deprecated shim construction, display, source, resolution, and output limit against the canonical provider-credential API was removed.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: removing the staged credential shims from bitty-plugin-host.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files.
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 docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@Xuepoo
Xuepoo merged commit 4374994 into main Oct 6, 2026
17 checks passed
@Xuepoo
Xuepoo deleted the ctx-0991/chore-remove-credential-shim branch October 6, 2026 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:plugin Area: plugin host chore Chore / maintenance P2 Priority: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant