Skip to content

ci(roadmap): close the release batch automatically on tag (CS-77) - #40

Merged
RudneyForti merged 1 commit into
mainfrom
feature/77-release-sync
Aug 3, 2026
Merged

ci(roadmap): close the release batch automatically on tag (CS-77)#40
RudneyForti merged 1 commit into
mainfrom
feature/77-release-sync

Conversation

@RudneyForti

Copy link
Copy Markdown
Collaborator

Summary

Completes the roadmap automation chain. Merging already moves a card to Concluídas; now tagging closes the batch: pushing a v* tag stamps that version on the merged-but-unreleased cards, so the "Em aberto" bucket folds into its release group with no manual step.

The rule it enforces

Per AGENTS.md → Versioning authority, a card's version is a claim that the work shipped in that release. So the script does not blanket-stamp everything unversioned — it verifies each card with git merge-base --is-ancestor <commitHash> <tag>:

  • Card merged before the tag → stamped
  • Card merged after the tag was cut → stays in "Em aberto" for the next release
  • Card with no commitHash → left untouched (never guessed)
  • Non-release tag (banana) → refused, exit 1
  • Re-run on the same tag → no-op (idempotent)

This makes the phantom-version bug that started the versioning work (a v1.15.0 group git never tagged) structurally impossible.

Changes

  • .github/workflows/release-sync.yml — on push of v* (plus workflow_dispatch to reprocess a tag manually); checks out main with full history so the containment check has a real graph; commits the board with [skip ci]
  • scripts/roadmap-stamp-release.mjs — the stamping logic
  • tests/unit/release-sync.test.ts — 6 cases run against a throwaway git repo with a real commit graph and a real tag; mocking git would have tested nothing
  • AGENTS.md / GIT-WORKFLOW.md — E7 stamping documented as automatic, no longer NEO's job

Verified locally against the real repo

v1.16.0 → stamped 1.16.0 on 6 card(s): CS-49, CS-71, CS-72, CS-73, CS-74, CS-76
v1.15.4 → nothing to stamp (all six correctly reported "fora da tag")
banana  → refused, exit 1

After merge

I'll trigger workflow_dispatch with v1.16.0 to close the current batch — which both delivers the stamping and proves the automation end-to-end on the real board.

Checklist

  • Link to feature/issue: CS-77
  • Description of changes included above
  • List of additions documented
  • All existing tests are passing (119)
  • New tests were added for this change (6 cases, real git graph)
  • Agent Smith validated behavior (script exercised against the live repo — see results above)
  • No regressions observed

References

CS-77 · follows CS-73 (merge sync) and CS-76 (dual-source board)

- release-sync.yml: on a v* tag push, stamp that version on the merged
  cards the tag shipped, closing the "Em aberto" bucket with no manual step
- verify containment with git merge-base --is-ancestor instead of blanket
  stamping: work merged after the tag was cut stays open for the next release
- never guess a version for a card with no commitHash; refuse a non-release
  tag; idempotent on re-run
- workflow_dispatch input to reprocess a tag manually
- tests build a throwaway repo with a real commit graph (mocking git would
  test nothing): containment, post-tag exclusion, no-overwrite, idempotency
- AGENTS.md / GIT-WORKFLOW.md: E7 stamping is now automatic, not NEO's job
@RudneyForti
RudneyForti merged commit bb8fe1e into main Aug 3, 2026
3 checks passed
@RudneyForti
RudneyForti deleted the feature/77-release-sync branch August 3, 2026 00:54
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