Skip to content

Commit e30002c

Browse files
authored
test: expand explicit Kiro real-world repo coverage (#598) (#609)
1 parent 852d669 commit e30002c

3 files changed

Lines changed: 64 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313
- **README supported tools update**: Added a Kiro row to the Supported Tools table with current rule coverage (`KIRO-*`, `KR-SK-*`) and current file surface (`.kiro/steering/**/*.md` and `.kiro/skills/**/SKILL.md`) (#596).
1414
- **Kiro S-tier CI gate**: Added an explicit `Kiro S-tier Gate` step in the main CI test job that executes dedicated Kiro gate checks for target behavior, docs/rule parity integrity, and real-world manifest coverage on every PR/push (#602).
1515
- **Kiro fixture expansion**: Added fixture packs for Kiro powers, agents, hooks, and MCP settings plus integration tests to keep the corpus present and CLI-runnable (#599).
16+
- **Kiro real-world repo coverage**: Added/updated explicit Kiro-tagged real-world repos (`awsdataarchitect/kiro-best-practices`, `dereknguyen269/derek-power`, `cremich/promptz`, `Theadd/kiro-agents`) and tightened CI gating to require the expanded baseline in `tests/real-world/repos.yaml` (#598).
1617

1718
### Changed
1819
- **Kiro docs and tests**: Expanded integration/contract tests for Kiro target paths and updated usage docs to clarify legacy `--target` behavior versus `tools = [...]` filtering.

crates/agnix-cli/tests/kiro_ci_gate.rs

Lines changed: 53 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
use assert_cmd::Command;
22
use regex::Regex;
33
use serde::Deserialize;
4+
use std::collections::HashSet;
45
use std::fs;
56
use std::io::Write;
67
use std::path::{Path, PathBuf};
@@ -54,6 +55,27 @@ fn agnix() -> Command {
5455
cmd
5556
}
5657

58+
fn normalize_repo_url(url: &str) -> Option<String> {
59+
let trimmed = url.trim().trim_end_matches('/');
60+
let prefix = "https://github.com/";
61+
if !trimmed.starts_with(prefix) {
62+
return None;
63+
}
64+
65+
let mut parts = trimmed[prefix.len()..].split('/');
66+
let owner = parts.next()?;
67+
let repo = parts.next()?;
68+
if owner.is_empty() || repo.is_empty() || parts.next().is_some() {
69+
return None;
70+
}
71+
72+
Some(format!(
73+
"https://github.com/{}/{}",
74+
owner.to_ascii_lowercase(),
75+
repo.to_ascii_lowercase()
76+
))
77+
}
78+
5779
#[test]
5880
#[ignore = "run via CI Kiro S-tier gate step"]
5981
fn kiro_target_still_disables_claude_rules() {
@@ -224,9 +246,18 @@ fn real_world_manifest_has_explicit_kiro_coverage() {
224246
.filter(|repo| repo.categories.iter().any(|category| category == "kiro"))
225247
.collect();
226248

249+
let required_kiro_repos = [
250+
"https://github.com/Theadd/kiro-agents",
251+
"https://github.com/awsdataarchitect/kiro-best-practices",
252+
"https://github.com/dereknguyen269/derek-power",
253+
"https://github.com/cremich/promptz",
254+
];
255+
227256
assert!(
228-
!kiro_entries.is_empty(),
229-
"tests/real-world/repos.yaml must include at least one explicit 'kiro' categorized repo"
257+
kiro_entries.len() >= required_kiro_repos.len(),
258+
"tests/real-world/repos.yaml must include at least {} explicit 'kiro' categorized repos, found {}",
259+
required_kiro_repos.len(),
260+
kiro_entries.len()
230261
);
231262

232263
let repo_url_re =
@@ -237,4 +268,24 @@ fn real_world_manifest_has_explicit_kiro_coverage() {
237268
.all(|repo| repo_url_re.is_match(&repo.url)),
238269
"All explicit 'kiro' category entries must be valid GitHub owner/repo URLs"
239270
);
271+
272+
let normalized_kiro_repo_urls: HashSet<String> = kiro_entries
273+
.iter()
274+
.map(|repo| normalize_repo_url(&repo.url))
275+
.collect::<Option<HashSet<String>>>()
276+
.expect("All explicit 'kiro' repo URLs must normalize to owner/repo form");
277+
let missing_required: Vec<&str> = required_kiro_repos
278+
.iter()
279+
.copied()
280+
.filter(|url| {
281+
let normalized_required =
282+
normalize_repo_url(url).expect("required Kiro repo URL constants must normalize");
283+
!normalized_kiro_repo_urls.contains(&normalized_required)
284+
})
285+
.collect();
286+
assert!(
287+
missing_required.is_empty(),
288+
"Missing required explicit Kiro real-world repos in tests/real-world/repos.yaml:\n{}",
289+
missing_required.join("\n")
290+
);
240291
}

tests/real-world/repos.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1460,7 +1460,7 @@ repos:
14601460
- url: https://github.com/Royal-lobster/Transedit
14611461
categories: [auto-discovered]
14621462
status: pending
1463-
- url: https://github.com/Ryotaverse69/suptia-kiro
1463+
- url: https://github.com/Theadd/kiro-agents
14641464
categories: [auto-discovered, kiro]
14651465
status: pending
14661466
- url: https://github.com/SAP/e-mobility-charging-stations-simulator
@@ -1913,6 +1913,9 @@ repos:
19131913
- url: https://github.com/aviadshiber/kapsis
19141914
categories: [auto-discovered]
19151915
status: pending
1916+
- url: https://github.com/awsdataarchitect/kiro-best-practices
1917+
categories: [auto-discovered, kiro]
1918+
status: pending
19161919
- url: https://github.com/axAilotl/character-federation
19171920
categories: [auto-discovered]
19181921
status: pending
@@ -2177,6 +2180,9 @@ repos:
21772180
- url: https://github.com/derek1ee/clrviz
21782181
categories: [auto-discovered]
21792182
status: pending
2183+
- url: https://github.com/dereknguyen269/derek-power
2184+
categories: [auto-discovered, kiro]
2185+
status: pending
21802186
- url: https://github.com/deseven/ec-su_axb35-win
21812187
categories: [auto-discovered]
21822188
status: pending
@@ -3155,6 +3161,9 @@ repos:
31553161
- url: https://github.com/pratikpakhale/mixboard
31563162
categories: [auto-discovered]
31573163
status: pending
3164+
- url: https://github.com/cremich/promptz
3165+
categories: [auto-discovered, kiro]
3166+
status: pending
31583167
- url: https://github.com/presidio-oss/aider-based-code-generator
31593168
categories: [auto-discovered]
31603169
status: pending

0 commit comments

Comments
 (0)