feature: pin a release commit forever, independent of its shared branch ref #52

Merged
Gilles merged 1 commit from feat/pin-release-commits into master 2026-10-30 17:01:48 +00:00
Owner

Summary

  • PinnedRef pins a whole (ref_kind, ref_value), but ci-base's publish-release.mjs uploads release/devel-snapshot reports under the exact same ref_kind=branch/ref_value= as every regular CI push on that branch -- there is no dedicated ref for a release, so pinning the ref would freeze that branch's entire history forever.
  • New PinnedCommit(project, commit_sha), unique per project -- checked once inside cleanup._delete_reports() itself, so both cleanup_pr and prune_history respect it for free, without duplicating the check.
  • New endpoints: GET/POST/DELETE .../commits/{commit_sha}/pin/ and GET .../pinned-commits/, same permission gating as the existing PinnedRefView.

Frontend companion (a pin toggle on ReportCard, keyed by commit_sha) coming in a follow-up PR on argus/frontend.

Closes #51

Test plan

  • pytest (287/287)
  • pylint apps config (10/10)
  • bandit -r apps config -x '/migrations/,/tests.py,/test_*.py' (0 issues)
  • autopep8 --diff --exit-code clean
  • makemigrations --check clean

🤖 Generated with Claude Code

https://claude.ai/code/session_014HiJrn6J6vhyFfC2qyY4uh

## Summary - PinnedRef pins a whole (ref_kind, ref_value), but ci-base's publish-release.mjs uploads release/devel-snapshot reports under the exact same ref_kind=branch/ref_value=<branch> as every regular CI push on that branch -- there is no dedicated ref for a release, so pinning the ref would freeze that branch's entire history forever. - New `PinnedCommit(project, commit_sha)`, unique per project -- checked once inside `cleanup._delete_reports()` itself, so both `cleanup_pr` and `prune_history` respect it for free, without duplicating the check. - New endpoints: `GET/POST/DELETE .../commits/{commit_sha}/pin/` and `GET .../pinned-commits/`, same permission gating as the existing `PinnedRefView`. Frontend companion (a pin toggle on ReportCard, keyed by commit_sha) coming in a follow-up PR on argus/frontend. Closes #51 ## Test plan - [x] pytest (287/287) - [x] pylint apps config (10/10) - [x] bandit -r apps config -x '*/migrations/*,*/tests.py,*/test_*.py' (0 issues) - [x] autopep8 --diff --exit-code clean - [x] makemigrations --check clean 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_014HiJrn6J6vhyFfC2qyY4uh
feature: pin a release commit forever, independent of its shared branch ref
All checks were successful
ci / test (pull_request) Successful in 3m34s
ci / e2e (pull_request) Has been skipped
ci / docker (pull_request) Has been skipped
ci / deploy (pull_request) Has been skipped
ed51f3c48a
PinnedRef pins a whole (ref_kind, ref_value), but ci-base's publish-release.mjs
uploads release/devel-snapshot reports under the exact same ref_kind=branch/
ref_value=<branch> as every regular CI push on that branch -- there is no
dedicated ref for a release. Pinning the ref would freeze that branch's
entire history forever, not just the release build.

New PinnedCommit(project, commit_sha), checked once inside
cleanup._delete_reports() itself so both cleanup_pr and prune_history respect
it for free, plus GET/POST/DELETE .../commits/{commit_sha}/pin/ and
GET .../pinned-commits/ endpoints (same permission gating as PinnedRefView).

Closes #51

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014HiJrn6J6vhyFfC2qyY4uh
Author
Owner
<!-- argus-link-bot:argus/backend --> 📊 [Rapports Argus pour cette PR](https://reports.stationmyr.net/argus/backend/pr/52)
Gilles merged commit ae2f522de7 into master 2026-10-30 17:01:48 +00:00
Gilles deleted branch feat/pin-release-commits 2026-10-30 17:01:48 +00:00
Sign in to join this conversation.
No description provided.