fix: pre-landing review fixes (base manifest sets the form, flag validated first, stamp_paths test)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
garrytanandcapy-ai[bot] committed 2026-10-28 20:29:36 +00:00
1 parent 7459bb4831
commit 9bd98cb649
5 files changed
+34 -12

No files matched your search

+20
View File
@@ -67,6 +67,26 @@ describe('gstack-restamp keeps the repo\'s manifest width', () => {
expect(pkgVersion(repo)).toBe('0.60.483.0');
});
test('a branch an older restamp cut to three parts heals: the base\'s four-part manifest sets the form', () => {
const repo = fixture({ policy: GBRAIN_POLICY, version: '0.60.482.0' });
fourPartManifest(repo, '0.60.482.0');
makePr(repo, 'feat-a');
setPkgVersion(repo, '0.60.482');
repo.git('commit', '-q', '-am', 'old restamp cut the manifest');
const r = restamp(repo, ['--next']);
expect(r.status).toBe(EXIT.ok);
expect(pkgVersion(repo)).toBe('0.60.483.0');
});
test('a manifest listed through stamp_paths keeps four parts too', () => {
const repo = fixture({ policy: { ...GBRAIN_POLICY, stamp_files: [], stamp_paths: ['package.json'] }, version: '0.60.482.0' });
fourPartManifest(repo, '0.60.482.0');
makePr(repo, 'feat-a');
const r = restamp(repo, ['--next']);
expect(r.status).toBe(EXIT.ok);
expect(pkgVersion(repo)).toBe('0.60.483.0');
});
test('gstack-shaped repo: the three-part manifest and its lockfile still get the npm-valid form', () => {
const repo = fixture();
makePr(repo, 'feat-a');