refactor: rename agent-manager TEE/non-TEE to crabshack/legacy_tee#310
refactor: rename agent-manager TEE/non-TEE to crabshack/legacy_tee#310walnut-the-cat wants to merge 2 commits into
Conversation
Behavior-preserving rename of the internal agent-manager naming axis:
ManagerType::{NonTee,Tee} -> {Crabshack,LegacyTee}, is_non_tee -> is_crabshack,
is_non_tee_infra() -> uses_crabshack_infra(),
next_available_{non_tee,tee}_manager -> {crabshack,legacy_tee},
NonTeeInstanceResponse -> CrabshackInstanceResponse, and related locals/comments/tests.
The "non-TEE" pool is the live CrabShack path (which now does TEE node placement
via node_policy); the "TEE" pool is the separate Legacy TEE backend. Only internal
identifiers, log/error strings, comments, and test names change. External contracts
(env vars + the new_agent_with_non_tee_infra DB/admin key) are read as-is, so no
config/DB/admin/frontend migration is needed.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
Code Review
This pull request updates the codebase terminology by renaming references to 'non-TEE' and 'TEE' to 'crabshack' and 'legacy_tee' respectively. This includes renaming configuration fields (such as non_tee_agent_url_pattern to crabshack_agent_url_pattern and is_non_tee to is_crabshack), updating local variables, and adapting documentation, comments, and test names to align with the new naming convention. There are no review comments provided, so I have no feedback to offer.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
There was a problem hiding this comment.
Pull request overview
This PR refactors internal agent-manager terminology to replace TEE/non-TEE with clearer, behavior-preserving names: legacy_tee (bearer) and crabshack (passkey/“claws”), while keeping external contracts (env vars, DB/admin JSON field names) unchanged.
Changes:
- Renames manager typing and routing helpers across the services layer (
ManagerType, selection helpers, log strings) tocrabshack/legacy_tee. - Updates config structures to use
is_crabshackandcrabshack_agent_url_patternwhile still reading legacy env vars at the boundary. - Updates API routes and test/documentation references to the new internal terminology.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| crates/services/src/system_configs/ports.rs | Updates admin/system-config documentation to describe crabshack vs legacy_tee routing while preserving the DB/admin field name. |
| crates/services/src/agent/service.rs | Renames manager-type logic, routing decisions, logs, and tests to crabshack/legacy_tee terminology. |
| crates/services/src/agent/ports.rs | Updates trait/docs references for gateway session behavior to crabshack terminology. |
| crates/config/src/lib.rs | Renames agent manager config fields to is_crabshack and crabshack_agent_url_pattern, keeping env var boundaries intact. |
| crates/api/tests/upgrade_check_tests.rs | Updates integration-test documentation/comments to reference crabshack upgrade checks. |
| crates/api/tests/common.rs | Wires the renamed crabshack_agent_url_pattern into test server setup. |
| crates/api/src/routes/agents.rs | Uses crabshack_infra naming in the create-instance route and updates related comments. |
| crates/api/src/main.rs | Passes crabshack_agent_url_pattern into service initialization. |
| crates/api/src/bin/task_worker.rs | Passes crabshack_agent_url_pattern into worker service initialization. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Review — PR #310: rename agent-manager TEE/non-TEE → crabshack/legacy_teeRead the full diff across all 9 files. This is a behavior-preserving identifier/string/comment rename. No control flow, no boolean polarity flips, no API/DB/env boundary changes. No critical issues found. Verified for safety
Minor (non-blocking) — stragglers the rename missedThe PR description says comments were renamed too, but a few non-TEE comments remain where they describe the now-renamed concept (not the external contract):
(The ✅ Approved — clean rename, externally safe, no logic changes. Suggest sweeping the residual |
- default_crabshack_agent_url -> default_crabshack_agent_url_pattern: it returns the detection pattern (from NON_TEE_AGENT_URL), not a URL, and feeds crabshack_agent_url_pattern (Copilot). - agents.rs: tighten the gateway-cookie comment to match the crabshack_infra gating (Copilot). - Sweep residual "non-TEE" comments to crabshack/legacy_tee in oauth.rs, agent/ports.rs, and system_configs/ports.rs (claude review). The dead InfrastructureConfig/NON_TEE_INFRA axis is left for its separate follow-up. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Addressed review feedback in e4eec97:
Left for the stated follow-up: the dead |
Overview
Renames the internal agent-manager naming from
TEE/non-TEEtolegacy_tee/crabshack. Behavior-preserving: identifiers, log/error strings,comments, and test names only.
AgentManager.is_non_teeis misleading. The pool labeled "non-TEE" is the liveCrabShack path, and CrabShack now places agents on TEE nodes via
node_policy,so "non-TEE" no longer means "not in a TEE".
Scope (internal only)
e.g.
ManagerType::{NonTee,Tee}->{Crabshack,LegacyTee},AgentManager.is_non_tee->is_crabshack,is_non_tee_infra()->uses_crabshack_infra(),next_available_{non_tee,tee}_manager->{crabshack,legacy_tee}. Full map in the diff.External contracts are unchanged, so this needs no config/DB/admin/frontend
migration: env vars (
AGENT_MANAGER_URLS[_TEE],NON_TEE_AGENT_URL, ...) and theDB/admin key
new_agent_with_non_tee_infraare read as-is at the boundary.Renaming those is a separate follow-up (below).
Verification
No semantic flip (passkey path -> crabshack, bearer path -> legacy_tee; env ->
is_crabshackmapping preserved).cargo fmt,clippy -D warnings, unit tests(config 26 / services 231 / api 101) green.
Follow-ups (separate PRs)
new_agent_with_non_tee_infrakey (needsbackward-compat + ansible/admin coordination).
InfrastructureConfig.non_tee_infra(envNON_TEE_INFRA): no consumers.