rename .story_kit directory to .storkit and update all references
Renames the config directory and updates 514 references across 42 Rust source files, plus CLAUDE.md, .gitignore, Makefile, script/release, and .mcp.json files. All 1205 tests pass. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
+24
-24
@@ -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 `.story_kit/merge_workspace` directory and
|
||||
/// The merge pipeline uses a shared `.storkit/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".
|
||||
@@ -89,7 +89,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(".story_kit")
|
||||
.join(".storkit")
|
||||
.join("merge_workspace");
|
||||
|
||||
// Ensure we start clean: remove any leftover merge workspace.
|
||||
@@ -250,7 +250,7 @@ pub(crate) fn run_squash_merge(
|
||||
}
|
||||
|
||||
// ── Bug 226: Verify the commit contains real code changes ─────
|
||||
// If the merge only brought in .story_kit/ files (pipeline file moves),
|
||||
// If the merge only brought in .storkit/ files (pipeline file moves),
|
||||
// there are no actual code changes to land on master. Abort.
|
||||
{
|
||||
let diff_check = Command::new("git")
|
||||
@@ -261,10 +261,10 @@ pub(crate) fn run_squash_merge(
|
||||
let changed_files = String::from_utf8_lossy(&diff_check.stdout);
|
||||
let has_code_changes = changed_files
|
||||
.lines()
|
||||
.any(|f| !f.starts_with(".story_kit/"));
|
||||
.any(|f| !f.starts_with(".storkit/"));
|
||||
if !has_code_changes {
|
||||
all_output.push_str(
|
||||
"=== Merge commit contains only .story_kit/ file moves, no code changes ===\n",
|
||||
"=== Merge commit contains only .storkit/ file moves, no code changes ===\n",
|
||||
);
|
||||
cleanup_merge_workspace(project_root, &merge_wt_path, &merge_branch);
|
||||
return Ok(SquashMergeResult {
|
||||
@@ -272,7 +272,7 @@ pub(crate) fn run_squash_merge(
|
||||
had_conflicts,
|
||||
conflicts_resolved,
|
||||
conflict_details: Some(
|
||||
"Feature branch has no code changes outside .story_kit/ — only \
|
||||
"Feature branch has no code changes outside .storkit/ — only \
|
||||
pipeline file moves were found."
|
||||
.to_string(),
|
||||
),
|
||||
@@ -960,7 +960,7 @@ after\n";
|
||||
|
||||
// Verify no leftover merge workspace directory.
|
||||
assert!(
|
||||
!repo.join(".story_kit/merge_workspace").exists(),
|
||||
!repo.join(".storkit/merge_workspace").exists(),
|
||||
"merge workspace should be cleaned up"
|
||||
);
|
||||
}
|
||||
@@ -1076,7 +1076,7 @@ after\n";
|
||||
.current_dir(repo)
|
||||
.output()
|
||||
.unwrap();
|
||||
let sk_dir = repo.join(".story_kit/work/4_merge");
|
||||
let sk_dir = repo.join(".storkit/work/4_merge");
|
||||
fs::create_dir_all(&sk_dir).unwrap();
|
||||
fs::write(
|
||||
sk_dir.join("diverge_test.md"),
|
||||
@@ -1135,7 +1135,7 @@ after\n";
|
||||
"merge-queue branch should be cleaned up, got: {branch_list}"
|
||||
);
|
||||
assert!(
|
||||
!repo.join(".story_kit/merge_workspace").exists(),
|
||||
!repo.join(".storkit/merge_workspace").exists(),
|
||||
"merge workspace should be cleaned up"
|
||||
);
|
||||
}
|
||||
@@ -1188,13 +1188,13 @@ after\n";
|
||||
|
||||
// Cleanup should still happen.
|
||||
assert!(
|
||||
!repo.join(".story_kit/merge_workspace").exists(),
|
||||
!repo.join(".storkit/merge_workspace").exists(),
|
||||
"merge workspace should be cleaned up"
|
||||
);
|
||||
}
|
||||
|
||||
/// Bug 226: Verifies that `run_squash_merge` fails when the feature branch
|
||||
/// only contains .story_kit/ file moves with no real code changes.
|
||||
/// only contains .storkit/ file moves with no real code changes.
|
||||
#[tokio::test]
|
||||
async fn squash_merge_md_only_changes_fails() {
|
||||
use std::fs;
|
||||
@@ -1204,13 +1204,13 @@ after\n";
|
||||
let repo = tmp.path();
|
||||
init_git_repo(repo);
|
||||
|
||||
// Create a feature branch that only moves a .story_kit/ file.
|
||||
// Create a feature branch that only moves a .storkit/ file.
|
||||
Command::new("git")
|
||||
.args(["checkout", "-b", "feature/story-md_only_test"])
|
||||
.current_dir(repo)
|
||||
.output()
|
||||
.unwrap();
|
||||
let sk_dir = repo.join(".story_kit/work/2_current");
|
||||
let sk_dir = repo.join(".storkit/work/2_current");
|
||||
fs::create_dir_all(&sk_dir).unwrap();
|
||||
fs::write(
|
||||
sk_dir.join("md_only_test.md"),
|
||||
@@ -1236,17 +1236,17 @@ after\n";
|
||||
let result =
|
||||
run_squash_merge(repo, "feature/story-md_only_test", "md_only_test").unwrap();
|
||||
|
||||
// The squash merge will commit the .story_kit/ file, but should fail because
|
||||
// there are no code changes outside .story_kit/.
|
||||
// The squash merge will commit the .storkit/ file, but should fail because
|
||||
// there are no code changes outside .storkit/.
|
||||
assert!(
|
||||
!result.success,
|
||||
"merge with only .story_kit/ changes must fail: {}",
|
||||
"merge with only .storkit/ changes must fail: {}",
|
||||
result.output
|
||||
);
|
||||
|
||||
// Cleanup should still happen.
|
||||
assert!(
|
||||
!repo.join(".story_kit/merge_workspace").exists(),
|
||||
!repo.join(".storkit/merge_workspace").exists(),
|
||||
"merge workspace should be cleaned up"
|
||||
);
|
||||
}
|
||||
@@ -1359,7 +1359,7 @@ after\n";
|
||||
"merge-queue branch must be cleaned up"
|
||||
);
|
||||
assert!(
|
||||
!repo.join(".story_kit/merge_workspace").exists(),
|
||||
!repo.join(".storkit/merge_workspace").exists(),
|
||||
"merge workspace must be cleaned up"
|
||||
);
|
||||
}
|
||||
@@ -1463,7 +1463,7 @@ after\n";
|
||||
|
||||
// Cleanup must still happen.
|
||||
assert!(
|
||||
!repo.join(".story_kit/merge_workspace").exists(),
|
||||
!repo.join(".storkit/merge_workspace").exists(),
|
||||
"merge workspace must be cleaned up even on gate failure"
|
||||
);
|
||||
}
|
||||
@@ -1503,7 +1503,7 @@ after\n";
|
||||
.unwrap();
|
||||
|
||||
// Simulate a stale merge workspace left from a previous failed merge.
|
||||
let stale_ws = repo.join(".story_kit/merge_workspace");
|
||||
let stale_ws = repo.join(".storkit/merge_workspace");
|
||||
fs::create_dir_all(&stale_ws).unwrap();
|
||||
fs::write(stale_ws.join("leftover.txt"), "stale").unwrap();
|
||||
|
||||
@@ -1524,7 +1524,7 @@ after\n";
|
||||
|
||||
// ── story 216: merge worktree uses project.toml component setup ───────────
|
||||
|
||||
/// When the project has `[[component]]` entries in `.story_kit/project.toml`,
|
||||
/// When the project has `[[component]]` entries in `.storkit/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)]
|
||||
@@ -1537,9 +1537,9 @@ after\n";
|
||||
let repo = tmp.path();
|
||||
init_git_repo(repo);
|
||||
|
||||
// Add a .story_kit/project.toml with a component whose setup writes a
|
||||
// Add a .storkit/project.toml with a component whose setup writes a
|
||||
// sentinel file so we can confirm the command ran.
|
||||
let sk_dir = repo.join(".story_kit");
|
||||
let sk_dir = repo.join(".storkit");
|
||||
fs::create_dir_all(&sk_dir).unwrap();
|
||||
fs::write(
|
||||
sk_dir.join("project.toml"),
|
||||
@@ -1612,7 +1612,7 @@ after\n";
|
||||
let repo = tmp.path();
|
||||
init_git_repo(repo);
|
||||
|
||||
// No .story_kit/project.toml — no component setup.
|
||||
// No .storkit/project.toml — no component setup.
|
||||
fs::write(repo.join("file.txt"), "initial").unwrap();
|
||||
Command::new("git")
|
||||
.args(["add", "."])
|
||||
|
||||
Reference in New Issue
Block a user