Skip to content

fix: gs sync materializes gentle-ai configs; stop symlinking tui.json - #70

Merged
barbatdev merged 10 commits into
mainfrom
fix/69-gs-sync-materialize
Oct 21, 2026
Merged

barbatdev merged 10 commits into
mainfrom
fix/69-gs-sync-materialize

Conversation

@barbatdev

Copy link
Copy Markdown
Owner

Closes #69

What changes

  • install.sh: opencode/tui.json is seeded as a regular copy (scripts/seed-file.sh). An existing symlink to our file is converted in place; a regular file is kept (tool-owned); a foreign symlink is left alone. Fixes refusing to read symlink in gentle-ai sync.
  • fish: ~/.gentle-ai/bin goes first on PATH when present (gentle-ai cannot persist PATH for fish).
  • gs sync: runs gentle-ai sync after the binaries step. GS_SYNC_AGENTS scopes runtimes per host, GS_SKIP_AI_SYNC=1 skips it. Failures print the output without aborting. Legacy upgrade scripts are flagged (not removed).

Tests

  • bash scripts/check-install-symlinks.sh — new seed_file cases (absent, own symlink, tool-owned, foreign, dry run)
  • fish fish/tests/w7-gentle-ai-path.fish — new
  • bash scripts/test-gs-sync.sh — new, isolated HOME/PATH, no network
  • Other fish tests pass; w5b-herdr-ssh.fish fails on main too (unrelated).

After merge (manual, per host)

  • Mac: rerun ./install.sh (converts tui.json), then gs sync.
  • agent-dev / agent-gentle: set GS_SYNC_AGENTS in 99-local.fish, then gs sync.
  • agent-gentle: opencode-review-transport.ts has custom bytes; move it aside so gentle-ai can manage it.
  • Remove legacy scripts the WARN lines name.

gentle-ai sync refuses to read symlinks and aborts (and fails rollback) on
~/.config/opencode/tui.json. Seed it once, convert our old symlink in place,
and keep the file once a tool owns it.

Refs #69
gentle-ai cannot persist PATH for fish login shells, so the OpenCode
background launcher in ~/.gentle-ai/bin never took effect.

Refs #69
gs sync only rebuilt binaries, so managed configs drifted per host. It now
runs gentle-ai sync (scoped by GS_SYNC_AGENTS, skippable with
GS_SKIP_AI_SYNC=1), reports failures without aborting, and flags legacy
upgrade scripts so gs sync is the single entry point.

Closes #69
The README restore in dc56614 dropped the Linux rows the nix preflight
check requires, which kept main red and blocked merges.

Refs #69
* fix(install): add profile files install.sh already links

install.sh on main links herdr, ghostty, fish and pi profile files that were
never committed, so install.sh --check fails and CI stays red.

Refs #69

* docs: restore Linux Home Manager rows the nix preflight requires

Dropped by the README restore in dc56614.

Refs #69
gentle-ai sync refuses to read symlinks and aborts (and fails rollback) on
~/.config/opencode/tui.json. Seed it once, convert our old symlink in place,
and keep the file once a tool owns it.

Refs #69
gentle-ai cannot persist PATH for fish login shells, so the OpenCode
background launcher in ~/.gentle-ai/bin never took effect.

Refs #69
gs sync only rebuilt binaries, so managed configs drifted per host. It now
runs gentle-ai sync (scoped by GS_SYNC_AGENTS, skippable with
GS_SKIP_AI_SYNC=1), reports failures without aborting, and flags legacy
upgrade scripts so gs sync is the single entry point.

Closes #69
The README restore in dc56614 dropped the Linux rows the nix preflight
check requires, which kept main red and blocked merges.

Refs #69
@barbatdev
barbatdev merged commit 2e02283 into main Oct 21, 2026
1 check passed
@barbatdev
barbatdev deleted the fix/69-gs-sync-materialize branch October 21, 2026 12:22
@barbatdev

Copy link
Copy Markdown
Owner Author

Fleet review (glm)

Lens: requirements + adversarial. Verified against issue #69's proposal at head b647f50: the tui.json symlink is replaced by a seed copy (install.sh), gs sync now runs gentle-ai sync after the binaries step and before the compat check, scoping/skip via GS_SYNC_AGENTS/GS_SKIP_AI_SYNC, and legacy upgrade scripts are flagged — matching items 1, 2 and 4 of the issue's work plan. Adversarial verification: run_quiet always returns 0 (prints FAILED plus output), so a failing gentle-ai sync cannot abort gs sync under set -euo pipefail — matches the test-4 contract; ai_bin is always assigned before use in both workshop and consumer branches; check_file exists in install.sh; fish_add_path --path --move is a valid documented option combination (-P/--path manipulates PATH directly), correctly guarded by test -d; seed_file handles absent DST, own-symlink conversion (mv replaces the link, never its target), tool-owned regular files, and foreign symlinks, and does not mkdir/copy under DRY_RUN. Consumer-mode cmd_sync shims every network-capable command in test-gs-sync.sh, so the 'no network' test claim holds structurally. One minor scope note below.

Suggestion (1)

Verdict: ready to merge

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.

gs sync no materializa configs: falta paso gentle-ai sync y hay colisión de ownership con install.sh

1 participant