Splitting works for more batches; updates never delete a release still in use

- A split part may change the compiled code of its own batch's functions
  still in review (their source is put back as on main; shared changes in the
  file still affect them). It no longer counts as changing functions someone
  else holds; their status is measured again.
- An annotated declaration (a STUB on a prototype) is a region of its own
  instead of stopping the split of the whole file.
- Running processes record the release they started from; update.sh keeps
  those. A worker left running across deploys lost its release directory and
  every analysis failed with "Cannot find module analyze-worker.js".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RNwtXPYqFu3oKaaXwYwNWW
This commit is contained in:
Saty 2026-10-18 12:50:04 +02:00
commit aaba8ad165
5 changed files with 32 additions and 3 deletions

View file

@ -37,3 +37,12 @@ test('withoutFunctions restores pending functions from the base, or drops new on
// One definition shared by a pending and a finished function can't be split.
assert.equal(withoutFunctions({ 'a.cpp': file }, ['fn_00002'], () => null), null);
});
test('an annotated declaration is a region of its own instead of stopping the split', () => {
const text = '// STUB: fn_00010\nvoid declared(int a);\n\n// FUNCTION: fn_00011\nint defined() {\n return 1;\n}\n';
const r = functionRegions(text);
assert.deepEqual([r.get('fn_00010').start, r.get('fn_00010').end], [0, 2]);
assert.deepEqual([r.get('fn_00011').start, r.get('fn_00011').end], [3, 7]);
const out = withoutFunctions({ 'a.cpp': text }, ['fn_00011'], () => null);
assert.equal(out['a.cpp'], '// STUB: fn_00010\nvoid declared(int a);\n\n');
});