mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-10-06 15:02:20 +02:00
The decomposition lanes have two safety nets and neither covers the product. The checkpoint benchmark measures the agent runtime; the computed-style snapshot pins the CSS. Nothing checked that Notes, Calendar, Documents, Email, Memory, Cookbook or Settings still worked after a route package moved or a 17,000-line module was split - and the unit suite does not, since a byte-identical file move can break tests that pass on the base branch with CI green throughout. The 28 Playwright specs we do have are all under tests/e2e/photo-editor/ and no workflow runs them. scripts/odysseus-smoke boots this worktree through `odysseus dev` and runs tests/smoke/: one scenario per area, each asserting a user-visible outcome rather than a status code. Models come from a deterministic OpenAI-compatible stub on an ephemeral loopback port; email reuses the existing ODYSSEUS_EMAIL_FIXTURE path rather than inventing a second mechanism. No scenario touches a live endpoint or the network. The report is a per-area table that prints the areas the suite does not cover next to the ones it does, and builds its rows from the registry rather than from what happened to run, so an area cannot go missing by having its module deleted or renamed. Under a plain pytest with nothing booted every scenario skips with the reason, so the full suite stays green.
28 lines
1.0 KiB
Python
28 lines
1.0 KiB
Python
"""Uploads: a file uploaded through the chat attachment route reads back byte for byte."""
|
|
from __future__ import annotations
|
|
|
|
UPLOAD_PATH = "/api/upload"
|
|
STATS_PATH = "/api/upload/stats"
|
|
|
|
FILENAME = "odysseus-smoke-attachment.txt"
|
|
CONTENT = b"Uploaded by the release smoke suite."
|
|
|
|
|
|
def test_an_upload_reads_back_unchanged(client):
|
|
response = client.post(UPLOAD_PATH,
|
|
files={"files": (FILENAME, CONTENT, "text/plain")})
|
|
assert response.status_code == 200, response.text
|
|
files = response.json().get("files") or []
|
|
assert len(files) == 1, response.text
|
|
entry = files[0]
|
|
assert entry.get("name") == FILENAME, entry
|
|
assert entry.get("size") == len(CONTENT), entry
|
|
|
|
fetched = client.get(f"{UPLOAD_PATH}/{entry['id']}")
|
|
assert fetched.status_code == 200, fetched.text
|
|
assert fetched.content == CONTENT, fetched.content
|
|
|
|
stats = client.get(STATS_PATH)
|
|
assert stats.status_code == 200, stats.text
|
|
assert stats.json().get("total_files", 0) >= 1, stats.text
|