Repository navigation
feat(core): add shared request timing collector and middleware #389
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
9c03cc5
ab44494
878be47
4dd6bf8
0185297
4bdb54b
42f429a
1ed8229
777e8ed
d52b8c5
3b436c7
511ce06
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,10 @@ | ||
| Run the full CI gate checks locally before pushing. Run all four commands sequentially and report any failures: | ||
| Run the full CI gate checks locally before pushing. Run all six commands sequentially and report any failures: | ||
|
|
||
| 1. `cargo fmt --all -- --check` | ||
| 2. `cargo clippy --workspace --all-targets --all-features -- -D warnings` | ||
| 3. `cargo test --workspace --all-targets` | ||
| 4. `cargo check --workspace --all-targets --features "fastly cloudflare"` | ||
| 4. `cargo test -p edgezero-core --doc` | ||
| 5. `cargo check --workspace --all-targets --features "fastly cloudflare spin"` | ||
| 6. `cargo check -p edgezero-adapter-spin --target wasm32-wasip2 --features spin` | ||
|
|
||
| If any step fails, show the errors and suggest fixes. Do not proceed to the next step until the current one passes. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| //! Keep the local check command aligned with the documented CI gates. | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ♻️ This guard sits in the wrong place and is brittle: it checks Wherever it lives, the count shouldn't be hard-coded. let expected = gate_commands(gates);
assert_eq!(gate_commands(command), expected);
let row = format!("Run all {} CI gate checks locally", expected.len());
assert!(command_row.contains(&row)); |
||
|
|
||
| #[cfg(test)] | ||
| mod tests { | ||
| fn gate_commands(markdown: &str) -> Vec<&str> { | ||
| markdown | ||
| .lines() | ||
| .filter_map(|line| line.split_once(". `")?.1.strip_suffix('`')) | ||
| .collect() | ||
| } | ||
|
|
||
| #[test] | ||
| fn local_check_command_matches_documented_ci_gates() { | ||
| let conventions = include_str!("../../../CLAUDE.md"); | ||
| let command = include_str!("../../../.claude/commands/check-ci.md"); | ||
| let gates = conventions | ||
| .split_once("## CI Gates\n") | ||
| .unwrap() | ||
| .1 | ||
| .split_once("\n## ") | ||
| .unwrap() | ||
| .0; | ||
| let expected = gate_commands(gates); | ||
| assert_eq!(expected.len(), 6); | ||
| assert_eq!(gate_commands(command), expected); | ||
| assert!(command.starts_with( | ||
| "Run the full CI gate checks locally before pushing. Run all six commands sequentially" | ||
| )); | ||
| let command_row = conventions | ||
| .lines() | ||
| .find(|line| line.starts_with("| `/check-ci`")) | ||
| .unwrap(); | ||
| assert!(command_row.contains("Run all 6 CI gate checks locally")); | ||
| } | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.