Skip to content

feat(rsvp): self-RSVP + interested commands with verified questionnaire support - #65

Merged
KalebCole merged 2 commits into
mainfrom
feat/rsvp-questionnaire-support
Jul 24, 2026
Merged

KalebCole merged 2 commits into
mainfrom
feat/rsvp-questionnaire-support

Conversation

@KalebCole

@KalebCole KalebCole commented Jul 24, 2026 •

Copy link
Copy Markdown
Owner

What

Adds guest-side RSVP to the CLI and verifies the questionnaire wire shape that was previously only guessed.

New commands

  • events rsvp / explore rsvp — going | maybe | declined (single addGuest call, status field)
  • events interested / explore interested — markEventInterest

Questionnaire support (verified live 2026-07-24)

Recon method: created a throwaway private event via the CLI, added one required short-answer question in the host UI, RSVP'd through the web app (native CDP mouse click — React ignores synthetic clicks), read the answer back off the guest record, then cancelled the event. Source of truth was __NEXT_DATA__.props.pageProps (Partiful SSR-embeds the event; there is no runtime fetch to intercept).

Location Field Shape
Event questionnaireEnabled true (key absent when no questionnaire)
Event questionnaire.questions[] { id, type:"short_answer", text, required }
Event questionnaireVersions[] append-only history
Guest questionnaireResponse { questionnaireVersion, answers: { "<questionId>": "<string>" } }

Answers are keyed by question id (epoch-ms string), not by text or index.

Implementation

  • eventRequiresQuestionnaire() — keys off questionnaireEnabled + questionnaire.questions[]; legacy field-name guesses kept only as defensive fallback
  • buildQuestionnaireResponse(event, answersByKey) — builds the verified response, accepts answers by id or text, fail-closed throw on unanswered required questions
  • buildRsvpParams() — attaches questionnaireResponse into the addGuest payload when supplied
  • Read-before-write errors (getCurrentGuest / getEventInfo) now propagate and abort the RSVP instead of silently disabling guards

Tests

187/187 passing (10 new questionnaire-shape unit tests). Includes schema registry entries, README docs, and partiful-events skill docs.

Notes

  • .gitignore adds .npmrc (keeps npm creds out of the repo)
  • Recon test event ztL5bpOhID4UfSaKOxXR was cancelled; it was private and never had guests invited

Summary by CodeRabbit

  • New Features

    • Added events rsvp and events interested commands, also available through explore.
    • Supports RSVP statuses, plus-ones, names, messages, previews, confirmations, and removing interest.
    • Added validation for ticketed and questionnaire-required events.
    • Added questionnaire answer support for eligible RSVPs.
    • Added command schema entries for the new options.
  • Documentation

    • Updated the README and Partiful skill documentation with command usage, flags, aliases, and behavioral notes.
  • Tests

    • Added coverage for RSVP, interest, validation, questionnaire handling, dry runs, aliases, and command schemas.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@coderabbitai

coderabbitai Bot commented Jul 24, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@KalebCole, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 28 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 0f5f3570-b0c5-4f8e-8ba6-1d162c87af21

📥 Commits

Reviewing files that changed from the base of the PR and between 80d5f23 and 2c35873.

📒 Files selected for processing (11)
  • .gitignore
  • README.md
  • skills/partiful-events/SKILL.md
  • src/cli.js
  • src/commands/rsvp.js
  • src/commands/schema.js
  • src/lib/rsvp.js
  • tests/rsvp-integration.test.js
  • tests/rsvp-orchestration.test.js
  • tests/rsvp.test.js
  • tests/schema-rsvp.test.js
📝 Walkthrough

Walkthrough

Adds events rsvp and events interested commands with explore aliases, authenticated Partiful API writes, RSVP validation and questionnaire guards, schema metadata, documentation, tests, and Wayfinder TypeScript-port planning records.

Changes

RSVP and interest commands

Layer / File(s) Summary
RSVP contracts and endpoint decisions
.wayfinder/BUILD-PROMPT.md, .wayfinder/tickets/*, docs/explore-command-design.md, README.md, skills/partiful-events/SKILL.md
Documents command flags, endpoint mappings, read-before-write behavior, refusal conditions, questionnaire handling, and output contracts.
Payload builders and command wiring
src/lib/rsvp.js, src/commands/rsvp.js, src/cli.js, src/commands/schema.js
Adds RSVP status normalization, payload builders, event guards, questionnaire response construction, shared command handlers, events and explore registration, and schema entries.
RSVP behavior validation
tests/rsvp*.test.js, tests/schema-rsvp.test.js
Tests payload construction, aliases, status handling, guards, questionnaire behavior, confirmation, fail-closed reads, and schema introspection.

Explore Wayfinder planning

Layer / File(s) Summary
Discovery API and filtering decisions
.wayfinder/map.md, .wayfinder/tickets/01-build-id-recon.md, .wayfinder/tickets/03-tag-filter-recon.md
Records discovery endpoints, authentication, pagination, region handling, build-id fallback, and server-side tag filtering.
Explore implementation and documentation tasks
.wayfinder/tickets/05-implement.md, .wayfinder/tickets/06-docs.md
Defines implementation, verification, skill, README, and agent-documentation tasks for Explore.

TypeScript port roadmap

Layer / File(s) Summary
TypeScript port roadmap and conventions
.wayfinder/ts-port/map.md, .wayfinder/ts-port/tickets/T2-porting-convention-doc.md
Defines migration sequencing, strict TypeScript, Zod response schemas, request types, transport categories, imports, and behavior-preservation rules.
TypeScript migration task definitions
.wayfinder/ts-port/tickets/T0-*.md, .wayfinder/ts-port/tickets/T1-*.md, .wayfinder/ts-port/tickets/T3-*.md, .wayfinder/ts-port/tickets/T4-*.md, .wayfinder/ts-port/tickets/T5-*.md, .wayfinder/ts-port/tickets/T6-*.md
Adds task specifications for branch setup, toolchain configuration, library and command migration, schema introspection, drift detection, and API smoke tests.

Repository housekeeping

Layer / File(s) Summary
Ignore local npm configuration
.gitignore
Adds .npmrc to the ignored files.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant CLI
  participant rsvpAction
  participant PartifulAPI
  CLI->>rsvpAction: invoke RSVP command
  rsvpAction->>PartifulAPI: read event and current guest
  rsvpAction->>PartifulAPI: submit addGuest mutation
  PartifulAPI-->>rsvpAction: return RSVP result
  rsvpAction-->>CLI: emit JSON output
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: self-RSVP and interested commands with questionnaire support.
Docstring Coverage ✅ Passed Docstring coverage is 83.33% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/rsvp-questionnaire-support

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 18

🧹 Nitpick comments (1)
src/commands/schema.js (1)

58-97: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Derive alias schemas from shared parameter definitions.

events.* and explore.* duplicate the same parameter objects. Reusing shared RSVP and interested parameter definitions, or asserting deep equality in tests, will prevent future flag changes from making schema metadata diverge between aliases.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/commands/schema.js` around lines 58 - 97, The events.* and explore.*
command schemas duplicate RSVP and interested parameter definitions, allowing
alias metadata to diverge. In src/commands/schema.js, extract shared parameter
definitions for the RSVP and interested commands, then reference those
definitions from events.rsvp/explore.rsvp and
events.interested/explore.interested while preserving the existing
command-specific names and behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.wayfinder/BUILD-PROMPT.md:
- Around line 24-25: The questionnaire work is incorrectly shown as unresolved
in both planning records. In .wayfinder/BUILD-PROMPT.md lines 24-25, replace the
open-unknown section with the verified questionnaire contract and implementation
reference; in .wayfinder/tickets/02-rsvp-endpoint-recon.md lines 35-39, update
the resolution heading to indicate full closure while preserving the historical
details.
- Around line 18-21: Update the documented RSVP command syntax and its
accompanying flag list in the BUILD-PROMPT command-naming section to include the
supported --name, --password, and --timezone options alongside the existing
flags. Keep the canonical events rsvp command and its explore alias
documentation consistent with the implementation and integration tests.

In @.wayfinder/map.md:
- Around line 29-33: Replace the empty (#) links in the “Auth model: always
logged in” and “Discovery is not read-only” entries with valid section anchors,
or remove the link markup and keep the labels as plain text. Ensure no empty
Markdown link remains in the document.
- Around line 29-33: Update the discovery authentication contract in
.wayfinder/map.md at lines 29-33 to state that discovery read endpoints require
valid Bearer authentication, removing the claim that they are public. Preserve
.wayfinder/tickets/01-build-id-recon.md lines 51-54 as the authoritative `{data:
...}` envelope and valid Bearer-authentication contract; no direct change is
required there.
- Around line 6-12: Synchronize Explore completion status across all affected
sites: in .wayfinder/map.md lines 6-12, do not mark Explore as shipped until
implementation, tests, verification, and documentation are complete; in
.wayfinder/tickets/05-implement.md lines 4-7, close the implementation ticket
only after implementation, tests, and verification; in
.wayfinder/tickets/06-docs.md lines 4-7, close the documentation ticket only
after skill and README updates are complete.

In @.wayfinder/tickets/05-implement.md:
- Around line 4-7: Update the ticket metadata for the Explore implementation so
its Status no longer remains open once the implementation is merged and
verified, keeping it consistent with the map’s shipped claim. Do not mark it
complete before that verification occurs.
- Around line 15-17: Rewrite the task to make getDiscoverFeed and
getDiscoverSections via src/lib/http.js the primary discovery implementation,
including region and trending data plus RSVP/interested writes through the
stable API. Describe build-ID resolution or scraping only as a fallback path,
not the main strategy, and keep all HTTP requests routed through
src/lib/http.js.

In @.wayfinder/tickets/06-docs.md:
- Around line 4-7: Update the ticket metadata so its status remains open only
while the skill and README updates are incomplete; once both documentation
changes are shipped, mark the ticket completed and align its blocked-by or map
metadata with that state.

In @.wayfinder/ts-port/map.md:
- Around line 44-48: Update the “Out of scope” transport-count statement to
align with T2 and T3: describe the repository as using three transport groups,
or explicitly clarify that the two-transport count excludes the Firebase
authentication service.

In @.wayfinder/ts-port/tickets/T1-toolchain-setup.md:
- Around line 16-18: Update the toolchain setup ticket to define the final
published CLI launcher before renaming src/cli.js: specify how bin will invoke
the TypeScript entry, using either a retained JavaScript launcher or an explicit
tsx wrapper, and document the chosen build-vs-tsx approach. Add a smoke test
that verifies the installed bin path resolves and executes successfully.

In @.wayfinder/ts-port/tickets/T3-port-lib-layer-spec.md:
- Around line 28-35: Expand the FIRST-SLICE ORACLE criteria to require
representative typed coverage for each transport: http.js, Firestore, and
Firebase Auth. Require at least one endpoint per transport, or explicit tests of
reusable transport-specific types, before approving replication across the
remaining lib files; retain the existing strict TypeScript, schema, inference,
envelope, and test requirements.

In @.wayfinder/ts-port/tickets/T5-rewire-schema-command.md:
- Around line 13-22: Update the T3/T5 plan to require an explicit runtime
endpoint registry for every spec’d API method, containing host, HTTP method,
transport, request-parameter descriptors, and response Zod schemas. Make schema
api.<method> read its endpoint metadata and schemas from this registry, while
leaving the existing schema <command> behavior unchanged.

In @.wayfinder/ts-port/tickets/T6-drift-detection-smoke-tests.md:
- Around line 12-14: Update the drift-detection requirement to forbid default
logging of raw unknown response values. When explicitly enabled by a
verbose/debug flag, log only redacted field paths, value types, and bounded
counts, ensuring sensitive vendor data such as phone numbers, user IDs, and
tokens is never emitted.
- Around line 15-18: Update the real Partiful API smoke-test plan to require a
dedicated test account and event, with explicit opt-in environment gating
matching existing integration-test conventions. Define and document a policy
that excludes destructive operations or guarantees reliable cleanup for any
test-created data, especially authenticated writes affecting RSVPs.

In `@docs/explore-command-design.md`:
- Around line 59-72: Update the `explore rsvp` refusal documentation and its
related JSON example to match `rsvpAction`: document exit 3 with type
`validation_error` for the implemented refusal guards, and remove the claim that
password-gated events are refused since `--password` is accepted and forwarded.
Align the design note with the existing README.md and SKILL.md behavior.

In `@src/commands/rsvp.js`:
- Around line 174-204: Update interestedAction to use the same confirmation gate
as rsvpAction before calling apiRequest, honoring the command’s --yes/--force
options and preserving the dry-run behavior. Reuse the existing confirmation
helper and message pattern rather than introducing a separate prompt
implementation.

In `@src/lib/rsvp.js`:
- Around line 198-229: Update buildQuestionnaireResponse to safely handle cases
where eventRequiresQuestionnaire detects legacy question fields but
event.questionnaire or event.questionnaire.questions is absent; use the
appropriate legacy question collection or convert the condition into a handled
validation error, while preserving the existing answer and
missing-required-question behavior.
- Around line 89-91: Update the count handling near plusOnes and derivedCount to
explicitly validate user-provided o.count: reject non-finite values and counts
less than or equal to zero with the existing argument-error mechanism, rather
than silently falling back or sending invalid values. Preserve derivedCount only
when count is omitted, and continue truncating valid counts before sending them
to /addGuest.

---

Nitpick comments:
In `@src/commands/schema.js`:
- Around line 58-97: The events.* and explore.* command schemas duplicate RSVP
and interested parameter definitions, allowing alias metadata to diverge. In
src/commands/schema.js, extract shared parameter definitions for the RSVP and
interested commands, then reference those definitions from
events.rsvp/explore.rsvp and events.interested/explore.interested while
preserving the existing command-specific names and behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 86c2a6ef-533d-476d-9593-619e171bbeb6

📥 Commits

Reviewing files that changed from the base of the PR and between 50feda1 and 80d5f23.

📒 Files selected for processing (29)
  • .gitignore
  • .wayfinder/BUILD-PROMPT.md
  • .wayfinder/map.md
  • .wayfinder/tickets/01-build-id-recon.md
  • .wayfinder/tickets/02-rsvp-endpoint-recon.md
  • .wayfinder/tickets/03-tag-filter-recon.md
  • .wayfinder/tickets/04-command-shape.md
  • .wayfinder/tickets/05-implement.md
  • .wayfinder/tickets/06-docs.md
  • .wayfinder/tickets/07-rsvp-going-live-capture.md
  • .wayfinder/ts-port/map.md
  • .wayfinder/ts-port/tickets/T0-rsvp-merged-branch-cut.md
  • .wayfinder/ts-port/tickets/T1-toolchain-setup.md
  • .wayfinder/ts-port/tickets/T2-porting-convention-doc.md
  • .wayfinder/ts-port/tickets/T3-port-lib-layer-spec.md
  • .wayfinder/ts-port/tickets/T4-port-commands-helpers.md
  • .wayfinder/ts-port/tickets/T5-rewire-schema-command.md
  • .wayfinder/ts-port/tickets/T6-drift-detection-smoke-tests.md
  • README.md
  • docs/explore-command-design.md
  • skills/partiful-events/SKILL.md
  • src/cli.js
  • src/commands/rsvp.js
  • src/commands/schema.js
  • src/lib/rsvp.js
  • tests/rsvp-integration.test.js
  • tests/rsvp-orchestration.test.js
  • tests/rsvp.test.js
  • tests/schema-rsvp.test.js

Comment thread .wayfinder/BUILD-PROMPT.md Outdated
Comment on lines +18 to +21
- **Command naming (DECIDED by Kaleb 2026-07-24):**
- CANONICAL: `events rsvp <id> [--status going|maybe|declined] [--plus-one NAME] [--count N] [--message TXT] [-y] [--dry-run]` -> `addGuest`
- ALIAS: `explore rsvp <id>` -> thin forward to the SAME handler.
- Same alias pattern for `events interested` / `explore interested <id> [--remove]` -> `markEventInterest`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Keep the documented RSVP flags in sync with the implementation.

The canonical syntax omits --name, --password, and --timezone, while the schema and integration tests expose/use them. Update both the usage line and flag list so future implementations do not miss supported inputs.

Also applies to: 40-40

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.wayfinder/BUILD-PROMPT.md around lines 18 - 21, Update the documented RSVP
command syntax and its accompanying flag list in the BUILD-PROMPT command-naming
section to include the supported --name, --password, and --timezone options
alongside the existing flags. Keep the canonical events rsvp command and its
explore alias documentation consistent with the implementation and integration
tests.

Comment thread .wayfinder/BUILD-PROMPT.md Outdated
Comment on lines +24 to +25
## The ONE open unknown to resolve first (recon)
How custom questionnaire answers ride inside the `addGuest` payload. Some hosts require Q&A before an RSVP submits (`getLastQuestionnaireAnswers` is the tell). This affects regular invited events too, not just discovery. Do NOT ship without handling it.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Refresh questionnaire-resolution status across the planning docs.

Both records still present the questionnaire work as open or partial even though the follow-up is documented as resolved on July 24, 2026.

  • .wayfinder/BUILD-PROMPT.md#L24-L25: replace the open-unknown section with the verified questionnaire contract and implementation reference.
  • .wayfinder/tickets/02-rsvp-endpoint-recon.md#L35-L39: change the resolution heading to reflect full closure while retaining historical details.
📍 Affects 2 files
  • .wayfinder/BUILD-PROMPT.md#L24-L25 (this comment)
  • .wayfinder/tickets/02-rsvp-endpoint-recon.md#L35-L39
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.wayfinder/BUILD-PROMPT.md around lines 24 - 25, The questionnaire work is
incorrectly shown as unresolved in both planning records. In
.wayfinder/BUILD-PROMPT.md lines 24-25, replace the open-unknown section with
the verified questionnaire contract and implementation reference; in
.wayfinder/tickets/02-rsvp-endpoint-recon.md lines 35-39, update the resolution
heading to indicate full closure while preserving the historical details.

Comment thread .wayfinder/map.md Outdated
Comment on lines +6 to +12
A shipped `partiful explore` command surfacing Partiful's public trending/discovery
events, AND the ability to **RSVP** (going) or mark **interested** on a discovered
event you were never invited to. "Shipped" = command shape, output contract,
build-id handling, and the discover write-path (RSVP/interested) all decided and
implemented in `~/repos/partiful-cli`, with skill/README docs updated.

This is an **execution-carrying** map: it ends in merged code, not just a spec.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Synchronize completion status across the map and dependent tickets.

  • .wayfinder/map.md#L6-L12: do not claim Explore is shipped until the dependent work is complete.
  • .wayfinder/tickets/05-implement.md#L4-L7: close only after implementation, tests, and verification are complete.
  • .wayfinder/tickets/06-docs.md#L4-L7: close only after the skill and README updates are complete.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~9-~9: “Discover” is a proper noun and needs to be capitalized.
Context: ...ut contract, build-id handling, and the discover write-path (RSVP/interested) all decide...

(A_GOOGLE)

📍 Affects 3 files
  • .wayfinder/map.md#L6-L12 (this comment)
  • .wayfinder/tickets/05-implement.md#L4-L7
  • .wayfinder/tickets/06-docs.md#L4-L7
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.wayfinder/map.md around lines 6 - 12, Synchronize Explore completion status
across all affected sites: in .wayfinder/map.md lines 6-12, do not mark Explore
as shipped until implementation, tests, verification, and documentation are
complete; in .wayfinder/tickets/05-implement.md lines 4-7, close the
implementation ticket only after implementation, tests, and verification; in
.wayfinder/tickets/06-docs.md lines 4-7, close the documentation ticket only
after skill and README updates are complete.

Comment thread .wayfinder/map.md Outdated
Comment on lines +29 to +33
- [Auth model: always logged in](#) — `explore` reuses the existing Firebase-token
flow via `src/lib/http.js`. No anonymous/unauthed mode. The CLI's contract is that
the user is logged in; discovery read endpoints happen to be public, but we don't
build a separate anon path.
- [Discovery is not read-only](#) — RSVP (going) and "interested" on a discovered

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Replace the empty Markdown links.

(#) is not a usable anchor and triggers MD042. Use real section anchors or plain text.

🧰 Tools
🪛 markdownlint-cli2 (0.23.0)

[warning] 29-29: No empty links

(MD042, no-empty-links)


[warning] 33-33: No empty links

(MD042, no-empty-links)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.wayfinder/map.md around lines 29 - 33, Replace the empty (#) links in the
“Auth model: always logged in” and “Discovery is not read-only” entries with
valid section anchors, or remove the link markup and keep the labels as plain
text. Ensure no empty Markdown link remains in the document.

Source: Linters/SAST tools


🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Use one authenticated discovery contract everywhere.

  • .wayfinder/map.md#L29-L33: replace the claim that discovery read endpoints are public with the required Bearer-authenticated API behavior.
  • .wayfinder/tickets/01-build-id-recon.md#L51-L54: retain this as the authoritative contract: {data: ...} envelope plus valid Bearer authentication.
🧰 Tools
🪛 markdownlint-cli2 (0.23.0)

[warning] 29-29: No empty links

(MD042, no-empty-links)


[warning] 33-33: No empty links

(MD042, no-empty-links)

📍 Affects 2 files
  • .wayfinder/map.md#L29-L33 (this comment)
  • .wayfinder/tickets/01-build-id-recon.md#L51-L54
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.wayfinder/map.md around lines 29 - 33, Update the discovery authentication
contract in .wayfinder/map.md at lines 29-33 to state that discovery read
endpoints require valid Bearer authentication, removing the claim that they are
public. Preserve .wayfinder/tickets/01-build-id-recon.md lines 51-54 as the
authoritative `{data: ...}` envelope and valid Bearer-authentication contract;
no direct change is required there.

Comment thread .wayfinder/tickets/05-implement.md Outdated
Comment on lines +4 to +7
Labels: wayfinder:task
Blocked by: COMMAND-SHAPE
Assignee: (unclaimed)
Status: open

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Keep this ticket open until the implementation is actually merged and verified.

Its open status conflicts with the map’s claim that Explore is shipped.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.wayfinder/tickets/05-implement.md around lines 4 - 7, Update the ticket
metadata for the Explore implementation so its Status no longer remains open
once the implementation is merged and verified, keeping it consistent with the
map’s shipped claim. Do not mark it complete before that verification occurs.

Comment on lines +15 to +18
- **Smoke tests:** 3–5 integration tests hitting the real Partiful API (need valid auth; gate behind
env like existing `*.integration.test.js`). When Partiful changes something, a smoke test fails
before users hit it. This IS the spec verifier.
- Decide: CI-run vs. manual (auth secrets in CI is the constraint).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

Add safety boundaries for real-API smoke tests.

The listed endpoints include authenticated writes, so smoke tests could mutate real RSVPs or other production data. Require a dedicated test account/event, explicit opt-in environment gating, and a documented policy excluding destructive operations or performing reliable cleanup.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.wayfinder/ts-port/tickets/T6-drift-detection-smoke-tests.md around lines 15
- 18, Update the real Partiful API smoke-test plan to require a dedicated test
account and event, with explicit opt-in environment gating matching existing
integration-test conventions. Define and document a policy that excludes
destructive operations or guarantees reliable cleanup for any test-created data,
especially authenticated writes affecting RSVPs.

Comment thread docs/explore-command-design.md Outdated
Comment on lines +59 to +72
### `explore rsvp <eventId>`
```
partiful explore rsvp <eventId> [options]

--status <s> going | maybe | declined (default: going)
--plus-one <name> Add a named plus-one (repeatable)
--count <n> Total headcount incl. yourself + plus-ones (default: 1)
--message <msg> Public comment posted on the event page
-y, --yes Skip the confirmation prompt (agent flows)
--dry-run Print the payload, don't write

Refuses (exit 4, type unsupported_event) on ticketed / password-gated /
questionnaire events — use the Partiful app for those.
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Refusal contract here doesn't match the shipped implementation.

This note documents exit 4, type: unsupported_event for ticketed/password-gated/questionnaire refusals (also shown in the JSON example at Line 143-147), but rsvpAction actually returns exit 3, type: validation_error for both guards, and never refuses password-gated events at all (it accepts --password and forwards it). README.md and SKILL.md correctly document the exit-3 behavior — this design note is now stale relative to the code in this same PR.

📝 Suggested doc fix
-  Refuses (exit 4, type unsupported_event) on ticketed / password-gated /
-  questionnaire events — use the Partiful app for those.
+  Refuses (exit 3, type validation_error) on ticketed / questionnaire events —
+  use the Partiful app for those. Password-gated events are supported via
+  --password, not refused.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
### `explore rsvp <eventId>`
```
partiful explore rsvp <eventId> [options]
--status <s> going | maybe | declined (default: going)
--plus-one <name> Add a named plus-one (repeatable)
--count <n> Total headcount incl. yourself + plus-ones (default: 1)
--message <msg> Public comment posted on the event page
-y, --yes Skip the confirmation prompt (agent flows)
--dry-run Print the payload, don't write
Refuses (exit 4, type unsupported_event) on ticketed / password-gated /
questionnaire events — use the Partiful app for those.
```
🧰 Tools
🪛 markdownlint-cli2 (0.23.0)

[warning] 60-60: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/explore-command-design.md` around lines 59 - 72, Update the `explore
rsvp` refusal documentation and its related JSON example to match `rsvpAction`:
document exit 3 with type `validation_error` for the implemented refusal guards,
and remove the claim that password-gated events are refused since `--password`
is accepted and forwarded. Align the design note with the existing README.md and
SKILL.md behavior.

Comment thread src/commands/rsvp.js
Comment on lines +174 to +204
/**
* Shared interest handler. Backs `events interested` and `explore interested`.
*/
async function interestedAction(eventId, opts, cmd) {
const globalOpts = cmd.optsWithGlobals();
try {
const config = loadConfig();
const token = await getValidToken(config);

const interested = !opts.remove;
// No confirmation gate here: marking interest is non-destructive and easily
// reversible via --remove, unlike an RSVP write to a host's guest list.
const params = buildInterestParams({ eventId, interested });
const payload = makePayload(config, params);

if (globalOpts.dryRun) {
jsonOutput({ dryRun: true, endpoint: '/markEventInterest', payload });
return;
}

await apiRequest('POST', '/markEventInterest', token, payload, globalOpts.verbose);

jsonOutput({
eventId,
interested,
url: `https://partiful.com/e/${eventId}`,
});
} catch (e) {
handleError(e);
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

interestedAction skips the confirmation gate that the command-shape ticket requires for it.

Ticket 04 (.wayfinder/tickets/04-command-shape.md, Line 41-42) explicitly decided the confirmation gate applies to both rsvp and interested because both "write to a real host's guest list." Here, interestedAction never prompts regardless of --yes/--force, unlike rsvpAction's gate at Line 148-156. This also runs against the path guideline for this directory.

As per path instructions, src/commands/**/*.js: "Do not skip confirmation on destructive actions without explicit user consent."

🔒 Suggested fix
     const interested = !opts.remove;
-    // No confirmation gate here: marking interest is non-destructive and easily
-    // reversible via --remove, unlike an RSVP write to a host's guest list.
     const params = buildInterestParams({ eventId, interested });
     const payload = makePayload(config, params);

     if (globalOpts.dryRun) {
       jsonOutput({ dryRun: true, endpoint: '/markEventInterest', payload });
       return;
     }

+    if (!globalOpts.yes && !globalOpts.force) {
+      const verb = interested ? 'mark yourself interested in' : 'remove your interest in';
+      const confirmed = await confirm(`About to ${verb} "${eventId}". Continue?`);
+      if (!confirmed) {
+        jsonOutput({ interested: false, message: 'Aborted by user' });
+        return;
+      }
+    }
+
     await apiRequest('POST', '/markEventInterest', token, payload, globalOpts.verbose);
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
/**
* Shared interest handler. Backs `events interested` and `explore interested`.
*/
async function interestedAction(eventId, opts, cmd) {
const globalOpts = cmd.optsWithGlobals();
try {
const config = loadConfig();
const token = await getValidToken(config);
const interested = !opts.remove;
// No confirmation gate here: marking interest is non-destructive and easily
// reversible via --remove, unlike an RSVP write to a host's guest list.
const params = buildInterestParams({ eventId, interested });
const payload = makePayload(config, params);
if (globalOpts.dryRun) {
jsonOutput({ dryRun: true, endpoint: '/markEventInterest', payload });
return;
}
await apiRequest('POST', '/markEventInterest', token, payload, globalOpts.verbose);
jsonOutput({
eventId,
interested,
url: `https://partiful.com/e/${eventId}`,
});
} catch (e) {
handleError(e);
}
}
/**
* Shared interest handler. Backs `events interested` and `explore interested`.
*/
async function interestedAction(eventId, opts, cmd) {
const globalOpts = cmd.optsWithGlobals();
try {
const config = loadConfig();
const token = await getValidToken(config);
const interested = !opts.remove;
const params = buildInterestParams({ eventId, interested });
const payload = makePayload(config, params);
if (globalOpts.dryRun) {
jsonOutput({ dryRun: true, endpoint: '/markEventInterest', payload });
return;
}
if (!globalOpts.yes && !globalOpts.force) {
const verb = interested ? 'mark yourself interested in' : 'remove your interest in';
const confirmed = await confirm(`About to ${verb} "${eventId}". Continue?`);
if (!confirmed) {
jsonOutput({ interested: false, message: 'Aborted by user' });
return;
}
}
await apiRequest('POST', '/markEventInterest', token, payload, globalOpts.verbose);
jsonOutput({
eventId,
interested,
url: `https://partiful.com/e/${eventId}`,
});
} catch (e) {
handleError(e);
}
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/commands/rsvp.js` around lines 174 - 204, Update interestedAction to use
the same confirmation gate as rsvpAction before calling apiRequest, honoring the
command’s --yes/--force options and preserving the dry-run behavior. Reuse the
existing confirmation helper and message pattern rather than introducing a
separate prompt implementation.

Source: Path instructions

Comment thread src/lib/rsvp.js Resolved
Comment thread src/lib/rsvp.js Resolved
…nnaire support

Adds `events rsvp` / `explore rsvp` (going|maybe|declined via addGuest) and
`events interested` / `explore interested` (markEventInterest), backed by pure,
unit-tested builders in src/lib/rsvp.js.

Questionnaire handling is now verified against the live wire shape (host-side
recon on a throwaway event, 2026-07-24):
- event.questionnaireEnabled + event.questionnaire.questions[{id,type,text,required}]
- guest.questionnaireResponse = { questionnaireVersion, answers: { "<questionId>": val } }
  (answers keyed by question id, not text/index)

- eventRequiresQuestionnaire() keys off the verified fields (legacy guesses kept
  as defensive fallback)
- buildQuestionnaireResponse() builds the response, accepts answers by id or text,
  fail-closed throw on unanswered required questions
- buildRsvpParams() attaches questionnaireResponse into the addGuest payload

Fail-closed error handling on read-before-write (getCurrentGuest/getEventInfo
errors abort the RSVP rather than silently disabling guards).

187/187 tests passing. Includes schema entries, README + partiful-events skill docs.
@KalebCole
KalebCole force-pushed the feat/rsvp-questionnaire-support branch from 80d5f23 to 57a86ad Compare July 24, 2026 21:12

@KalebCole KalebCole left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review — PR #65 (self-RSVP + interested commands)\n\nVerdict: Comment — 2 real correctness issues to address, 1 design choice affirmed. Tests are green (187/187 locally). CodeRabbit's other 15 comments targeted .wayfinder/ planning docs that were subsequently stripped from this PR and are moot.\n\n### 🔴 Fix before merge\n- src/lib/rsvp.js:200 — buildQuestionnaireResponse can throw a raw TypeError when the legacy-questionnaire fallback path is taken but event.questionnaire is absent.\n\n### ⚠️ Fix before merge\n- src/lib/rsvp.js:91 — --count accepts 0, negatives, and silently swallows non-numeric input; needs explicit validation.\n\n### ✅ Affirmed (no change)\n- src/commands/rsvp.js:185 — intentional lack of confirmation gate on the reversible interest toggle is the right call.\n\n### ✅ Looks good\n- Clean separation: pure builders/guards in lib, all network in the command layer.\n- Fail-closed read-before-write correctly avoids duplicate guest records.\n- Strong test coverage across unit + integration + orchestration + schema.\n\n---\nReviewed by Hermes Agent (delegated review)

Comment thread src/lib/rsvp.js Outdated

const plusOnes = Array.isArray(o.plusOnes) ? o.plusOnes.filter(Boolean) : [];
const derivedCount = 1 + plusOnes.length;
const count = Number.isFinite(o.count) ? Math.trunc(o.count) : derivedCount;

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Input validation gap: --count isn't validated. Number.isFinite(o.count) accepts 0 and negative values, so --count 0 or --count -3 is truncated and sent to /addGuest as-is. Non-numeric input (parseInt→NaN) silently falls back to derivedCount, masking user error. Recommend: reject non-finite OR <= 0 counts with a PartifulError('validation_error', exit 3), preserving derivedCount only when --count is omitted.

Comment thread src/lib/rsvp.js Outdated
*/
export function buildQuestionnaireResponse(event, answersByKey = {}) {
if (!eventRequiresQuestionnaire(event)) return null;
const questions = event.questionnaire.questions;

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Potential crash: const questions = event.questionnaire.questions assumes event.questionnaire exists, but eventRequiresQuestionnaire() can return true via the LEGACY field-name fallback (line 181: event.questions / event.rsvpQuestions / event.customQuestions) when event.questionnaire is entirely absent. That path reaches line 200 and throws TypeError: Cannot read properties of undefined (reading 'questions'). Recommend: resolve the question list defensively — prefer event.questionnaire?.questions, fall back to the matched legacy collection, else throw a handled validation_error rather than a raw TypeError.

Comment thread src/commands/rsvp.js

const interested = !opts.remove;
// No confirmation gate here: marking interest is non-destructive and easily
// reversible via --remove, unlike an RSVP write to a host's guest list.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Acknowledging the design choice (no change requested): CodeRabbit flagged the absence of a --yes/--force confirmation gate on interestedAction. The inline rationale here (non-destructive, reversible via --remove, unlike an RSVP write to a host's guest list) is sound — a confirmation prompt on a reversible interest toggle adds friction without safety benefit. Documenting that we reviewed and intentionally retained this behavior.

- reject non-finite/<=0 --count instead of silently sending or falling back
- resolve questionnaire questions defensively so the legacy fallback path
  can't throw a raw TypeError when event.questionnaire is absent
Addresses code review on PR #65.
@KalebCole
KalebCole merged commit ad7be30 into main Jul 24, 2026
1 check passed
@KalebCole
KalebCole deleted the feat/rsvp-questionnaire-support branch July 24, 2026 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant