Skip to content

Commit c313d36

Browse files
committed
test(objectql): the seed self-apply publish double answers engine.find, which the draft address reads
Claude-Session: https://claude.ai/code/session_01GP3comALHRcRBixS2TEnLF Co-authored-by: Claude <noreply@anthropic.com>
1 parent 740f97b commit c313d36

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

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

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -452,11 +452,13 @@ describe('protocol.publishPackageDrafts (ADR-0033 / ADR-0067 D2)', () => {
452452
*/
453453
describe('protocol.publishMetaItem — seed self-apply', () => {
454454
function makePublishable(body: unknown) {
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);
455+
// A publish that states no package reads the item's active and draft
456+
// rows once (`engine.find` on `sys_metadata`) to resolve the draft a
457+
// draft save naming no package writes, so the gate and the promotion
458+
// resolve one draft (ADR-0048, #23495). No row here: the address is the
459+
// package-unbound draft, and the repository double below answers both
460+
// reads.
461+
const protocol = new ObjectStackProtocolImplementation({ findOne: async () => null, find: async () => [] } as never);
460462
(protocol as any).ensureOverlayIndex = async () => {};
461463
// [#21694] No lock on these items. Stubbed at `lockWriteRefusal`, the
462464
// verdict the publish path asks (`promoteDraftForPublish`, since #8594),

0 commit comments

Comments
 (0)