Repository navigation
feat: Ghost MVP — recorder CLI, OpenCode adapter, Ghost Cloud auth & sessions - #6
Conversation
…sessions - packages/ghost: local recorder (shadowgit checkpoints, runtime probes, scrubbed sync) - packages/opencode-plugin: Mode A adapter streaming turn events to recorder - Ghost Cloud: GitHub OAuth login, device pairing (/pair), sessions ingest API (v1) - db/schema.sql: Neon schema (users/devices/pairing/projects/sessions/turns/checkpoints/samples) - pages: /login, /pair; dep: pg
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Tests now merged to main (c33f162) — re-running the suite on the Ghost MVP preview: https://ghostinthecodebase-git-feat-ghost-cloud-ako-7127.vercel.app (latest preview deployment is Ready). Previous run's 23 failures were harness-side internal errors (shared ref 77eed1ae); the same tests pass 23/23 via CLI executions and the integration flow passed in that run too. |
|
Caution
|
| Screenshot | Error details |
|---|---|
|
— |
expected exactly one invoice, got 2 |
Suggested Fix Prompt (Copy into your AI coding agent)
I’m changing the test to stop asserting a single-item list and instead verify that the list returns alice-owned invoices, includes the seeded invoice, and does not leak other users’ data. The retrieval step will use a known alice invoice id from the response rather than assuming only one result.
Reject invoice listing without authentication
| Screenshot | Error details |
|---|---|
|
— |
TestSprite hit an internal error while running this test; our team has been notified. (ref: 320c97fd-7286-4c55-a3f9-6c08d23b8fc8) |
Return 404 for an unknown invoice id
| Screenshot | Error details |
|---|---|
|
— |
TestSprite hit an internal error while running this test; our team has been notified. (ref: 320c97fd-7286-4c55-a3f9-6c08d23b8fc8) |
Get own seeded invoice by id as Alice
| Screenshot | Error details |
|---|---|
|
— |
TestSprite hit an internal error while running this test; our team has been notified. (ref: 320c97fd-7286-4c55-a3f9-6c08d23b8fc8) |
Create an invoice then read it back
| Screenshot | Error details |
|---|---|
|
— |
TestSprite hit an internal error while running this test; our team has been notified. (ref: 320c97fd-7286-4c55-a3f9-6c08d23b8fc8) |
Unknown invoice id returns not_found even for authenticated user
| Screenshot | Error details |
|---|---|
|
— |
TestSprite hit an internal error while running this test; our team has been notified. (ref: 320c97fd-7286-4c55-a3f9-6c08d23b8fc8) |
Create invoice without x-user-id returns 401 and no invoice is created
| Screenshot | Error details |
|---|---|
|
— |
TestSprite hit an internal error while running this test; our team has been notified. (ref: 320c97fd-7286-4c55-a3f9-6c08d23b8fc8) |
Unauthenticated request to invoices endpoint should not reveal data even if caller is otherwise valid
| Screenshot | Error details |
|---|---|
|
— |
TestSprite hit an internal error while running this test; our team has been notified. (ref: 320c97fd-7286-4c55-a3f9-6c08d23b8fc8) |
Create invoice with malformed JSON body returns 400 invalid_json
| Screenshot | Error details |
|---|---|
|
— |
TestSprite hit an internal error while running this test; our team has been notified. (ref: 320c97fd-7286-4c55-a3f9-6c08d23b8fc8) |
Reject unauthenticated invoice read
| Screenshot | Error details |
|---|---|
|
— |
TestSprite hit an internal error while running this test; our team has been notified. (ref: 320c97fd-7286-4c55-a3f9-6c08d23b8fc8) |
Invoice list response shape is stable for seeded invoices
| Screenshot | Error details |
|---|---|
|
— |
TestSprite hit an internal error while running this test; our team has been notified. (ref: 320c97fd-7286-4c55-a3f9-6c08d23b8fc8) |
Deny access when Alice reads Bob's invoice
| Screenshot | Error details |
|---|---|
|
— |
TestSprite hit an internal error while running this test; our team has been notified. (ref: 320c97fd-7286-4c55-a3f9-6c08d23b8fc8) |
List invoices with a real user session returns only that user's seeded invoice
| Screenshot | Error details |
|---|---|
|
— |
TestSprite hit an internal error while running this test; our team has been notified. (ref: 320c97fd-7286-4c55-a3f9-6c08d23b8fc8) |
List invoices does not leak other users' invoice records or fields
| Screenshot | Error details |
|---|---|
|
— |
TestSprite hit an internal error while running this test; our team has been notified. (ref: 320c97fd-7286-4c55-a3f9-6c08d23b8fc8) |
Create invoice with non-numeric amount returns 422 and creates nothing
| Screenshot | Error details |
|---|---|
|
— |
TestSprite hit an internal error while running this test; our team has been notified. (ref: 320c97fd-7286-4c55-a3f9-6c08d23b8fc8) |
Get own seeded invoice by id as Bob
| Screenshot | Error details |
|---|---|
|
— |
TestSprite hit an internal error while running this test; our team has been notified. (ref: 320c97fd-7286-4c55-a3f9-6c08d23b8fc8) |
Create invoice with missing customer returns 422 and creates nothing
| Screenshot | Error details |
|---|---|
|
— |
TestSprite hit an internal error while running this test; our team has been notified. (ref: 320c97fd-7286-4c55-a3f9-6c08d23b8fc8) |
| Screenshot | Error details |
|---|---|
|
— |
TestSprite hit an internal error while running this test; our team has been notified. (ref: 320c97fd-7286-4c55-a3f9-6c08d23b8fc8) |
Reject missing auth before invoice existence is evaluated
| Screenshot | Error details |
|---|---|
|
— |
TestSprite hit an internal error while running this test; our team has been notified. (ref: 320c97fd-7286-4c55-a3f9-6c08d23b8fc8) |
| Screenshot | Error details |
|---|---|
|
— |
TestSprite hit an internal error while running this test; our team has been notified. (ref: 320c97fd-7286-4c55-a3f9-6c08d23b8fc8) |
Create and read invoice as Alice, ensuring owner isolation fields
| Screenshot | Error details |
|---|---|
|
— |
TestSprite hit an internal error while running this test; our team has been notified. (ref: 320c97fd-7286-4c55-a3f9-6c08d23b8fc8) |
Unknown x-user-id value returns 401 on POST /api/invoices
| Screenshot | Error details |
|---|---|
|
— |
TestSprite hit an internal error while running this test; our team has been notified. (ref: 320c97fd-7286-4c55-a3f9-6c08d23b8fc8) |
Read a created invoice using the id captured from create
| Screenshot | Error details |
|---|---|
|
— |
TestSprite hit an internal error while running this test; our team has been notified. (ref: 320c97fd-7286-4c55-a3f9-6c08d23b8fc8) |
Reject invoice listing with unknown user identity
| Screenshot | Error details |
|---|---|
|
— |
TestSprite hit an internal error while running this test; our team has been notified. (ref: 320c97fd-7286-4c55-a3f9-6c08d23b8fc8) |
Evaluation details
What could be better: The clearest defect is invoice scoping:
Invoice visibility and retrieval flow failed with expected exactly one invoice, got 2, and the payload shows both Alice-owned invoices in the list. That suggests the listing endpoint is not applying the expected seeded-user filter, or the test setup left extra records visible. The rest of the suite could not be meaningfully distinguished because many tests hit the same TestSprite internal error reference (320c97fd-7286-4c55-a3f9-6c08d23b8fc8), so blocked coverage is substantial. The main gap is reliable auth/ownership enforcement and clearer separation of seed data per user.
Recommended next steps: First, inspect the invoice list and read endpoints to confirm they enforce user scoping consistently for Alice and Bob, then rerun the visibility/retrieval tests to verify only the expected seeded invoice appears. Next, validate the auth middleware and request validation paths separately so missing
x-user-id, unknown users, malformed JSON, and bad amount/customer fields produce the expected 401/400/422 responses without creating records. Since many tests were blocked by the harness, re-run the high-priority auth and ownership cases after each fix and use the test titles in the fix prompt to grep quickly for the affected specs.
|
Production redeployed from merged main — seeded state clean, list tests hardened to be count-tolerant, integration flow passing. Suite re-verification: https://ghostinthecodebase-git-feat-ghost-cloud-ako-7127.vercel.app |
Ghost MVP
Product layer observed by the test suite (no changes to the stable /api/invoices\ target API contract that TestSprite exercises):
Verification
Notes