Skip to content

chore(v0.1.25.38.1): same-release hygiene sweep — actor parity, test assertions, README backfill#142

Merged
amavashev merged 1 commit into
mainfrom
fix/v0.1.25.38.1-hygiene
Apr 23, 2026
Merged

chore(v0.1.25.38.1): same-release hygiene sweep — actor parity, test assertions, README backfill#142
amavashev merged 1 commit into
mainfrom
fix/v0.1.25.38.1-hygiene

Conversation

@amavashev
Copy link
Copy Markdown
Collaborator

@amavashev amavashev commented Apr 23, 2026

Summary

Patch-of-patch follow-up to v0.1.25.38 (bulk-action event parity). No behavior change, no API change, no spec change. Three deferred items bundled into a single low-risk PR.

Code hygiene (Finding #4 from post-merge review)

  • BudgetController#emitBulkFundEvent now mirrors the single-op dual-auth ActorType conditional (authenticated_tenant_id present → API_KEY, otherwise ADMIN). Today bulk is AdminKeyAuth-gated so this always resolves to ADMIN, but aligning with single-op prevents silent mis-attribution if bulk auth is ever broadened.
  • TenantController bulk + single-op ADMIN hardcodes kept (aligning would change event wire shape — single-op omits keyId, bulk populates it); both sites carry // TODO actor-parity comments flagging the asymmetry.

Test hygiene (Finding #5)

  • ArgumentCaptor<Map<String, Object>> added to all five budget bulk emit tests (CREDIT / DEBIT / RESET / RESET_SPENT / REPAY_DEBT) and all three tenant bulk emit tests (SUSPEND / REACTIVATE / CLOSE).
  • Asserts core EventDataBudgetLifecycle / EventDataTenantLifecycle payload keys; CLOSE additionally asserts the cascade sub-map (budgets_closed / webhooks_disabled / api_keys_revoked).
  • Previously the payload arg was any() — no protection against builder drift.

Docs

  • README v0.1.25.x release-note catalog backfilled for seven releases (.32 → .38). Tone matches the existing .31 paragraph; sourced from each release's CHANGELOG.md + AUDIT.md entry. Flagged on 2026-04-22 during the v0.1.25.38 release audit as pre-existing drift.
  • CHANGELOG.md entry prepended as [0.1.25.38.1] — 2026-04-23.
  • AUDIT.md extended with a "Second-pass hygiene sweep" sub-section under the existing v0.1.25.38 post-merge review block; header title + server version bumped to 0.1.25.38.1.

Version

  • cycles-admin-service/pom.xml <revision> 0.1.25.380.1.25.38.1 (fourth-segment patch-of-patch, matching the v0.1.25.28.1 precedent documented in CHANGELOG preamble).

Test plan

  • mvn clean verify green (763 tests, jacoco ≥95%, spec-coverage 46/46)
  • No wire / OpenAPI / DTO contract change (additive comments + test strengthening + docs + internal conditional)
  • CI green on this PR
  • After merge: tag v0.1.25.38.1 on main, push tag, gh release create v0.1.25.38.1 to fire release.yml

…assertions, README backfill

Patch-of-patch follow-up to v0.1.25.38 (bulk-action event parity). No
behavior change, no API change, no spec change.

Code hygiene (Finding #4 from post-merge review).
- BudgetController#emitBulkFundEvent now mirrors the single-op
  dual-auth ActorType conditional (authenticated_tenant_id present →
  API_KEY, otherwise ADMIN). Today bulk is AdminKeyAuth-gated so this
  always resolves to ADMIN, but aligning with single-op prevents silent
  mis-attribution if bulk auth is ever broadened.
- TenantController bulk + single-op ADMIN hardcodes kept (aligning
  would change event wire shape — single-op omits keyId, bulk
  populates it); both sites carry `// TODO actor-parity` comments
  flagging the asymmetry.

Test hygiene (Finding #5).
- ArgumentCaptor<Map<String, Object>> added to all five budget bulk
  emit tests (CREDIT / DEBIT / RESET / RESET_SPENT / REPAY_DEBT) and
  all three tenant bulk emit tests (SUSPEND / REACTIVATE / CLOSE).
  Asserts core EventDataBudgetLifecycle / EventDataTenantLifecycle
  payload keys; CLOSE additionally asserts the `cascade` sub-map
  (`budgets_closed` / `webhooks_disabled` / `api_keys_revoked`).
  Previously the payload arg was `any()` — no protection against
  builder drift. One representative per action, not exhaustive.

Docs.
- README v0.1.25.x release-note catalog backfilled for seven releases
  (.32 lenient read-side deserialization, .33 SB/Tomcat CVE pin,
  .34 commons-lang3 CVE pin, .35 tenant-close cascade + Rule 2,
  .36 Rule 2 coverage completion, .37 Rule 1(c) bounded-convergence,
  .38 bulk-action event parity). Tone matches existing .31 paragraph.
  Flagged on 2026-04-22 during the v0.1.25.38 release audit.
- CHANGELOG entry prepended as [0.1.25.38.1] — 2026-04-23.
- AUDIT.md extended with "Second-pass hygiene sweep (2026-04-23)"
  sub-section under the existing v0.1.25.38 post-merge review block.
- Header title + server version bumped to 0.1.25.38.1.

Version.
- cycles-admin-service/pom.xml <revision> 0.1.25.38 → 0.1.25.38.1
  (fourth-segment patch-of-patch, matching v0.1.25.28.1 precedent).

Verified: `mvn clean verify` → 763 tests green, jacoco ≥95%,
spec-coverage 46/46.
@amavashev amavashev merged commit e5f315c into main Apr 23, 2026
8 checks passed
amavashev added a commit that referenced this pull request May 2, 2026
Free supply-chain security analysis from openssf/scorecard. Same workflow
as runcycles/cycles-server (PR #142). Scores ~17 practices on a 0-10 scale
and publishes to api.scorecard.dev so the badge auto-updates.

Runs on push to main, on branch_protection_rule changes, and weekly.
Action SHAs are pinned per Scorecard's pinned-dependencies criterion.
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