Skip to content

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.

test(api): the catalog exercises pullboard publish [A1]

Corey Olsonb11d67d2d2f4
diff --git a/test/api-catalog.test.js b/test/api-catalog.test.js
index 7ab32ddf..aaf1da04 100644
--- a/test/api-catalog.test.js
+++ b/test/api-catalog.test.js
@@ -687,6 +687,17 @@ catalogCase('[A1] catalog commands keep their real repository exercises', async
assert.equal(landing.batch, null);
assert.deepEqual(landing.landed, []);
assert.deepEqual(landing.items, []);
+ const published = join(source.dir, 'published.git');
+ await source.git(source.dir, 'init', '-q', '--bare', published);
+ await source.git(source.repo, 'remote', 'add', 'origin', published);
+ const publishing = await source.run(source.repo, 'publish', '--json');
+ assert.equal(publishing.status, 0, publishing.stderr || publishing.stdout);
+ const publication = parseOneDocument(publishing.stdout);
+ coveredRoots.add('publish');
+ const trunkHead = await source.git(source.repo, 'rev-parse', 'HEAD');
+ assert.deepEqual([publication.head, publication.published, publication.red], [trunkHead, true, []]);
+ assert.equal(await source.git(published, 'rev-parse', 'refs/heads/main'), trunkHead, 'publish pushed the head the suite passed');
+ await source.git(source.repo, 'remote', 'remove', 'origin'); // Later catalog commands keep their remote-less fixture.
await json(source, source.repo, 'roadmap');
await json(source, source.repo, 'queue');
const failures = await json(source, source.repo, 'flakes');