Skip to content

fix: implement email channel, satellite ingestion, credit ID validation, monotonic timestamps#367

Merged
Oluwaseyi89 merged 6 commits into
CarbonScribe:mainfrom
BashMan11:fix/issues-313-314-316-318
May 30, 2026
Merged

fix: implement email channel, satellite ingestion, credit ID validation, monotonic timestamps#367
Oluwaseyi89 merged 6 commits into
CarbonScribe:mainfrom
BashMan11:fix/issues-313-314-316-318

Conversation

@BashMan11
Copy link
Copy Markdown
Contributor

Summary

Resolves four assigned issues in a single commit.

#318 — Email notification channel (Go)

  • Replaced //go:build future stub with production EmailChannel
  • SMTP / AWS SES support via environment variables (EMAIL_SMTP_HOST, EMAIL_SMTP_USER, etc.)
  • Address-format validation, required-field checks
  • Exponential-backoff retry (3 attempts)

#316 — Satellite data ingestion pipeline (Go)

  • ingestion/satellite.go: SatellitePipeline with source allowlist, data-type constraints, future-date guard
  • models.go: SatelliteReading, BoundingBox, IngestSatelliteRequest
  • repository.go: Repository interface
  • service.go: Service orchestrating pipeline + list
  • handler.go: POST /api/v1/monitoring/satellite and GET /api/v1/monitoring/:projectID
  • postgres_repository.go: PostgresRepository (Save + ListByProject)

#314 — Validate registry_credit_id in merkle_bridge (Rust)

  • New errors: CreditIdTooShort (13), CreditIdTooLong (14), CreditIdInvalidCharset (15)
  • validate_registry_credit_id(): 8–64 chars, [A-Za-z0-9_-] only
  • Called in mint_wrapped and mark_retired
  • Tests: too-short, too-long, bad-charset, valid ID, mark_retired with bad charset

#313 — Monotonic timestamp enforcement in registry_contract (Rust)

  • New error: TimestampNotMonotonic (9)
  • New storage keys: MonotonicEnforcement, LastTimestamp(String)
  • set_monotonic_enforcement(enabled) — admin-only toggle
  • is_monotonic_enforcement_enabled() — view function
  • Checks in anchor_document and anchor_document_batch
  • Tests: toggle, allow increasing timestamps, reject same/earlier, disabled allows any order

Testing

  • Go: go test ./internal/notifications/... ./internal/monitoring/... — all pass
  • Rust: brace-balanced, follows existing contract patterns (Cargo not available in this environment)

Closes #313
Closes #314
Closes #316
Closes #318

, CarbonScribe#318

CarbonScribe#318 - Implement email notification channel (Go)
- Replace //go:build future stub with production EmailChannel
- SMTP/AWS SES support via environment variables
- Input validation (address format, required fields)
- Exponential-backoff retry logic (3 attempts)

CarbonScribe#316 - Implement satellite data ingestion pipeline (Go)
- ingestion/satellite.go: SatellitePipeline with validation
  (source allowlist, data-type constraints, future-date guard)
- models.go: SatelliteReading, BoundingBox, IngestSatelliteRequest
- repository.go: Repository interface
- service.go: Service orchestrating pipeline + list
- handler.go: POST /satellite and GET /:projectID Gin endpoints
- postgres_repository.go: PostgresRepository (Save + ListByProject)

CarbonScribe#314 - Validate registry_credit_id in merkle_bridge (Rust)
- Add errors CreditIdTooShort(13), CreditIdTooLong(14),
  CreditIdInvalidCharset(15)
- validate_registry_credit_id(): 8-64 chars, [A-Za-z0-9_-] only
- Called in mint_wrapped and mark_retired
- Tests: too-short, too-long, bad-charset, valid ID, mark_retired

CarbonScribe#313 - Add monotonic timestamp enforcement in registry_contract (Rust)
- Add Error::TimestampNotMonotonic(9)
- StorageKey::MonotonicEnforcement and LastTimestamp(String)
- set_monotonic_enforcement(enabled) admin entry point
- is_monotonic_enforcement_enabled() view function
- Checks in anchor_document and anchor_document_batch
- Tests: toggle, allow increasing, reject same/earlier timestamps,
  disabled allows any order

Closes CarbonScribe#313, CarbonScribe#314, CarbonScribe#316, CarbonScribe#318
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 29, 2026

@BashMan11 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

@Oluwaseyi89
Copy link
Copy Markdown
Contributor

@BashMan11 you have done a good job! But there are pending test failures to fix. Try fixing them.

…ppy warnings

- Updated all test registry_credit_id values to meet the minimum 8-character requirement, fixing test failures due to CreditIdTooShort errors.
- Refactored needless range loops to use iterators as recommended by clippy.
- Ensured all tests pass and contract enforces correct ID validation.
…lient

- Ensure correct import and usage of stellar.MethodologyClient interface
- Fix type and method signature mismatches in methodology-validator and handler
- Guarantee compatibility with GetMethodologyMeta and IsValidMethodology implementations
- Clean up package naming and interface usage for validation logic
@Oluwaseyi89 Oluwaseyi89 merged commit 3e9fb93 into CarbonScribe:main May 30, 2026
2 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

2 participants