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(link): carry counts and no entries across consent [E32,H17]
Corey Olsone2b5438860bb
diff --git a/src/board-link.js b/src/board-link.jsindex c62754f4..b2b1bc27 100644--- a/src/board-link.js+++ b/src/board-link.js@@ -1,4 +1,17 @@-/** Shared board links retain bilateral consent, current generations and a multiple-parent DAG [E32,H16,H17]. */+/**+ * Shared board links retain bilateral consent, current generations and a multiple-parent DAG [E32,H16,H17].+ *+ * Resolve BoardRefs through an explicitly authorized inventory, then approve the canonical record+ * with each endpoint's caller-configured signer authority. applyBoardLink persists that accepted+ * record on a real board/catalog; readBoardLinks is detached storage, not an authority assertion.+ * Operations call authorizeBoardLink again, so restored records and asynchronous revocations do+ * not inherit trust from a path, handle, registry entry or previous successful read.+ *+ * boardStateAnnouncement is only the common stripping serializer. Actual delivery is provided+ * by board-link-relay.js with a board-bound authenticated transport and a separately provisioned+ * board-link-envelope.js capability. Neither repository enrollment nor a relay bearer token+ * replaces the two board approvals. There is no CLI, UI or automatic key-distribution policy here.+ */import { Refused } from './refused.js';import { atomic } from './board-event-log.js';import { logEvent } from './board-event-log.js';diff --git a/test/board-link.test.js b/test/board-link.test.jsindex 46cf435b..001fc9d3 100644--- a/test/board-link.test.js+++ b/test/board-link.test.js@@ -228,4 +228,25 @@ test('sealed board-link delivery authenticates both boards and retains exact retawait receiver.publish(revoked);await assert.rejects(transportApi.deliverBoardState(child.board, { ...context, correlationId: 'state-11', position: 11 }, ports),error => error.code === 'BOARD_LINK_INACTIVE', 'authoritative revocation blocks a source whose local catalog is stale');+ for (const [generation, mode] of [[2, 'counts'], [3, 'nothing']]) {+ const renewed = await consent(api, authority, parent, child, record.linkId, mode, generation);+ await api.applyBoardLink(child.board, renewed, authority);+ await api.applyBoardLink(parent.board, renewed, authority);+ await sender.publish(renewed);+ const nextContext = { ...context, generation, position: generation, correlationId: 'mode-' + mode };+ await assert.rejects(transportApi.deliverBoardState(child.board, nextContext, ports), error => error.code === 'BOARD_LINK_AUTH',+ 'a prior generation capability cannot seal new consent');+ await assert.rejects(transportApi.deliverBoardState(child.board, nextContext, { authority, transport: sender }),+ error => error.code === 'BOARD_LINK_AUTH', 'missing sealing authority never falls back to plaintext');+ const scoped = createBoardLinkCapability(renewed, await generateBoardKey());+ await transportApi.deliverBoardState(child.board, nextContext, { authority, capability: scoped, transport: sender });+ const delivery = (await receiver.read()).deliveries.at(-1);+ const allowed = await scoped.open(delivery.envelope);+ assert.deepEqual(allowed.rows, mode === 'counts' ? { claimed: 1 } : []);+ assert.equal(JSON.stringify(allowed).includes('must stay private'), false);+ await transportApi.receiveBoardState(parent.board, delivery, { authority, capability: scoped });+ scoped.close();+ await assert.rejects(scoped.open(delivery.envelope), error => error.code === 'BOARD_LINK_AUTH');+ }+ capability.close();});