-
Notifications
You must be signed in to change notification settings - Fork 6
Make pause state durable and survive process restarts #29
Copy link
Copy link
Open
Labels
GRANTFOX OSSGrantFox open-source campaign taskGrantFox open-source campaign taskMAYBE REWARDEDMay be rewarded under the GrantFox campaignMay be rewarded under the GrantFox campaignOFFICIAL CAMPAIGNOfficial GrantFox campaign issueOfficial GrantFox campaign issuearea:adminadminadminpriority:lowLow priorityLow prioritystack:expressstack:expressstack:expressstack:nodejsNode.jsNode.jsstack:typescriptTypeScriptTypeScripttype:enhancementImprovement to existing functionalityImprovement to existing functionality
Metadata
Metadata
Assignees
Labels
GRANTFOX OSSGrantFox open-source campaign taskGrantFox open-source campaign taskMAYBE REWARDEDMay be rewarded under the GrantFox campaignMay be rewarded under the GrantFox campaignOFFICIAL CAMPAIGNOfficial GrantFox campaign issueOfficial GrantFox campaign issuearea:adminadminadminpriority:lowLow priorityLow prioritystack:expressstack:expressstack:expressstack:nodejsNode.jsNode.jsstack:typescriptTypeScriptTypeScripttype:enhancementImprovement to existing functionalityImprovement to existing functionality
Type
Fields
Give feedbackNo fields configured for Feature.
Implement durable, observable pause state
Description
The
pausedboolean insrc/index.tsdrives the pause middleware,/api/v1/admin/status, the deep-health status, and thestableroute_pausedmetric — but it is a plain in-process variable that resets tofalseon every restart. An operator who pauses the service before a deploy would find it silently un-paused afterward. This issue makes pause state durable and records pause/unpause as audit events.Requirements and context
StableRoute-Org/Stableroute-backendonly.paused(via the storage adapter if available, else a small state file) and restore it on startup.admin.paused/admin.unpausedevents viarecordEventso the audit log captures operator actions./api/v1/admin/unpauseso recovery is always possible./api/v1/admin/status, deep health, and the metric.Suggested execution
git checkout -b enhancement/admin-29-durable-pausesrc/index.ts— persist/restore pause; emit events.src/__tests__/index.test.ts— assert events recorded; simulate restore from persisted state.README.md.Test and commit
npm run build,npm run lint, andnpm test.npm testoutput in the PR.Example commit message
feat(admin): make pause state durable and auditedGuidelines
Community & contribution rewards