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
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "feat: Python starter checks, fixture test coverage, and real-world validation"
type: feat
status: active
status: done
date: 2026-04-02
origin: ~/.gstack/projects/brettdavies-agentnative/brett-main-design-20260327-214808.md
---
Expand Down Expand Up @@ -96,7 +96,7 @@ real-world CLIs outside of self-dogfooding.

## Implementation Units

- [ ] **Unit 1: Implement `code-bare-except` Python source check**
- [x] **Unit 1: Implement `code-bare-except` Python source check**

**Goal:** Detect bare `except:` clauses (without exception type) in Python source. Proves the tree-sitter-python
pipeline works end-to-end.
Expand Down Expand Up @@ -144,7 +144,7 @@ pipeline works end-to-end.

---

- [ ] **Unit 2: Implement `p4-sys-exit` Python source check**
- [x] **Unit 2: Implement `p4-sys-exit` Python source check**

**Goal:** Detect `sys.exit()` calls outside `if __name__ == "__main__"` blocks.

Expand Down Expand Up @@ -185,7 +185,7 @@ pipeline works end-to-end.

---

- [ ] **Unit 3: Implement `p6-no-color-source` Python source check**
- [x] **Unit 3: Implement `p6-no-color-source` Python source check**

**Goal:** Detect `NO_COLOR` environment variable handling in Python source.

Expand Down Expand Up @@ -225,7 +225,7 @@ pipeline works end-to-end.

---

- [ ] **Unit 4: Un-ignore and fix integration tests for fixtures**
- [x] **Unit 4: Un-ignore and fix integration tests for fixtures**

**Goal:** Make the 3 `#[ignore]` integration tests pass and remove the `#[ignore]` attribute.

Expand Down Expand Up @@ -269,7 +269,7 @@ pipeline works end-to-end.

---

- [ ] **Unit 5: Real-world validation against bird, xurl-rs, and ripgrep**
- [x] **Unit 5: Real-world validation against bird, xurl-rs, and ripgrep**

**Goal:** Run agentnative against 3 real-world CLIs and document results. Satisfies design doc success criteria.

Expand Down Expand Up @@ -308,7 +308,7 @@ pipeline works end-to-end.

---

- [ ] **Unit 6: Update design doc to reflect revised Python scope**
- [x] **Unit 6: Update design doc to reflect revised Python scope**

**Goal:** Formally document that v0.1 ships 2-3 starter Python checks, with full coverage in v0.2.

Expand Down
7 changes: 3 additions & 4 deletions src/checks/behavioral/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@ pub fn all_behavioral_checks() -> Vec<Box<dyn Check>> {

#[cfg(test)]
pub(crate) mod tests {
use std::cell::RefCell;
use std::collections::HashMap;
use std::path::PathBuf;
use std::sync::OnceLock;
use std::time::Duration;

use crate::project::Project;
Expand All @@ -44,7 +43,7 @@ pub(crate) mod tests {
.expect("create test runner"),
),
include_tests: false,
parsed_files: RefCell::new(HashMap::new()),
parsed_files: OnceLock::new(),
}
}

Expand Down Expand Up @@ -103,7 +102,7 @@ pub(crate) mod tests {
BinaryRunner::new(script_path, Duration::from_secs(5)).expect("create test runner"),
),
include_tests: false,
parsed_files: RefCell::new(HashMap::new()),
parsed_files: OnceLock::new(),
}
}
}
4 changes: 2 additions & 2 deletions src/checks/project/dry_run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ impl Check for DryRunCheck {
#[cfg(test)]
mod tests {
use super::*;
use std::cell::RefCell;
use std::collections::HashMap;
use std::path::PathBuf;
use std::sync::OnceLock;

use crate::project::{Language, ParsedFile};

Expand Down Expand Up @@ -154,7 +154,7 @@ mod tests {
manifest_path: Some(dir.join("Cargo.toml")),
runner: None,
include_tests: false,
parsed_files: RefCell::new(parsed),
parsed_files: OnceLock::from(parsed),
}
}

Expand Down
Loading