docs(release): seal and deliver task agreement 1.25 with retained production state

This commit is contained in:
Agent Workbench Dev
2026-11-04 15:34:29 +08:00
parent 78976ac775
commit ddefe5f108
1444 changed files with 2161122 additions and 17 deletions
@@ -0,0 +1,15 @@
import fs from 'node:fs';
import path from 'node:path';
import { deliveryGit } from './delivery-project.mjs';
export function captureWorkspaceSource(f) {
const index = deliveryGit(f, ['rev-parse', '--path-format=absolute', '--git-path', 'index']).trim();
return { head: deliveryGit(f, ['rev-parse', 'HEAD']), branch: deliveryGit(f, ['symbolic-ref', 'HEAD']),
refs: deliveryGit(f, ['for-each-ref', '--format=%(refname) %(objectname)']).split('\n').filter(Boolean),
index: fs.readFileSync(index), files: ['owner-staged.txt', 'owner-unstaged.txt', 'owner-untracked.txt', 'src/add.mjs']
.map(relative => [relative, fs.existsSync(path.join(f.projectRoot, relative)) ? fs.readFileSync(path.join(f.projectRoot, relative)) : null]) };
}
export function assertWorkspaceSource(assert, f, original, branch) {
const current = captureWorkspaceSource(f);
assert.deepEqual({ ...current, refs: current.refs.filter(value => !value.startsWith('refs/heads/' + branch + ' ')) }, original);
}