Skip to content

feat(promote): auto-pin uv git deps from branch= to tag= during staging→main#175

Closed
MickaelV0 wants to merge 3 commits into
stagingfrom
feat/170-promote-pin-swap
Closed

feat(promote): auto-pin uv git deps from branch= to tag= during staging→main#175
MickaelV0 wants to merge 3 commits into
stagingfrom
feat/170-promote-pin-swap

Conversation

@MickaelV0
Copy link
Copy Markdown
Contributor

Summary

  • Adds Step 1b pin-swap phase to /promote between pre-flight and version bump
  • Detects [tool.uv.sources] entries with branch=, resolves each to a release tag via uv.lock SHA + git ls-remote, shows DP(A) diff, rewrites pyproject.toml, regenerates uv.lock, stages both
  • Fails loud when SHA has no matching tag; no-op when zero branch= git deps; --dry-run shows plan only

Acceptance criteria

  • /promote detects branch= entries in [tool.uv.sources] and lists them in pre-flight output
  • For each, resolves uv.lock SHA → <pkg>/vX.Y.Z tag (subdirectory-aware for monorepo subdir packages)
  • DP(A) gate before mutating pyproject.toml / uv.lock
  • On apply: rewrite source block, run uv lock, stage both files for the promotion commit
  • On abort: revert pyproject.toml + uv.lock cleanly (DP gate prevents writes)
  • If SHA has no matching tag → fail loud with actionable message ("cut <pkg>/vX.Y.Z at <sha> upstream first")
  • No-op + silent skip when zero git deps with branch= are found
  • --dry-run shows the swap plan without writing
  • Works for repos that release as containers (phase runs before image build, orthogonal to container flow)
  • Documented in docs/release-convention.md (new file)

Files changed

  • plugins/dev-core/skills/promote/lib/pin-swap.ts — new, pure-logic implementation (I/O injected via Deps interface)
  • plugins/dev-core/skills/promote/__tests__/pin-swap.test.ts — 36 vitest unit tests
  • plugins/dev-core/skills/promote/SKILL.md — Step 1b documented
  • plugins/dev-core/skills/promote/README.md — pin-swap added to how-it-works list
  • docs/release-convention.md — new file documenting branch/tag convention + pin-swap

Test plan

  • bun run test — 543 tests pass (36 new in pin-swap suite)
  • bun run lint — biome clean
  • pre-commit + pre-push hooks pass (lint, typecheck, trufflehog, conventional-commits)

Follow-up (out of scope, flagged)

  • ~/projects/CLAUDE.md Release Convention block should reference pin-swap behavior — this file is outside the repo and cannot be edited in this PR. Flag for manual update.

Closes #170

🤖 Generated with Claude Code

MickaelV0 and others added 3 commits May 13, 2026 17:43
…rnative)

Adds Step 1b to /frame: three required fields that must be answered before
tier classification can proceed. Non-falsifiable failure modes surface an
abort prompt. Frame artifact gains a required Premise Validity section.
Motivated by Roxabi/lyra#1162 (quality-debt infra that measured bookkeeping
compliance, not code quality — 1100 LOC that a falsification check would
have caught).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add Step 2d budget heuristic to /plan: classifies each task by cost
class (trivial/bounded/judgmental/exploratory), estimates tool-call ops,
force-splits or DP-flags tasks exceeding 50 ops, and emits a Budget
Table in the plan artifact's Wave Structure section.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ng→main

Add Step 1b pin-swap phase to /promote: detects [tool.uv.sources] entries
with branch=, resolves each to a release tag via uv.lock SHA + git ls-remote,
shows DP(A) diff, rewrites pyproject.toml, regenerates uv.lock, stages both.
Fails loud when SHA has no matching tag. No-op when zero branch= git deps.
--dry-run shows plan without writing. Documented in docs/release-convention.md.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@MickaelV0
Copy link
Copy Markdown
Contributor Author

Closing — branch contained scope creep (frame + plan commits from sibling PRs #172 #174). Reopening as clean promote-only branch.

@MickaelV0 MickaelV0 closed this May 13, 2026
@MickaelV0 MickaelV0 deleted the feat/170-promote-pin-swap branch May 13, 2026 16:46
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.

feat(promote): auto-pin uv git deps from branch= to tag= during staging→main

1 participant