Skip to content

feat(api): add ETag caching, correlation ID tracing, standardized err… - #1065

Merged
Abd-Standard merged 1 commit into
Core-Foundry:mainfrom
Dami24-hub:feat/api-hardening-and-observability
Oct 17, 2026
Merged

Abd-Standard merged 1 commit into
Core-Foundry:mainfrom
Dami24-hub:feat/api-hardening-and-observability

Conversation

@Dami24-hub

Copy link
Copy Markdown
Contributor

Body:

## Summary of Changes

1. **ETag Conditional Responses (#985):**
   - Implemented `ETag` calculation and `If-None-Match` conditional handling returning `HTTP 304 Not Modified` for unchanged event and statistics payloads.

2. **Request Correlation ID Tracing (#986):**
   - Introduced middleware to validate client `X-Correlation-ID` headers or generate UUIDs, propagating correlation IDs into structured logs and outbound response headers.

3. **Standardized Machine-Readable Error Codes (#987):**
   - Established a unified JSON error payload structure using stable, documented error codes (`INVALID_PERMISSIONS`, `RESOURCE_NOT_FOUND`, etc.).

4. **Scoped API Credentials (#988):**
   - Implemented fine-grained permission scopes for integration API keys with server-side authorization enforcement and write-only key secret handling.

## Issue Resolution

Closes #985
Closes #986
Closes #987
Closes #988

…or codes, and scoped API credentials

- Core-Foundry#985: strong SHA-256 ETags + If-None-Match → 304 on event and statistics GET endpoints
- Core-Foundry#986: validated X-Correlation-Id propagated via AsyncLocalStorage into logs,
  error envelopes and EventProcessingQueue jobs
- Core-Foundry#987: central error-code catalog; error envelope always carries details and
  correlation_id
- Core-Foundry#988: scoped API credentials (scrypt-hashed, secret returned only on create),
  server-side scope checks returning 403 INVALID_PERMISSIONS

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@drips-wave

drips-wave Bot commented Oct 17, 2026

Copy link
Copy Markdown

@Dami24-hub 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

@Abd-Standard
Abd-Standard merged commit 10c78de into Core-Foundry:main Oct 17, 2026
2 of 7 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.

3 participants