huskies: rename project from storkit to huskies

Rename all references from storkit to huskies across the codebase:
- .storkit/ directory → .huskies/
- Binary name, Cargo package name, Docker image references
- Server code, frontend code, config files, scripts
- Fix script/test to build frontend before cargo clippy/test
  so merge worktrees have frontend/dist available for RustEmbed

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Timmy
2026-04-03 16:12:52 +01:00
parent a7035b6ba7
commit 2d8ccb3eb6
572 changed files with 1340 additions and 1220 deletions
+28 -28
View File
@@ -10,7 +10,7 @@ use super::gates::run_project_tests;
/// Global lock ensuring only one squash-merge runs at a time.
///
/// The merge pipeline uses a shared `.storkit/merge_workspace` directory and
/// The merge pipeline uses a shared `.huskies/merge_workspace` directory and
/// temporary `merge-queue/{story_id}` branches. If two merges run concurrently,
/// the second call's initial cleanup destroys the first call's branch mid-flight,
/// causing `git cherry-pick merge-queue/…` to fail with "bad revision".
@@ -88,7 +88,7 @@ pub(crate) fn run_squash_merge(
let mut all_output = String::new();
let merge_branch = format!("merge-queue/{story_id}");
let merge_wt_path = project_root.join(".storkit").join("merge_workspace");
let merge_wt_path = project_root.join(".huskies").join("merge_workspace");
// Ensure we start clean: remove any leftover merge workspace.
cleanup_merge_workspace(project_root, &merge_wt_path, &merge_branch);
@@ -189,7 +189,7 @@ pub(crate) fn run_squash_merge(
// ── Commit in the temporary worktree ──────────────────────────
all_output.push_str("=== git commit ===\n");
let commit_msg = format!("storkit: merge {story_id}");
let commit_msg = format!("huskies: merge {story_id}");
let commit = Command::new("git")
.args(["commit", "-m", &commit_msg])
.current_dir(&merge_wt_path)
@@ -238,7 +238,7 @@ pub(crate) fn run_squash_merge(
}
// ── Bug 226: Verify the commit contains real code changes ─────
// If the merge only brought in .storkit/ files (pipeline file moves),
// If the merge only brought in .huskies/ files (pipeline file moves),
// there are no actual code changes to land on master. Abort.
{
let diff_check = Command::new("git")
@@ -247,10 +247,10 @@ pub(crate) fn run_squash_merge(
.output()
.map_err(|e| format!("Failed to check merge diff: {e}"))?;
let changed_files = String::from_utf8_lossy(&diff_check.stdout);
let has_code_changes = changed_files.lines().any(|f| !f.starts_with(".storkit/work/"));
let has_code_changes = changed_files.lines().any(|f| !f.starts_with(".huskies/work/"));
if !has_code_changes {
all_output.push_str(
"=== Merge commit contains only .storkit/ file moves, no code changes ===\n",
"=== Merge commit contains only .huskies/ file moves, no code changes ===\n",
);
cleanup_merge_workspace(project_root, &merge_wt_path, &merge_branch);
return Ok(SquashMergeResult {
@@ -258,7 +258,7 @@ pub(crate) fn run_squash_merge(
had_conflicts,
conflicts_resolved,
conflict_details: Some(
"Feature branch has no code changes outside .storkit/ — only \
"Feature branch has no code changes outside .huskies/ — only \
pipeline file moves were found."
.to_string(),
),
@@ -419,10 +419,10 @@ pub(crate) fn run_squash_merge(
}
// Verify HEAD commit has actual code changes (not an empty cherry-pick).
// Exclude .storkit/work/ (pipeline file moves) but keep .storkit/project.toml
// Exclude .huskies/work/ (pipeline file moves) but keep .huskies/project.toml
// and other config files which are legitimate deliverables.
let diff_stat = Command::new("git")
.args(["diff", "--stat", "HEAD~1..HEAD", "--", ".", ":(exclude).storkit/work"])
.args(["diff", "--stat", "HEAD~1..HEAD", "--", ".", ":(exclude).huskies/work"])
.current_dir(project_root)
.output()
.map(|o| String::from_utf8_lossy(&o.stdout).trim().to_string())
@@ -1047,7 +1047,7 @@ after\n";
// Verify no leftover merge workspace directory.
assert!(
!repo.join(".storkit/merge_workspace").exists(),
!repo.join(".huskies/merge_workspace").exists(),
"merge workspace should be cleaned up"
);
}
@@ -1167,7 +1167,7 @@ after\n";
.current_dir(repo)
.output()
.unwrap();
let sk_dir = repo.join(".storkit/work/4_merge");
let sk_dir = repo.join(".huskies/work/4_merge");
fs::create_dir_all(&sk_dir).unwrap();
fs::write(sk_dir.join("diverge_test.md"), "---\nname: test\n---\n").unwrap();
Command::new("git")
@@ -1176,7 +1176,7 @@ after\n";
.output()
.unwrap();
Command::new("git")
.args(["commit", "-m", "storkit: queue diverge_test for merge"])
.args(["commit", "-m", "huskies: queue diverge_test for merge"])
.current_dir(repo)
.output()
.unwrap();
@@ -1218,7 +1218,7 @@ after\n";
"merge-queue branch should be cleaned up, got: {branch_list}"
);
assert!(
!repo.join(".storkit/merge_workspace").exists(),
!repo.join(".huskies/merge_workspace").exists(),
"merge workspace should be cleaned up"
);
}
@@ -1270,13 +1270,13 @@ after\n";
// Cleanup should still happen.
assert!(
!repo.join(".storkit/merge_workspace").exists(),
!repo.join(".huskies/merge_workspace").exists(),
"merge workspace should be cleaned up"
);
}
/// Bug 226: Verifies that `run_squash_merge` fails when the feature branch
/// only contains .storkit/ file moves with no real code changes.
/// only contains .huskies/ file moves with no real code changes.
#[tokio::test]
async fn squash_merge_md_only_changes_fails() {
use std::fs;
@@ -1286,13 +1286,13 @@ after\n";
let repo = tmp.path();
init_git_repo(repo);
// Create a feature branch that only moves a .storkit/ file.
// Create a feature branch that only moves a .huskies/ file.
Command::new("git")
.args(["checkout", "-b", "feature/story-md_only_test"])
.current_dir(repo)
.output()
.unwrap();
let sk_dir = repo.join(".storkit/work/2_current");
let sk_dir = repo.join(".huskies/work/2_current");
fs::create_dir_all(&sk_dir).unwrap();
fs::write(sk_dir.join("md_only_test.md"), "---\nname: Test\n---\n").unwrap();
Command::new("git")
@@ -1313,17 +1313,17 @@ after\n";
let result = run_squash_merge(repo, "feature/story-md_only_test", "md_only_test").unwrap();
// The squash merge will commit the .storkit/ file, but should fail because
// there are no code changes outside .storkit/.
// The squash merge will commit the .huskies/ file, but should fail because
// there are no code changes outside .huskies/.
assert!(
!result.success,
"merge with only .storkit/ changes must fail: {}",
"merge with only .huskies/ changes must fail: {}",
result.output
);
// Cleanup should still happen.
assert!(
!repo.join(".storkit/merge_workspace").exists(),
!repo.join(".huskies/merge_workspace").exists(),
"merge workspace should be cleaned up"
);
}
@@ -1444,7 +1444,7 @@ after\n";
"merge-queue branch must be cleaned up"
);
assert!(
!repo.join(".storkit/merge_workspace").exists(),
!repo.join(".huskies/merge_workspace").exists(),
"merge workspace must be cleaned up"
);
}
@@ -1560,7 +1560,7 @@ after\n";
// Cleanup must still happen.
assert!(
!repo.join(".storkit/merge_workspace").exists(),
!repo.join(".huskies/merge_workspace").exists(),
"merge workspace must be cleaned up even on gate failure"
);
}
@@ -1600,7 +1600,7 @@ after\n";
.unwrap();
// Simulate a stale merge workspace left from a previous failed merge.
let stale_ws = repo.join(".storkit/merge_workspace");
let stale_ws = repo.join(".huskies/merge_workspace");
fs::create_dir_all(&stale_ws).unwrap();
fs::write(stale_ws.join("leftover.txt"), "stale").unwrap();
@@ -1620,7 +1620,7 @@ after\n";
// ── story 216: merge worktree uses project.toml component setup ───────────
/// When the project has `[[component]]` entries in `.storkit/project.toml`,
/// When the project has `[[component]]` entries in `.huskies/project.toml`,
/// `run_squash_merge` must run their setup commands in the merge worktree
/// before quality gates — matching the behaviour of `create_worktree`.
#[cfg(unix)]
@@ -1633,9 +1633,9 @@ after\n";
let repo = tmp.path();
init_git_repo(repo);
// Add a .storkit/project.toml with a component whose setup writes a
// Add a .huskies/project.toml with a component whose setup writes a
// sentinel file so we can confirm the command ran.
let sk_dir = repo.join(".storkit");
let sk_dir = repo.join(".huskies");
fs::create_dir_all(&sk_dir).unwrap();
fs::write(
sk_dir.join("project.toml"),
@@ -1708,7 +1708,7 @@ after\n";
let repo = tmp.path();
init_git_repo(repo);
// No .storkit/project.toml — no component setup.
// No .huskies/project.toml — no component setup.
fs::write(repo.join("file.txt"), "initial").unwrap();
Command::new("git")
.args(["add", "."])