You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[audit] Dead code: delete unused alt-constructors/methods in pkg/scheduler + pkg/alerts #290
Scope correction during Phase 0 execution (PR #330): re-verified all 7 named funcs against the live tree. Only 2 had zero references anywhere:
alerts.NewClientWithEncryption — removed
scheduler.UpdateScheduleMetadata — removed
The other 5 are live test infrastructure, not dead:
scheduler.NewClientWithTableName — the constructor for ~8 scheduler tests
scheduler.RecordExecution — seeds the test for the liveGetExecutionHistory
alerts.NewClientWithTableNames — the constructor for the whole alerts_substrate_test.go
alerts.GetAlert / alerts.RecordAlertHistory — exercised by alerts_substrate_test.go
The original finding over-counted because deadcode (run over the main module) can't see build-tagged/substrate test usage. Removing them would strip real coverage of live code, so they stay. Closing the removed portion via #330; leaving this issue open only if we later decide the substrate tests themselves should go (separate call).
Verified complete against current main (post-#326/#330).
PR #330 already removed the only 2 symbols in the audit's list of 7 that had zero references anywhere:
alerts.NewClientWithEncryption
scheduler.UpdateScheduleMetadata
Re-checked the remaining 5 across the whole spawn module + all lambda/* submodules + cmd/: they are live test-harness constructors/helpers, not dead code — deleting them would break unit/substrate tests for no benefit:
scheduler.NewClientWithTableName — constructor for ~9 scheduler_test.go sites
scheduler.RecordExecution — seeds the test for the live GetExecutionHistory (called at cmd/schedule.go)
Activity
scttfrdmn commentedon Jul 11, 2026
Scope correction during Phase 0 execution (PR #330): re-verified all 7 named funcs against the live tree. Only 2 had zero references anywhere:
alerts.NewClientWithEncryption— removedscheduler.UpdateScheduleMetadata— removedThe other 5 are live test infrastructure, not dead:
scheduler.NewClientWithTableName— the constructor for ~8 scheduler testsscheduler.RecordExecution— seeds the test for the liveGetExecutionHistoryalerts.NewClientWithTableNames— the constructor for the wholealerts_substrate_test.goalerts.GetAlert/alerts.RecordAlertHistory— exercised byalerts_substrate_test.goThe original finding over-counted because
deadcode(run over the main module) can't see build-tagged/substrate test usage. Removing them would strip real coverage of live code, so they stay. Closing the removed portion via #330; leaving this issue open only if we later decide the substrate tests themselves should go (separate call).chore: remove dead code found by the 2026-07-11 audit (#286-292) (#330)
scttfrdmn commentedon Jul 15, 2026
Verified complete against current
main(post-#326/#330).PR #330 already removed the only 2 symbols in the audit's list of 7 that had zero references anywhere:
alerts.NewClientWithEncryptionscheduler.UpdateScheduleMetadataRe-checked the remaining 5 across the whole spawn module + all
lambda/*submodules +cmd/: they are live test-harness constructors/helpers, not dead code — deleting them would break unit/substrate tests for no benefit:scheduler.NewClientWithTableName— constructor for ~9 scheduler_test.go sitesscheduler.RecordExecution— seeds the test for the liveGetExecutionHistory(called at cmd/schedule.go)alerts.NewClientWithTableNames— the constructor for alerts_substrate_test.go (this is the standard [audit] Structural (design): cmd/ talks to DynamoDB directly (27 sites, ~5 files) — extract a store/repository layer #326 store-test pattern)alerts.RecordAlertHistory/alerts.GetAlert— referenced only by alerts_substrate_test.goNothing left to delete. Closing as done.