Skip to content

docs(contract): propose event and contact read evidence (#164, #165) - #180

Merged
KalebCole merged 8 commits into
mainfrom
spec/164-165-read-evidence
Aug 12, 2026
Merged

KalebCole merged 8 commits into
mainfrom
spec/164-165-read-evidence

Conversation

@KalebCole

@KalebCole KalebCole commented Aug 11, 2026 •

Copy link
Copy Markdown
Owner

Summary

Exact evidence

Event and guest reads

  • Upcoming and past event lists returned HTTP 200 at result.data.upcomingEvents and result.data.pastEvents, with 35 and 294 items.
  • Immediate repeats had the same counts, identity sequences, and identity sets, with no observed duplicate identity.
  • getEventInfo returned HTTP 200 for one selected readable event, including while signed out.
  • A synthetic missing event returned HTTP 404 with NOT_FOUND.
  • getCurrentGuest returned HTTP 200 for the selected event.
  • The selected Firestore guest document returned HTTP 200, matched the callable guest identity, and had equal guest status.
  • Firestore event reads returned HTTP 403 with PERMISSION_DENIED for both the selected readable ID and a synthetic ID.
  • No inaccessible-event permission probe was available.

Contact reads

  • Two authenticated traversals each returned 2,451 contacts in pages of 1000, 1000, and 451, followed by an empty terminal sentinel.
  • Data pages had string nextCursor values; the terminal response omitted nextCursor.
  • Both traversals had the same identity sequence and set, with no observed duplicate identity.
  • Every observed contact had string private identity and name fields plus a nonnegative integer shared-event count.
  • Signed-out getContacts returned HTTP 401 with UNAUTHENTICATED.
  • Current first-party public assets establish sibling params/paging, maxResults: 1000, sequential cursor traversal, and local name filtering.

Remaining unknowns and implementation gates

  • Implement event reads in Go #164 still needs reviewed product mappings for event state, full role and RSVP projection, list-field completeness, list failure behavior, and a safe permission/not-found distinction for inaccessible events. List ordering, limits, pagination, and snapshot behavior remain unknown. Current-guest null/alternate variants and Firestore event success/not-found/attendee behavior also remain unknown.
  • Implement contacts and private resolution in Go #165 still needs a reviewed safe bound for future complete-catalog traversal and mappings for unsupported failures. Invalid cursors, cursor lifetime/reuse, backend ordering, snapshot behavior, useAuthUser, rate limiting, future completeness, and duplicates outside the two traversals remain unknown. Local ambiguity behavior still needs synthetic fixture coverage during implementation.
  • Owner review and merge of this proposed contract revision are required before either Go slice can use it as authority.

Privacy

The committed artifact contains only allowlisted HTTP metadata, normalized paths and types, counts, equality facts, and stable error codes. It contains no raw private values, credentials, identities, names, event IDs, contact details, phone numbers, email addresses, or tokens.

Validation

  • TZ=America/Los_Angeles npm test -- --run tests/remote-api-contract.test.js tests/drift.test.js — 34 passed
  • TZ=America/Los_Angeles npm test -- --exclude='tests/*-integration.test.js' --exclude='tests/smoke-real-api.test.js' — 290 passed; no live tests run
  • npm run typecheck — passed
  • go test -race ./... — passed
  • go vet ./... — passed
  • go build ./... — passed
  • go mod verify — passed
  • git diff --check origin/main...HEAD — passed
  • Repository PII guard on the sanitized artifact, evidence notes, OpenAPI contract, and evidence ledger — passed

Related to #164 and #165. Do not merge until independent review is complete.

Summary by CodeRabbit

  • Documentation

    • Updated the remote API contract to proposed revision 2026-08-11.5.
    • Added evidence for event, guest, contact, and Firestore reads, including authentication, pagination, filtering, and known limitations.
    • Added research notes covering contact pagination and authenticated read behavior.
    • Clarified implementation-gate requirements for observed and unknown response mappings.
  • API Reference

    • Expanded documented success and error responses and added structured schemas.
    • Documented contact paging requirements and authentication options.
  • Tests

    • Added validation for response behavior, pagination, privacy redaction, and contract evidence.

@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 Aug 11, 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: 55 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

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: 9cde1928-ba43-4f22-b398-e00d97a8038c

📥 Commits

Reviewing files that changed from the base of the PR and between 48a5754 and 1b129cb.

📒 Files selected for processing (6)
  • docs/REMOTE-API-CONTRACT.md
  • docs/research/2026-08-10-partiful-api-contract-evidence-ledger.md
  • docs/research/2026-08-11-contacts-pagination-public-assets.md
  • spec/partiful.api-evidence.json
  • spec/partiful.openapi.json
  • tests/remote-api-contract.test.js
📝 Walkthrough

Walkthrough

The proposed remote API contract advances to revision 2026-08-11.5. Documentation records read observations for event, guest, Firestore, and contact operations. The OpenAPI snapshot and contract tests now represent observed response shapes, statuses, errors, pagination, provenance, and privacy constraints.

Changes

Remote contract revision

Layer / File(s) Summary
Evidence and contract documentation
docs/CLI-PRODUCT-CONTRACT.md, docs/REMOTE-API-CONTRACT.md, docs/research/*
The documents identify proposed revision 2026-08-11.5 and record event, guest, Firestore, and contact read behavior, pagination, authentication outcomes, privacy limits, and remaining unknowns.
Observed OpenAPI operations and schemas
spec/partiful.openapi.json
The OpenAPI snapshot adds structured responses, paging inputs, authentication and permission errors, and schemas for event, guest, Firestore, homepage, and contact data.
Evidence and contract validation
tests/remote-api-contract.test.js
Tests validate redacted evidence, revision metadata, response statuses and shapes, provenance, pagination, privacy redaction, and explicit unknown mappings.

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

Possibly related issues

Possibly related PRs

  • KalebCole/partiful-cli#156: Introduced the shared remote API contract artifacts, evidence ledger, OpenAPI specification, and contract tests.
  • KalebCole/partiful-cli#176: Extended the same remote API evidence and OpenAPI coverage for authenticated operations.
  • KalebCole/partiful-cli#179: Updated the same contract, evidence ledger, OpenAPI snapshot, and contract tests before this revision.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely identifies the proposed contract changes for event and contact read evidence.
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 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch spec/164-165-read-evidence

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.

@github-actions

github-actions Bot commented Aug 11, 2026 •

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-08-12 00:53 UTC

@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: 1

🤖 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 `@spec/partiful.openapi.json`:
- Around line 2708-2715: Update spec/partiful.openapi.json so currentGuest is
required and uses only the exact CurrentGuest schema reference, removing the
permissive {} anyOf branch. Update tests/remote-api-contract.test.js to assert
both the required currentGuest field and its exact CurrentGuest reference.
🪄 Autofix

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: c66077f1-3a68-47e3-a25c-ccbfd47f8ad9

📥 Commits

Reviewing files that changed from the base of the PR and between 162cbe5 and 6a8b694.

📒 Files selected for processing (10)
  • docs/CLI-PRODUCT-CONTRACT.md
  • docs/REMOTE-API-CONTRACT.md
  • docs/research/2026-08-10-contract-evidence-sources.md
  • docs/research/2026-08-10-partiful-api-contract-evidence-ledger.md
  • docs/research/2026-08-11-contacts-pagination-public-assets.md
  • docs/research/2026-08-11-event-contacts-read-observation.md
  • spec/partiful.api-evidence.json
  • spec/partiful.openapi.json
  • spec/research/read-evidence-redacted-20260811.json
  • tests/remote-api-contract.test.js

Comment thread spec/partiful.openapi.json Resolved
@KalebCole

Copy link
Copy Markdown
Owner Author

Independent review cycle 1 found 2 Standards and 2 Spec blockers. Required fixes: remove universal anonymous getEventInfo security, close empty-security provenance gaps, add contact dedup/rate-limit/future-completeness machine facts, make aggregate privacy validation strict, and correct observed-200 versus typed-body inventory. Revision remains proposed.

@KalebCole

Copy link
Copy Markdown
Owner Author

Review cycle 1 resolved

Fixed in 49a7d36:

  • getEventInfo is bearer-only in the normative OpenAPI security contract. The one selected signed-out success remains only in evidence metadata and the human evidence ledger.
  • Material-claim enumeration now exposes empty {} security alternatives, with a regression test proving that they cannot bypass provenance review.
  • The machine ledger now records first-party client deduplication by contact id with the first occurrence winning. It separately keeps rate limiting, future catalog completeness, server duplicate behavior, and server ordering behavior explicit unknowns.
  • Aggregate privacy validation now strictly walks every aggregate key and scalar value against an exact allowlist. Mutation tests reject unknown name/ID keys and arbitrary values.
  • The inventory now distinguishes 12 observed HTTP 200 statuses from 11 typed 200 bodies; the send-code body remains unclaimed.

The contract remains proposed and is not owner-reviewed.

Validation: targeted contract/drift 36 passed; full non-live JS 292 passed; TypeScript typecheck, Go race tests, vet, build, module verification, diff check, repository PII guard, and focused strict privacy guard passed. One initial concurrent full-suite run timed out an unchanged skill test; its isolated retry and the serial full-suite rerun passed.

@KalebCole

Copy link
Copy Markdown
Owner Author

Independent review cycle 2: two blockers remain. The proposal must leave the approved/shipped CLI product revision at .4, and one selected EventInfo/CurrentGuest sample must not become operation-wide required/null-only constraints. The resumer is widening/scoping those claims test-first; .5 remains proposed.

@KalebCole

Copy link
Copy Markdown
Owner Author

Review cycle 2 blockers are fixed in 79498e06ef31e1f5db8b99cc534b41cd5c6adc06.

  • Restored the approved CLI product contract and shipped Go revision to 2026-08-11.4; the separate remote proposal remains 2026-08-11.5 with status proposed.
  • Removed operation-wide required-field claims from EventInfo and CurrentGuest.
  • Kept only evidence-supported optional event unions (endDate string/null and image object/null); selected-only description, visibility, count, plusOnes, and userId variants remain unconstrained.
  • Added machine and human single-sample limitations, explicit plus-one uncertainty, exact provenance checks, and the revised 1,232 material-claim inventory.

Validation: targeted contract/drift 36/36; full non-live JS 292/292 under TZ=America/Los_Angeles; TypeScript typecheck; go test -race ./...; go vet ./...; go build ./...; go mod verify; diff checks; staged PII guard; focused strict privacy guard. All passed. No live API or credential access occurred.

Remaining gate: independent owner review and merge of proposed remote revision .5, followed by S3/S4 implementation and the shipped internal/app.RemoteContractRevision bump. This PR is not marked owner-reviewed and was not merged.

@KalebCole

Copy link
Copy Markdown
Owner Author

Final Spec blocker is fixed in 48a5754fa0e812988b7ec7b89354db3c4774feb0.

  • Removed only the top-level type: "object" constraints from EventInfo and CurrentGuest.
  • Retained observed property schemas as conditional object properties without claiming all success variants are objects.
  • Removed both obsolete machine-ledger type claims, updated human ledgers, and aligned the audited inventory at 1,230 material claims.
  • Added semantic assertions that neither component imposes an operation-wide top-level type and that neither obsolete provenance claim remains.

Validation passed: red/green focused test; targeted contract/drift 36/36; full non-live JS 292/292 under TZ=America/Los_Angeles; TypeScript typecheck; Go race/vet/build/mod verification; diff checks; focused strict privacy test; and full-file PII scans for every changed contract/evidence file. No live API or credential access occurred.

The proposal remains .5 with status proposed. No merge, approval, or owner-reviewed status change occurred.

@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: 1

🤖 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 `@docs/research/2026-08-11-contacts-pagination-public-assets.md`:
- Line 148: Update the phrase in the list to “status or error-body mappings for
unsupported cases” so it clearly refers to mappings associated with unsupported
cases, not unsupported mappings.
🪄 Autofix

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: ac871eab-3d32-4ae5-a951-58edafeda359

📥 Commits

Reviewing files that changed from the base of the PR and between 6a8b694 and 48a5754.

📒 Files selected for processing (9)
  • docs/CLI-PRODUCT-CONTRACT.md
  • docs/REMOTE-API-CONTRACT.md
  • docs/research/2026-08-10-contract-evidence-sources.md
  • docs/research/2026-08-10-partiful-api-contract-evidence-ledger.md
  • docs/research/2026-08-11-contacts-pagination-public-assets.md
  • docs/research/2026-08-11-event-contacts-read-observation.md
  • spec/partiful.api-evidence.json
  • spec/partiful.openapi.json
  • tests/remote-api-contract.test.js
🚧 Files skipped from review as they are similar to previous changes (3)
  • docs/research/2026-08-10-contract-evidence-sources.md
  • docs/REMOTE-API-CONTRACT.md
  • spec/partiful.openapi.json

- cursor lifetime, reuse, and invalid-cursor behavior;
- the backend ordering key and snapshot behavior;
- the behavior of `useAuthUser`;
- rate limiting and unsupported status or error-body mappings; and

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

Clarify the unsupported-case mapping phrase.

unsupported status or error-body mappings is ambiguous. It can describe unsupported mappings instead of mappings for unsupported cases. Replace it with status or error-body mappings for unsupported cases.

Proposed wording
- - rate limiting and unsupported status or error-body mappings; and
+ - rate limiting and status or error-body mappings for unsupported cases; and
📝 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
- rate limiting and unsupported status or error-body mappings; and
- rate limiting and status or error-body mappings for unsupported cases; and
🧰 Tools
🪛 LanguageTool

[uncategorized] ~148-~148: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...ior; - the behavior of useAuthUser; - rate limiting and unsupported status or error-body ma...

(EN_COMPOUND_ADJECTIVE_INTERNAL)

🤖 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/research/2026-08-11-contacts-pagination-public-assets.md` at line 148,
Update the phrase in the list to “status or error-body mappings for unsupported
cases” so it clearly refers to mappings associated with unsupported cases, not
unsupported mappings.

Source: Linters/SAST tools

Co-authored-by: Copilot <[email protected]>

Copilot-Session: 7b842425-e150-41a6-9cd2-6b0842fe8c01
@KalebCole
KalebCole merged commit a426456 into main Aug 12, 2026
2 of 3 checks passed
@KalebCole
KalebCole deleted the spec/164-165-read-evidence branch August 27, 2026 03:21
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