Repository navigation
Description
Explicit empty attendee clearing works after #1273. A nonblank value that contains no attendee, such as --attendees=';optional', also takes that clear path. A typo can therefore become a request to remove the current attendee list.
At current main e8428c36dd31db13eecba55fcef6f4ee75951188 (after v0.48.0), applyUpdateAttendees calls buildAttendees, then force-sends an empty attendee list whenever parsing yields none. parseAttendee discards ;optional because the address before the semicolon is empty.
Credential-free reproduction from that checkout (no Google call):
cat > internal/cmd/attendee_clear_probe_test.go <<'GO'
package cmd
import (
"encoding/json"
"io"
"testing"
"github.com/alecthomas/kong"
)
func TestAttendeeClearProbe(t *testing.T) {
c := &CalendarUpdateCmd{}
parser, err := kong.New(c, kong.Writers(io.Discard, io.Discard))
if err != nil { t.Fatal(err) }
parsed, err := parser.Parse([]string{"primary", "synthetic-event", "--attendees=;optional"})
if err != nil { t.Fatal(err) }
patch, changed, err := buildCalendarUpdatePatch(calendarUpdateInputFromCommand(c), calendarUpdateFieldsFromKong(parsed))
if err != nil { t.Fatal(err) }
wire, err := json.Marshal(patch)
if err != nil { t.Fatal(err) }
t.Logf("changed=%v patch=%s", changed, wire)
if string(wire) == `{"attendees":[]}` {
t.Fatal("nonblank malformed attendee input became a clear patch")
}
}
GO
DBUS_SESSION_BUS_ADDRESS=disabled: GOG_KEYRING_BACKEND=file go test -vet=off -count=1 ./internal/cmd -run '^TestAttendeeClearProbe$' -v
rm internal/cmd/attendee_clear_probe_test.goObserved by running the probe at that upstream commit: changed=true patch={"attendees":[]}; the regression assertion fails. Expected: reject a nonblank value that parses to no attendees; keep explicit empty or whitespace-only clearing working. No live Calendar mutation is needed to demonstrate the malformed patch.
Related open PR #1181 adds validation for its new MCP literal-attendee arrays. Its shared CLI patch builder still force-sends an empty list when legacy --attendees parsing yields nobody, so this report concerns the existing CLI path. This PR-head assessment is from source review, not an executed PR-head test.
Would you like a small standalone fix for this? We have a downstream guard that distinguishes deliberate empty input from nonblank input that parses to nobody.
Investigated and reproduced with AI assistance (the Astrarch agent team); the reproduction was verified on a real host.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon Nov 11, 2026
Codex review: this still needs some work.
Summary
Keep open: current main and v0.48.0 convert malformed nonblank attendee input into an explicit attendee-clear patch, and no open fix owns this defect.
Reproducibility: yes. through current source: --attendees=';optional' is present, parses to zero attendees, and triggers forced empty-array serialization; the reporter supplies a failing probe, which this read-only review did not execute.
Regression provenance
Possible regression — suspected (reviewed change). No predecessor PR is attributed.
Next step
Add an attendee-update validation guard and establish a failing regression for modifier-only input while retaining empty and whitespace-only clears.
Review details
Best possible solution:
Reject nonblank replacement input that yields zero attendees before mutation, preserving omitted flags, deliberate clears, and valid attendee modifiers.
Do we have a high-confidence way to reproduce the issue?
Yes, through current source: --attendees=';optional' is present, parses to zero attendees, and triggers forced empty-array serialization; the reporter supplies a failing probe, which this read-only review did not execute.
Is this the best way to solve the issue?
A guard in the shared update patch builder is a focused repair because it can return a usage error before mutation while retaining the tested empty-clear contract.
AGENTS.md: found and applied where relevant.
Codex review notes: model internal, reasoning medium; reviewed against e8428c36dd31.
Label changes
Label changes:
P2: A narrow malformed CLI input can produce a destructive Calendar update, but no widespread incident or urgent workflow outage is established.impact:data-loss: A modifier-only typo produces a patch that removes the existing attendee list.issue-rating: 🦞 diamond lobster: Current issue advisory state selects this label.clawsweeper:source-repro: Current issue advisory state selects this label.clawsweeper:queueable-fix: Current issue advisory state selects this label.clawsweeper:fix-shape-clear: Current issue advisory state selects this label.Label justifications:
P2: A narrow malformed CLI input can produce a destructive Calendar update, but no widespread incident or urgent workflow outage is established.impact:data-loss: A modifier-only typo produces a patch that removes the existing attendee list.Evidence reviewed
Acceptance criteria:
What I checked:
internal/cmd/calendar_update_patch_plan.go:174, e8428c36dd31)internal/cmd/calendar_attendees.go:60, e8428c36dd31)internal/cmd/calendar_edit.go:332, e8428c36dd31)internal/cmd/calendar_clear_fields_test.go:11, e8428c36dd31)internal/cmd/calendar_update_patch_plan.go:181, 8c5c062ad9f8)internal/cmd/calendar_update_patch_plan.go:174, f939ed37151a)How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.Reviewed November 11, 2026, 2:54 PM ET / 19:54 UTC.
fix: preserve workspace request and output contracts
steipete commentedon Nov 14, 2026
Fixed in #1336. Malformed nonblank attendees now fail before PATCH, while explicit empty or whitespace input still clears attendees.
The regression failed against the previous main and passes with the fix. Full
make ci, independent P0–P2 review, and exact-head GitHub CI passed. A built CLI also verified the outgoing request against a synthetic HTTP endpoint.