Repository navigation
test: verify Collection uploads through Server analysis and Dashboard - #124
Conversation
Serialize fictional current and legacy reports in Collection, persist and analyze them through real Server handlers with two private source teams, and decode the actual response in Dashboard. Keep independent expected scores and malformed-payload outcomes. Refs: LVT-272
Run the retained upload-to-analysis journey with disposable services and fail the aggregate when any applicable job is skipped, missing, cancelled or unsuccessful. Refs: LVT-272, LVT-273
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
🚅 Deployed to the lovat-pr-124 environment in lovat
2 services not affected by this PR
|
Lovat AI reviewStatus: completed · Model: Reviewed commit: Critical: 0 · High: 0 · Medium: 1 · Low: 0 Overall assessmentThis PR is almost entirely test and CI infrastructure, and the contract journey itself is well constructed: fixtures are synthetic, authorization is exercised through real JWT middleware, and the gate logic fails closed. The main concrete defect is in the Server integration test's teardown, which deletes teams, users, and the tournament but leaves scout reports, team match data, registered teams, and scouters behind, so the suite is not idempotent against a persistent lovat_test database and will fail on a second local run with unique-constraint or foreign-key errors. FindingsMedium (1)
Review details
Limitations
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1c79535567
ℹ️ 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".
| @@ -0,0 +1 @@ | |||
| {"slug":"contracts","label":"Cross-app contracts","required":["index.html","outcomes.json","collection-payloads.json","analysis.actual.json"],"browser":false} | |||
There was a problem hiding this comment.
Suppress the nonexistent contracts coverage link
When a successful main build publishes the report site, registering this section makes preparePagesReports render a contracts/coverage/ link for it, but the contract job never creates or uploads that directory and this manifest does not require it. The new Cross-app contracts row therefore always sends users to a missing page; add an explicit coverage capability to report sections or otherwise render this entry without that link.
AGENTS.md reference: AGENTS.md:L54-L56
Useful? React with 👍 / 👎.
📱 Connect your app to this PR deploymentScan a QR code to use this PR's Server API. Worker changes use the same API; Server URL: |
Keep the online SDK compatibility gate passing and render only coverage reports that are declared by their producer. Verify the contract chain reruns against the same disposable databases; Prisma cascades remove seeded descendants. Refs: LVT-272, LVT-273
…oard SDK Refs: LVT-272, LVT-273
There was a problem hiding this comment.
Lovat AI review: 1 new finding(s) at 538b863addd7d9d1bdba52ef2f7fd96d2b7dd7d5.
The persistent Lovat AI review comment contains the latest complete result.
apps/server/test/crossAppContract.integration.test.ts:196— Integration test teardown leaves scoutReport, teamMatchData, registeredTeam, and scouter rows behind (DATABASE· confidence 0.75)
| .set("X-Lovat-Error-Format", "json-v1"); | ||
| } | ||
|
|
||
| describe.sequential( |
There was a problem hiding this comment.
MEDIUM · DATABASE — Integration test teardown leaves scoutReport, teamMatchData, registeredTeam, and scouter rows behind
beforeAll creates registeredTeam, scouter, teamMatchData, and uploads scout reports, but afterAll only deletes cachedAnalysis, users, teams, and the tournament. The uploaded scout reports (uuids 92720001-...-0001..0004) and the teamMatchData rows for the two robots are never removed, and registeredTeam/scouter rows referencing the source teams are deleted only indirectly (if at all, via team deletion). On any persistent lovat_test database (the documented local workflow reuses one), a second run fails: db.team.create violates the unique number constraint, db.registeredTeam/scouter creations collide, and the scout report upload for an existing uuid will not behave as a fresh insert. Leftover teamMatchData rows can also block or corrupt tournament deletion on reruns.
Suggested fix: Extend the afterAll cleanup to delete scoutReport rows by the fixture uuids, teamMatchData rows for the robots/tournament, scouter rows by scouterUuid, and registeredTeam rows by code, before deleting teams and the tournament.
Lovat AI review · confidence 0.75 · z-ai/glm-5.3-flash
Collection, Server and Dashboard previously tested separate fixtures, so incompatible serializers or analysis responses could pass independently. This adds one fictional corpus with independently specified scores, legacy/malformed reports, two source teams and private-note expectations. CI passes Collection's actual serialized payloads through the real Server and disposable PostgreSQL/Redis, then decodes the actual analysis response in Dashboard.
Shared fixture/backend changes select consumer contracts. The aggregate requires every applicable suite to succeed, including Railway config, and fails on missing/skipped/cancelled results. Diagnostic contract reports upload after failure and join GitHub Pages at
/lovat/contracts/after a successful main run. The index only links to declared coverage reports. Align SDK 58 patch packages required by Expo's newly updated compatibility gate; the same alignment is included in Collection PR #125.Validation: the real cross-app GitHub job passed in run 43247779577. Local
bash scripts/check-contracts.shpassed twice against the same verified loopback-only databases (2 Collection + 3 Server + 2 Dashboard tests each run), confirming cascade cleanup/reruns. Server build/typecheck/lint and 1,462 unit tests passed; Collection test typecheck/lint and Dashboard analysis passed; 15 selection/gate/report tests, actionlint, structure and diff checks passed. After SDK alignment, Collection compatibility, all 141 existing tests, lint/format/types pass locally. Latest full CI pending. Expected arithmetic/provenance is documented for reviewer inspection.Physical devices, real Auth0, branch protection and provider promotion remain separately tracked release work; no production deployment is performed.
Refs: LVT-272, LVT-273.