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
test(api): preserve unauthenticated move refusal [A3,N27,N35]
Corey Olson45eb7f49e212
diff --git a/test/e2e.test.js b/test/e2e.test.jsindex 50d0c7d2..1925809d 100644--- a/test/e2e.test.js+++ b/test/e2e.test.js@@ -1293,10 +1293,12 @@ async function startView(box, cwd) {const key = link.searchParams.get('k');const base = `http://127.0.0.1:${link.port}`;const headers = { 'x-pullboard-key': key };+ /** Read the public listing through the view's real authenticated API. */const boards = async () => {const response = await fetch(`${base}/api/v1/boards`, { headers });return { status: response.status, document: await response.json() };};+ /** Resolve a registered board id and read its public state. */const state = async (root) => {const listing = await boards();if (listing.status !== 200) return listing;@@ -1305,6 +1307,7 @@ async function startView(box, cwd) {const response = await fetch(`${base}/api/v1/boards/${encodeURIComponent(board.id)}/state`, { headers });return { ...listing.document, project: (await response.json()).state };};+ /** Send a public move to the registered board or a deliberately unknown id. */const act = async (root, body) => {const listing = await boards();const board = listing.document.boards?.find((entry) => entry.root === root);@@ -1382,9 +1385,16 @@ test('from the view the person adds items, shouts and holds lanes, through the Cconst unknown = await view.act(box.dir, { verb: 'shout', args: { to: 'all', text: 'x' } });assert.equal(unknown.status, 404);assert.equal(unknown.document.error.code, 'NO_BOARD');- const stranger = await fetch(`${view.base}/api/v1/boards`, { headers: { 'content-type': 'application/json' } });+ const before = await view.state(box.repo);+ const target = before.boards.find((entry) => entry.root === box.repo);+ const stranger = await fetch(`${view.base}/api/v1/boards/${encodeURIComponent(target.id)}/moves`, {+ method: 'POST',+ headers: { 'content-type': 'application/json' },+ body: JSON.stringify({ verb: 'shout', args: { to: 'all', text: 'unauthorized move' } }),+ });assert.equal(stranger.status, 401);assert.equal((await stranger.json()).error.code, 'AUTH_REQUIRED');+ assert.deepEqual((await view.state(box.repo)).project.shouts, before.project.shouts, 'an unauthenticated move cannot write a shout');} finally {await view.stop();}diff --git a/test/project-meta.test.js b/test/project-meta.test.jsindex 850c0b74..bdf73a76 100644--- a/test/project-meta.test.js+++ b/test/project-meta.test.js@@ -45,6 +45,7 @@ test('the API exposes configured repo/project names, refreshed labels, stale warconst view = await serveView({ port: 0 });try {const link = new URL(view.url);+ /** Read the public listing without pruning unavailable registered roots. */const boards = async () => {const response = await fetch(`${link.origin}/api/v1/boards`, { headers: { 'x-pullboard-key': link.searchParams.get('k') } });assert.equal(response.status, 200);