Autonomous development for real products. Governed agents build from specs you approve, follow the rules you set, and nothing merges until another agent proves it. Your decisions, judgement and taste are the bar that work must clear. Declare your vision and let agents build it.
JavaScript agentic-codingai-agentsai-governanceautonomous-agentsclaude-codeclicode-reviewcodexcoding-agentsdeveloper-toolsgit-hooksllmlocal-firstmulti-agentsoftware-factoryspec-driven-developmentverificationvibe-coding
chore: merge main and preserve DCO coverage [I1,O3]
Corey Olsonead61507461e
diff --cc test/workflows.test.jsindex 6441b513,976677ab..fbb517f9--- a/test/workflows.test.js+++ b/test/workflows.test.js@@@ -1,9 -1,10 +1,11 @@@+ /** @pullboard-test-input source-tree *//** Check that main CI shards work without hiding failures or cancelling unrelated runs [C7]. */import assert from 'node:assert/strict';- import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';-import { existsSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs';++import { existsSync, mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs';+ import { tmpdir } from 'node:os';import { join, resolve } from 'node:path';-import { test } from 'node:test';+import { after, test } from 'node:test';+import { createE2eHelpers } from './e2e-helpers.js';import { runFixtureChild } from './fixture-child.js';const ROOT = resolve(import.meta.dirname, '..');@@@ -56,60 -55,43 +58,101 @@@ function workflowShardsAndCancellation(test('the gate workflow shards and cancels superseded main runs [C7]', workflowShardsAndCancellation);+/** Read an optional workflow so the test reports its absence as a workflow assertion. */+function workflowText(path) {+ return existsSync(path) ? readFileSync(path, 'utf8') : '';+}++/** Check that the independently named DCO check runs for every pull request. */+function contributorWorkflows() {+ const dco = workflowText(resolve(ROOT, '.github/workflows/dco.yml'));+ assert.match(dco, /^name: DCO\n/u, 'the DCO check has a stable required-check name');+ assert.match(dco, /\n {2}pull_request:\n/u, 'the DCO workflow runs on pull requests');+ assert.match(dco, /\n dco:\n {4}name: DCO\n/u, 'the pull-request check is named DCO');+ assert.match(dco, /\n {10}fetch-depth: 0\n/u, 'the checker receives the full pull-request history');+ assert.match(dco, /run: node bin\/check-signoffs\.js\n/u,+ 'the DCO workflow runs the repository sign-off checker');+}++test('the named DCO check runs for pull requests [I1]', contributorWorkflows);++test('a pull request with an unsigned commit fails DCO and a signed replacement passes [I1]', (t) => {+ const box = e2e.sandbox();+ const repo = join(box.dir, 'dco-workflow');+ mkdirSync(repo);+ box.git(repo, 'init', '-q', '-b', 'main');+ box.env.GIT_AUTHOR_NAME = 'Maintainer';+ box.env.GIT_AUTHOR_EMAIL = '[email protected]';+ writeFileSync(join(repo, 'pullboard.json'), JSON.stringify({ maintainers: ['[email protected]'] }));+ box.git(repo, 'add', '-A');+ box.git(repo, 'commit', '-q', '-m', 'chore: add trusted contribution policy');+ const base = box.git(repo, 'rev-parse', 'HEAD').trim();++ box.env.GIT_AUTHOR_NAME = 'Outside Contributor';+ box.env.GIT_AUTHOR_EMAIL = '[email protected]';+ writeFileSync(join(repo, 'README.md'), 'An unsigned contribution.\n');+ box.git(repo, 'add', 'README.md');+ box.git(repo, 'commit', '-q', '-m', 'feat: add an unsigned contribution');+ const unsigned = box.git(repo, 'rev-parse', 'HEAD').trim();+ const event = join(box.dir, 'pull-request.json');+ /** Run the public CI entry point against a real pull-request event and Git history. */+ function check() {+ writeFileSync(event, JSON.stringify({ pull_request: {+ base: { sha: base }, head: { sha: box.git(repo, 'rev-parse', 'HEAD').trim() },+ } }));+ return runFixtureChild(process.execPath, [resolve(ROOT, 'bin/check-signoffs.js')], {+ cwd: repo, encoding: 'utf8',+ env: { ...box.env, GITHUB_EVENT_NAME: 'pull_request', GITHUB_EVENT_PATH: event },+ });+ }+ const rejected = check();+ assert.equal(rejected.status, 1, rejected.failure || rejected.stderr);+ assert.ok(rejected.stderr.includes(unsigned.slice(0, 12)), 'the failure names the unsigned commit');++ box.git(repo, 'reset', '--soft', base);+ box.git(repo, 'commit', '-q', '-m', 'feat: sign the contribution',+ '-m', 'Signed-off-by: Outside Contributor <[email protected]>');+ const accepted = check();+ assert.equal(accepted.status, 0, accepted.failure || accepted.stderr);+});+++ const workflow = readFileSync(new URL('../.github/workflows/release.yml', import.meta.url), 'utf8');++ /** Execute the actual workflow extraction against private input; no GitHub or npm command runs. */+ function extract(t, script, changelog, tag = 'v1.2.3') {+ const root = mkdtempSync(join(tmpdir(), 'pullboard-release-notes-'));+ t.after(() => rmSync(root, { recursive: true, force: true }));+ writeFileSync(join(root, 'CHANGELOG.md'), changelog);+ const notes = join(root, 'release-notes.md');+ const result = runFixtureChild(process.execPath, ['--input-type=module', '-e', script], {+ cwd: root, encoding: 'utf8',+ env: { ...process.env, GITHUB_REF_NAME: tag, RUNNER_TEMP: root },+ });+ return { ...result, notes: existsSync(notes) ? readFileSync(notes, 'utf8') : null };+ }++ test('the release workflow publishes exactly the tagged changelog section [O3]', t => {+ const match = workflow.match(/node --input-type=module <<'NOTES'\n([\s\S]*?)\n {10}NOTES/u);+ assert.ok(match, 'the workflow extracts its notes from CHANGELOG before publishing');+ const script = match[1].replace(/^ {10}/gmu, '');+ const body = '\n### Added\n\n- Preserve **Markdown**, Unicode café, and trailing spaces. \n\n';+ const changelog = '# Changelog\n\n## [Unreleased]\n\nNot this future version.\n\n## [1.2.3] - 2026-10-26\n' + body+ + '## [1.2.2] - 2026-10-25\n\nNot this older version.\n';+ const selected = extract(t, script, changelog);+ assert.equal(selected.status, 0, selected.stderr);+ assert.equal(selected.notes, body, 'only the selected section body is copied byte for byte');+ const last = extract(t, script, '# Changelog\n\n## [1.2.3]\n' + body);+ assert.equal(last.status, 0, last.stderr);+ assert.equal(last.notes, body, 'the final section does not need a following release heading');+ for (const invalid of [changelog.replace('[1.2.3]', '[1.2.30]'), changelog + '\n## [1.2.3]\nDuplicate\n',+ '# Changelog\n\n## [1.2.3]\n\n## [1.2.2]\nOlder\n']) {+ const refused = extract(t, script, invalid);+ assert.notEqual(refused.status, 0, 'missing, duplicate, or empty notes refuse before publication');+ assert.equal(refused.notes, null, 'a refusal never writes a notes file');+ }+ assert.match(workflow, /gh release create "\$GITHUB_REF_NAME"[^\n]*--verify-tag[^\n]*--notes-file "\$RUNNER_TEMP\/release-notes\.md"/u);+ assert.doesNotMatch(workflow, /--generate-notes|--notes-from-tag/u, 'generated or tag-message notes never replace the changelog');+ assert.ok(workflow.indexOf("<<'NOTES'") < workflow.indexOf('run: npm publish'), 'missing notes stop before npm publishing');+ assert.ok(workflow.indexOf('run: npm publish') < workflow.indexOf('gh release create'), 'the GitHub release follows successful package publication');+ assert.match(workflow, /publish:\n\s+permissions:\n\s+contents: write/u, 'only the publishing job gains release-write authority');+ });