Skip to content

fix: allow workdir to be a parent of mount destinations#13

Merged
donbeave merged 3 commits into
mainfrom
fix/allow-workdir-parent-of-mount-dst
Apr 7, 2026
Merged

fix: allow workdir to be a parent of mount destinations#13
donbeave merged 3 commits into
mainfrom
fix/allow-workdir-parent-of-mount-dst

Conversation

@donbeave

@donbeave donbeave commented Apr 7, 2026

Copy link
Copy Markdown
Member

Summary

  • Relaxes workspace validation to allow workdir to be a parent directory of mount destinations, not just equal to or inside one
  • Enables multi-project workspace layouts where workdir is the common ancestor (e.g. ~/Projects/jackin-project) of several mounted subdirectories (e.g. ~/Projects/jackin-project/jackin, ~/Projects/jackin-project/jackin-dev)
  • Adds 11 comprehensive tests covering positive cases (equal, inside, parent, grandparent, trailing slash, multi-mount) and negative cases (sibling, prefix overlap, unrelated paths)

Test plan

  • All 204 tests pass (cargo test)
  • Positive: workdir equal to mount dst
  • Positive: workdir inside mount dst
  • Positive: workdir deeply nested inside mount dst
  • Positive: workdir is parent of mount dst
  • Positive: workdir is grandparent of mount dst
  • Positive: workdir parent with trailing slash on dst
  • Positive: workdir parent of any mount in multi-mount workspace
  • Negative: sibling directories rejected
  • Negative: prefix overlap without parent relationship rejected (both directions)
  • Negative: completely unrelated paths rejected
  • Documentation verified — no docs reference the old validation rule

🤖 Generated with Claude Code

donbeave and others added 3 commits April 7, 2026 16:58
Previously, workspace validation required workdir to be equal to or
inside a mount destination. This prevented setting workdir to a parent
directory (e.g. ~/Projects/jackin-project) when mounts pointed to
subdirectories (e.g. ~/Projects/jackin-project/jackin).

Relax the validation to also accept workdir as a parent of any mount
destination, enabling multi-project workspace layouts where the working
directory is the common ancestor of several mounted subdirectories.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The fmt/clippy/test requirement was only in TESTING.md behind an
indirection, making it easy to miss. Surface the exact command and
rule directly in AGENTS.md so agents always see it.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@donbeave donbeave merged commit a31e949 into main Apr 7, 2026
1 check passed
@donbeave donbeave deleted the fix/allow-workdir-parent-of-mount-dst branch April 7, 2026 10:02
donbeave added a commit that referenced this pull request Apr 20, 2026
…f-mount-dst

fix: allow workdir to be a parent of mount destinations
donbeave added a commit that referenced this pull request Apr 21, 2026
…f-mount-dst

fix: allow workdir to be a parent of mount destinations
donbeave added a commit that referenced this pull request Apr 21, 2026
fix: allow workdir to be a parent of mount destinations
donbeave added a commit that referenced this pull request Apr 21, 2026
fix: allow workdir to be a parent of mount destinations
donbeave added a commit that referenced this pull request Apr 21, 2026
fix: allow workdir to be a parent of mount destinations
donbeave added a commit that referenced this pull request May 7, 2026
fix: allow workdir to be a parent of mount destinations
Signed-off-by: Alexey Zhokhov <alexey@zhokhov.com>
Co-authored-by: Codex <codex@openai.com>
donbeave added a commit that referenced this pull request May 7, 2026
fix: allow workdir to be a parent of mount destinations

Signed-off-by: Alexey Zhokhov <alexey@zhokhov.com>
Co-authored-by: Codex <codex@openai.com>
donbeave added a commit that referenced this pull request May 7, 2026
Previously, workspace validation required workdir to be equal to or
inside a mount destination. This prevented setting workdir to a parent
directory (e.g. ~/Projects/jackin-project) when mounts pointed to
subdirectories (e.g. ~/Projects/jackin-project/jackin).

Relax the validation to also accept workdir as a parent of any mount
destination, enabling multi-project workspace layouts where the working
directory is the common ancestor of several mounted subdirectories.

Signed-off-by: Alexey Zhokhov <alexey@zhokhov.com>
Co-authored-by: Claude <noreply@anthropic.com>
donbeave added a commit that referenced this pull request May 7, 2026
The fmt/clippy/test requirement was only in TESTING.md behind an
indirection, making it easy to miss. Surface the exact command and
rule directly in AGENTS.md so agents always see it.

Signed-off-by: Alexey Zhokhov <alexey@zhokhov.com>
Co-authored-by: Claude <noreply@anthropic.com>
donbeave added a commit that referenced this pull request May 7, 2026
fix: allow workdir to be a parent of mount destinations

Signed-off-by: Alexey Zhokhov <alexey@zhokhov.com>
Co-authored-by: Codex <codex@openai.com>
donbeave added a commit that referenced this pull request May 17, 2026
…hase 1 (#366)

## Summary

Re-bakes the codebase-readability program's May 2026 baseline against
today's tree (LOC, file counts, mega-function sizes, `//!` coverage,
duplication counts) and adds a trend caution showing every metric except
`"Dockerfile"` literals regressed since the original audit — making the
gap between "audit happened" and "extraction work scheduled" visible to
anyone landing on the page. Cargo workspace split's LOC reference is
updated to match. Separately, resolves the standing contradiction
between the deferred Bollard migration and two still-Medium open review
findings (#13 cleanup string-matching, #14
inspect-collapse-to-not-found) by carving out a concrete Phase 1 scope
(lifecycle, cleanup, inspect via Bollard) with named files, out-of-scope
items, and acceptance criteria; the open findings catalog now back-links
both items to that Phase 1 so the two pages agree on ownership.

## What's deferred (follow-up PRs)

- `jackin-daemon` phase-order section so the four reactive-daemon leaves
(daemon, live-auth-sync, attention-prompts, host-bridge, desktop hub)
have one canonical sequencing reference.
- `reproducibility-pinning` operator-review pass (the page has been
"agent brainstorm, not yet reviewed" for a long time).
- `multi-runtime-support` "Remaining Work" bullets — split into
acceptance-criteria-bearing leaves or annotate each bullet with a
definition of done.
- Bollard Phase 2 (`docker build`, interactive `docker run -it` via
Bollard) — kept deferred per the original "incremental is pragmatic"
rationale.

## Verify locally

### Checkout

Paste this first to bypass the `tirith` paste scanner for the rest of
the session:

```sh
export TIRITH=0
```

Then paste the checkout block:

```sh
mkdir -p "$HOME/Projects/jackin-project/test"
cd "$HOME/Projects/jackin-project/test"

if [ ! -d jackin/.git ]; then
  git clone https://github.com/jackin-project/jackin.git
fi

cd jackin
mise trust
git fetch -f origin docs/roadmap-rebake-audit-and-bollard-phase1:refs/remotes/origin/docs/roadmap-rebake-audit-and-bollard-phase1
git checkout -B docs/roadmap-rebake-audit-and-bollard-phase1 refs/remotes/origin/docs/roadmap-rebake-audit-and-bollard-phase1
```

### Documentation

```sh
cd docs
bun install --frozen-lockfile
bunx astro sync
bunx tsc --noEmit
bun run build
bun run check:repo-links
bun run dev
```

Astro serves at `http://localhost:4321/`. Pages to walk:

**http://localhost:4321/reference/roadmap/codebase-readability/**  
UPDATED roadmap page in the *Internals → Roadmap → Codebase health*
sidebar group. New "Trend since the original May 2026 audit" caution
Aside at the top should render under the five numbered goals, and the
per-module health table plus Tier A/B/C tables should show the refreshed
LOC numbers (largest file 7593L, `fn run` 1186L). The "Current metrics"
table near the bottom now has three columns (today / original May 2026
audit / pre-audit) instead of two.

**http://localhost:4321/reference/roadmap/bollard-migration/**  
UPDATED roadmap page in the *Internals → Roadmap → Infrastructure*
sidebar group. Status now reads "Partially scoped"; new "Open Review
Findings This Resolves" and "Phased Plan" sections should render with
the in-scope files, out-of-scope deferrals, and acceptance criteria for
Phase 1.

**http://localhost:4321/reference/roadmap/open-review-findings/**  
UPDATED roadmap page in the same Infrastructure sidebar group. Findings
#13 and #14 should each end with "Scoped for the Bollard migration Phase
1." and the link should resolve.

**http://localhost:4321/reference/roadmap/cargo-workspace-split/**  
UPDATED roadmap page in the *Codebase health* sidebar group. The "When
to do this" paragraph should read "~93K lines of production Rust (119
files in src/, re-baked 2026-05-17) … 88% growth".

**http://localhost:4321/reference/roadmap/**  
UPDATED overview. The Infrastructure improvements section's "Docker API
migration" bullet should now describe Phase 1 as the next concrete PR
with the open-findings link, and end with "(status: partially scoped)".

Signed-off-by: Alexey Zhokhov <alexey@zhokhov.com>
Co-authored-by: Amp <amp@ampcode.com>
donbeave added a commit that referenced this pull request May 17, 2026
…hase 1 (#366)

## Summary

Re-bakes the codebase-readability program's May 2026 baseline against
today's tree (LOC, file counts, mega-function sizes, `//!` coverage,
duplication counts) and adds a trend caution showing every metric except
`"Dockerfile"` literals regressed since the original audit — making the
gap between "audit happened" and "extraction work scheduled" visible to
anyone landing on the page. Cargo workspace split's LOC reference is
updated to match. Separately, resolves the standing contradiction
between the deferred Bollard migration and two still-Medium open review
findings (#13 cleanup string-matching, #14
inspect-collapse-to-not-found) by carving out a concrete Phase 1 scope
(lifecycle, cleanup, inspect via Bollard) with named files, out-of-scope
items, and acceptance criteria; the open findings catalog now back-links
both items to that Phase 1 so the two pages agree on ownership.

## What's deferred (follow-up PRs)

- `jackin-daemon` phase-order section so the four reactive-daemon leaves
(daemon, live-auth-sync, attention-prompts, host-bridge, desktop hub)
have one canonical sequencing reference.
- `reproducibility-pinning` operator-review pass (the page has been
"agent brainstorm, not yet reviewed" for a long time).
- `multi-runtime-support` "Remaining Work" bullets — split into
acceptance-criteria-bearing leaves or annotate each bullet with a
definition of done.
- Bollard Phase 2 (`docker build`, interactive `docker run -it` via
Bollard) — kept deferred per the original "incremental is pragmatic"
rationale.

## Verify locally

### Checkout

Paste this first to bypass the `tirith` paste scanner for the rest of
the session:

```sh
export TIRITH=0
```

Then paste the checkout block:

```sh
mkdir -p "$HOME/Projects/jackin-project/test"
cd "$HOME/Projects/jackin-project/test"

if [ ! -d jackin/.git ]; then
  git clone https://github.com/jackin-project/jackin.git
fi

cd jackin
mise trust
git fetch -f origin docs/roadmap-rebake-audit-and-bollard-phase1:refs/remotes/origin/docs/roadmap-rebake-audit-and-bollard-phase1
git checkout -B docs/roadmap-rebake-audit-and-bollard-phase1 refs/remotes/origin/docs/roadmap-rebake-audit-and-bollard-phase1
```

### Documentation

```sh
cd docs
bun install --frozen-lockfile
bunx astro sync
bunx tsc --noEmit
bun run build
bun run check:repo-links
bun run dev
```

Astro serves at `http://localhost:4321/`. Pages to walk:

**http://localhost:4321/reference/roadmap/codebase-readability/**  
UPDATED roadmap page in the *Internals → Roadmap → Codebase health*
sidebar group. New "Trend since the original May 2026 audit" caution
Aside at the top should render under the five numbered goals, and the
per-module health table plus Tier A/B/C tables should show the refreshed
LOC numbers (largest file 7593L, `fn run` 1186L). The "Current metrics"
table near the bottom now has three columns (today / original May 2026
audit / pre-audit) instead of two.

**http://localhost:4321/reference/roadmap/bollard-migration/**  
UPDATED roadmap page in the *Internals → Roadmap → Infrastructure*
sidebar group. Status now reads "Partially scoped"; new "Open Review
Findings This Resolves" and "Phased Plan" sections should render with
the in-scope files, out-of-scope deferrals, and acceptance criteria for
Phase 1.

**http://localhost:4321/reference/roadmap/open-review-findings/**  
UPDATED roadmap page in the same Infrastructure sidebar group. Findings
#13 and #14 should each end with "Scoped for the Bollard migration Phase
1." and the link should resolve.

**http://localhost:4321/reference/roadmap/cargo-workspace-split/**  
UPDATED roadmap page in the *Codebase health* sidebar group. The "When
to do this" paragraph should read "~93K lines of production Rust (119
files in src/, re-baked 2026-05-17) … 88% growth".

**http://localhost:4321/reference/roadmap/**  
UPDATED overview. The Infrastructure improvements section's "Docker API
migration" bullet should now describe Phase 1 as the next concrete PR
with the open-findings link, and end with "(status: partially scoped)".

Signed-off-by: Alexey Zhokhov <alexey@zhokhov.com>
Co-authored-by: Amp <amp@ampcode.com>
donbeave added a commit that referenced this pull request May 18, 2026
…hase 1 (#366)

## Summary

Re-bakes the codebase-readability program's May 2026 baseline against
today's tree (LOC, file counts, mega-function sizes, `//!` coverage,
duplication counts) and adds a trend caution showing every metric except
`"Dockerfile"` literals regressed since the original audit — making the
gap between "audit happened" and "extraction work scheduled" visible to
anyone landing on the page. Cargo workspace split's LOC reference is
updated to match. Separately, resolves the standing contradiction
between the deferred Bollard migration and two still-Medium open review
findings (#13 cleanup string-matching, #14
inspect-collapse-to-not-found) by carving out a concrete Phase 1 scope
(lifecycle, cleanup, inspect via Bollard) with named files, out-of-scope
items, and acceptance criteria; the open findings catalog now back-links
both items to that Phase 1 so the two pages agree on ownership.

## What's deferred (follow-up PRs)

- `jackin-daemon` phase-order section so the four reactive-daemon leaves
(daemon, live-auth-sync, attention-prompts, host-bridge, desktop hub)
have one canonical sequencing reference.
- `reproducibility-pinning` operator-review pass (the page has been
"agent brainstorm, not yet reviewed" for a long time).
- `multi-runtime-support` "Remaining Work" bullets — split into
acceptance-criteria-bearing leaves or annotate each bullet with a
definition of done.
- Bollard Phase 2 (`docker build`, interactive `docker run -it` via
Bollard) — kept deferred per the original "incremental is pragmatic"
rationale.

## Verify locally

### Checkout

Paste this first to bypass the `tirith` paste scanner for the rest of
the session:

```sh
export TIRITH=0
```

Then paste the checkout block:

```sh
mkdir -p "$HOME/Projects/jackin-project/test"
cd "$HOME/Projects/jackin-project/test"

if [ ! -d jackin/.git ]; then
  git clone https://github.com/jackin-project/jackin.git
fi

cd jackin
mise trust
git fetch -f origin docs/roadmap-rebake-audit-and-bollard-phase1:refs/remotes/origin/docs/roadmap-rebake-audit-and-bollard-phase1
git checkout -B docs/roadmap-rebake-audit-and-bollard-phase1 refs/remotes/origin/docs/roadmap-rebake-audit-and-bollard-phase1
```

### Documentation

```sh
cd docs
bun install --frozen-lockfile
bunx astro sync
bunx tsc --noEmit
bun run build
bun run check:repo-links
bun run dev
```

Astro serves at `http://localhost:4321/`. Pages to walk:

**http://localhost:4321/reference/roadmap/codebase-readability/**  
UPDATED roadmap page in the *Internals → Roadmap → Codebase health*
sidebar group. New "Trend since the original May 2026 audit" caution
Aside at the top should render under the five numbered goals, and the
per-module health table plus Tier A/B/C tables should show the refreshed
LOC numbers (largest file 7593L, `fn run` 1186L). The "Current metrics"
table near the bottom now has three columns (today / original May 2026
audit / pre-audit) instead of two.

**http://localhost:4321/reference/roadmap/bollard-migration/**  
UPDATED roadmap page in the *Internals → Roadmap → Infrastructure*
sidebar group. Status now reads "Partially scoped"; new "Open Review
Findings This Resolves" and "Phased Plan" sections should render with
the in-scope files, out-of-scope deferrals, and acceptance criteria for
Phase 1.

**http://localhost:4321/reference/roadmap/open-review-findings/**  
UPDATED roadmap page in the same Infrastructure sidebar group. Findings
#13 and #14 should each end with "Scoped for the Bollard migration Phase
1." and the link should resolve.

**http://localhost:4321/reference/roadmap/cargo-workspace-split/**  
UPDATED roadmap page in the *Codebase health* sidebar group. The "When
to do this" paragraph should read "~93K lines of production Rust (119
files in src/, re-baked 2026-05-17) … 88% growth".

**http://localhost:4321/reference/roadmap/**  
UPDATED overview. The Infrastructure improvements section's "Docker API
migration" bullet should now describe Phase 1 as the next concrete PR
with the open-findings link, and end with "(status: partially scoped)".

Signed-off-by: Alexey Zhokhov <alexey@zhokhov.com>
Co-authored-by: Amp <amp@ampcode.com>
donbeave added a commit that referenced this pull request May 19, 2026
…e findings #13/#14

- bollard-migration.mdx: rewrite to describe what shipped in Phase 1 and
  what remains deferred (docker build, interactive exec) in Phase 2
- roadmap.mdx: move bollard-migration from Planned to Partially implemented
- open-review-findings.mdx: remove #13 (string-match cleanup) and #14
  (inspect collapses to not-found), renumber #15-17 to #13-15
- codebase-map.mdx: add src/docker_client.rs entry describing DockerApi
  trait, BollardDockerClient, FakeDockerClient, and ContainerState

Signed-off-by: Alexey Zhokhov <alexey@zhokhov.com>
Co-authored-by: Claude <noreply@anthropic.com>
donbeave added a commit that referenced this pull request May 19, 2026
…e findings #13/#14

- bollard-migration.mdx: rewrite to describe what shipped in Phase 1 and
  what remains deferred (docker build, interactive exec) in Phase 2
- roadmap.mdx: move bollard-migration from Planned to Partially implemented
- open-review-findings.mdx: remove #13 (string-match cleanup) and #14
  (inspect collapses to not-found), renumber #15-17 to #13-15
- codebase-map.mdx: add src/docker_client.rs entry describing DockerApi
  trait, BollardDockerClient, FakeDockerClient, and ContainerState

Signed-off-by: Alexey Zhokhov <alexey@zhokhov.com>
Co-authored-by: Claude <noreply@anthropic.com>
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