Skip to content

T5: source-scoped export withholding in readRowsSince#374

Merged
philcunliffe merged 1 commit into
integration/install-experience-overhaulfrom
task/install-experience-overhaul/T5
Jul 22, 2026
Merged

T5: source-scoped export withholding in readRowsSince#374
philcunliffe merged 1 commit into
integration/install-experience-overhaulfrom
task/install-experience-overhaul/T5

Conversation

@philcunliffe

Copy link
Copy Markdown
Contributor

Implements task T5 of install-experience-overhaul.

Extends readRowsSince with a second optional resolver, sourceWithholdResolver,
threaded the same way usagePolicyResolver already is: drop-but-advance, so a
withheld row still moves the watermark.

  • createSourceWithholdResolver (src/core/cache/source-withhold.js): pure,
    catalog-agnostic factory over plain data.
  • buildSourceWithholdResolver (src/core/runtime/source_withhold.js):
    boot-time reduction from classifyClientProvenance (T3) + the plugin
    catalog, into the set of 'local'-classified picker source ids on a
    machine with a central layer.
  • bootKernel now builds the kernel runtime after the catalog/layered config
    are resolved so it can wire the resolver through createKernelRuntime.
  • @hypaware/ai-gateway declares attribution_column: "client_name" on its
    ai_gateway_messages dataset contribution (T1's manifest field). A dataset
    with no declared attribution_column is never subject to source-scoped
    withholding, the conservative default.

Tests directly against readRowsSince: withhold-and-advance, the
no-attribution-column passthrough default, no-resolver passthrough,
projection-can't-bypass, and composition with the existing cwd-based
local-only filter.

Test plan

  • npm test (7 pre-existing, unrelated leave-command.test.js failures
    confirmed present on origin/integration/install-experience-overhaul
    before this change; all new source-withholding tests pass)
  • npm run typecheck

Task-Id: T5

Extends readRowsSince (src/core/cache/storage.js) with a second optional
resolver, sourceWithholdResolver, threaded the same way usagePolicyResolver
already is: drop-but-advance, so a withheld row still moves the watermark
(LLP 0070#incremental continuation semantics).

createSourceWithholdResolver (src/core/cache/source-withhold.js) is a pure,
catalog-agnostic factory over plain data (withheld source ids + a
dataset -> attribution-column map). buildSourceWithholdResolver
(src/core/runtime/source_withhold.js) does the boot-time reduction from
classifyClientProvenance (T3) and the plugin catalog: the set of picker
source ids classified 'local' on a machine with a central layer. bootKernel
now builds the kernel runtime after the catalog and layered config are
resolved (previously built at the top of the function) so it can pass this
resolver through createKernelRuntime.

Per-row matching uses the new attribution_column manifest field (T1).
@hypaware/ai-gateway declares attribution_column: "client_name" on its
ai_gateway_messages dataset contribution. A dataset with no declared
attribution_column is never subject to source-scoped withholding, the
conservative default matching local-only's existing design.

Tests cover withhold-and-advance, the no-attribution-column passthrough
default, no-resolver passthrough, projection-can't-bypass, and composition
with the existing cwd-based local-only filter, all directly against
readRowsSince.

Task-Id: T5
@philcunliffe
philcunliffe merged commit 4a8aeca into integration/install-experience-overhaul Jul 22, 2026
8 checks passed
@philcunliffe
philcunliffe deleted the task/install-experience-overhaul/T5 branch July 22, 2026 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant