mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-11 15:39:04 +02:00
fix(migrations): v1.27 remediation prints a real command instead of a fictional flag
Every skip/failure path referenced '/setup-gbrain --rerun-migration', which is implemented nowhere, and promised the migration 'will ask again next upgrade', which the version-window runners make false. All five sites now print the direct GSTACK_MIGRATE_ASSUME_YES=1 bash invocation. Runner-side re-offer tracking is filed in TODOS.
This commit is contained in:
@@ -190,6 +190,13 @@ describe('v1.27.0.0 migration — #1383 consent + failure-stays-pending contract
|
||||
expect(r.code).toBe(0);
|
||||
expect(r.stderr).toContain('skipping for now');
|
||||
expect(r.stderr).toContain('GSTACK_MIGRATE_ASSUME_YES=1');
|
||||
// The remediation must be REAL: a direct invocation of this script.
|
||||
// `/setup-gbrain --rerun-migration` never existed, and the runners'
|
||||
// version windows never re-select a passed migration, so "will ask
|
||||
// again next upgrade" was false.
|
||||
expect(r.stderr).toContain('v1.27.0.0.sh');
|
||||
expect(r.stderr).not.toContain('--rerun-migration');
|
||||
expect(r.stderr).not.toContain('ask again');
|
||||
// Old state untouched, nothing recorded as done.
|
||||
expect(fs.existsSync(path.join(tmpHome, '.gstack-brain-remote.txt'))).toBe(true);
|
||||
expect(fs.existsSync(path.join(tmpHome, '.gstack-artifacts-remote.txt'))).toBe(false);
|
||||
@@ -205,6 +212,11 @@ describe('v1.27.0.0 migration — #1383 consent + failure-stays-pending contract
|
||||
expect(r.code).toBe(1);
|
||||
expect(r.stderr).toContain('PENDING');
|
||||
expect(r.stderr).toContain('INCOMPLETE');
|
||||
// Honest remediation: direct invocation, not the nonexistent
|
||||
// /setup-gbrain --rerun-migration flag.
|
||||
expect(r.stderr).toContain('Re-run manually with:');
|
||||
expect(r.stderr).toContain('GSTACK_MIGRATE_ASSUME_YES=1');
|
||||
expect(r.stderr).not.toContain('--rerun-migration');
|
||||
expect(fs.existsSync(path.join(tmpHome, '.gstack/.migrations/v1.27.0.0.done'))).toBe(false);
|
||||
const journal = fs.readFileSync(
|
||||
path.join(tmpHome, '.gstack/.migrations/v1.27.0.0.journal'),
|
||||
|
||||
Reference in New Issue
Block a user