Context
Follow-up cleanup from #280.
The refresh coordinator currently re-exports several timing constants and helpers from refresh-coordinator/index.ts, even though they are implementation details used only by the coordinator internals/tests.
This is not a correctness issue and does not need to block #280. We can handle it separately to keep the coordinator surface small and easier to reason about.
Proposed cleanup
- Stop re-exporting coordinator-internal timing values/helpers from
refresh-coordinator/index.ts unless they are genuinely needed outside the coordinator implementation.
- Keep
REFRESH_STORAGE_MOUNT internal if no external caller needs it.
- Rename the generic
REFRESH_RESULT_TTL_SECONDS constant to something explicit such as REFRESH_TERMINAL_RESULT_TTL_SECONDS, since completed results now use a separate 30-second TTL and the 5-second value applies specifically to terminal failures.
- Keep the runtime behavior unchanged.
Current intended TTL semantics remain:
completed refresh: 30s
terminal failure: 5s
transient failure: 1s
Redis lease: 30s
Goal
Reduce unnecessary API-shaped surface and make the remaining names describe their actual semantics. Prefer the smallest possible diff; do not introduce new abstractions or redesign the coordinator.
Acceptance criteria
- Coordinator internals are not unnecessarily re-exported from
index.ts.
- The 5-second terminal-result TTL has an explicit name.
- No refresh coordination behavior changes.
- Existing coordinator/auth tests continue to pass.
Related: #280
Context
Follow-up cleanup from #280.
The refresh coordinator currently re-exports several timing constants and helpers from
refresh-coordinator/index.ts, even though they are implementation details used only by the coordinator internals/tests.This is not a correctness issue and does not need to block #280. We can handle it separately to keep the coordinator surface small and easier to reason about.
Proposed cleanup
refresh-coordinator/index.tsunless they are genuinely needed outside the coordinator implementation.REFRESH_STORAGE_MOUNTinternal if no external caller needs it.REFRESH_RESULT_TTL_SECONDSconstant to something explicit such asREFRESH_TERMINAL_RESULT_TTL_SECONDS, since completed results now use a separate 30-second TTL and the 5-second value applies specifically to terminal failures.Current intended TTL semantics remain:
Goal
Reduce unnecessary API-shaped surface and make the remaining names describe their actual semantics. Prefer the smallest possible diff; do not introduce new abstractions or redesign the coordinator.
Acceptance criteria
index.ts.Related: #280