Summary
Repeated metadata reads add latency, but stale metadata can mislabel events or authorize the wrong contract behavior.
Why this matters
This closes a correctness, security, or operability gap in the TalentTrust backend and makes the behavior explicit under retries, chain inconsistency, authorization, and failure.
Requirements
- Repository scope: Talenttrust/Talenttrust-Backend only.
- Use a bounded cache with network and contract keys; invalidate on deployment/config changes; expose age and refresh failures.
- Preserve tenant isolation, structured errors, auditability, and existing API compatibility unless this issue explicitly requires a contract change.
- Add focused unit and integration coverage for the new behavior.
Technical guidance
- Follow the repository's existing service, queue, persistence, logging, authentication, and error-envelope conventions.
- Keep side effects bounded and make retries, ordering, authorization, and failure handling explicit.
- Document non-obvious operational and security decisions in the PR.
Edge cases — each must have a test
Acceptance criteria
Out of scope
- unbounded permanent caching
Summary
Repeated metadata reads add latency, but stale metadata can mislabel events or authorize the wrong contract behavior.
Why this matters
This closes a correctness, security, or operability gap in the TalentTrust backend and makes the behavior explicit under retries, chain inconsistency, authorization, and failure.
Requirements
Technical guidance
Edge cases — each must have a test
Acceptance criteria
Out of scope