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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,7 @@ apps/desktop/src-tauri/gen/

# Generated SBOMs (CI artifacts, never committed)
*.cdx.json

# Python bytecode (the conformance harness runs with python3 -I)
__pycache__/
*.pyc
3 changes: 2 additions & 1 deletion crates/forge/conformance/FINDINGS.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,8 @@ Each version passes its own fixtures (22/22). Checking the 1.22.6 fixtures again

- A full record run takes about 2.5 to 3 minutes per version and needs a fresh server (the merge
scenario waits for Gitea's async PR checks and is the slowest, about 45 s).
- Fixtures are 3.5 MB across the two versions; compact JSON would roughly halve that.
- Fixtures are stored compactly (header on one line, one exchange per line): 2.3 MB across the two versions, down from 3.8 MB.
Most of the rest is real payload (diffs, base64, git output), so further savings would mean dropping recorded content.

## Additional recordings (review follow-up)

Expand Down
3 changes: 2 additions & 1 deletion crates/forge/conformance/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ serves, **recorded from real Gitea** rather than written by hand. A scenario run
- `check` runs the same scenarios against any server and compares the result with the fixtures.
- `diff` compares two fixture directories offline, for example `1.22.6` against `1.26.2`.

`show` prints a readable digest of a fixture directory. Everything is Python 3 standard library plus
`show` prints a readable digest of a fixture directory. `selftest` (offline, run by `forge-check.sh`) checks that the compact fixture writer round-trips and that
every stored fixture is exactly what it would write. Everything is Python 3 standard library plus
`git` and (for recording) Docker. Always run Python as `python3 -I`.

## Record against real Gitea
Expand Down
176 changes: 11 additions & 165 deletions crates/forge/conformance/fixtures/1.22.6/A-meta.json
Original file line number Diff line number Diff line change
@@ -1,165 +1,11 @@
{
"scenario": "A",
"title": "meta",
"error": null,
"exchanges": [
{
"kind": "http",
"method": "GET",
"path": "/api/v1/version",
"auth": "admin",
"status": 200,
"headers": {
"content-type": "application/json;charset=utf-8"
},
"body": {
"version": "1.22.6"
}
},
{
"kind": "http",
"method": "GET",
"path": "/api/v1/version",
"auth": "none",
"status": 403,
"headers": {
"content-type": "application/json;charset=utf-8"
},
"body": {
"message": "Only signed in user is allowed to call APIs."
}
},
{
"kind": "http",
"method": "GET",
"path": "/api/healthz",
"auth": "none",
"status": 200,
"headers": {
"content-type": "application/json"
},
"body": {
"status": "pass",
"description": "Gitea: Git with a cup of tea",
"checks": {
"cache:ping": [
{
"status": "pass",
"time": "<ts>"
}
],
"database:ping": [
{
"status": "pass",
"time": "<ts>"
}
]
}
}
},
{
"kind": "http",
"method": "GET",
"path": "/api/v1/user",
"auth": "admin",
"status": 200,
"headers": {
"content-type": "application/json;charset=utf-8"
},
"body": {
"id": "<id:id#1>",
"login": "<admin>",
"login_name": "",
"source_id": "<id:source_id#1>",
"full_name": "",
"email": "admin@example.invalid",
"avatar_url": "<base>/avatars/98afc2e6474fc6c67d129b8b3043e959",
"html_url": "<base>/<admin>",
"language": "",
"is_admin": true,
"last_login": "<ts>",
"created": "<ts>",
"restricted": false,
"active": true,
"prohibit_login": false,
"location": "",
"website": "",
"description": "",
"visibility": "public",
"followers_count": 0,
"following_count": 0,
"starred_repos_count": 0,
"username": "<admin>"
}
},
{
"kind": "http",
"method": "GET",
"path": "/api/v1/user",
"auth": "bad",
"status": 401,
"headers": {
"content-type": "application/json;charset=utf-8"
},
"body": {
"message": "user does not exist [uid: 0, name: ]",
"url": "<base>/api/swagger"
}
},
{
"kind": "http",
"method": "GET",
"path": "/api/v1/user",
"auth": "none",
"status": 403,
"headers": {
"content-type": "application/json;charset=utf-8"
},
"body": {
"message": "Only signed in user is allowed to call APIs."
}
},
{
"kind": "http",
"method": "GET",
"path": "/api/v1/repos/<admin>/probe",
"auth": "none",
"status": 403,
"headers": {
"content-type": "application/json;charset=utf-8"
},
"body": {
"message": "Only signed in user is allowed to call APIs."
}
},
{
"kind": "http",
"method": "GET",
"path": "/api/v1/repos/<admin>/probe",
"auth": "bad",
"status": 401,
"headers": {
"content-type": "application/json;charset=utf-8"
},
"body": {
"message": "user does not exist [uid: 0, name: ]",
"url": "<base>/api/swagger"
}
},
{
"kind": "http",
"method": "GET",
"path": "/api/v1/repos/<admin>/missing",
"auth": "admin",
"status": 404,
"headers": {
"content-type": "application/json;charset=utf-8"
},
"body": {
"errors": null,
"message": "The target couldn't be found.",
"url": "<base>/api/swagger"
}
}
]
}
{"scenario":"A","title":"meta","error":null,"exchanges":[
{"kind":"http","method":"GET","path":"/api/v1/version","auth":"admin","status":200,"headers":{"content-type":"application/json;charset=utf-8"},"body":{"version":"1.22.6"}},
{"kind":"http","method":"GET","path":"/api/v1/version","auth":"none","status":403,"headers":{"content-type":"application/json;charset=utf-8"},"body":{"message":"Only signed in user is allowed to call APIs."}},
{"kind":"http","method":"GET","path":"/api/healthz","auth":"none","status":200,"headers":{"content-type":"application/json"},"body":{"status":"pass","description":"Gitea: Git with a cup of tea","checks":{"cache:ping":[{"status":"pass","time":"<ts>"}],"database:ping":[{"status":"pass","time":"<ts>"}]}}},
{"kind":"http","method":"GET","path":"/api/v1/user","auth":"admin","status":200,"headers":{"content-type":"application/json;charset=utf-8"},"body":{"id":"<id:id#1>","login":"<admin>","login_name":"","source_id":"<id:source_id#1>","full_name":"","email":"admin@example.invalid","avatar_url":"<base>/avatars/98afc2e6474fc6c67d129b8b3043e959","html_url":"<base>/<admin>","language":"","is_admin":true,"last_login":"<ts>","created":"<ts>","restricted":false,"active":true,"prohibit_login":false,"location":"","website":"","description":"","visibility":"public","followers_count":0,"following_count":0,"starred_repos_count":0,"username":"<admin>"}},
{"kind":"http","method":"GET","path":"/api/v1/user","auth":"bad","status":401,"headers":{"content-type":"application/json;charset=utf-8"},"body":{"message":"user does not exist [uid: 0, name: ]","url":"<base>/api/swagger"}},
{"kind":"http","method":"GET","path":"/api/v1/user","auth":"none","status":403,"headers":{"content-type":"application/json;charset=utf-8"},"body":{"message":"Only signed in user is allowed to call APIs."}},
{"kind":"http","method":"GET","path":"/api/v1/repos/<admin>/probe","auth":"none","status":403,"headers":{"content-type":"application/json;charset=utf-8"},"body":{"message":"Only signed in user is allowed to call APIs."}},
{"kind":"http","method":"GET","path":"/api/v1/repos/<admin>/probe","auth":"bad","status":401,"headers":{"content-type":"application/json;charset=utf-8"},"body":{"message":"user does not exist [uid: 0, name: ]","url":"<base>/api/swagger"}},
{"kind":"http","method":"GET","path":"/api/v1/repos/<admin>/missing","auth":"admin","status":404,"headers":{"content-type":"application/json;charset=utf-8"},"body":{"errors":null,"message":"The target couldn't be found.","url":"<base>/api/swagger"}}
]}
Loading
Loading