Skip to content

docs(contract): record auth endpoint observations and promote response schemas - #176

Merged
KalebCole merged 7 commits into
mainfrom
spec/163-auth-evidence
Aug 11, 2026
Merged

KalebCole merged 7 commits into
mainfrom
spec/163-auth-evidence

Conversation

@KalebCole

@KalebCole KalebCole commented Aug 11, 2026 •

Copy link
Copy Markdown
Owner

Summary

Proposed remote API contract revision 2026-08-11.2 adding dated live observation evidence for all five authentication operations, closing the S2 evidence gate for #163. Pending owner approval.

Evidence

  • Owner-attended session (2026-08-11T02:30:19Z): observed HTTP 200 success for all 5 auth ops
  • Sanitized artifact: spec/research/auth-evidence-redacted-20260811.json
  • Fake-token probe artifact: spec/research/auth-error-probes-redacted-20260811.json

Contract changes

  • 5 auth operations gain 200 response schemas
  • 4 operations gain observed error responses: getLoginToken 403, signInWithCustomToken/refreshToken/lookupFirebaseUser 400
  • sendAuthCodeTrusted 200 body shape unclaimed
  • Operation-specific failure boundaries with product mappings
  • Material claims: 992. Revision: 2026-08-11.2 (proposed)

Failure boundaries

Operation Error Product mapping
getLoginToken 403 input.invalid / AUTH_CODE_REJECTED
signInWithCustomToken 400 auth.expired
refreshToken 400 auth.expired
lookupFirebaseUser 400 auth.expired (optional S2)

Other received -> contract.protocol_changed. No-response -> remote.unavailable.

Tests

Pacific full suite: 337 passed, 6 skipped, 0 failed.

Linked: #163

Summary by CodeRabbit

  • New Features

    • Added documented authentication response and error schemas for token refresh, sign-in, login-token, and user-lookup operations.
    • Added privacy-safe evidence covering successful requests, validation failures, response formats, and status mappings.
    • Expanded the documented API inventory with additional observed operations, including event photo uploads.
  • Documentation

    • Updated the remote API contract and evidence ledger to revision 2026-08-11.2.
    • Clarified pagination, duplicate handling, fail-closed status behavior, and remaining unknown operations.
  • Tests

    • Expanded contract validation for authentication evidence, citations, response schemas, and error handling.

…e schemas

Add dated live observation evidence for all five authentication operations:
sendAuthCodeTrusted, getLoginToken, signInWithCustomToken, refreshToken, and
lookupFirebaseUser. Each now has an observed HTTP 200 success status with a
typed response schema in the OpenAPI contract.

Evidence source: owner-attended session (2026-08-11T02:30:19Z) with sanitized
artifact retaining only HTTP metadata and JSON paths/types. Privacy-safe
negative probes confirmed error envelope shapes. No credentials, phone
numbers, codes, tokens, or user IDs are present in any committed artifact.

Contract changes:
- Five auth operations gain 200 response schemas (LoginTokenResponse,
  FirebaseSignInResponse, RefreshTokenResponse, FirebaseLookupResponse,
  FirebaseLookupUser, FirebaseProviderUserInfo)
- Operation and claim classifications promoted to dated-live-observation
- Material claim count rises from 833 to 930
- Failure boundary: received non-200 is contract.protocol_changed,
  no-response is remote.unavailable, rate limiting not claimed
- Contract revision remains 2026-08-11.1

Does not implement Go auth, change approved product contract, or merge.
Stops for owner approval.

Closes the S2 evidence gate for #163.

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

coderabbitai Bot commented Aug 11, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The update records observed authentication responses and errors, adds redacted evidence artifacts, expands the evidence contract, defines typed OpenAPI schemas, and strengthens contract tests. Documentation and specification revisions advance to 2026-08-11.2.

Changes

Authentication contract evidence

Layer / File(s) Summary
Observed authentication evidence
docs/research/2026-08-10-contract-evidence-sources.md, docs/research/2026-08-11-auth-observation.md, spec/research/*
The research records success responses, error probes, response shapes, Firebase referrer behavior, privacy controls, and remaining unknowns for five authentication operations.
Evidence contract model
docs/research/2026-08-10-partiful-api-contract-evidence-ledger.md, spec/partiful.api-evidence.json
The ledger and evidence contract classify dated-live authentication observations, response schemas, status mappings, citations, provenance, and lookup metadata.
OpenAPI authentication contract
spec/partiful.openapi.json
Authentication operations now expose typed success and error responses. New schemas describe token responses, Firebase users, provider information, callable errors, validation errors, and token errors.
Contract validation and revision
tests/remote-api-contract.test.js, docs/REMOTE-API-CONTRACT.md
Tests validate authentication evidence, citations, schemas, required fields, status mappings, and failure boundaries. Documentation references revision 2026-08-11.2.

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

Possibly related PRs

  • KalebCole/partiful-cli#156: Introduced the remote API contract that this update extends with observed authentication responses and schemas.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 66.67% 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 summarizes the main changes: documenting authentication endpoint observations and promoting response schemas.
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/163-auth-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-11 05:07 UTC

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1ca53d5381

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread spec/partiful.api-evidence.json Outdated
Comment on lines +301 to +302
"request": "dated-live-observation",
"requestCitation": "docs/research/2026-08-11-auth-observation.md#scope-and-provenance",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep sendAuthCodeTrusted request evidence inferred

For sendAuthCodeTrusted, the new auth observation only documents the attended success status and response shape, and the sanitized artifact retains response metadata/paths rather than the request body. All of this operation's detailed request-schema claims still cite the historical draft, so marking the operation-level request as dated-live-observation overstates the evidence and lets the audit report a live-observed request contract that was not captured; this should remain TypeScript-derived unless a live request-shape source is added.

Useful? React with 👍 / 👎.

Ubuntu and others added 6 commits August 11, 2026 03:04
1. Bump revision to 2026-08-11.2; mark status proposed pending owner
   approval rather than owner-reviewed.

2. Restore request-shape provenance to prior evidence classes. The wizard
   observed responses only: sendAuthCodeTrusted, refreshToken, and
   lookupFirebaseUser requests retain typescript-derived-inference;
   getLoginToken and signInWithCustomToken retain their March 24
   dated-live-observation for requests.

3. Contract test now parses the committed sanitized artifact independently
   and verifies each promoted response status, JSON path, and scalar type
   against the artifact. additionalProperties claims are classified
   typescript-derived-inference (one response cannot prove open-ended
   future fields). required arrays are justified by fail-closed validation:
   every required field was observed in the success response and is needed
   for correct operation; absence constitutes contract.protocol_changed.

4. Human ledger inventory corrected: 7 operation-level dated observations,
   of which 6 have observed response status (createTextBlast has observed
   request only, response remains explicit unknown). 20 operations remain
   typescript-derived inference.

5. Removed duplicate Dated poster catalog observation heading so every
   citation anchor is unique.

6. Full Pacific suite: 16 files failed, 9 passed, 1 skipped; 117 tests
   failed, 161 passed, 6 skipped. All 117 failures are in integration,
   skill, schema, bulk, template, doctor, and date tests unrelated to
   contract changes. remote-api-contract.test.js: 16/16 passed.

Co-authored-by: Copilot <[email protected]>
1. Restore responseCitation provenance enforcement. Every observed-response
   operation now asserts responseCitation resolves and equals the intended
   source: posterCatalogObservation for getPosterCatalog,
   authObservation20260811 for all five auth operations. Existing poster
   provenance check is preserved and strengthened.

2. Promote operation-specific observed failures needed by S2:
   - getLoginToken 403 wrong code -> input.invalid / AUTH_CODE_REJECTED
   - signInWithCustomToken 400 invalid token -> auth.expired
   - refreshToken 400 invalid token -> auth.expired
   - lookupFirebaseUser 400 invalid token -> auth.expired (optional, not S2 gate)
   auth.human_required remains local no-private-terminal only.
   Other received statuses -> contract.protocol_changed.
   No-response -> remote.unavailable. No rate claim.
   Added CallableAuthError, FirebaseValidationError, FirebaseTokenError
   schemas with operation-specific failureBoundary in evidence JSON.
   Agent fake-token probe artifact committed at
   spec/research/auth-error-probes-redacted-20260811.json.

3. sendAuthCodeTrusted 200: removed unsupported object response schema.
   HTTP 200 retained but body shape is unclaimed/ignored because auth
   login uses no send-response field.

4. OpenAPI description changed from Owner-reviewed to Proposed pending
   owner approval. Ledger status remains proposed.

Contract revision: 2026-08-11.2 (proposed)
Material claims: 992
Pacific full suite: 337 passed, 6 skipped, 0 failed

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

Copilot-Session: 8453c76f-a887-4fce-be42-d7997ed94292
Co-authored-by: Copilot <[email protected]>

Copilot-Session: 8453c76f-a887-4fce-be42-d7997ed94292
Co-authored-by: Copilot <[email protected]>

Copilot-Session: 8453c76f-a887-4fce-be42-d7997ed94292

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

🧹 Nitpick comments (5)
docs/research/2026-08-11-auth-observation.md (1)

53-59: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Record why the observed getLoginToken 400 is not promoted.

This section records an agent probe that returned HTTP 400 for getLoginToken. The "Reviewed contract conclusions" section promotes only 403 for getLoginToken, and spec/partiful.openapi.json defines only 200, 403, and default for that operation. The document explains the exclusion for the sendAuthCodeTrusted 500, but not for this 400.

Add one sentence that states the 400 came from a deliberately empty phone input and therefore does not establish a contract-level failure mapping. This keeps the fail-closed boundary auditable, because a received 400 currently maps to contract.protocol_changed.

🤖 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-auth-observation.md` around lines 53 - 59, Update
the “Agent negative probe” section to add one sentence explaining that the
observed getLoginToken 400 resulted from deliberately empty phone input and
therefore does not establish a contract-level failure mapping; preserve the
existing note that received 400 responses map to contract.protocol_changed.
spec/partiful.api-evidence.json (1)

18-25: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Align authErrorProbes20260811 with the citation format, or remove it.

Every other value in sources uses the path#fragment citation format that citationResolves() in tests/remote-api-contract.test.js accepts. authErrorProbes20260811 is a bare file path with no fragment, so citationResolves() returns false for it. No claim or operation claim cites this key, and the same path is already recorded as authObservation.probeArtifactPath, which is the value the test actually consumes.

Remove the duplicate entry, or give it a resolvable JSON-pointer fragment into the probe artifact.

🧹 Proposed fix
     "authObservation20260811": "docs/research/2026-08-11-auth-observation.md#scope-and-provenance",
-    "authErrorProbes20260811": "spec/research/auth-error-probes-redacted-20260811.json",
     "authSendCode20260811": "docs/research/2026-08-11-auth-observation.md#sendauthcodetrusted",
🤖 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.api-evidence.json` around lines 18 - 25, Remove the unused
authErrorProbes20260811 entry from the sources object, since it is a bare
duplicate of authObservation.probeArtifactPath and fails citationResolves();
leave the other citation-formatted entries unchanged.
tests/remote-api-contract.test.js (3)

490-507: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Assert that each leaf schema node declares a type.

Line 505 applies the type check only when current?.type is truthy. Line 502 checks definedness alone. A schema node that declares a property with no type therefore passes this helper without any type validation, and the artifact's recorded type is never compared.

Every current leaf node declares a type, so there is no active gap. This test is the enforcement mechanism for the whole evidence gate, so the silent-pass path should fail instead.

🛡️ Proposed hardening
         if (current?.$ref) current = spec.components.schemas[current.$ref.split('/').pop()];
-        if (current?.type) expect(current.type, `${operationId} ${shapePath} type`).toBe(shapeType);
+        expect(current.type, `${operationId} ${shapePath} declares a type`).toBeDefined();
+        expect(current.type, `${operationId} ${shapePath} type`).toBe(shapeType);
🤖 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 490 - 507, Update
verifyShapeAgainstSchema so every resolved leaf node is required to declare a
type, then compare that declared value with shapeType. Replace the conditional
type assertion on current?.type while preserving the existing definedness and
$ref resolution checks.

132-139: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Consolidate the repeated observed-operation sets into one module-level constant.

This file now declares the same six-operation set three times: here, at lines 191-198 as observedStatusOps, and at lines 231-238 as observedResponseOps. Lines 531-537 also repeat the citation map that lines 239-246 already define. This set is also re-allocated on every loop iteration at this site.

If a future observation promotes another operation, an author must update four places. Extract one constant and one map at module scope and reference them from each test.

♻️ Proposed refactor
+const OBSERVED_STATUS_OPS = new Set([
+  'getPosterCatalog',
+  'sendAuthCodeTrusted',
+  'getLoginToken',
+  'signInWithCustomToken',
+  'refreshToken',
+  'lookupFirebaseUser',
+]);

Then replace each local declaration:

-      const observedStatusOps = new Set([
-        'getPosterCatalog',
-        'sendAuthCodeTrusted',
-        'getLoginToken',
-        'signInWithCustomToken',
-        'refreshToken',
-        'lookupFirebaseUser',
-      ]);
       expect(claim.status).toBe(
-        observedStatusOps.has(operation.operationId)
+        OBSERVED_STATUS_OPS.has(operation.operationId)
🤖 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 132 - 139, Extract the
repeated six-operation set into a single module-level constant and the
duplicated citation map into a single module-level constant in
tests/remote-api-contract.test.js. Replace the local observedStatusOps and
observedResponseOps declarations, including the loop-scoped allocation near the
referenced code, and reuse the shared constants in all affected tests while
preserving their existing behavior.

610-618: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Anchor the required-field match to a full path segment.

Line 615 uses path.startsWith(field), which matches any observed path that shares a prefix with the required field name. A required field named token would be satisfied by an observed path token_type, so the check can pass for a field that was never observed. The trailing || path === field clause is already covered by startsWith.

Anchor the prefix on a segment boundary.

🛡️ Proposed fix
-        const found = success.shape.some(({ path }) => path.startsWith(field) || path === field);
+        const found = success.shape.some(
+          ({ path }) => path === field || path.startsWith(`${field}.`),
+        );
🤖 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 610 - 618, Update
requiredFieldsObserved so the found check matches the required field only when
path equals field or begins with field followed by a path-segment delimiter,
preventing names such as token from matching token_type. Remove the redundant
path === field alternative if the boundary-aware match already covers exact
matches.
🤖 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 26-33: Update the operation-level summary to count five, not six,
typed response schemas, and identify sendAuthCodeTrusted alongside
createTextBlast as the exceptions with observed 200 responses but no typed
schema. Keep the existing list of seven operations and align the wording with
the unclaimed body-shape statement later in the document.

In `@spec/partiful.api-evidence.json`:
- Around line 3941-3960: Update the evidence entries for FirebaseSignInResponse,
RefreshTokenResponse, and FirebaseLookupResponse schema /type claims to match
their observed object responses, using classification dated-live-observation and
citations to the corresponding sections in
docs/research/2026-08-11-auth-observation.md. Keep their existing observed
properties and required-claim evidence aligned.

---

Nitpick comments:
In `@docs/research/2026-08-11-auth-observation.md`:
- Around line 53-59: Update the “Agent negative probe” section to add one
sentence explaining that the observed getLoginToken 400 resulted from
deliberately empty phone input and therefore does not establish a contract-level
failure mapping; preserve the existing note that received 400 responses map to
contract.protocol_changed.

In `@spec/partiful.api-evidence.json`:
- Around line 18-25: Remove the unused authErrorProbes20260811 entry from the
sources object, since it is a bare duplicate of
authObservation.probeArtifactPath and fails citationResolves(); leave the other
citation-formatted entries unchanged.

In `@tests/remote-api-contract.test.js`:
- Around line 490-507: Update verifyShapeAgainstSchema so every resolved leaf
node is required to declare a type, then compare that declared value with
shapeType. Replace the conditional type assertion on current?.type while
preserving the existing definedness and $ref resolution checks.
- Around line 132-139: Extract the repeated six-operation set into a single
module-level constant and the duplicated citation map into a single module-level
constant in tests/remote-api-contract.test.js. Replace the local
observedStatusOps and observedResponseOps declarations, including the
loop-scoped allocation near the referenced code, and reuse the shared constants
in all affected tests while preserving their existing behavior.
- Around line 610-618: Update requiredFieldsObserved so the found check matches
the required field only when path equals field or begins with field followed by
a path-segment delimiter, preventing names such as token from matching
token_type. Remove the redundant path === field alternative if the
boundary-aware match already covers exact matches.
🪄 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: 6f19bf58-2888-4e26-8543-9abccb4cbea7

📥 Commits

Reviewing files that changed from the base of the PR and between ae4825d and d7a2c71.

📒 Files selected for processing (9)
  • 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-auth-observation.md
  • spec/partiful.api-evidence.json
  • spec/partiful.openapi.json
  • spec/research/auth-error-probes-redacted-20260811.json
  • spec/research/auth-evidence-redacted-20260811.json
  • tests/remote-api-contract.test.js

Comment on lines +26 to +33
Seven operations have at least one operation-level dated live observation:
`createTextBlast`, `getLoginToken`, `getPosterCatalog`,
`lookupFirebaseUser`, `refreshToken`, `sendAuthCodeTrusted`, and
`signInWithCustomToken`.

Of these seven, six have an observed HTTP 200 success status and typed
response schema (all except createTextBlast, whose response status and body
remain explicit unknown).

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

Correct the typed-response-schema count.

Line 31 states that six of the seven dated-live operations have "an observed HTTP 200 success status and typed response schema". Only five have a typed response schema. sendAuthCodeTrusted has an observed 200 with no schema: spec/partiful.openapi.json defines its 200 response with a description only and no content, and tests/remote-api-contract.test.js asserts that the response has no content property.

Line 105 of this file already records the body shape as unclaimed. Align line 31 with that statement.

📝 Proposed fix
-Of these seven, six have an observed HTTP 200 success status and typed
-response schema (all except createTextBlast, whose response status and body
-remain explicit unknown).
+Of these seven, six have an observed HTTP 200 success status (all except
+createTextBlast, whose response status and body remain explicit unknown).
+Five of those six also have a typed response schema; `sendAuthCodeTrusted`
+has an observed 200 with an unclaimed body.
📝 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
Seven operations have at least one operation-level dated live observation:
`createTextBlast`, `getLoginToken`, `getPosterCatalog`,
`lookupFirebaseUser`, `refreshToken`, `sendAuthCodeTrusted`, and
`signInWithCustomToken`.
Of these seven, six have an observed HTTP 200 success status and typed
response schema (all except createTextBlast, whose response status and body
remain explicit unknown).
Seven operations have at least one operation-level dated live observation:
`createTextBlast`, `getLoginToken`, `getPosterCatalog`,
`lookupFirebaseUser`, `refreshToken`, `sendAuthCodeTrusted`, and
`signInWithCustomToken`.
Of these seven, six have an observed HTTP 200 success status (all except
createTextBlast, whose response status and body remain explicit unknown).
Five of those six also have a typed response schema; `sendAuthCodeTrusted`
has an observed 200 with an unclaimed body.
🤖 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 26 - 33, Update the operation-level summary to count five, not six, typed
response schemas, and identify sendAuthCodeTrusted alongside createTextBlast as
the exceptions with observed 200 responses but no typed schema. Keep the
existing list of seven operations and align the wording with the unclaimed
body-shape statement later in the document.

Comment on lines +3941 to +3960
"#/components/schemas/LoginTokenResponse/properties/result/properties/data/type": {
"classification": "dated-live-observation",
"citation": "docs/research/2026-08-11-auth-observation.md#getlogintoken"
},
"#/components/schemas/LoginTokenResponse/properties/result/required/0": {
"classification": "dated-live-observation",
"citation": "docs/research/2026-08-11-auth-observation.md#getlogintoken"
},
"#/components/schemas/LoginTokenResponse/properties/result/type": {
"classification": "dated-live-observation",
"citation": "docs/research/2026-08-11-auth-observation.md#getlogintoken"
},
"#/components/schemas/LoginTokenResponse/required/0": {
"classification": "dated-live-observation",
"citation": "docs/research/2026-08-11-auth-observation.md#getlogintoken"
},
"#/components/schemas/LoginTokenResponse/type": {
"classification": "dated-live-observation",
"citation": "docs/research/2026-08-11-auth-observation.md#getlogintoken"
},

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 | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Compare classifications of `/type` and `/properties` claims for the auth response schemas.
set -euo pipefail

fd -t f 'partiful.api-evidence.json' --exec python3 -c '
import json, sys, re
data = json.load(open(sys.argv[1]))
names = ["LoginTokenResponse","FirebaseSignInResponse","RefreshTokenResponse",
         "FirebaseLookupResponse","FirebaseLookupUser","FirebaseProviderUserInfo",
         "CallableAuthError","FirebaseValidationError","FirebaseTokenError"]
for n in names:
    prefix = "`#/components/schemas/`%s/" % n
    buckets = {}
    for ptr, claim in data["claims"].items():
        if ptr.startswith(prefix):
            kind = "type" if ptr == prefix + "type" else (
                   "additionalProperties" if ptr.endswith("/additionalProperties") else "other")
            buckets.setdefault(kind, set()).add(claim["classification"])
    print(n, {k: sorted(v) for k, v in sorted(buckets.items())})
' {}

Repository: KalebCole/partiful-cli

Length of output: 278


🏁 Script executed:

set -euo pipefail
file="$(fd -t f 'partiful.api-evidence.json' | head -n 1)"
python3 - "$file" <<'PY'
import json, sys
path = sys.argv[1]
data = json.load(open(path))
names = [
    "LoginTokenResponse", "FirebaseSignInResponse", "RefreshTokenResponse",
    "FirebaseLookupResponse", "FirebaseLookupUser", "FirebaseProviderUserInfo",
    "CallableAuthError", "FirebaseValidationError", "FirebaseTokenError",
]
for name in names:
    prefix = f"`#/components/schemas/`{name}/"
    buckets = {}
    for pointer, claim in data["claims"].items():
        if pointer.startswith(prefix):
            if pointer == prefix + "type":
                kind = "type"
            elif pointer.endswith("/additionalProperties"):
                kind = "additionalProperties"
            else:
                kind = "other"
            buckets.setdefault(kind, set()).add(claim["classification"])
    print(name, {k: sorted(v) for k, v in sorted(buckets.items())})
PY

printf '\nRelevant claim records:\n'
rg -n -C 2 'RefreshTokenResponse/(type|properties|required)|FirebaseSignInResponse/(type|properties|required)|FirebaseLookupResponse/(type|properties|required)|LoginTokenResponse/type|FirebaseLookupUser/type' "$file"

printf '\nRelevant ledger and observation references:\n'
rg -n -i -C 3 'request claims|response-schema|structural claims|LoginTokenResponse|RefreshTokenResponse|FirebaseSignInResponse|FirebaseLookupResponse' docs spec --glob '*.md' --glob '*.json' | head -n 300

Repository: KalebCole/partiful-cli

Length of output: 36457


🏁 Script executed:

set -euo pipefail
printf '%s\n' 'Ledger excerpt:'
sed -n '80,125p' docs/research/2026-08-10-partiful-api-contract-evidence-ledger.md

printf '%s\n' 'Auth observation headings and relevant sections:'
rg -n '^#{1,4} |type|schema|required|response|RefreshTokenResponse|FirebaseSignInResponse|FirebaseLookupResponse' docs/research/2026-08-11-auth-observation.md | head -n 240

printf '%s\n' 'Relevant observation excerpts:'
sed -n '1,260p' docs/research/2026-08-11-auth-observation.md

Repository: KalebCole/partiful-cli

Length of output: 13616


Promote the three response-schema /type claims.

The live observation records object responses for FirebaseSignInResponse, RefreshTokenResponse, and FirebaseLookupResponse. Align their /type claims with their observed properties and required claims, and cite the corresponding sections in docs/research/2026-08-11-auth-observation.md.

🤖 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.api-evidence.json` around lines 3941 - 3960, Update the
evidence entries for FirebaseSignInResponse, RefreshTokenResponse, and
FirebaseLookupResponse schema /type claims to match their observed object
responses, using classification dated-live-observation and citations to the
corresponding sections in docs/research/2026-08-11-auth-observation.md. Keep
their existing observed properties and required-claim evidence aligned.

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