Skip to content

Semantic vector publication times out under the fixed 30-second graph deadline #837

Description

@HashemKhalifa

tracedecay version

0.1.0-beta.37+1576b68e3df520e2113170518a98de97a31fdda8, built from source on macOS.

The same publication boundary is still present at PR #707 commit a5002ff.

What happened?

After the stale-stage recovery covered by #792 allowed a retained semantic vector generation to resume, staging advanced to 161,492 of 168,659 chunks. Final publication then failed in publish_generation with a graph operation deadline error, and semantic runtime returned to degraded/runtime_failure.

This is downstream of #792. Commit a5002ff fixes stale occupancy at begin_generation, but publish_generation_records still creates one authority with Instant::now() + GRAPH_OPERATION_DEADLINE where GRAPH_OPERATION_DEADLINE is 30 seconds. That same authority is reused across both:

  1. prepare_publication_from_staged_native
  2. publish_ready_stage

The prepare phase calls recovered_generation_digest_from_database, which decodes and hashes the full staged generation. Publication then performs additional whole-generation work under the remaining portion of the same deadline.

Existing repository scaling measurements for the native staging proof are approximately linear:

  • 2,048 chunks: 497 ms
  • 4,096 chunks: 1,021 ms
  • 8,192 chunks: 2,150 ms
  • 22,016 chunks: 5,704 ms
  • approximately 243 to 259 microseconds per chunk

At 168,659 chunks, the digest proof alone projects to roughly 41 to 44 seconds, before sealed publication work. The fixed 30-second deadline therefore cannot admit this valid corpus.

Steps to reproduce

  1. Run the PR feat: TraceDecay V2 delivery (PR8–PR13) + daemon performance, memory, and reliability overhaul #707 semantic recovery stack with a retained staged generation of roughly 168k chunks.
  2. Allow the retained generation to resume and finish staging.
  3. Drive final semantic publication.
  4. Observe publish_generation terminate at the graph authority deadline and semantic runtime become degraded.

Error output

semantic publication phase: publish_generation
graph authority check: deadline exceeded
runtime state: degraded
runtime reason: runtime_failure
active generation: null

Expected behavior

Daemon-owned whole-generation verification and publication should be bounded by lifecycle cancellation and a background-operation budget appropriate to the existing repository policy. Interactive graph operations should retain their short deadline.

Each independently corpus-scaled publication phase should receive a fresh authority so one full-generation pass cannot consume the budget of the next pass.

Component

Indexing / sync

Additional context

Related to #792, but not fixed by it. #792 removes the stale begin_generation blocker; this defect appears later, once that recovery succeeds and the retained generation reaches final publication.

The retained stage remains available for replay. Reproduction does not require rebuilding embeddings or creating a second generation.

Activity

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

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions