Files
ngit-grasp/src/sync
DanConwayDev f5b2de4655 fix(sync): publish startup repositories after reconstructing all roots
Startup inserted persisted repositories as StateOnly before querying and
registering their roots. Purgatory reconciliation removes StateOnly entries
absent from purgatory, so its timer could delete that staging entry between
awaits. Later roots were ignored as unknown repositories. The workspace
REQ-concurrency test exposed this: startup loaded 2,500 persisted issues but
tracked only 499, preventing the expected restart query burst.

Assemble announcement ownership and root IDs in private PendingUpdates,
then publish the complete Full entry through process_batch. Publish before
consuming queued notifications so newly arriving roots can resolve their
repository. Preserve purgatory cleanup rules and live discovery behavior;
this does not change remote query limits or claim a production occurrence.

Strengthen the startup invariant test to require private staging and retain
roots through an intervening purgatory reconciliation. The unchanged
2,500-issue restart scenario passes after this change. Document the behavior
and include the fix in the unreleased changelog.

Validation: focused startup unit and restart integration tests; full locked
workspace suite, all-target Clippy with warnings denied, formatting and diff
checks pass on the combined upgrade and compatibility cleanup.

Assisted-by: GPT-6
2026-09-17 13:44:55 +00:00
..