← All activity records

FACTUAL ACTIVITY RECORD · An activity record based on work that took place

Restricting synchronization by root task

Using a multi-root allowlist and parent-child closure to exclude unrelated conversations before ingestion

Activity period:

Purpose

Synchronizing an entire workspace could send conversations outside the publication scope and local operational information to the database.

The ingestion boundary needed to select only explicitly listed root tasks and synchronize their subagents without omission or unrelated inclusion.

Implementation

environment-setting template and the configuration parser gained a required comma-separated allowlist of UUIDv7 root session IDs. Values are trimmed, lowercased, sorted, checked for duplicates, and checked against the root-count limit before startup.

root-task reader fully lists active and archived tasks and resolves each allowed session to one unique root. From those seeds it recursively follows explicit parent and subAgentActivity thread-ID relationships without reusing a subagent's independent session ID as hierarchy.

  • Reject missing, ambiguous, non-root, conflicting-parent, repeated-pagination-cursor, and read/list mismatch states as a whole.
  • When root or descendant limits are exceeded, synchronize no snapshot instead of silently truncating.
  • Validate the complete closure before splitting it into an initial batch of eight and later batches of 32, with up to four concurrent reads.
  • Include the allowlist in durable outbox scope and reject scope changes while unsent batches exist.

When only the allowlist changes and no queued or blocked batch exists, only thread checkpoints are removed inside a transaction. Sequence, device, owner binding, and agent-definition hash remain, while public-selection decisions stay in a separate layer.

This shows synchronization-target canonicalization added in the primary Commit. Concrete values and the format name are removed from errors, while empty-set rejection, format validation, duplicate rejection, and sorting are preserved.

Flow validating multiple roots and syncing only selected subtrees

Rendering diagram…

What was confirmed

Verification results

Sixty-three tests across eight test files, type checks, the build, and diff consistency passed.

Multiple roots, descendants with independent session IDs, and descendants without session IDs were selected through valid parent relationships.

Missing, ambiguous, non-root, conflicting-parent, changed-ID, limit, pagination, and unsent-batch scope-change cases failed closed.

The root-task synchronization boundary was applied to the target without a database-schema change. Continuous operation with actual multiple roots was not verified at the cutoff.

Basis for completion

The work was complete when configuration, reader, and outbox boundaries could resolve full root and descendant closures from an explicit allowlist, reject partial synchronization and old-scope delivery, and pass all 63 tests.