Skip to content

fix(kb): an unavailable claim registry neither masks a start error nor fails a switch status read (#19881) - #20432

Closed
mrveiss wants to merge 2 commits into
mainfrom
issue-19881-switch-claims
Closed

mrveiss wants to merge 2 commits into
mainfrom
issue-19881-switch-claims

Conversation

@mrveiss

@mrveiss mrveiss commented Nov 1, 2026

Copy link
Copy Markdown
Owner

Thinking Path

The embedding switch's lock lives in the work-claims registry, which can be unavailable. Two paths did not expect that: a failed cleanup release replaced the real start error, and a status read returned a 500.

What Changed

  • start_switch: a failed cleanup release is logged and the original error propagates. The claim expires by TTL.
  • switch_status: when the registry cannot be read, an active state keeps its value and gains lock_unknown: true. It is not reported as stale and is not a 500.
  • EmbeddingSwitchData gains lock_unknown, default false.

Verification

knowledge/embedding_switch_test.py and api/embeddings_switch_19379_test.py run locally; only these. New tests: registry down reads lock_unknown with state building, a readable registry does not report it, and a failed release leaves the start's own error with the warning logged. No real registry outage was run.

Worth reviewing:

  • _finish's releases and _heartbeat's extend still raise ClaimUnavailable. The state is already written before _finish releases, and a heartbeat failure ends the build; the issue does not ask for these, so they are unchanged.
  • No frontend reads this type's new field. api.ts was edited to the generator's format, not regenerated; the generated-types check judges that.

Model Used

Claude Opus 5.5

Closes #19881

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 3 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
Commits

Reviewing files that changed from the base of the PR and between f88cd37 and 5bdb181.

Files ignored due to path filters: 1
  • autobot-frontend/src/types/generated/api.ts is excluded by !**/generated/**
Files selected for processing: 3
  • autobot-backend/api/schemas_embeddings.py
  • autobot-backend/knowledge/embedding_switch.py
  • autobot-backend/knowledge/embedding_switch_test.py
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Notice: 29 open PRs — past the runaway threshold (25)

This is not a request to defer this PR. There is no cap on open PRs (#19397) -- nothing blocks opening or pushing a PR.

This notice only means the count is high enough to be worth a glance for a runaway — something opening PRs in a loop, or a merge pipeline that has stalled so nothing is draining.

Currently open:

If the queue is draining normally, ignore this. Otherwise:

  1. Check whether CI is dispatching at all — see the ci-dispatch-watchdog status on these PRs
  2. Approved PRs land through the merge train the coordinator sequences (merge commits, never squash) -- check the open chore(merge-train) PR is moving, not each PR on its own
  3. Look for a loop opening near-identical PRs

Warn-only runaway detector — .github/workflows/pr-queue-gate.yml. It never blocks a merge.

@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

✅ SSOT Configuration Compliance: Passing

🎉 No new hardcoded values of either class — ssot and other both block.

Known backlog in pipeline-scripts/hardcoded_values_baseline.txt is suppressed and tracked in #14371.

@mrveiss

mrveiss commented Nov 1, 2026

Copy link
Copy Markdown
Owner Author

Code review on PR #20432 (head 3ba7afc): approve. Read only. A failed release leaves the claim until its TTL, and a second start while the lock is unknown is refused server-side. Non-blocking: nothing in the UI reads lock_unknown yet. api.ts is judged by the generated-types check.

@mrveiss

mrveiss commented Nov 1, 2026

Copy link
Copy Markdown
Owner Author

Landed via the merge train (PR #20458), main 0dbb02f.

@mrveiss

mrveiss commented Nov 1, 2026

Copy link
Copy Markdown
Owner Author

Closed: 0 changed files; the content is on main via the merge train (PR #20458).

@mrveiss mrveiss closed this Nov 1, 2026
@mrveiss
mrveiss deleted the issue-19881-switch-claims branch November 1, 2026 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

phase:M1.4 Wizard and SLM: choose a mode, apply it, default models work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

kb: the embedding switch lets an unavailable claim registry mask the build error and turn switch status into a 500

1 participant