Back to Home
Case Study A — Safe TS Migration Pack

field-rename in a real codebase

Renaming config.baseUrl to config.apiBaseUrl across sovr-mcp-server — a 22-file, 2,042-line TypeScript project. Every reference found. Every patch verified. Zero manual edits.

13
Hits Found
13
Patches Generated
3
Files Changed
PASS
Verify Result
What was renamed
KindCountClassification
Type field declaration1safe
Property key in object literal1safe
Value reference (property access)7safe
this.config.baseUrl chain2safe
Destructuring shorthand1safe
Template literal interpolation1safe
Generated Diffs

Every patch, character-precise.

Type field declaration
@src/types/index.ts
export interface Config {
- baseUrl: string;
+ apiBaseUrl: string;
apiKey: string;
timeout?: number;
}
Property key + value reference
@src/index.ts
const config: Config = {
- baseUrl: process.env.API_URL ?? "http://localhost:3000",
+ apiBaseUrl: process.env.API_URL ?? "http://localhost:3000",
apiKey: process.env.API_KEY ?? "",
};
this.config chain in class method
@src/api/client.ts
export class ApiClient {
constructor(private config: Config) {}
async request(path: string) {
- const url = `${this.config.baseUrl}${path}`;
+ const url = `${this.config.apiBaseUrl}${path}`;
return fetch(url, {
headers: this.getHeaders(),
});
}
getEndpoint() {
- return this.config.baseUrl;
+ return this.config.apiBaseUrl;
}
}
Destructuring shorthand expansion
@src/utils/helpers.ts
function createClient(config: Config) {
- const { baseUrl, apiKey } = config;
+ const { apiBaseUrl: baseUrl, apiKey } = config;
return new ApiClient(baseUrl, apiKey);
}
Safe-Apply Verification
tsc --noEmit on patched copy: 0 errors
Applied: yes (all 13 patches written)
Post-apply tsc: still green

In Trial #005a on a different repo (SOVR-MCP-PROXY), safe-apply correctly blocked a write when the rename left a string literal "url" in a required array inconsistent with the renamed property. A human would have shipped that bug.

Have a field rename in your codebase?

We'll run sovr-patch on your repo and show you the results before you commit to anything.