Skip to content

v0.6.8: BotRegistration.project_dir for non-default project layouts (F185)#149

Merged
firstintent merged 1 commit into
mainfrom
f185-project-dir-resolver
May 25, 2026
Merged

v0.6.8: BotRegistration.project_dir for non-default project layouts (F185)#149
firstintent merged 1 commit into
mainfrom
f185-project-dir-resolver

Conversation

@firstintent
Copy link
Copy Markdown
Owner

Summary

Fixes daemon's inability to find projects that live outside ~/projects/<slug>/. Two real cases this unblocks:

  • Projects on NAS / non-home paths (e.g. /vol4/1000/nasworkspace/ccteam).
  • Project directory basename differs from workflow slug (dir ccteam, slug research-squad).

Approach

  • Additive schema: BotRegistration.project_dir: Option<PathBuf> (serde-default-skip; legacy JSON without the field still parses).
  • Resolver fallback: supervisor::bot_dir and inbound::DefaultMailboxResolver prefer reg.project_dir when set; fall back to the historical <projects_root>/<workflow_slug>/.ccteam/chat/<role>/ when None.
  • MCP input: chat_register_bot gains an optional project_dir parameter. When omitted, the dispatcher defaults to std::env::current_dir() (canonicalized via std::fs::canonicalize).
  • Skill: ccteam-creator Phase 5.6 now passes project_dir (the directory holding .ccteam/workflow.yaml) when registering bots.

No version bump, no migration tooling — pre-v1.0 policy (CLAUDE.md §五 third bullet). Old registrations continue to work via fallback.

Drive-by

e2e_creator_full_path_test carried a stale assertion referencing ## 5.9 Phase 5.9 — that section was renumbered to 5.8 in #146 when the broken ccteam internal daemon ensure-running reference was removed. Fixed here so the workspace test gate is clean.

Test plan

  • cargo test --workspace --locked --no-fail-fast --exclude ccteam-web: 1469 pass / 0 F185-related failures. Excluded ccteam-web due to local inotify-busy host hang on ws_* tests (known per CLAUDE.md §六); CI exercises it cleanly. Two remaining transient failures both reproduce on bare main and pass in isolation (cost_summary::t09_memoize_second_call_no_reread — concurrent file-watch race; dm_autoroute::daemon_dm_no_at_mention_auto_routes_to_single_bot — env-race flake CLAUDE.md §六 documents).
  • cargo clippy --workspace --all-targets --locked -- -D warnings 0 warning
  • cargo fmt --all -- --check 0 drift
  • New project_dir_resolve_test.rs: explicit project_dir path used; absent → fallback to projects_root/slug
  • Extended chat_register_mcp_test.rs: serde round-trip with new field
  • End-to-end test on supervisor + mailbox honors reg.project_dir over projects_root

Acceptance

User scenario:

mkdir -p /vol4/1000/nasworkspace/ccteam/.ccteam
cd /vol4/1000/nasworkspace/ccteam   # creator writes workflow.yaml here
# register bot (skill auto-passes project_dir = $PWD)
ccteam start
# daemon finds /vol4/1000/nasworkspace/ccteam/.ccteam/chat/<role>/ — works

Refs docs/versions/v0-6-8/README.md (F185 will be folded into the version archive in a follow-up sweep alongside the other V0.6.8 additions).

…F185)

Today the daemon resolves a bot's working dir as
`<projects_root>/<workflow_slug>/.ccteam/chat/<role>/`, with
`projects_root` hardcoded to `~/projects` (or `--registry` override).
That breaks two real cases:

- Project lives outside the home tree (NAS share, `/vol4/.../ccteam`).
- Project directory basename differs from workflow slug (dir
  `ccteam`, slug `research-squad`).

F185 adds `BotRegistration.project_dir: Option<PathBuf>`. When set,
the supervisor + mailbox resolver use the absolute path directly.
`chat_register_bot` accepts an optional `project_dir` input and
defaults to the MCP server's current_dir (canonicalized). Legacy
registrations without the field continue to use the
`<projects_root>/<slug>/` fallback — no migration needed.

The `ccteam-creator` skill now passes `project_dir` (the dir holding
`.ccteam/workflow.yaml`) so the daemon finds projects no matter where
the user keeps them.

Also fixes a stale baseline assertion in e2e_creator_full_path_test
that referenced the pre-V0.6.8 `## 5.9` SKILL section (renumbered to
5.8 when the broken daemon ensure-running phase was dropped).

Closes V0.6.8 F185.
@firstintent firstintent merged commit dfb9413 into main May 25, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant