The assigner's integration test answers the verbs' asks of the indexer's first views from the indexer's buckets (issue 1966)
The verbs ask mesh-delivery-indexer.modules and .manifests through the tool runner
since the asks moved off the indexer's state, but the test's stand-in answered every
ask {ok:true}, which is no answer: propose failed on main with 'unexpected end of
JSON input'.
Claude-Session: https://claude.ai/code/session_01NcbgfFSnn24M3GcqttoU7i
This commit is contained in:
@@ -1233,7 +1233,18 @@ func TestAProposalIsAnsweredApprovedAndWritten(t *testing.T) {
|
||||
t.Fatal("anchor in the form before was not converted")
|
||||
}
|
||||
}
|
||||
verbs := newSeatTools(bedStore{b}, func(string, any) (json.RawMessage, error) { return json.RawMessage(`{"ok":true}`), nil })
|
||||
// The verbs ask the indexer's first views of modules and manifests (ADR 0615 §1), as the tool runner answers them from the
|
||||
// indexer's buckets; every other ask the controller's, answered ok.
|
||||
verbs := newSeatTools(bedStore{b}, func(tool string, _ any) (json.RawMessage, error) {
|
||||
if state, ok := strings.CutPrefix(tool, buckets.IndexerModule+"."); ok && indexerFirstViews[state] != "" {
|
||||
a, err := views.FirstView(buckets.IndexerModule, state, bedSource{b.ctx, b.buckets[indexerFirstViews[state]]}, nil, "", time.Now())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return json.Marshal(map[string]any{"result": a})
|
||||
}
|
||||
return json.RawMessage(`{"ok":true}`), nil
|
||||
})
|
||||
propose := func() mma.Proposal {
|
||||
t.Helper()
|
||||
got, err := verbs.doPropose(map[string]any{"why": "move web", "changes": `[{"op":"take-off","node":"anchor","module":"web"},` +
|
||||
|
||||
Reference in New Issue
Block a user