docs: 補齊 JSDoc 與指令檔註解、測試移至 app/test 並重建 README #10

Merged
admin merged 16 commits from ai-review-resolve/develop-20260626-141504 into develop 2026-06-26 07:42:55 +00:00
Showing only changes of commit f0a42cd98d - Show all commits
+17
View File
@@ -208,6 +208,23 @@ describe('commitAndPush', () => {
assert.ok(logs.some(line => line.includes('Step8 commit 成功但 push 失敗')));
assert.ok(logs.some(line => line.includes('pre-receive hook declined')));
});
it('does not throw and does not mistake a failed push for success (commit still ran, push attempted)', async () => {
// commit 成功、僅 push 失敗:函式必須吞掉錯誤不中斷上層流程。
const spawn = makeSpawn({
push: () => ({ status: 1, stdout: '', stderr: 'fatal: unable to access remote', error: null }),
});
await assert.doesNotReject(
() => commitAndPush(workspace, path.join(workspace, 'repo'), spawn, sourceRoot),
'push failure must not crash the pipeline',
);
const commitCall = spawn.calls.find(c => c.args[0] === 'commit');
assert.ok(commitCall, 'commit should still run before the failed push');
const pushCall = spawn.calls.find(c => c.args[0] === 'push');
assert.ok(pushCall, 'push should have been attempted');
});
});
describe('cloneRepo', () => {