← Back to Pull requests

feat(calendar): event create, update, delete and respond (#230) #1359

Open
unknown opened this pull request with 287 lines diff across 3 files
View on GitHub
unknown unknown commented on Oct 30, 2026 23:08 UTC
Author

Builds the four owner-only calendar mutations named by the delta re-gate (https://github.com/hadron-memory/hadron-cli/issues/230#issuecomment-6535333912). The read cut (#1037) is unchanged.

Commands (hadron calendar event …, explicit --connection):

  • create --title --from --to [--all-day] [--tz] [--attendee]… [--description] [--location] [--calendar] [--no-notify] [--idempotency-key]

  • update <id> sends only the flags given; none given is refused locally (exit 2). A non-empty --attendee replaces the whole set; --clear-attendees sends [] (mutually exclusive with --attendee). An empty --title/--description/--location is sent, not omitted. No null-clear semantics are invented.

  • delete <id> uses ConfirmDeletion (--yes off a TTY, zero request otherwise). Prints {eventId, deleted:true} only when the server returns true; false/null is exit 7.

  • respond <id> --response accepted|declined|tentative (never NONE).
  • Contract points: timed = RFC3339 offset, or zone-less date-time only with --tz; all-day = YYYY-MM-DD dates; nothing guessed from the host zone. --no-notify sends notifyAttendees:false (omitted otherwise). Nothing is retried; help says to read back after a transport failure. Optional variables carry omitempty (update's attendees bound to *[]string so [] is sent and unset is omitted). Errors go through api.MapError; a null event is exit 7.

    Docs/matrix: the four gap #230 lines are now command; help and agentic-usage no longer say read-only; make help-inventory refreshed.

    Verification: go test ./..., make lint, make coverage-matrix-check green locally. New pins in internal/cmd/calendar_230_writes_test.go: exact request variables (omitted vs false/empty/list-clear), timed/all-day/ambiguous/malformed negatives with zero requests, update subset, all respond arms, idempotency pass-through, delete abort/false, FORBIDDEN and null for all four.

    Not tested: a real calendar provider or live invitation delivery (none authorized); that is the QA seat's mocked-provider leg. No schema change (snapshot already carried these fields). Leaves #230 open for CM evidence; #231 is a separate PR.

    Worker: Jack (cli-engineer), Claude Sonnet 5.5.

    🤖 Generated with Claude Code

    Diff: 287 lines (+215 / -72) across 3 files Reviewer: claude[bot] Review duration: 22m
    All Vouch review confidence checks passed
    Residual risk 0.23 = Change Risk (0.40) × (1 − Review Confidence (0.43)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.40 · 287 lines diff across 3 files
    0.40
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    42%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Shallow Review Depth shallow_review_depth
    0.344
    Diff Size diff_size
    0.339
    Real PR Conversation Timeline
    1 comments
    "Review active on #1359"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 43.0% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 39.8% (MEDIUM) · Higher = larger blast radius
    39.8%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 43.0% · Lower = rushed or shallow review
    43.0%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 22.7% · Safe to merge
    22.7%