Skip to content

Commit d8657b5

Browse files
committed
test(objectql): give the publish double's engine the draft-row read
A publish that states no package now reads the pending draft row's package binding once, so the seed self-apply double's engine answers that read (no row) and the repository double answers the rest, as before. Claude-Session: https://claude.ai/code/session_018zT8d8NpiQ1ExhuNd5TxY6 Co-authored-by: Claude <noreply@anthropic.com>
1 parent 6d6f894 commit d8657b5

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎packages/objectql/src/protocol-publish-package-drafts.test.ts‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,11 @@ describe('protocol.publishPackageDrafts (ADR-0033 / ADR-0067 D2)', () => {
452452
*/
453453
describe('protocol.publishMetaItem — seed self-apply', () => {
454454
function makePublishable(body: unknown) {
455-
const protocol = new ObjectStackProtocolImplementation({} as never);
455+
// A publish that states no package reads the pending draft row's package
456+
// binding once (`engine.findOne` on `sys_metadata`) so the gate and the
457+
// promotion resolve one draft (ADR-0048). No row here: the binding stays
458+
// unstated and the repository double below answers both reads.
459+
const protocol = new ObjectStackProtocolImplementation({ findOne: async () => null } as never);
456460
(protocol as any).ensureOverlayIndex = async () => {};
457461
// [#21694] No lock on these items. Stubbed at `lockWriteRefusal`, the
458462
// verdict the publish path asks (`promoteDraftForPublish`, since #8594),

0 commit comments

Comments
 (0)