Skip to content

fix: make bond early_unlock_admin nullable#2580

Merged
rafa-stacks merged 1 commit into
pox5from
pox5--bond-admin
Jun 11, 2026
Merged

fix: make bond early_unlock_admin nullable#2580
rafa-stacks merged 1 commit into
pox5from
pox5--bond-admin

Conversation

@rafa-stacks

Copy link
Copy Markdown
Collaborator

Description

The setup-bond pox-5 event no longer carries an early_unlock_admin field, but the bonds table still defined the early_unlock_admin column as NOT NULL, forcing ingestion to write an empty-string placeholder. This makes the column nullable so bond creation can simply skip it.

  1. Motivation for change: keep the schema in sync with the updated setup-bond event and stop persisting a meaningless placeholder value.
  2. What was changed:
    • bonds migration: early_unlock_admin is now nullable (dropped NOT NULL).
    • Ingestion (updateBond): no longer sets early_unlock_admin (removed the '' placeholder + its TODO); the column defaults to NULL.
    • DbBondInsertValues: dropped the early_unlock_admin field (no longer written).
    • DbBond: early_unlock_admin read type is now string | null.
  3. How does this impact application developers: no API-visible change — early_unlock_admin is not exposed in any response/serializer; it remains an internal column (now nullable).
  4. Link to relevant issues and documentation: follow-up to the pox-5 setup-bond event change (feat: capture bond registration BTC/sBTC lockup data #2579).

Type of Change

  • New feature
  • Bug fix
  • API reference/documentation update
  • Other

Does this introduce a breaking change?

No. Targets the unreleased pox5 line; the column is internal and not serialized in any API response.

Are documentation updates required?

  • Link to documentation updates:

Testing information

  1. Testing is covered by the existing simulated tests/api/pox5/bonds.test.ts suite — the SETUP_BOND_DATA fixture no longer includes early_unlock_admin, matching the new event shape.
  2. Not a reproduction-style bug.
  3. Affected code paths: pox-5 setup-bond ingestion (pg-write-storeupdateBond), bonds migration, and the bond DB types.
  4. No other affected projects.
  5. Watch out for: nothing reads early_unlock_admin on the read path; BOND_COLUMNS still selects it (now returns null). Verified with npm run test:api:pox5 (bonds suite: 17/17 passing).

🤖 Generated with Claude Code

@codecov

codecov Bot commented Jun 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@rafa-stacks rafa-stacks merged commit 18a5afb into pox5 Jun 11, 2026
20 checks passed
@rafa-stacks rafa-stacks deleted the pox5--bond-admin branch June 11, 2026 14:00
@github-project-automation github-project-automation Bot moved this to ✅ Done in API Board Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

1 participant