Conversation
…ytefolk#174) The index-generation endpoints hard-coded execution_wired=true and exposed create/activate mutations, but no worker executor claims targets and search does not route generation vectors. Builds entered a permanently stuck building state, and empty-workspace builds could activate with zero vectors. - Change execution_wired to false in all API responses - Return 503 execution_unavailable from create and activate handlers - Add ErrExecutionUnavailable sentinel error - Align docs/INDEX_GENERATIONS.md with actual routes and behavior - Add tests asserting flag matches capability and mutations are blocked
sun-970
requested review from
Bindy-lbb,
PeterGuy326 and
waterbro-8
as code owners
September 8, 2026 05:39
5 tasks
修复已完成(本地验证全绿)对应 #174 index generation 执行器未接入。 改动:
验证:
未推送原因本 PR 的 head repo 是 其他待办(未动)
|
PeterGuy326
requested changes
Sep 9, 2026
PeterGuy326
left a comment
Collaborator
There was a problem hiding this comment.
Gate decision
REQUEST CHANGES on current head c58a31f1a0d80f020fb673929e29f2421eac3b93.
The exact head fails its own Go test suite. Reproduction from server/:
go test ./...
--- FAIL: TestIndexGenerationMutationHandlers
create: code = <nil>, want execution_unavailable
activate_blocked: code = <nil>, want execution_unavailable
FAIL github.com/PeterGuy326/mem/server/internal/api
This is in the acceptance tests that this PR claims to align. Please make the handler and test fixture agree on the disabled-execution contract, rerun go test ./..., and attach the green exact-head CI result. The focused code paths passing is not enough while the repository suite is red.
writeError puts the code under "error", not "code". The test was checking response["code"] which is always nil.
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
execution_wiredfromtruetofalsein all index-generation API responses, reflecting that no worker executor claims targets and search does not route generation vectorsexecution_unavailablefrom create and activate endpoints, preventing builds from entering a permanently stuckbuildingstate and preventing empty-workspace activation with zero vectorsdocs/INDEX_GENERATIONS.mdwith the actual routes and behaviorFixes #174
Changes
server/internal/indexgeneration/types.goErrExecutionUnavailablesentinel errorserver/internal/api/handlers_index_generations.goexecution_wired: false; block create and activate with 503server/internal/api/handlers_index_generations_test.goTestExecutionWiredFlagMatchesCapabilitydocs/INDEX_GENERATIONS.mdexecution_unavailableguards, and honest flagResolution chosen
Smallest (per #174 scope boundary): make the flag honest, block stuck/empty-activation states, align docs. The full worker executor is deferred to a follow-up issue.
Acceptance criteria from #174
execution_wiredcannot report a state the server does not honor:TestExecutionWiredFlagMatchesCapabilityasserts the flag isfalseand that create/activate are blockeddocs/INDEX_GENERATIONS.mdmatches the routes that existTest plan
go vetpasses onindexgenerationpackagegofmtpasses on modified handler and test filesmemory.ListRelationsResultcompile error inapi.gois unrelated to this change)