Skip to content

feat(bin): register Firstmate projects with Paseo - #7

Merged
ryannmicua merged 5 commits into
mainfrom
fm/paseo-auto-project
Sep 28, 2026
Merged

ryannmicua merged 5 commits into
mainfrom
fm/paseo-auto-project

Conversation

@ryannmicua

@ryannmicua ryannmicua commented Sep 28, 2026 •

Copy link
Copy Markdown
Owner

Intent

Queue the automatic Paseo project that is created when adding a firstmate project, but only if Paseo is the selected backend. Also it should be possible to ask firstmate to create a Paseo project for an existing project registered locally in firstmate's projects directory.

Context: the Paseo runtime backend (merged in PR #6) never creates Paseo projects itself. A fresh task must match exactly one registered Paseo project by the physical path of its source checkout, and it refuses when that match is absent or ambiguous. Today someone has to register each project's folder in Paseo manually.

What Changed

  • Adds an idempotent helper to register a Firstmate project’s checkout with Paseo, reusing a matching project and refusing ambiguous matches.

  • Supports explicit registration for existing projects, and limits automatic registration after add or create to when Paseo is the selected runtime backend.

  • Removing a Firstmate project does not remove its Paseo project; this can be handled in a separate follow-up.

Risk Assessment

✅ Low: The change is bounded to Paseo project registration, its backend-selection guard, and focused documentation and coverage; no material defect or unnecessary behavior was found.

Testing

The focused scenario script and live helper runs covered backend-conditional creation, explicit registration, idempotency, ambiguity refusal, and backslash paths; the transcript records CLI output and persisted state. The change has no rendered UI surface, so CLI evidence is appropriate.

  • Live validation: ✅ go - 5 of 5 scenarios driven live against the product
Scenario Result Live Evidence
After adding a registered project with Paseo selected, its checkout is recorded as a Paseo project. ✅ pass live Paseo project registration transcript
After adding a registered project with tmux selected, Paseo is not called and no project is created. ✅ pass live Paseo project registration transcript
Request Paseo registration for an existing Firstmate project under tmux; it creates one project and reuses it on repeat. ✅ pass live Paseo project registration transcript
When multiple Paseo projects match a checkout, registration refuses and creates no additional project. ✅ pass live Paseo project registration transcript
Register a project whose checkout path contains a backslash; the existing match is reused without creating a duplicate. ✅ pass live Paseo project registration transcript; focused scenario script
Evidence: Paseo project registration transcript

Source: Paseo project registration transcript

Scenario: add under selected Paseo backend
created Paseo project first-added (project-0) for registered project first-added at ~/.no-mistakes/worktrees/ff5e17b6f5de/01M3M4GM3PQ5J0TRE97DRQAA0R/.tmp-paseo-validation/manual/home/projects/first-added
persisted project=first-added path=~/.no-mistakes/worktrees/ff5e17b6f5de/01M3M4GM3PQ5J0TRE97DRQAA0R/.tmp-paseo-validation/manual/home/projects/first-added

Scenario: add while tmux is selected
skip: runtime backend for new tasks is tmux; no Paseo project was created
Paseo CLI calls before=3 after=3

Scenario: explicit request for existing Firstmate project while tmux is selected
created Paseo project existing (project-1) for registered project existing at ~/.no-mistakes/worktrees/ff5e17b6f5de/01M3M4GM3PQ5J0TRE97DRQAA0R/.tmp-paseo-validation/manual/home/projects/existing
Paseo project existing (project-1) already matches registered project existing at ~/.no-mistakes/worktrees/ff5e17b6f5de/01M3M4GM3PQ5J0TRE97DRQAA0R/.tmp-paseo-validation/manual/home/projects/existing
persisted project=existing path=~/.no-mistakes/worktrees/ff5e17b6f5de/01M3M4GM3PQ5J0TRE97DRQAA0R/.tmp-paseo-validation/manual/home/projects/existing

Scenario: ambiguous matches refuse creation
error: 2 Paseo projects match source path ~/.no-mistakes/worktrees/ff5e17b6f5de/01M3M4GM3PQ5J0TRE97DRQAA0R/.tmp-paseo-validation/manual/home/projects/existing; refusing ambiguous project reuse
Paseo creates after ambiguity: 2

Scenario: a path containing a backslash is matched losslessly
Paseo project foo\bar (backslash-existing) already matches registered project foo\bar at ~/.no-mistakes/worktrees/ff5e17b6f5de/01M3M4GM3PQ5J0TRE97DRQAA0R/.tmp-paseo-validation/manual/home/projects/foo\bar
Total Paseo creates: 2

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

🔧 **Review** - 1 issue found → auto-fixed ✅
  • ⚠️ bin/backends/paseo.sh:117 - jq @tsv escapes backslashes, but the read at bin/backends/paseo.sh:106-114 does not decode them. For a valid checkout path such as projects/foo\bar, lookup skips the existing match and returns “missing” here; bin/fm-paseo-project.sh:89 then creates a duplicate, and its post-create check at bin/fm-paseo-project.sh:108 also misses the match and errors. Retrying can create more duplicates. Preserve path fields losslessly or refuse to create when a match cannot be represented.

🔧 Fix applied.
✅ Re-checked - no issues remain.

✅ **Test** - passed

✅ No issues found.

  • Live validation: ✅ go - 5 of 5 scenarios driven live against the product
Scenario Result Live Evidence
After adding a registered project with Paseo selected, its checkout is recorded as a Paseo project. ✅ pass live Paseo project registration transcript
After adding a registered project with tmux selected, Paseo is not called and no project is created. ✅ pass live Paseo project registration transcript
Request Paseo registration for an existing Firstmate project under tmux; it creates one project and reuses it on repeat. ✅ pass live Paseo project registration transcript
When multiple Paseo projects match a checkout, registration refuses and creates no additional project. ✅ pass live Paseo project registration transcript
Register a project whose checkout path contains a backslash; the existing match is reused without creating a duplicate. ✅ pass live Paseo project registration transcript; focused scenario script
  • TMPDIR=.tmp-paseo-validation bash tests/fm-paseo-project.test.sh
  • Ran bin/fm-paseo-project.sh --if-selected first-added with Paseo and tmux selected in isolated configuration.
  • Ran bin/fm-paseo-project.sh existing twice under tmux and checked persisted project state.
  • Exercised ambiguous-match refusal and lossless matching of a backslash path; captured the CLI transcript.
  • Confirmed the disposable worktree setup was removed.
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

…sh CLI now writes a valid session record for the board path, and `render_board` points the adapter to that fixture-local store. Verified with the renderer test under an isolated `HOME` (all cases passed) and `git diff --check`
…so early matches cannot close the producer pipe and leak a Broken pipe diagnostic. The focused quota chooser test and git diff check passed
@ryannmicua
ryannmicua merged commit a0d4311 into main Sep 28, 2026
20 checks passed
@ryannmicua
ryannmicua deleted the fm/paseo-auto-project branch September 28, 2026 21:27
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