Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/src/domain/demo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ enum Item {
name: &'static str,
pages: Vec<PdfPage>,
},
/// A PDF registered but never uploaded: the build's snapshot fails with "the file was never uploaded".
/// A PDF registered but never uploaded: the build's snapshot fails with "the PDF was never uploaded".
MissingPdf {
name: &'static str,
},
Expand Down
2 changes: 1 addition & 1 deletion app/src/domain/processing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ pub async fn process(build: Build, store: &BlobStore, renderer_version: &str) ->
if snapshot.kind == "document" {
if snapshot.render_id.is_none() {
if blob_missing {
mark_failed(snapshot, "the file was never uploaded").await?;
mark_failed(snapshot, "the PDF was never uploaded").await?;
continue;
}
let blob = snapshot.source_blob.clone().unwrap_or_default();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"result": {
"content": [
{
"text": "{\"invitation\":{\"created_at\":\"<time:1>\",\"email\":\"ada@example.com\",\"forge\":null,\"id\":\"<uuid:1>\",\"invitee\":\"ada@example.com\",\"login\":null,\"role\":\"member\"},\"members\":[{\"avatar_url\":null,\"email\":\"<uuid:2>@example.com\",\"id\":\"<uuid:3>\",\"identities\":[],\"login\":null,\"name\":\"owner\",\"role\":\"admin\",\"since\":\"<time:1>\",\"source\":\"created\",\"synced_at\":null},{\"avatar_url\":null,\"email\":\"member@example.com\",\"id\":\"<uuid:4>\",\"identities\":[],\"login\":null,\"name\":\"member\",\"role\":\"member\",\"since\":\"<time:1>\",\"source\":\"created\",\"synced_at\":null}]}",
"text": "{\"invitation\":{\"created_at\":\"<time:1>\",\"email\":\"ada@example.com\",\"forge\":null,\"id\":\"<uuid:1>\",\"invitee\":\"ada@example.com\",\"login\":null,\"role\":\"member\"},\"members\":[{\"avatar_url\":null,\"email\":\"<uuid:2>@example.com\",\"id\":\"<uuid:3>\",\"identities\":[],\"login\":null,\"name\":\"owner\",\"role\":\"admin\",\"since\":\"<time:2>\",\"source\":\"created\",\"synced_at\":null},{\"avatar_url\":null,\"email\":\"member@example.com\",\"id\":\"<uuid:4>\",\"identities\":[],\"login\":null,\"name\":\"member\",\"role\":\"member\",\"since\":\"<time:2>\",\"source\":\"created\",\"synced_at\":null}]}",
"type": "text"
}
],
Expand All @@ -31,7 +31,7 @@
"login": null,
"name": "owner",
"role": "admin",
"since": "<time:1>",
"since": "<time:2>",
"source": "created",
"synced_at": null
},
Expand All @@ -43,7 +43,7 @@
"login": null,
"name": "member",
"role": "member",
"since": "<time:1>",
"since": "<time:2>",
"source": "created",
"synced_at": null
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"result": {
"content": [
{
"text": "{\"invitation\":{\"created_at\":\"<time:1>\",\"email\":\"ada@example.com\",\"forge\":null,\"id\":\"<uuid:1>\",\"invitee\":\"ada@example.com\",\"login\":null,\"role\":\"member\"},\"members\":[{\"avatar_url\":null,\"email\":\"<uuid:2>@example.com\",\"id\":\"<uuid:3>\",\"identities\":[],\"login\":null,\"name\":\"owner\",\"role\":\"admin\",\"since\":\"<time:1>\",\"source\":\"created\",\"synced_at\":null},{\"avatar_url\":null,\"email\":\"member@example.com\",\"id\":\"<uuid:4>\",\"identities\":[],\"login\":null,\"name\":\"member\",\"role\":\"member\",\"since\":\"<time:1>\",\"source\":\"created\",\"synced_at\":null}]}",
"text": "{\"invitation\":{\"created_at\":\"<time:1>\",\"email\":\"ada@example.com\",\"forge\":null,\"id\":\"<uuid:1>\",\"invitee\":\"ada@example.com\",\"login\":null,\"role\":\"member\"},\"members\":[{\"avatar_url\":null,\"email\":\"<uuid:2>@example.com\",\"id\":\"<uuid:3>\",\"identities\":[],\"login\":null,\"name\":\"owner\",\"role\":\"admin\",\"since\":\"<time:2>\",\"source\":\"created\",\"synced_at\":null},{\"avatar_url\":null,\"email\":\"member@example.com\",\"id\":\"<uuid:4>\",\"identities\":[],\"login\":null,\"name\":\"member\",\"role\":\"member\",\"since\":\"<time:2>\",\"source\":\"created\",\"synced_at\":null}]}",
"type": "text"
}
],
Expand All @@ -31,7 +31,7 @@
"login": null,
"name": "owner",
"role": "admin",
"since": "<time:1>",
"since": "<time:2>",
"source": "created",
"synced_at": null
},
Expand All @@ -43,7 +43,7 @@
"login": null,
"name": "member",
"role": "member",
"since": "<time:1>",
"since": "<time:2>",
"source": "created",
"synced_at": null
}
Expand Down
6 changes: 6 additions & 0 deletions app/tests/mcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1072,6 +1072,12 @@ async fn invite_member_checks(app: Application) -> laravel::Result<()> {
let member =
create!(User { pid: laravel::str::uuid7(), name: "member", email: "member@example.com", staff: false }).await?;
app::testing::fixtures::member(&org, &member, "member").await?;
// Both memberships at one fixed time, so the golden never depends on a second ticking over between them and the
// invitation (`since` has seconds).
let org_id = org.id;
db::query!("UPDATE memberships SET created_at = '2026-11-20 15:00:00+00' WHERE organization_id = {org_id}")
.update()
.await?;
let member_token = token("user_tokens", member.id, "member", "vcu").await?;
let invite = json!({ "org": f.org, "invitee": "ada@example.com", "role": "member" });

Expand Down
1 change: 1 addition & 0 deletions app/tests/screenshots_seed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ async fn seeded() -> laravel::Result<()> {
let failed =
Snapshot::query().filter(Snapshot::name.eq("invoice_long.pdf")).first().await?.expect("the missing pdf");
assert_eq!(failed.state, "failed");
assert_eq!(failed.error.as_deref(), Some("the PDF was never uploaded"), "server/'s wording for a document");
// Fixed ids and prefixes.
// Ids don't restart in a reused test database (sequences survive the rollback), so each pid is checked against
// its own row's id.
Expand Down
Loading