Skip to content

T12: OpenClaw Lane B sweep hermetic smoke (quiesce + dedupe) - #571

Merged
philcunliffe merged 1 commit into
integration/openclaw-two-lane-capturefrom
task/openclaw-two-lane-capture/T12
Aug 2, 2026
Merged

T12: OpenClaw Lane B sweep hermetic smoke (quiesce + dedupe)#571
philcunliffe merged 1 commit into
integration/openclaw-two-lane-capturefrom
task/openclaw-two-lane-capture/T12

Conversation

@philcunliffe

Copy link
Copy Markdown
Contributor

Summary

  • New backfill_openclaw_fixture hermetic smoke under hypaware-core/smoke/flows, mirroring backfill_claude_fixture.js / backfill_codex_fixture.js: writes a minimal OpenClaw v3 session JSONL in the nested-message-envelope shape (PR OpenClaw backfill reads message fields one level too high, projecting 0 rows #552's reader) under a temp agents/<id>/sessions/ tree with a controllable mtime.
  • Drives the real createBackfillSweepDriver (T9) through a cron-due tick and asserts:
    • (a) a file inside the default 180000ms quiesce window is skipped
    • (b) a file backdated past it is captured with native message identity
    • (c) rerunning the sweep on a later cron-due tick (fresh devRunId, forcing a genuine re-scan of committed partitions) nets zero new rows for the already-written part_ids
  • Fixes a latent bug surfaced by driving a real, non-dry-run sweep write for the first time (T9's own tests only ever exercised a mocked runBackfill seam): writeRows/flushDataset read ctx.query, which BackfillRunnerContext never carried and the daemon's createBackfillSweepDriver(...) call never supplied, so any real sweep write crashed on Cannot read properties of undefined (reading 'getDataset'), in both the smoke and the real daemon path. Threaded query through BackfillRunnerContext, BackfillSweepDriverOptions, createBackfillSweepDriver, and the daemon's sweepDriver construction.
  • Updated LLP 0172's field enumeration and ctx code samples (Sections 4.3/4.4) to match, and extended the existing T9 unit tests to cover the new required field.

Test plan

  • npm run typecheck clean
  • npm test (3276 passed, 1 skipped, 0 failed)
  • npm run smoke -- backfill_openclaw_fixture ok
  • npm run smoke -- backfill_claude_fixture ok (no regression)
  • npm run smoke -- backfill_codex_fixture ok (no regression)
  • npm run smoke -- daemon_foreground_start_stop ok (real daemon sweep-driver wiring)
  • npm run smoke -- walkthrough_backfill_client_history ok (CLI/onboarding backfill path)

Task-Id: T12

New backfill_openclaw_fixture.js under hypaware-core/smoke/flows,
mirroring backfill_claude_fixture.js / backfill_codex_fixture.js: writes
a minimal OpenClaw v3 session JSONL in the nested-message-envelope shape
(PR #552's reader) under a temp agents/<id>/sessions/ tree with a
controllable mtime, drives the real createBackfillSweepDriver (T9)
through a cron-due tick, and asserts (a) a file inside the default
180000ms quiesce window is skipped, (b) a file backdated past it is
captured with native message identity, and (c) rerunning the sweep on a
later cron-due tick (forcing a fresh devRunId, so the ai-gateway
materializer's dedupe genuinely re-scans committed partitions) nets zero
new rows for the already-written part_ids.

Driving a real, non-dry-run sweep write for the first time (T9's own
tests only ever exercised a mocked runBackfill seam) surfaced a latent
bug: writeRows/flushDataset read ctx.query, which BackfillRunnerContext
never carried and the daemon's createBackfillSweepDriver(...) call never
supplied, so any real sweep write actually crashed on
"Cannot read properties of undefined (reading 'getDataset')" in both the
smoke and the real daemon path. Threaded query through
BackfillRunnerContext, BackfillSweepDriverOptions,
createBackfillSweepDriver, and the daemon's sweepDriver construction, and
updated LLP 0172's field enumeration and ctx samples (Sections 4.3/4.4)
to match. Extended the existing T9 unit tests
(test/core/daemon-backfill-sweep.test.js) to cover the new required
field and its passthrough.

Task-Id: T12
@philcunliffe
philcunliffe merged commit 0c62a21 into integration/openclaw-two-lane-capture Aug 2, 2026
7 of 9 checks passed
@philcunliffe
philcunliffe deleted the task/openclaw-two-lane-capture/T12 branch August 2, 2026 02:34
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