Skip to content

knowledge-turso: search exhaustion after generation switches answers CONCURRENT_MODIFICATION 409, like pgvector #37597

Description

@objectstack-fleet

repo:objectstack#5 · os-bill · session_01Utp6Cb4BAjgQ43tqy1DvVJ

Filing gate: ② follow-up out of #37465 (PR #37570, seat contract record 7195078617, REWORK 7195089651 answering the zone's turso question), filed by the owning zone ai-37000 under #37465 at the seat's direction, per the maintainer's standing permission for areas to file their own follow-up cards.
Grading: area:ai · Task · p3 (seat-directed) · reach: knowledge search during rebuild on turso · evidence: read, not run.

维护者速读

  • 做什么:turso 存储在重建期间连续三次切换代次后,检索报的错和 pgvector 对齐(409 并发修改,而不是 503 服务不可用)。
  • 谁受益:调用方对两种存储收到同一种可重试错误。
  • 不做会怎样:turso 下这种情况报 503,看起来像服务挂了;功能不受影响。
  • 需要你做的:无。

What

PR #37570 makes pgvector search answer CONCURRENT_MODIFICATION 409 when it exhausts its retries across generation switches. knowledge-turso's equivalent path answers SERVICE_UNAVAILABLE 503 after three switches. The two adapters should answer the same coded error for the same condition.

Acceptance

  • turso search exhaustion after generation switches answers CONCURRENT_MODIFICATION 409, matching pgvector.
  • A test pins the turso answer; the error-status conformance check stays green (baseline rows only if it demands them).
  • No change to the retry count or to search results on the happy path.

Activity

  1. added
    area:ai
    on Nov 26, 2026
  2. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in area:ai · domain:server · Task · priority:p3 · pm:queue · size S; rationale: on turso, search exhaustion after a generation switch should answer CONCURRENT_MODIFICATION 409 as pgvector does. Read, not run; seat-directed p3.

  3. added
    domain:server
    pm:queue
    on Nov 26, 2026
  4. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#1 · os-elon-musk · session_016WV4cwPhGV4g9p1BGQaZbP

    Claim: PM loop round 1 · area o1-C (epic #37000 follow-ups, handed over by repo:objectstack#5 in mailbox #37561 knock 7206533010, ledger #37000 comment 7206523866) · 2026-11-27T00:43Z
    Session: session_016WV4cwPhGV4g9p1BGQaZbP
    Account: os-elon-musk
    Branch: claude/area-o1C-37597
    Worktree: objectstack-issue-37597
    Domain: domain:server
    Area: o1-C
    Seat: repo:objectstack#1
    File surface: packages/plugins/knowledge-turso/src/turso-adapter.ts (the search-exhaustion branch of searchAttempt), packages/plugins/knowledge-turso/src/__tests__/acceptance.test.ts (or a new test file beside it), error-status conformance baseline rows only if that check demands them, a changeset (stop on breach; explain in the report)
    Container & model: S, mode:subagent, model: default tier (dispatch-gates --tier: "no path-derived mandate"), effort: medium (reason: review-nit follow-up aligning one coded answer with pgvector)
    Clause-②: no
    Metadata-protocol: none
    Responsibility: objectstack's own code, packages/plugins/knowledge-turso/src/turso-adapter.ts (searchAttempt exhaustion branch) | no platform path covers it (pgvector already answers 409 at pgvector-adapter.ts:514; turso does not) | every caller of knowledge search on turso while a rebuild switches generations; reachable today, low frequency
    Thread-read: 7196081018
    Premise: holds, read not yet measured — on origin/main 94843b8 turso-adapter.ts:566-570 throws notReady(...) (SERVICE_UNAVAILABLE 503) after SEARCH_ATTEMPTS switches, pinned by acceptance.test.ts:325-340; pgvector answers CONCURRENT_MODIFICATION 409 (pgvector-adapter.ts:514); the code is already in the error-code ledger (no new code).
    Serial constraints cleared: #37676 (seat 5, #37304) rewrites turso-adapter.ts (incl. :569); a probe edit of :567-569 merges cleanly with it; the dev re-runs overlap-check before every push and queues behind #37676 with Notify: serial on exit 1
    Pre-claim lane: packages/plugins/knowledge-turso/** ⇒ domain:server (file ownership only), built and L1-read in o1-C / L1-a.
    Pre-claim deps: none on the card (source #37465 closed, PR #37570 merged).
    Prior rulings read: check-prior-rulings.mjs --card 37597 --paths packages/plugins/knowledge-turso/src/turso-adapter.ts: zero ruling hits on the surface (no ruling); epic #37000 "Rulings that bound every child" apply (no new adapter-contract members).
    Fold-or-serial: not folded — #37644 is another package and mechanism.

  5. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 27, 2026
  6. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#1 · os-elon-musk · session_016WV4cwPhGV4g9p1BGQaZbP
    os-dev-report

    {
     "issue": 37597,
     "status": "done",
     "branch": "claude/area-o1C-37597",
     "pr": "https://github.com/objectstack-ai/objectstack/pull/37748",
     "session": "session_016WV4cwPhGV4g9p1BGQaZbP",
     "premise_still_valid": true,
     "summary": "turso searchAttempt's exhaustion branch (active generation switched on each of SEARCH_ATTEMPTS=3 attempts) now throws { code: CONCURRENT_MODIFICATION, status: 409 } via a module-private switchedDuringSearch helper, the envelope pgvector answers (no remedy, no retryable flag), instead of notReady (SERVICE_UNAVAILABLE 503). Premise measured on origin/main ce4d8c7d74: notReady at turso-adapter.ts:567, pinned 503 at acceptance.test.ts:325-340; pgvector 409 at pgvector-adapter.ts:514; CONCURRENT_MODIFICATION already a standard code (spec api/errors.zod.ts:96), no new code. Only the throw line changed in the branch; its two message lines are byte-identical so the diff stays mergeable with #37676 (first draft touched line 568 and overlap-check exited 1 on adjacency; reshaped, now exit 0). upsert exhaustion throws a bare Error in both turso and pgvector, so no mismatch there; unchanged.",
     "tests": "At f256b9b3b8: pnpm --filter @objectstack/knowledge-turso test -> Test Files 3 passed (3), Tests 156 passed (156); typecheck -> tsc + check:test-typecheck OK (0 files / 0 errors); lock VERDICT command-exit 0. Pin: acceptance case 'stops after three attempts' asserts { code: 'CONCURRENT_MODIFICATION', status: 409 } and n === 3, in both :memory: and file: suites. Ablation: origin/main turso-adapter.ts restored on disk (grep switchedDuringSearch = 0), vitest -t 'keeps being switched' -> 2 failed (- code CONCURRENT_MODIFICATION / + code SERVICE_UNAVAILABLE), VERDICT command-exit 1; restored from HEAD, git status clean.",
     "gates": "Local: dependency closure build (knowledge-turso^...) VERDICT command-exit 0. dispatch-gates --commands (66 families, tree f256b9b3b8): 65 exit 0, incl. check:error-status-conformance ('every derivable runtime status is documented, and every documented status is reachable'; no baseline rows needed); check:dual-build-cjs-loads exit 3 PREREQUISITE NOT MET (needs full build) = NOT MEASURED, CI runs it. --ran reconciliation exit 0: 66 accounted, 65 run, 1 NOT-MEASURED. overlap-check exit 0 (origin/main and #37676). check-nul-bytes exit 0. CI on PR head f256b9b3b8: in_progress at report time (Lint, Type Check, Check Changeset, Governed Surface Queue Guard, PR-body guards, ...).",
     "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm",
     "mcp_calls": "0",
     "api_writes": "3 — git push (branch, not REST); relay pr_create (POST pulls, plus assignees leg) via fleet-write run 45922086997; post-stamped issue comment on #37597",
     "open_questions": [],
     "security_findings": "none",
     "out_of_scope_findings": [],
     "deviations": "Dispatch said commits end with 'Co-Authored-By: Claude Opus 5.5'; the pre-push check:commit-card-trailers hook refused it (pair must be model-free, AGENTS.md/os-dev.md). The two unpublished commits were squashed with git reset --soft BASE into one commit carrying 'Co-authored-by: Claude' + Claude-Session. PR body carries both the dispatch's attribution lines and closing lines verbatim.",
     "files_changed": [
      ".changeset/37597-turso-search-switch-409.md",
      "packages/plugins/knowledge-turso/src/__tests__/acceptance.test.ts",
      "packages/plugins/knowledge-turso/src/turso-adapter.ts"
     ],
     "line_budget": "+27 / -3 across 3 files (dispatch-gates count), under 3000"
    }
  7. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#1 · os-elon-musk · session_016WV4cwPhGV4g9p1BGQaZbP

    Close-out · area o1-C · 2026-11-27T02:26Z

    Delivered by PR #37748 (merged): knowledge-turso search that loses the generation-switch race on all three attempts answers CONCURRENT_MODIFICATION 409, as pgvector does; attempt count unchanged; pinned in the acceptance suite. Nothing remains on this card; pm:dispatched removed with this comment.

  8. removed
    pm:dispatched
    on Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:aidomain:serverpriority:p3

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions