fix(gate): ensure add-waiter command functions (#1265)

* fix(gate): use GateWait RPC for add-waiter command

bd gate add-waiter was calling Update RPC which rejects waiters
field (not in allowedUpdateFields). Changed to use existing GateWait
RPC that handles waiters correctly.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(storage): allow waiters field in UpdateIssue

Add waiters to allowedUpdateFields whitelist and handle JSON
serialization for the array field. This enables bd gate add-waiter
to work in direct mode (--no-daemon).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(storage/dolt): allow waiters field in UpdateIssue

Mirror the SQLite fix: add waiters to allowed fields and handle JSON
serialization for the array field.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Eduardo Koloma Jr
2026-01-25 02:10:12 +01:00
committed by GitHub
parent dbd505656d
commit 8fab565f35
3 changed files with 22 additions and 6 deletions

View File

@@ -261,11 +261,12 @@ This is used by 'gt done --phase-complete' to register for gate wake notificatio
// Update the gate
if daemonClient != nil {
updateArgs := &rpc.UpdateArgs{
// Use GateWait RPC which handles waiters correctly (bypasses allowedUpdateFields)
gateWaitArgs := &rpc.GateWaitArgs{
ID: gateID,
Waiters: newWaiters,
Waiters: []string{waiter}, // GateWait handles deduplication internally
}
resp, uerr := daemonClient.Update(updateArgs)
resp, uerr := daemonClient.GateWait(gateWaitArgs)
if uerr != nil {
fmt.Fprintf(os.Stderr, "Error: %v\n", uerr)
os.Exit(1)