Repository navigation
docs(spec): reconstruct remote API contract - #156
Conversation
Co-authored-by: Copilot <[email protected]> Copilot-Session: 20afc1c6-5147-40ea-8fcc-837fbcbaa55a
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Review limit reached
Next review available in: 21 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 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 configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThe PR publishes the Partiful remote API contract revision ChangesRemote API contract
Estimated code review effort: 4 (Complex) | ~60 minutes Possibly related issues
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
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. Comment |
|
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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 10-38: The OpenAPI operations claim unverified numeric 200
responses, and the contract test does not validate status-code evidence. In
spec/partiful.openapi.json lines 10-38, replace each unsupported numeric
response key with default unless corresponding reviewed status-code evidence is
recorded; in tests/remote-api-contract.test.js lines 32-46, add validation that
rejects numeric response codes lacking matching evidence-ledger status-code
evidence, while preserving payload evidence checks.
- Around line 3-6: Use a single verified contract revision across both sites: in
spec/partiful.openapi.json lines 3-6, set info.version to 2026-08-10.1 or define
an explicit mapping between API version and contract revision; in
tests/remote-api-contract.test.js lines 24-30, update the assertion to validate
that defined revision, preferably via evidence.contractRevision, instead of
1.0.0.
🪄 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: 4101a564-9da6-422b-bdf8-034a3dcb691a
📒 Files selected for processing (5)
docs/REMOTE-API-CONTRACT.mddocs/research/2026-08-10-partiful-api-contract-evidence-ledger.mdspec/partiful.api-evidence.jsonspec/partiful.openapi.jsontests/remote-api-contract.test.js
Co-authored-by: Copilot <[email protected]> Copilot-Session: 20afc1c6-5147-40ea-8fcc-837fbcbaa55a
Co-authored-by: Copilot <[email protected]> Copilot-Session: 20afc1c6-5147-40ea-8fcc-837fbcbaa55a
Co-authored-by: Copilot <[email protected]> Copilot-Session: 20afc1c6-5147-40ea-8fcc-837fbcbaa55a
Co-authored-by: Copilot <[email protected]> Copilot-Session: 20afc1c6-5147-40ea-8fcc-837fbcbaa55a
There was a problem hiding this comment.
Actionable comments posted: 5
🧹 Nitpick comments (5)
docs/research/2026-08-10-partiful-api-contract-evidence-ledger.md (1)
21-23: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueProse is coupled to a literal test substring.
Lines 21-22 repeat the same sentence pattern for two operations.
tests/remote-api-contract.test.jslines 273-276 match the exact substring`<operationId>` is a TypeScript-derived inference. Any editorial merge of these two sentences breaks the test. Consider asserting the classification fromspec/partiful.api-evidence.jsonand matching only the operation id in the document.🤖 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-10-partiful-api-contract-evidence-ledger.md` around lines 21 - 23, Update the contract test around the repeated “TypeScript-derived inference” prose to derive the expected classification from spec/partiful.api-evidence.json and assert the operation id independently, rather than requiring the exact sentence substring in the document. Preserve validation that both sendAuthCodeTrusted and lookupFirebaseUser are documented with the correct classification.tests/remote-api-contract.test.js (2)
199-208: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueGuard the claim lookup before reading
citation.Line 202 reads
evidence.claims[base].citation. If the pointer is absent, the test throws aTypeErrorinstead of reporting the missing claim pointer. Add a defined check with the pointer as the assertion message.🤖 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 `@tests/remote-api-contract.test.js` around lines 199 - 208, Update the claim assertion in the unknown-default response test to first verify that evidence.claims[base] is defined, using base as the assertion message, before reading its citation; keep the existing citation comparison unchanged.
210-228: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueTighten the update-mask pointer pattern.
The
$anchor at line 219 applies only to the second alternative, so the first alternative matches any pointer that containsupdateMask.fieldPathsat any depth. The pattern also hard-codesparameters/1, which breaks if the parameter order changes. Match the parameter by name instead of by index.🤖 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 `@tests/remote-api-contract.test.js` around lines 210 - 228, Update the updateMask assertion in the test to anchor the entire pointer pattern and match the parameter by its name rather than the hard-coded parameters/1 index. Preserve support for both updateMask.fieldPaths and the parameter’s style/explode pointers while allowing parameter ordering to change.spec/research/historical-27-operation-draft.json (1)
3-7: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueMark the artifact non-authoritative inside the file.
docs/research/2026-08-10-contract-evidence-sources.mddeclares this file a non-authoritative copy. The file itself does not state that. A reader or a code generator that opens the JSON alone can mistake it for the canonical contract. Add the status toinfo.description, or add anx-statusextension. Keep the change limited if you must preserve byte-exact copy semantics; in that case record the exception in the sources index.🤖 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 `@spec/research/historical-27-operation-draft.json` around lines 3 - 7, Update the JSON artifact’s info metadata to explicitly identify it as non-authoritative, preferably by adding that status to info.description or via an x-status extension. Keep the change limited to this metadata and preserve byte-exact copy semantics if required, documenting the exception in the sources index.spec/partiful.openapi.json (1)
1775-1787: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winWire the response schemas to the
defaultresponses, or drop them.Nine schemas are unreachable:
CallableResponse,FirestoreDocument,FirestoreListResponse,RefreshTokenResponse,FirebaseSignInResponse,FirebaseLookupResponse,UploadData,UploadPhotoResponse, andPoster. No operation references them, because every response now uses a baredefaultkey. Code generators emit unused models, and readers cannot tell which operation each shape belongs to.The status codes stay explicit unknowns, so a
defaultresponse can still carry the observed payload shape. Example forgetPosterCatalog:♻️ Proposed change to attach an observed payload shape
"responses": { "default": { - "description": "Response status and body are unknown." + "description": "Response status is unknown. The observed body is a poster catalog array.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "`#/components/schemas/Poster`" + } + } + } + } } },If the payload evidence is not strong enough to publish, remove the unreferenced schemas instead.
Also applies to: 1830-1856, 1879-1936
🤖 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 `@spec/partiful.openapi.json` around lines 1775 - 1787, Remove the unreachable schemas CallableResponse, FirestoreDocument, FirestoreListResponse, RefreshTokenResponse, FirebaseSignInResponse, FirebaseLookupResponse, UploadData, UploadPhotoResponse, and Poster, unless concrete operation payload evidence supports attaching each schema to its corresponding default response. Ensure no unused component schemas remain and preserve the existing explicit unknown status-code responses.
🤖 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-10-partiful-api-contract-evidence-ledger.md`:
- Around line 45-49: Update the poster catalog operation and Poster schema
citation wording to reference the Markdown headings `#poster-catalog-fetch` and
`#poster-interface` in the evidence-sources ledger, rather than directly citing
src/lib/posters.ts; retain src/lib/posters.ts as the underlying source
referenced by those headings.
- Around line 39-40: Update the claim-count wording in the evidence ledger
description to consistently state 819 material claims, including the reference
to tests/remote-api-contract.test.js; preserve the surrounding
citation-resolution text.
In `@spec/partiful.openapi.json`:
- Around line 1237-1248: Update the collectionPath parameter in the
firestoreListDocuments operation to document that its value may contain
multi-segment Firestore paths and that slash separators must remain unencoded;
use the OpenAPI parameter metadata appropriate for preserving path separators or
explicitly state the reserved-character requirement. Keep the existing parameter
name, path location, and required behavior unchanged.
In `@tests/remote-api-contract.test.js`:
- Around line 284-294: Update the citation comparison in the test “does not
treat the event-image observation as poster-catalog evidence” to use the real
dated event-image note path instead of the undefined
`evidence.sources.eventImageObservation` value, while preserving the existing
poster pointer filtering and negative assertion.
- Around line 136-141: Update the assertion after constructing the pointers Set
to assert its size rather than its nonexistent length: use pointers.size and
verify it equals 819, preserving the existing claim collection logic.
---
Nitpick comments:
In `@docs/research/2026-08-10-partiful-api-contract-evidence-ledger.md`:
- Around line 21-23: Update the contract test around the repeated
“TypeScript-derived inference” prose to derive the expected classification from
spec/partiful.api-evidence.json and assert the operation id independently,
rather than requiring the exact sentence substring in the document. Preserve
validation that both sendAuthCodeTrusted and lookupFirebaseUser are documented
with the correct classification.
In `@spec/partiful.openapi.json`:
- Around line 1775-1787: Remove the unreachable schemas CallableResponse,
FirestoreDocument, FirestoreListResponse, RefreshTokenResponse,
FirebaseSignInResponse, FirebaseLookupResponse, UploadData, UploadPhotoResponse,
and Poster, unless concrete operation payload evidence supports attaching each
schema to its corresponding default response. Ensure no unused component schemas
remain and preserve the existing explicit unknown status-code responses.
In `@spec/research/historical-27-operation-draft.json`:
- Around line 3-7: Update the JSON artifact’s info metadata to explicitly
identify it as non-authoritative, preferably by adding that status to
info.description or via an x-status extension. Keep the change limited to this
metadata and preserve byte-exact copy semantics if required, documenting the
exception in the sources index.
In `@tests/remote-api-contract.test.js`:
- Around line 199-208: Update the claim assertion in the unknown-default
response test to first verify that evidence.claims[base] is defined, using base
as the assertion message, before reading its citation; keep the existing
citation comparison unchanged.
- Around line 210-228: Update the updateMask assertion in the test to anchor the
entire pointer pattern and match the parameter by its name rather than the
hard-coded parameters/1 index. Preserve support for both updateMask.fieldPaths
and the parameter’s style/explode pointers while allowing parameter ordering to
change.
🪄 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: 97ffb634-8862-4f70-b207-95823e9cb764
📒 Files selected for processing (7)
docs/REMOTE-API-CONTRACT.mddocs/research/2026-08-10-contract-evidence-sources.mddocs/research/2026-08-10-partiful-api-contract-evidence-ledger.mdspec/partiful.api-evidence.jsonspec/partiful.openapi.jsonspec/research/historical-27-operation-draft.jsontests/remote-api-contract.test.js
🚧 Files skipped from review as they are similar to previous changes (1)
- docs/REMOTE-API-CONTRACT.md
| The 819 material claims are audited by | ||
| `tests/remote-api-contract.test.js`. Each ledger citation resolves either to a |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Description: Compare the documented claim count with the test constant and the ledger entry count.
set -euo pipefail
rg -n '819|876|776' docs/research/2026-08-10-partiful-api-contract-evidence-ledger.md tests/remote-api-contract.test.js
fd -t f 'partiful.api-evidence.json' spec --exec sh -c 'python3 -c "
import json,sys
data = json.load(open(sys.argv[1]))
print(sys.argv[1], \"claims:\", len(data.get(\"claims\", {})), \"operations:\", len(data.get(\"operations\", {})))
" {}'Repository: KalebCole/partiful-cli
Length of output: 458
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '%s\n' '--- ledger and test references ---'
rg -n -C 2 '819|876|776|material claims|historically derived' \
docs/research/2026-08-10-partiful-api-contract-evidence-ledger.md \
tests/remote-api-contract.test.js
printf '%s\n' '--- evidence JSON files ---'
git ls-files 'spec/*partiful*' 'spec/**/*.json' | sed -n '1,80p'
printf '%s\n' '--- claim counts ---'
python3 - <<'PY'
import json
from pathlib import Path
for path in Path("spec").rglob("partiful.api-evidence.json"):
data = json.loads(path.read_text())
print(path, "claims:", len(data.get("claims", {})),
"operations:", len(data.get("operations", {})))
PY
printf '%s\n' '--- repository references to the disputed counts ---'
rg -n -S '876 material|776 historically|819 material|material claims|historically derived claims' . \
-g '!node_modules' -g '!dist' -g '!build' || trueRepository: KalebCole/partiful-cli
Length of output: 1556
Correct the PR description claim count.
The committed evidence file contains 819 claims, and the test audits 819 material claims. Update the PR description to use 819 material claims.
🤖 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-10-partiful-api-contract-evidence-ledger.md` around
lines 39 - 40, Update the claim-count wording in the evidence ledger description
to consistently state 819 material claims, including the reference to
tests/remote-api-contract.test.js; preserve the surrounding citation-resolution
text.
| The event-image observation establishes fields used for an event's selected | ||
| poster image; it does **not** establish that `/posters.json` returns a catalog | ||
| array or that its entries have that shape. The catalog operation and `Poster` | ||
| schema are therefore TypeScript-derived inferences with citations to | ||
| `src/lib/posters.ts`, not dated live observations. |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win
Correct the stated citation target for the poster claims.
This text says the catalog operation and Poster schema carry citations to src/lib/posters.ts. The machine ledger cites the Markdown headings #poster-catalog-fetch and #poster-interface in docs/research/2026-08-10-contract-evidence-sources.md, and tests/remote-api-contract.test.js line 287 asserts that Markdown citation. src/lib/posters.ts is the underlying source referenced by those headings.
📝 Proposed wording fix
-schema are therefore TypeScript-derived inferences with citations to
-`src/lib/posters.ts`, not dated live observations.
+schema are therefore TypeScript-derived inferences. Their citations resolve to
+the `Poster interface` and `Poster catalog fetch` headings in
+`docs/research/2026-08-10-contract-evidence-sources.md`, which record the
+`src/lib/posters.ts` evidence. They are not dated live observations.📝 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.
| The event-image observation establishes fields used for an event's selected | |
| poster image; it does **not** establish that `/posters.json` returns a catalog | |
| array or that its entries have that shape. The catalog operation and `Poster` | |
| schema are therefore TypeScript-derived inferences with citations to | |
| `src/lib/posters.ts`, not dated live observations. | |
| The event-image observation establishes fields used for an event's selected | |
| poster image; it does **not** establish that `/posters.json` returns a catalog | |
| array or that its entries have that shape. The catalog operation and `Poster` | |
| schema are therefore TypeScript-derived inferences. Their citations resolve to | |
| the `Poster interface` and `Poster catalog fetch` headings in | |
| `docs/research/2026-08-10-contract-evidence-sources.md`, which record the | |
| `src/lib/posters.ts` evidence. They are not dated live observations. |
🤖 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-10-partiful-api-contract-evidence-ledger.md` around
lines 45 - 49, Update the poster catalog operation and Poster schema citation
wording to reference the Markdown headings `#poster-catalog-fetch` and
`#poster-interface` in the evidence-sources ledger, rather than directly citing
src/lib/posters.ts; retain src/lib/posters.ts as the underlying source
referenced by those headings.
| "/v1/projects/getpartiful/databases/(default)/documents/{collectionPath}": { | ||
| "get": { | ||
| "operationId": "firestoreListDocuments", | ||
| "parameters": [ | ||
| { | ||
| "name": "collectionPath", | ||
| "in": "path", | ||
| "required": true, | ||
| "schema": { | ||
| "type": "string" | ||
| } | ||
| }, |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
{collectionPath} will be percent-encoded and break multi-segment Firestore paths.
Firestore collection paths are multi-segment, for example events/{eventId}/guests. This parameter uses the default simple style, so generated clients and validators percent-encode the value and send events%2F{eventId}%2Fguests. Firestore then resolves a different resource or returns an error. The spec also carries no note that the value contains path separators.
Either enumerate the concrete collection paths that the contract observed, or document the reserved-character requirement on the parameter so consumers do not encode the separators.
🔧 Proposed change to document the separator requirement
{
"name": "collectionPath",
"in": "path",
"required": true,
+ "description": "Firestore collection path relative to the documents root. The value contains unencoded '/' separators, for example 'events/{eventId}/guests'. Do not percent-encode the separators.",
"schema": {
- "type": "string"
+ "type": "string",
+ "pattern": "^[^/]+(/[^/]+)*$"
}
},📝 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.
| "/v1/projects/getpartiful/databases/(default)/documents/{collectionPath}": { | |
| "get": { | |
| "operationId": "firestoreListDocuments", | |
| "parameters": [ | |
| { | |
| "name": "collectionPath", | |
| "in": "path", | |
| "required": true, | |
| "schema": { | |
| "type": "string" | |
| } | |
| }, | |
| "/v1/projects/getpartiful/databases/(default)/documents/{collectionPath}": { | |
| "get": { | |
| "operationId": "firestoreListDocuments", | |
| "parameters": [ | |
| { | |
| "name": "collectionPath", | |
| "in": "path", | |
| "required": true, | |
| "description": "Firestore collection path relative to the documents root. The value contains unencoded '/' separators, for example 'events/{eventId}/guests'. Do not percent-encode the separators.", | |
| "schema": { | |
| "type": "string", | |
| "pattern": "^[^/]+(/[^/]+)*$" | |
| } | |
| }, |
🤖 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 `@spec/partiful.openapi.json` around lines 1237 - 1248, Update the
collectionPath parameter in the firestoreListDocuments operation to document
that its value may contain multi-segment Firestore paths and that slash
separators must remain unencoded; use the OpenAPI parameter metadata appropriate
for preserving path separators or explicitly state the reserved-character
requirement. Keep the existing parameter name, path location, and required
behavior unchanged.
| const pointers = new Set([ | ||
| ...materialClaimPointers(spec.servers, '#/servers', 'servers'), | ||
| ...materialClaimPointers(spec.paths, '#/paths', 'paths'), | ||
| ...materialClaimPointers(spec.components, '#/components', 'components'), | ||
| ]); | ||
| expect(pointers).toHaveLength(819); |
There was a problem hiding this comment.
🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win
🧩 Analysis chain
🌐 Web query:
Vitest 3 toHaveLength matcher requires length property Set size
💡 Result:
The Vitest toHaveLength matcher requires that the received object has a .length property [1][2]. Because JavaScript Set objects do not have a .length property—they use a .size property instead—toHaveLength will not function as expected when used directly on a Set [1]. To verify the size of a Set in Vitest, you should access the .size property directly and use the toBe matcher [1]: javascript import { expect, test } from 'vitest' test('check set size', () => { const mySet = new Set([1, 2, 3]) expect(mySet.size).toBe(3) })
Citations:
- 1: https://vitest.dev/api/expect.html
- 2: https://github.com/vitest-dev/vitest/blob/206e8cff/docs/api/expect.md
🏁 Script executed:
#!/bin/bash
set -eu
printf '%s\n' '--- target test ---'
sed -n '110,155p' tests/remote-api-contract.test.js
printf '%s\n' '--- Vitest configuration and package versions ---'
find . -maxdepth 2 -type f \( -name 'package.json' -o -name 'vitest.config.*' \) -print
if [ -f package.json ]; then
node - <<'JS'
const fs = require('fs');
const p = JSON.parse(fs.readFileSync('package.json', 'utf8'));
console.log(JSON.stringify({
type: p.type,
scripts: p.scripts,
vitest: p.devDependencies?.vitest ?? p.dependencies?.vitest
}, null, 2));
JS
fi
printf '%s\n' '--- relevant matcher usage ---'
rg -n --glob '*.js' 'toHaveLength|pointers\.size|materialClaimPointers' .Repository: KalebCole/partiful-cli
Length of output: 4399
🏁 Script executed:
#!/bin/bash
set -eu
node - <<'JS'
const pointers = new Set(['a', 'b', 'c']);
console.log(JSON.stringify({
length: pointers.length,
size: pointers.size,
lengthMatchesExpected: pointers.length === 3,
sizeMatchesExpected: pointers.size === 3,
}));
JSRepository: KalebCole/partiful-cli
Length of output: 228
Assert pointers.size instead of using toHaveLength.
pointers is a Set without a .length property, so this assertion fails before the claim checks run. Use expect(pointers.size).toBe(819).
🤖 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 `@tests/remote-api-contract.test.js` around lines 136 - 141, Update the
assertion after constructing the pointers Set to assert its size rather than its
nonexistent length: use pointers.size and verify it equals 819, preserving the
existing claim collection logic.
| it('does not treat the event-image observation as poster-catalog evidence', () => { | ||
| const posterOperation = evidence.operations.getPosterCatalog; | ||
| expect(posterOperation.classification).toBe('typescript-derived-inference'); | ||
| expect(posterOperation.citation).toBe(evidence.sources.posterCatalog); | ||
| expect(evidence.sources).not.toHaveProperty('eventImageObservation'); | ||
| for (const [pointer, claim] of Object.entries(evidence.claims)) { | ||
| if (pointer.includes('/posters.json') || pointer.includes('/Poster')) { | ||
| expect(claim.citation).not.toBe(evidence.sources.eventImageObservation); | ||
| } | ||
| } | ||
| }); |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
The event-image loop assertion can never fail.
Line 288 asserts that evidence.sources has no eventImageObservation key. Lines 289-292 then compare each citation against evidence.sources.eventImageObservation, which is undefined. Citations are strings, so not.toBe(undefined) always passes. Compare against the event-image note path so the loop enforces the stated rule.
🐛 Proposed fix
+const eventImageNote = 'docs/research/2026-03-24-event-image-observation.md';
expect(evidence.sources).not.toHaveProperty('eventImageObservation');
for (const [pointer, claim] of Object.entries(evidence.claims)) {
if (pointer.includes('/posters.json') || pointer.includes('/Poster')) {
- expect(claim.citation).not.toBe(evidence.sources.eventImageObservation);
+ expect(claim.citation, pointer).not.toContain(eventImageNote);
}
}Replace eventImageNote with the real path of the dated event-image note.
📝 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.
| it('does not treat the event-image observation as poster-catalog evidence', () => { | |
| const posterOperation = evidence.operations.getPosterCatalog; | |
| expect(posterOperation.classification).toBe('typescript-derived-inference'); | |
| expect(posterOperation.citation).toBe(evidence.sources.posterCatalog); | |
| expect(evidence.sources).not.toHaveProperty('eventImageObservation'); | |
| for (const [pointer, claim] of Object.entries(evidence.claims)) { | |
| if (pointer.includes('/posters.json') || pointer.includes('/Poster')) { | |
| expect(claim.citation).not.toBe(evidence.sources.eventImageObservation); | |
| } | |
| } | |
| }); | |
| it('does not treat the event-image observation as poster-catalog evidence', () => { | |
| const posterOperation = evidence.operations.getPosterCatalog; | |
| expect(posterOperation.classification).toBe('typescript-derived-inference'); | |
| expect(posterOperation.citation).toBe(evidence.sources.posterCatalog); | |
| const eventImageNote = 'docs/research/2026-03-24-event-image-observation.md'; | |
| expect(evidence.sources).not.toHaveProperty('eventImageObservation'); | |
| for (const [pointer, claim] of Object.entries(evidence.claims)) { | |
| if (pointer.includes('/posters.json') || pointer.includes('/Poster')) { | |
| expect(claim.citation, pointer).not.toContain(eventImageNote); | |
| } | |
| } | |
| }); |
🤖 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 `@tests/remote-api-contract.test.js` around lines 284 - 294, Update the
citation comparison in the test “does not treat the event-image observation as
poster-catalog evidence” to use the real dated event-image note path instead of
the undefined `evidence.sources.eventImageObservation` value, while preserving
the existing poster pointer filtering and negative assertion.
Co-authored-by: Copilot <[email protected]> Copilot-Session: 20afc1c6-5147-40ea-8fcc-837fbcbaa55a
Summary
2026-08-10.1atspec/partiful.openapi.json; explicit owner approval is pending.defaultresponses while status/error bodies are unknown; separates request/response/status citations; uses repeated query-array serialization for Firestore update masks; and leaves undocumented FirebaselocalIdabsent.Verification
npm test -- tests/remote-api-contract.test.js— passed (14 tests; 1.96s test execution, no timeout).npm run typecheck— passedgit diff --check— passednpm testwas attempted but stopped after severe host-wide slowdown caused unrelated existing suites to exceed their 5s timeouts; no completed baseline comparison is claimed.No live probe was attempted:
partiful doctorfound no local credentials. No mutation was performed. Owner review/approval remains required.Summary by CodeRabbit
Documentation
New Specifications
Tests