Restart after a killed promotion chose scope=Skipped while m0007 pending work existed; owed full resolve deferred ~20 min to later incremental passes #343

Closed
opened 2026-10-08 20:57:34 +02:00 by buildagent · 2 comments
Member

This came up during #334 (zammad-dev, 0.34.0). The daemon was killed during the post-promotion resolve. The restarted daemon (pid 813834) then logged at 14:40:48:

index stage complete: reference resolution elapsed_ms=0 resolved=0 invalidated=0 scope=Skipped

So the owed Full resolve did not run at startup. Later incremental passes caught it up; the largest, at 15:00:40, had tier1_unique=12233 …. Final counts match the pre-upgrade state, so nothing was lost. For about 20 minutes, though, readers got floors with no stated cause.

The debug lane's reproduction did NOT show this: its restart on a killed DB ran the owed Full resolve in 55 s. Possible differences:

  • a watcher batch committed before the startup reconcile;
  • a different resolve_owed / pending-table state at kill time;
  • the profile.(fields) 17 of 18 refusal (#339) changing the activation comparison.

To do

  • Reproduce from a DB killed at the same point in the field.
  • Find which condition makes the startup reconcile pick Skipped with m0007 pending rows present.
  • Make startup run owed work, or disclose that it is owed (index_state naming pending resolution).

Related: #334, #339, #341.

This came up during #334 (zammad-dev, 0.34.0). The daemon was killed during the post-promotion resolve. The restarted daemon (pid 813834) then logged at 14:40:48: `index stage complete: reference resolution elapsed_ms=0 resolved=0 invalidated=0 scope=Skipped` So the owed Full resolve did not run at startup. Later incremental passes caught it up; the largest, at 15:00:40, had `tier1_unique=12233 …`. Final counts match the pre-upgrade state, so nothing was lost. For about 20 minutes, though, readers got floors with no stated cause. The debug lane's reproduction did NOT show this: its restart on a killed DB ran the owed Full resolve in 55 s. Possible differences: - a watcher batch committed before the startup reconcile; - a different `resolve_owed` / pending-table state at kill time; - the `profile.(fields) 17 of 18` refusal (#339) changing the activation comparison. ## To do - Reproduce from a DB killed at the same point in the field. - Find which condition makes the startup reconcile pick `Skipped` with m0007 pending rows present. - Make startup run owed work, or disclose that it is owed (`index_state` naming pending resolution). Related: #334, #339, #341.
Author
Member

Not reproduced, so I'm keeping this open.

What shipped in v0.35.0: a regression test, first_party_influence, pins the behaviour. A restart after a killed promotion runs the Full resolve it still owes. If that resolve is skipped whenever nothing was parsed, the test fails with the field's symptom.

Why the field log is still unexplained. Every code path that empties the pending tables also resolves them. So the field's scope=Skipped means those tables were already empty when the restart happened. Two possible reasons:

  • something else wrote to the index between the kill and the restart, for example a --no-daemon MCP process;
  • or the kill landed during the build or the switch itself, rather than during the resolve.

What would settle it: the field database as it was at kill time, or the restart's full daemon.log.

Not reproduced, so I'm keeping this open. **What shipped in v0.35.0:** a regression test, `first_party_influence`, pins the behaviour. A restart after a killed promotion runs the Full resolve it still owes. If that resolve is skipped whenever nothing was parsed, the test fails with the field's symptom. **Why the field log is still unexplained.** Every code path that empties the pending tables also resolves them. So the field's `scope=Skipped` means those tables were already empty when the restart happened. Two possible reasons: - something else wrote to the index between the kill and the restart, for example a `--no-daemon` MCP process; - or the kill landed during the build or the switch itself, rather than during the resolve. **What would settle it:** the field database as it was at kill time, or the restart's full daemon.log.
Author
Member

Triage 2026-11-09: OBSOLETE: since 71afdb73 (#53) publications switch and resolve atomically (promotion.rs:475), and owed work is disclosed through resolution_pending overlays (#375). The restart regression is pinned in first_party_influence.rs. The mechanism the report described no longer exists.

Triage 2026-11-09: OBSOLETE: since 71afdb73 (#53) publications switch and resolve atomically (`promotion.rs:475`), and owed work is disclosed through `resolution_pending` overlays (#375). The restart regression is pinned in `first_party_influence.rs`. The mechanism the report described no longer exists.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
h-dv/code-index#343
No description provided.