From d82558c999b864b22b3b2dd59afd7b52a7d6ecfb Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 12 Aug 2026 01:57:51 +0000 Subject: [PATCH] docs(objectql): correct two comments that still assert plugin-audit's retired `captureBefore` (#7707) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `captureBefore` was retired by #6656 (ADR-0049 enforce-or-remove) and its last consumer limb deleted by PR #7081. Two comments in `packages/objectql` still described it as live. Comments only — no executable line changes. `engine.ts`: the enumeration of delete-phase hooks that hold the `wantsPreImage` gate open listed `plugin-audit` as `captureBefore / writeAudit before+afterDelete`. `plugin-audit` now registers `writeAudit` on `afterInsert`/`afterUpdate`/`afterDelete` only (`audit-writers.ts:1343-1345`), so it holds term 2 of the gate open and no longer term 1. The `excludeObjects: AUDIT_EXCLUDED_OBJECTS` face (#5860) that makes it the worked example for an engine-face narrowing is unchanged, so the bullet is corrected rather than dropped. `plugin.ts`: inside the `sys_fetch_previous_update` retirement block, the #5846 measurement ("read the same row THREE times") is past-tense history and stays as written. Its closing clause pointed at "`captureBefore`'s now-redundant read is the identity lane's follow-up" — that follow-up has since landed, so the clause is restated to record #6656 instead of advertising pending work. ⛔ Scope fence honoured: `packages/plugins/plugin-audit` is untouched. This change deletes stale prose about the redundant read; acting on the read itself was already done by the identity lane in #6656. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01G2TwHzwbY5Zg6RvuTSzhZa --- packages/objectql/src/engine.ts | 4 +++- packages/objectql/src/plugin.ts | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/objectql/src/engine.ts b/packages/objectql/src/engine.ts index 9cd8bdbe88..252aed9f49 100644 --- a/packages/objectql/src/engine.ts +++ b/packages/objectql/src/engine.ts @@ -9106,7 +9106,9 @@ export class ObjectQL implements IObjectQLEngine { // by `targets(objectName)` inside the handler) // * `service-storage` file-reference-lifecycle before+afterDelete // (filters by `activeFileFields(object)` inside) - // * `plugin-audit` captureBefore / writeAudit before+afterDelete, + // * `plugin-audit` writeAudit afterDelete only — #6656 retired + // `captureBefore`, which was its `beforeDelete` half, + // so it holds term 2 open and no longer term 1; // global MINUS `excludeObjects: AUDIT_EXCLUDED_OBJECTS` // (#5860) — the one that narrows at the ENGINE face, // so `hookMatchesObject` can subtract it and an diff --git a/packages/objectql/src/plugin.ts b/packages/objectql/src/plugin.ts index 966b48d7d2..90d859619e 100644 --- a/packages/objectql/src/plugin.ts +++ b/packages/objectql/src/plugin.ts @@ -981,7 +981,8 @@ export class ObjectQLPlugin implements Plugin { // read. Two of the three were engine reads through the full read pipeline // (middleware, RLS, field masking) and neither consulted any demand gate. // This change removes one and makes the engine's the single producer; - // `captureBefore`'s now-redundant read is the identity lane's follow-up. + // `captureBefore`'s now-redundant read followed it out in #6656, which + // leaves the engine's gated read as the only producer on this path. // // ⛔ RETIRED — `sys_fetch_previous_delete` (#5929, ADR-0049 // enforce-or-remove). Do not reintroduce it.