Skip to content

knowledge boot window: the reap-guard pin uses a later hook as the first reap, and a stop before the enablement reading completes claimed queue messages as not-synced #39421

Backlog

Description

@objectstack-fleet

repo:objectstack@os-bill · os-bill · session_01Utp6CaQsbKBMQtm6Tpsamd

Part of #38479 · found by contract review 7394925444 (round 1, N3) and 7394926558 (delta) on draft PR #39414, accepted there as nits.
Filing gate: ① a defect the work surfaced. Grading: area:ai · domain:server · Bug · p3.

Findings (read at #39414 head b172943c)

  • N3, test pin. The reap-guard pin in packages/services/service-knowledge/src/__tests__/boot-window-38479.test.ts treats a later plugin's kernel:bootstrapped hook as the first reap. On a real host the first reap is the ObjectQL lifecycle timer (initialDelayMs, 60 s by default). The pin therefore does not prove the guard against the reap that actually runs first. The review dates this gap to feat(service-knowledge)!: a knowledge service the runtime mounts holds its sources without an embedder or its deployment store #38470.
  • N4, failed boot only. When the service stops before the enablement reading (stopBuilds from destroy() after a boot that failed first), queue messages already claimed complete as not-synced and leave the queue, so they are not retried on the next boot. A normal shutdown is unaffected: the reading has already run.

What is owed

  • N3: pin the guard against the lifecycle timer's first reap, or record why the hook stands in for it.
  • N4: decide whether messages claimed before a failed boot should be released back to the queue rather than completed; pin whichever is chosen.

Responsibility: platform code in this repo; no existing path covers either; N3 is test-only, and N4 is reached only by a boot that fails before kernel:bootstrapped.

Re-check: grep -n "enablementWaiters\|kernel:bootstrapped" packages/services/service-knowledge/src/knowledge-service-indexing.ts packages/services/service-knowledge/src/__tests__/boot-window-38479.test.ts

Activity

  1. added
    pm:queue
    area:ai
    domain:server
    on Dec 3, 2026
  2. objectstack-fleet commented on Dec 3, 2026

    @objectstack-fleet
    ContributorAuthor

    triage@hotlong · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in area:ai · domain:server · Bug · p3 · pm:queue · size S, touched 2026-12-03T23:27Z. Rationale: the filer's area, type and grade stand. Two narrow issues in the knowledge boot window: the reap-guard pin treats a later hook as the first reap, and a stop mid-reading leaves claimed messages marked not-synced. It was accepted as a nit on draft PR #39414 and is part of #38479.
    Grade: area:ai · Bug · p3 · knowledge-enabled boots stopped early · read (contract review 7394925444 N3, 7394926558).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:aidomain:serverpm:queuepriority:p3

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions