Follow-up from PR #166 (merged as 218c1035).
The sync-stage set is maintained independently in three places:
internal/syncjob/stage_error.go: parseKnownStage
internal/notify/catalog.go: knownSyncStages
internal/metrics/metrics.go: notificationMetricFailureTypes
Adding, renaming, or removing a stage now requires synchronized edits. If the lists drift:
WrapStageError can fail to preserve the stage identity.
- Notification classification can fall back to
sync.unknown.
- Notification metrics can normalize a valid stage failure to
sync.unknown.
PR #166 required parallel updates for the Bluesky and Mastodon bookmark stages, which exposed the maintenance risk.
Proposed resolution:
- Define one canonical stage metadata source, or add a generated/compile-time mechanism that derives the consumer registries.
- Keep the existing public failure type and error-code names stable.
- Add a regression test that fails when an enabled sync stage is missing from stage-error recognition, notification catalog lookup, or notification metric validation.
- Document any intentional distinction between internal stage IDs and emitted metric/source names.
Follow-up from PR #166 (merged as
218c1035).The sync-stage set is maintained independently in three places:
internal/syncjob/stage_error.go:parseKnownStageinternal/notify/catalog.go:knownSyncStagesinternal/metrics/metrics.go:notificationMetricFailureTypesAdding, renaming, or removing a stage now requires synchronized edits. If the lists drift:
WrapStageErrorcan fail to preserve the stage identity.sync.unknown.sync.unknown.PR #166 required parallel updates for the Bluesky and Mastodon bookmark stages, which exposed the maintenance risk.
Proposed resolution: