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
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,12 @@ crono-export
crono-export-linux-amd64
*.zip
*.tar.gz

# Wire-capture dumps from tools/wirecapture/ — contain raw cookies,
# anti-CSRF tokens, password POST bodies, and real account data. Never
# commit. Redacted fixtures live in
# internal/cronoclient/testdata/cronometer/ and are committed.
cronometer-capture/
tools/wirecapture/captures/
tools/wirecapture/wirecapture
*.unredacted.json
47 changes: 47 additions & 0 deletions internal/cronoclient/testdata/cronometer/001_login_get.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"seq": 1,
"label": "login_get",
"reqMethod": "GET",
"reqUrl": "https://cronometer.com/login/",
"reqHeader": {},
"reqBodySummary": null,
"respStatus": 200,
"respHeader": {
"Content-Type": [
"text/html;charset=UTF-8"
],
"Date": [
"Tue, 12 May 2026 02:18:14 GMT"
],
"Referrer-Policy": [
"strict-origin-when-cross-origin"
],
"Set-Cookie": [
"<REDACTED-COOKIE-NAME>=<REDACTED-VALUE>; Expires=Tue, 19 May 2026 02:18:14 GMT; Path=/",
"<REDACTED-COOKIE-NAME>=<REDACTED-VALUE>; Expires=Tue, 19 May 2026 02:18:14 GMT; Path=/; SameSite=None; Secure",
"<REDACTED-COOKIE-NAME>=<REDACTED-VALUE>; Path=/; Secure; HttpOnly",
"<REDACTED-COOKIE-NAME>=<REDACTED-VALUE>; Max-Age=172800; Expires=Thu, 14 May 2026 02:18:14 GMT; Path=/; Secure; HttpOnly"
],
"Strict-Transport-Security": [
"max-age=63072000; includeSubDomains; preload"
],
"Vary": [
"accept-encoding"
],
"X-Content-Type-Options": [
"nosniff"
],
"X-Frame-Options": [
"sameorigin"
],
"X-Xss-Protection": [
"1; mode=block"
]
},
"respBodySummary": {
"kind": "text",
"len": 683935,
"note": "Body elided (contains real account data + tokens). See WIRE_SHAPES.md for the synthesized response shape for this endpoint."
},
"durationMsApprox": 105
}
58 changes: 58 additions & 0 deletions internal/cronoclient/testdata/cronometer/002_login_post.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"seq": 2,
"label": "login_post",
"reqMethod": "POST",
"reqUrl": "https://cronometer.com/login",
"reqHeader": {
"Content-Type": [
"application/x-www-form-urlencoded"
],
"Cookie": [
"<REDACTED-COOKIE-VALUES>"
]
},
"reqBodySummary": {
"kind": "text",
"len": 104,
"note": "Body elided. See WIRE_SHAPES.md for the synthesized request shape for this endpoint."
},
"respStatus": 200,
"respHeader": {
"Content-Type": [
"application/json;charset=UTF-8"
],
"Date": [
"Tue, 12 May 2026 02:18:14 GMT"
],
"Referrer-Policy": [
"strict-origin-when-cross-origin"
],
"Set-Cookie": [
"<REDACTED-COOKIE-NAME>=<REDACTED-VALUE>; Expires=Tue, 19 May 2026 02:18:14 GMT; Path=/",
"<REDACTED-COOKIE-NAME>=<REDACTED-VALUE>; Expires=Tue, 19 May 2026 02:18:14 GMT; Path=/; SameSite=None; Secure",
"<REDACTED-COOKIE-NAME>=<REDACTED-VALUE>; Max-Age=1209600; Expires=Tue, 26 May 2026 02:18:14 GMT; Path=/; Secure; HttpOnly; SameSite=Lax",
"<REDACTED-COOKIE-NAME>=<REDACTED-VALUE>; Max-Age=0; Expires=Thu, 01 Jan 1970 00:00:10 GMT; Path=/; Secure; HttpOnly"
],
"Strict-Transport-Security": [
"max-age=63072000; includeSubDomains; preload"
],
"Vary": [
"accept-encoding"
],
"X-Content-Type-Options": [
"nosniff"
],
"X-Frame-Options": [
"sameorigin"
],
"X-Xss-Protection": [
"1; mode=block"
]
},
"respBodySummary": {
"kind": "text",
"len": 39,
"note": "Body elided (contains real account data + tokens). See WIRE_SHAPES.md for the synthesized response shape for this endpoint."
},
"durationMsApprox": 138
}
63 changes: 63 additions & 0 deletions internal/cronoclient/testdata/cronometer/003_gwt_authenticate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"seq": 3,
"label": "gwt_authenticate",
"reqMethod": "POST",
"reqUrl": "https://cronometer.com/cronometer/app",
"reqHeader": {
"Content-Type": [
"text/x-gwt-rpc; charset=UTF-8"
],
"Cookie": [
"<REDACTED-COOKIE-VALUES>"
],
"X-Gwt-Module-Base": [
"https://cronometer.com/cronometer/"
],
"X-Gwt-Permutation": [
"7B121DC5483BF272B1BC1916DA9FA963"
]
},
"reqBodySummary": {
"kind": "text",
"len": 179,
"note": "Body elided. See WIRE_SHAPES.md for the synthesized request shape for this endpoint."
},
"respStatus": 200,
"respHeader": {
"Content-Disposition": [
"attachment"
],
"Content-Type": [
"application/json;charset=utf-8"
],
"Date": [
"Tue, 12 May 2026 02:18:14 GMT"
],
"Referrer-Policy": [
"strict-origin-when-cross-origin"
],
"Set-Cookie": [
"<REDACTED-COOKIE-NAME>=<REDACTED-VALUE>; Expires=Tue, 19 May 2026 02:18:14 GMT; Path=/",
"<REDACTED-COOKIE-NAME>=<REDACTED-VALUE>; Expires=Tue, 19 May 2026 02:18:14 GMT; Path=/; SameSite=None; Secure",
"<REDACTED-COOKIE-NAME>=<REDACTED-VALUE>; Max-Age=1209600; Expires=Tue, 26 May 2026 02:18:14 GMT; Path=/; Secure; HttpOnly; SameSite=Lax"
],
"Strict-Transport-Security": [
"max-age=63072000; includeSubDomains; preload"
],
"X-Content-Type-Options": [
"nosniff"
],
"X-Frame-Options": [
"sameorigin"
],
"X-Xss-Protection": [
"1; mode=block"
]
},
"respBodySummary": {
"kind": "text",
"len": 8294,
"note": "Body elided (contains real account data + tokens). See WIRE_SHAPES.md for the synthesized response shape for this endpoint."
},
"durationMsApprox": 54
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"seq": 4,
"label": "gwt_generate_auth_token_servings",
"reqMethod": "POST",
"reqUrl": "https://cronometer.com/cronometer/app",
"reqHeader": {
"Content-Type": [
"text/x-gwt-rpc; charset=UTF-8"
],
"Cookie": [
"<REDACTED-COOKIE-VALUES>"
],
"X-Gwt-Module-Base": [
"https://cronometer.com/cronometer/"
],
"X-Gwt-Permutation": [
"7B121DC5483BF272B1BC1916DA9FA963"
]
},
"reqBodySummary": {
"kind": "text",
"len": 294,
"note": "Body elided. See WIRE_SHAPES.md for the synthesized request shape for this endpoint."
},
"respStatus": 200,
"respHeader": {
"Content-Disposition": [
"attachment"
],
"Content-Length": [
"48"
],
"Content-Type": [
"application/json;charset=utf-8"
],
"Date": [
"Tue, 12 May 2026 02:18:14 GMT"
],
"Referrer-Policy": [
"strict-origin-when-cross-origin"
],
"Set-Cookie": [
"<REDACTED-COOKIE-NAME>=<REDACTED-VALUE>; Expires=Tue, 19 May 2026 02:18:14 GMT; Path=/",
"<REDACTED-COOKIE-NAME>=<REDACTED-VALUE>; Expires=Tue, 19 May 2026 02:18:14 GMT; Path=/; SameSite=None; Secure"
],
"Strict-Transport-Security": [
"max-age=63072000; includeSubDomains; preload"
],
"X-Content-Type-Options": [
"nosniff"
],
"X-Frame-Options": [
"sameorigin"
],
"X-Xss-Protection": [
"1; mode=block"
]
},
"respBodySummary": {
"kind": "text",
"len": 48,
"note": "Body elided (contains real account data + tokens). See WIRE_SHAPES.md for the synthesized response shape for this endpoint."
},
"durationMsApprox": 25
}
61 changes: 61 additions & 0 deletions internal/cronoclient/testdata/cronometer/005_export_servings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"seq": 5,
"label": "export_servings",
"reqMethod": "GET",
"reqUrl": "https://cronometer.com/export?end=2026-05-11&generate=servings&nonce=%3CREDACTED%3E&start=2026-05-04",
"reqHeader": {
"Cookie": [
"<REDACTED-COOKIE-VALUES>"
],
"Sec-Fetch-Dest": [
"document"
],
"Sec-Fetch-Mode": [
"navigate"
],
"Sec-Fetch-Site": [
"same-origin"
]
},
"reqBodySummary": null,
"respStatus": 200,
"respHeader": {
"Content-Disposition": [
"attachment; filename=\"servings.csv\""
],
"Content-Length": [
"6507"
],
"Content-Type": [
"text/csv"
],
"Date": [
"Tue, 12 May 2026 02:18:14 GMT"
],
"Referrer-Policy": [
"strict-origin-when-cross-origin"
],
"Set-Cookie": [
"<REDACTED-COOKIE-NAME>=<REDACTED-VALUE>; Expires=Tue, 19 May 2026 02:18:14 GMT; Path=/",
"<REDACTED-COOKIE-NAME>=<REDACTED-VALUE>; Expires=Tue, 19 May 2026 02:18:14 GMT; Path=/; SameSite=None; Secure"
],
"Strict-Transport-Security": [
"max-age=63072000; includeSubDomains; preload"
],
"X-Content-Type-Options": [
"nosniff"
],
"X-Frame-Options": [
"sameorigin"
],
"X-Xss-Protection": [
"1; mode=block"
]
},
"respBodySummary": {
"kind": "text",
"len": 6500,
"note": "Body elided (contains real account data + tokens). See WIRE_SHAPES.md for the synthesized response shape for this endpoint."
},
"durationMsApprox": 59
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"seq": 6,
"label": "gwt_generate_auth_token_exercises",
"reqMethod": "POST",
"reqUrl": "https://cronometer.com/cronometer/app",
"reqHeader": {
"Content-Type": [
"text/x-gwt-rpc; charset=UTF-8"
],
"Cookie": [
"<REDACTED-COOKIE-VALUES>"
],
"X-Gwt-Module-Base": [
"https://cronometer.com/cronometer/"
],
"X-Gwt-Permutation": [
"7B121DC5483BF272B1BC1916DA9FA963"
]
},
"reqBodySummary": {
"kind": "text",
"len": 294,
"note": "Body elided. See WIRE_SHAPES.md for the synthesized request shape for this endpoint."
},
"respStatus": 200,
"respHeader": {
"Content-Disposition": [
"attachment"
],
"Content-Length": [
"48"
],
"Content-Type": [
"application/json;charset=utf-8"
],
"Date": [
"Tue, 12 May 2026 02:18:14 GMT"
],
"Referrer-Policy": [
"strict-origin-when-cross-origin"
],
"Set-Cookie": [
"<REDACTED-COOKIE-NAME>=<REDACTED-VALUE>; Expires=Tue, 19 May 2026 02:18:14 GMT; Path=/",
"<REDACTED-COOKIE-NAME>=<REDACTED-VALUE>; Expires=Tue, 19 May 2026 02:18:14 GMT; Path=/; SameSite=None; Secure"
],
"Strict-Transport-Security": [
"max-age=63072000; includeSubDomains; preload"
],
"X-Content-Type-Options": [
"nosniff"
],
"X-Frame-Options": [
"sameorigin"
],
"X-Xss-Protection": [
"1; mode=block"
]
},
"respBodySummary": {
"kind": "text",
"len": 48,
"note": "Body elided (contains real account data + tokens). See WIRE_SHAPES.md for the synthesized response shape for this endpoint."
},
"durationMsApprox": 26
}
Loading
Loading