Skip to content

setup and sync leave an existing config repository unchanged - #266

Merged
yourconscience merged 1 commit into
mainfrom
fix/setup-existing-config
Nov 15, 2026
Merged

yourconscience merged 1 commit into
mainfrom
fix/setup-existing-config

Conversation

@yourconscience

@yourconscience yourconscience commented Nov 15, 2026 •

Copy link
Copy Markdown
Owner

What and why

tackroom setup and a first tackroom sync changed a config repository that already existed. On a fresh clone that left tracked files modified, so the next git pull could stop.

  • Starter files: setup writes them only into a config root that had no tackroom.yaml. A role, skill or plugin.json deleted from the repository stays deleted. With a memory tier on, an existing config still gets missing files under memory/.
  • tackroom.yaml: setup no longer rewrites the file when its content is the same.
  • tackroom.lock: a sync no longer records a freshness hold for a new entry when the hold had already expired at lookup time. Pi packages are looked up only where Pi is detected.

Behaviour that changes for users, also in docs/upgrading.md:

  • A config root that holds only a hand-written tackroom.yaml no longer gets starter roles or the starter skill from setup.
  • A pinned MCP package whose harness is absent on a machine is looked up on every sync there, since the expired result is no longer cached in the lock.

Deleted TestSetupMemoryBasicUsesCustomRootCommands: it expected setup to create the starter skill in a root that held only a tackroom.yaml.

How I checked it

Built this branch and ran it on fresh clones of a real config repository, each in a throwaway home with a stub claude on PATH:

Command 2.7.0 This branch
tackroom setup --no-cron lock and yaml changed, three starter files added git status empty
tackroom sync --replace-conflicts lock changed git status empty
tackroom setup --overlay cloud --no-cron same as the first row git status empty, overlay applied

A first-time setup in an empty home still scaffolds the full starter set. A hold still in force is still recorded and still blocks.

  • go test ./... and go vet ./... pass
  • I can explain this change without an AI tool

Summary by Sourcery

Keep existing config repositories unchanged during setup and initial sync unless required memory files are missing or an active package decision must be recorded.

Bug Fixes:

  • Prevent setup from restoring deleted starter files or rewriting unchanged tackroom.yaml files in existing config repositories.
  • Prevent sync from recording already-expired package freshness holds and avoid Pi package lookups when Pi is not detected.

Enhancements:

  • Clarify setup, starter-file ownership, package holds, and Pi lookup behavior in user documentation.

Documentation:

  • Document the revised setup behavior and upgrade implications for existing config repositories.

@sourcery-ai

sourcery-ai Bot commented Nov 15, 2026

Copy link
Copy Markdown

Sorry @yourconscience, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 3 days and 1 hour by commenting @sourcery-ai review. Upgrade to get a review now.

@coderabbitai

coderabbitai Bot commented Nov 15, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 18222d20-43d7-4612-a26b-8207b0ffe79a
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@sourcery-ai

sourcery-ai Bot commented Nov 15, 2026

Copy link
Copy Markdown

Reviewer's Guide

Implementation

Avoid writing a new hold entry when its hold has already expired, and skip registry lookups for Pi packages unless Pi is detected.

  • internal/app/holds.go L145-149, L313-315

Limit starter assets on existing config roots to the enabled memory layer, and leave an unchanged tackroom.yaml unrewritten.

  • internal/app/setup.go L246-256
  • internal/app/setup_scaffold.go L108-113, L194-207 (+2 small edits)

Documentation

Explain that setup adds starter assets only to new config roots, while existing roots receive only missing files for an enabled memory tier.

  • docs/commands.md L12
  • docs/roles.md L27
  • docs/setup.md L18-19, L151-153
  • skills/tackroom/SKILL.md L81

Document when freshness holds are recorded and that Pi package lookups require Pi to be detected.

  • docs/skills.md L89-90
  • docs/upgrading.md L9-17

Document the setup behavior change, unchanged config formatting, and the new-root-only starter rule.

  • skills/tackroom/SKILL.md L84

Tests

Remove the test that expected setup to install memory hooks and the starter skill in an existing root containing only tackroom.yaml.

  • internal/app/setup_separation_test.go L386 (removed lines)

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@yourconscience
yourconscience merged commit 684a2bb into main Nov 15, 2026
7 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