Skip to content

Commit 42bb6cd

Browse files
committed
Keep local clawhip artifacts from tripping routine repo work
Dogfooding kept reproducing OMX team merge conflicts on `.clawhip/state/prompt-submit.json`, so the init bootstrap now teaches repos to ignore `.clawhip/` alongside the existing local `.claw/` artifacts. This also updates the current repo ignore list so the fix helps immediately instead of only on future `claw init` runs. Constraint: Keep the fix narrow and centered on repo-local ignore hygiene Rejected: Broader team merge-hygiene changes | unnecessary for the proven local root cause Confidence: high Scope-risk: narrow Reversibility: clean Directive: If more runtime-local artifact directories appear, extend the shared init gitignore list instead of patching repos ad hoc Tested: cargo fmt --all --check Tested: cargo clippy --workspace --all-targets -- -D warnings Tested: cargo test --workspace Tested: Architect review (APPROVE) Not-tested: Existing clones with already-tracked `.clawhip` files still need manual cleanup Related: ROADMAP ultraworkers#75
1 parent f91d156 commit 42bb6cd

3 files changed

Lines changed: 6 additions & 1 deletion

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ archive/
88
# Claw Code local artifacts
99
.claw/settings.local.json
1010
.claw/sessions/
11+
.clawhip/
1112
status-help.txt

ROADMAP.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -520,3 +520,5 @@ Model name prefix now wins unconditionally over env-var presence. Regression tes
520520
73. **Session timestamps are not monotonic enough for latest-session ordering under tight loops****done (verified 2026-04-12):** runtime session timestamps now use a process-local monotonic millisecond source, so back-to-back saves still produce increasing `updated_at_ms` even when the wall clock does not advance. The temporary sleep hack was removed from the resume-latest regression, and fresh workspace verification stayed green with the semantic-recency ordering path from #72. **Original filing below.**
521521

522522
74. **Poisoned test locks cascade into unrelated Rust regressions****done (verified 2026-04-12):** test-only env/cwd lock acquisition in `rust/crates/tools/src/lib.rs`, `rust/crates/plugins/src/lib.rs`, `rust/crates/commands/src/lib.rs`, and `rust/crates/rusty-claude-cli/src/main.rs` now recovers poisoned mutexes via `PoisonError::into_inner`, and new regressions lock that behavior so one panic no longer causes later tests to fail just by touching the shared env/cwd locks. Source: Jobdori dogfood 2026-04-12.
523+
524+
75. **`claw init` leaves `.clawhip/` runtime artifacts unignored****done (verified 2026-04-12):** `rust/crates/rusty-claude-cli/src/init.rs` now treats `.clawhip/` as a first-class local artifact alongside `.claw/` paths, and regression coverage locks both the create and idempotent update paths so `claw init` adds the ignore entry exactly once. The repo `.gitignore` now also ignores `.clawhip/` for immediate dogfood relief, preventing repeated OMX team merge conflicts on `.clawhip/state/prompt-submit.json`. Source: Jobdori dogfood 2026-04-12.

rust/crates/rusty-claude-cli/src/init.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const STARTER_CLAW_JSON: &str = concat!(
99
"}\n",
1010
);
1111
const GITIGNORE_COMMENT: &str = "# Claw Code local artifacts";
12-
const GITIGNORE_ENTRIES: [&str; 2] = [".claw/settings.local.json", ".claw/sessions/"];
12+
const GITIGNORE_ENTRIES: [&str; 3] = [".claw/settings.local.json", ".claw/sessions/", ".clawhip/"];
1313

1414
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
1515
pub(crate) enum InitStatus {
@@ -375,6 +375,7 @@ mod tests {
375375
let gitignore = fs::read_to_string(root.join(".gitignore")).expect("read gitignore");
376376
assert!(gitignore.contains(".claw/settings.local.json"));
377377
assert!(gitignore.contains(".claw/sessions/"));
378+
assert!(gitignore.contains(".clawhip/"));
378379
let claude_md = fs::read_to_string(root.join("CLAUDE.md")).expect("read claude md");
379380
assert!(claude_md.contains("Languages: Rust."));
380381
assert!(claude_md.contains("cargo clippy --workspace --all-targets -- -D warnings"));
@@ -407,6 +408,7 @@ mod tests {
407408
let gitignore = fs::read_to_string(root.join(".gitignore")).expect("read gitignore");
408409
assert_eq!(gitignore.matches(".claw/settings.local.json").count(), 1);
409410
assert_eq!(gitignore.matches(".claw/sessions/").count(), 1);
411+
assert_eq!(gitignore.matches(".clawhip/").count(), 1);
410412

411413
fs::remove_dir_all(root).expect("cleanup temp dir");
412414
}

0 commit comments

Comments
 (0)