Skip to content

feat(safety-registry): emit events on transfer_admin and accept_admin - #502

Merged
samjay8 merged 6 commits into
use-assay:mainfrom
meem08:feat/319-emit-admin-transfer-events
Oct 23, 2026
Merged

samjay8 merged 6 commits into
use-assay:mainfrom
meem08:feat/319-emit-admin-transfer-events

Conversation

@meem08

@meem08 meem08 commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Add admin_transfer_proposed(old, new) and admin_transferred(old, new) events so admin-role changes are visible in the event stream, matching the audit trail that attest/revoke already publish.

  • transfer_admin publishes AdminTransferProposed (topic: proposing admin; data: proposed successor + ledger timestamp) after recording the pending admin.
  • accept_admin publishes AdminTransferred (topic: replaced admin; data: new admin + ledger timestamp) after promoting the pending admin.
  • Bump INTERFACE_VERSION 1 -> 2 (event schema change).
  • Add unit tests asserting both event payloads and storage effects.
  • Document the events in docs/contract-interface.md#attestation-events and note the event budget impact (single non-batched admin calls, no effect on the attest_many cap).

What changed and why

The gate will flag this PR if it touches maintainer-owned paths

Those paths are listed in scripts/merge-gate.sh. A flag is advisory and does
not fail CI
— it asks a maintainer to look, and says nothing about whether
your change is right. Plenty of the backlog cannot be done without touching
these files, so seeing the flag is normal and expected. The finding appears in
the Merge gate job summary.

Checklist

  • No new third-party dependency (Go or Rust) was added. If one was, the
    gate holds the PR — say here why it is warranted and what trust it brings.
  • No severity threshold moved without a reason traceable to something
    the attestation run actually surfaced (docs/attestation-run.md).
  • No verdict is published that the evidence does not support. Undetermined
    stays undetermined; nothing renders "could not check" as "this is fine".
  • Tests pass locally: go test ./... and cd assay-contracts && cargo test.
  • If this PR touches a fail-closed path, a test would fail if the
    fail-closed behavior regressed
    — a fix without a regression test is a
    fix that can silently break again.
    closes Registry: emit events on transfer_admin and accept_admin #319

Add admin_transfer_proposed(old, new) and admin_transferred(old, new)
events so admin-role changes are visible in the event stream, matching
the audit trail that attest/revoke already publish.

- transfer_admin publishes AdminTransferProposed (topic: proposing
  admin; data: proposed successor + ledger timestamp) after recording
  the pending admin.
- accept_admin publishes AdminTransferred (topic: replaced admin; data:
  new admin + ledger timestamp) after promoting the pending admin.
- Bump INTERFACE_VERSION 1 -> 2 (event schema change).
- Add unit tests asserting both event payloads and storage effects.
- Document the events in docs/contract-interface.md#attestation-events
  and note the event budget impact (single non-batched admin calls,
  no effect on the attest_many cap).
@drips-wave

drips-wave Bot commented Oct 20, 2026

Copy link
Copy Markdown

@meem08 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@mergekeeper

mergekeeper Bot commented Oct 20, 2026

Copy link
Copy Markdown

MergeKeeper review

Scope: in scope for linked issue #319.
Verdict: clean

This PR successfully implements and tests the requested admin_transfer_proposed and admin_transferred events on the safety registry contract, bumps the interface version, and updates the documentation and event payload tests accordingly.

Reviewed commit: 55cf6de3691340c9cca3025fd165102950e405c0.
CI and merge eligibility are checked separately.

@mergekeeper

mergekeeper Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

MergeKeeper merge status

Status: blocked
PR state: open
Mergeability: conflicts / not mergeable
Checked commit: 55cf6de3691340c9cca3025fd165102950e405c0.

Reason: One or more required CI checks failed.

Failing checks:

Next steps:

  1. Open the failing check details above and fix the reported error.
  2. Run the same checks locally where possible.
  3. Commit and push the fix.
  4. MergeKeeper will automatically re-review the updated PR.

@mergekeeper

mergekeeper Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Needs changes

The PR successfully implements admin transfer events, tests, and documentation updates per issue #319. However, it fails to update the interface version (contract interface version bump 1 -> 2 mentioned in the PR description was omitted) and includes an unrelated Go version update in go.mod and CONTRIBUTING.md.


Blocking

assay-contracts/contracts/safety-registry/src/lib.rs

Problem: The PR description and acceptance criteria require bumping the interface version (e.g., from 1 to 2) due to the event schema change, but the version constant was not updated in the code.

Suggested fix: Locate the interface version constant in assay-contracts/contracts/safety-registry/src/lib.rs and increment it to reflect the new event schema.

Prompt for an AI coding agent
In assay-contracts/contracts/safety-registry/src/lib.rs, find the interface version definition and increment it by 1 to record the event schema change for admin transfer events.

go.mod:3

Problem: The PR includes an unrelated change bumping the Go version requirement from 1.26.9 to 1.26.10, which is out of scope for issue #319.

Suggested fix: Revert changes to go.mod and CONTRIBUTING.md to keep the PR focused solely on the safety-registry admin events.

Prompt for an AI coding agent
Revert the changes in go.mod and CONTRIBUTING.md that bump the Go version from 1.26.9 to 1.26.10, ensuring only changes requested by issue #319 are included.

Reviewed commit: dab842a26deb17c87a515a2e1002bee27e652e5c.

@mergekeeper mergekeeper Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs changes

The PR successfully implements admin transfer events and unit tests, but it fails to update the contract interface documentation (docs/contract-interface.md) with the actual admin_transfer_proposed and admin_transferred event definitions as requested in the issue acceptance criteria.


Blocking

docs/contract-interface.md:391

Problem: The PR adds an 'Event budget impact' section but fails to document the new admin_transfer_proposed(old, new) and admin_transferred(old, new) events under docs/contract-interface.md#attestation-events as required by the issue description and acceptance criteria.

Suggested fix: Add the documentation for admin_transfer_proposed and admin_transferred events under the attestation events section in docs/contract-interface.md.

Prompt for an AI coding agent
In docs/contract-interface.md around line 391, add the documentation for the `admin_transfer_proposed(old, new)` and `admin_transferred(old, new)` events alongside the existing attestation events to satisfy the issue requirements.

Reviewed commit: 3f14f3dd66852d6788867be3d26ba7dac86236f0.

Restore admin transfer event declarations, format the Rust tests, and raise the Go floor to the version fixing GO-2026-6809.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

@mergekeeper mergekeeper Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs changes

The PR successfully implements admin transfer events, tests, and documentation updates per issue #319. However, it fails to update the interface version (contract interface version bump 1 -> 2 mentioned in the PR description was omitted) and includes an unrelated Go version update in go.mod and CONTRIBUTING.md.


Blocking

assay-contracts/contracts/safety-registry/src/lib.rs

Problem: The PR description and acceptance criteria require bumping the interface version (e.g., from 1 to 2) due to the event schema change, but the version constant was not updated in the code.

Suggested fix: Locate the interface version constant in assay-contracts/contracts/safety-registry/src/lib.rs and increment it to reflect the new event schema.

Prompt for an AI coding agent
In assay-contracts/contracts/safety-registry/src/lib.rs, find the interface version definition and increment it by 1 to record the event schema change for admin transfer events.

go.mod:3

Problem: The PR includes an unrelated change bumping the Go version requirement from 1.26.9 to 1.26.10, which is out of scope for issue #319.

Suggested fix: Revert changes to go.mod and CONTRIBUTING.md to keep the PR focused solely on the safety-registry admin events.

Prompt for an AI coding agent
Revert the changes in go.mod and CONTRIBUTING.md that bump the Go version from 1.26.9 to 1.26.10, ensuring only changes requested by issue #319 are included.

Reviewed commit: dab842a26deb17c87a515a2e1002bee27e652e5c.

@samjay8
samjay8 merged commit 9d3ee26 into use-assay:main Oct 23, 2026
13 of 14 checks passed
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.

Registry: emit events on transfer_admin and accept_admin

2 participants