From 3ba40bc7e28e7f56d15b5679586fb9b20dd8f4d5 Mon Sep 17 00:00:00 2001 From: Rhys Sullivan <39114868+RhysSullivan@users.noreply.github.com> Date: Sat, 16 May 2026 00:54:09 -0700 Subject: [PATCH 1/2] Ignore reference symlink --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 7e12161e7..90827bcbc 100644 --- a/.gitignore +++ b/.gitignore @@ -66,6 +66,7 @@ executor.jsonc .vscode/mcp.json # reference repos (pulled via `bun run pull:references`) +.reference .reference/ .worktrees/ From 3028a80869d72dda0fe5943d60e27c768b7acd53 Mon Sep 17 00:00:00 2001 From: Rhys Sullivan <39114868+RhysSullivan@users.noreply.github.com> Date: Sat, 16 May 2026 01:38:06 -0700 Subject: [PATCH 2/2] Track Codex worktree environment setup --- .codex/environments/environment.toml | 75 ++++++++++++++++++++++++++++ .gitignore | 5 +- 2 files changed, 79 insertions(+), 1 deletion(-) create mode 100644 .codex/environments/environment.toml diff --git a/.codex/environments/environment.toml b/.codex/environments/environment.toml new file mode 100644 index 000000000..a068f80ef --- /dev/null +++ b/.codex/environments/environment.toml @@ -0,0 +1,75 @@ +# THIS IS AUTOGENERATED. DO NOT EDIT MANUALLY +version = 1 +name = "executor" + +[setup] +script = ''' +source_root="/home/rhys/executor" +reference_source="$source_root/.reference" + +if [ -d "$reference_source" ]; then + if [ -L .reference ]; then + if [ "$(readlink .reference)" != "$reference_source" ]; then + ln -sfn "$reference_source" .reference + fi + elif [ ! -e .reference ]; then + ln -s "$reference_source" .reference + else + echo ".reference already exists; leaving it in place" >&2 + fi +fi + +find "$source_root" \ + \( \ + -name ".git" \ + -o -name ".reference" \ + -o -name "node_modules" \ + -o -name ".turbo" \ + -o -name ".wrangler" \ + -o -name ".dev-db" \ + -o -name "dist" \ + -o -name "build" \ + -o -name ".output" \ + \) -prune \ + -o -type f \ + \( -name ".env" -o -name ".env.*" -o -name ".dev.vars" \) \ + ! -name "*.example" \ + ! -name "*.sample" \ + ! -name "*.template" \ + ! -name ".envrc" \ + ! -name ".envrc.*" \ + -print | +while IFS= read -r source_file; do + relative_path="${source_file#"$source_root"/}" + target_file="./$relative_path" + target_dir="$(dirname "$target_file")" + + if [ -e "$target_file" ]; then + continue + fi + + mkdir -p "$target_dir" + cp -p "$source_file" "$target_file" +done + +git_common_dir="$(git rev-parse --git-common-dir 2>/dev/null || true)" +if [ -n "$git_common_dir" ] && [ -d "$git_common_dir/info" ]; then + touch "$git_common_dir/info/exclude" + if ! grep -qxF ".reference" "$git_common_dir/info/exclude"; then + printf "\n.reference\n" >> "$git_common_dir/info/exclude" + fi +fi +''' + +[[actions]] +name = "Run" +icon = "run" +command = "bun i" + +[[actions]] +name = "Run Local Server" +icon = "tool" +command = ''' +cd apps/local +bun dev +''' diff --git a/.gitignore b/.gitignore index 90827bcbc..60820a211 100644 --- a/.gitignore +++ b/.gitignore @@ -71,7 +71,10 @@ executor.jsonc .worktrees/ .mcp.json -.codex/ +.codex/* +!.codex/environments/ +.codex/environments/* +!.codex/environments/environment.toml # Warden local scan outputs .warden/