MCPcopy
hub / github.com/Doorman11991/smallcode / enterRefactor

Method enterRefactor

src/session/tdd_state.js:303–317  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

301 }
302
303 enterRefactor() {
304 if (this.disabled) return { ok: true, phase: 'idle', message: 'TDD gating disabled.' };
305 if (this._phase !== PHASES.GREEN) {
306 return { ok: false, phase: this._phase, message: `enterRefactor called but phase is "${this._phase}", expected "green".` };
307 }
308
309 this._phase = PHASES.REFACTOR;
310 this._save();
311
312 return {
313 ok: true,
314 phase: PHASES.REFACTOR,
315 message: 'REFACTOR: make structural improvements only. Run full suite to verify no regressions.',
316 };
317 }
318
319 completeCycle(testResult) {
320 if (this.disabled) return { ok: true, phase: 'idle', message: 'TDD gating disabled.' };

Callers 5

tdd_state.test.jsFile · 0.80
_executeToolMethod · 0.80
executeToolFunction · 0.80

Calls 1

_saveMethod · 0.95

Tested by

no test coverage detected