Skip to content

fix: forge install freshness warning + qualifier-aware prune#81

Merged
N4M3Z merged 1 commit into
mainfrom
issue-73
Jul 9, 2026
Merged

fix: forge install freshness warning + qualifier-aware prune#81
N4M3Z merged 1 commit into
mainfrom
issue-73

Conversation

@N4M3Z

@N4M3Z N4M3Z commented Jul 9, 2026

Copy link
Copy Markdown
Owner

Closes #73

Problem

forge install deploys whatever the source working copy holds, so an install from a working copy parented behind trunk silently re-deploys already-merged-away content. And prune leaves a stale deployed base file alive when its source counterpart exists only as a qualifier variant.

Fix

  1. Freshness check: before deploying, compare the source git working copy against its trunk ref (origin/main, no network fetch). If behind, refuse with a prominent warning unless --allow-stale. A git-read failure is advisory, never fatal to install.
  2. Qualifier-aware prune: a deployed base file whose source counterpart exists only under a qualifier directory is pruned; a correctly-resolved qualifier deployment is kept.

Test plan

  • fmt / clippy -D warnings / test
  • freshness: stale source refuses without --allow-stale, proceeds with it, non-git skips silently
  • prune: base pruned when only an inactive model variant exists; kept when a real base or active variant resolves
  • CI matrix

🤖 Generated with Claude Code

Closes #73. Before deploying, forge install checks whether the source git
working copy is behind its trunk (origin/main, no network fetch); if behind it
refuses with a prominent warning unless --allow-stale is passed. A git-read
failure is advisory, never fatal. Prune is now qualifier-aware: a deployed base
file whose source counterpart exists only under a qualifier directory
(rules/harness/model) is pruned, while a correctly-resolved qualifier
deployment is kept.
@N4M3Z N4M3Z merged commit a53557e into main Jul 9, 2026
2 checks passed
@N4M3Z N4M3Z deleted the issue-73 branch July 9, 2026 07:30
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.

forge install: warn when source working copy is behind trunk; make prune qualifier-aware

1 participant