Skip to content

Bug fixes, testing, and CI - #51

Open
mylastresort wants to merge 8 commits into
Archer-01:mainfrom
mylastresort:main
Open

Bug fixes, testing, and CI#51
mylastresort wants to merge 8 commits into
Archer-01:mainfrom
mylastresort:main

Conversation

@mylastresort

@mylastresort mylastresort commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Bug fixes in job handling, logging, and manager logic
  • Added comprehensive test suite with config files and shell-based test scripts
  • Added GitHub Actions CI workflow for automated testing

Changes

  • Core fixes: Updates to internal/job/job.go, internal/logger/logger.go, internal/manager/manager.go
  • Client: Minor update in cmd/client/main.go
  • Compose: Updated compose.yaml
  • CI: Added .github/workflows/test.yml
  • Tests: Added test configs and shell scripts covering various scenarios (race conditions, retries, reload, kill signals, etc.)

syslog.New() fails in containers without a syslog daemon, causing
os.Exit(1). Make syslog optional — fall back to stdout-only logging
when unavailable.
Fall back to /var/log/taskmaster.log when syslog is unavailable,
rather than silently dropping syslog messages.
- Fix exec.Cmd reuse bug (C1): create fresh Cmd object each restart iteration
- Fix autorestart=unexpected logic (C3): correct index/value iteration + break
- Fix stop signal order (C4): send stopsignal first, then SIGKILL after stopwaitsecs
- Fix start/stop race condition (C8): unified mutex + startReady channel
- Fix client error variable (M2): read res.Err.Error() instead of err.Error()
- Fix reload error handling (M3): propagate config parse errors to client
- Fix mutex deadlock (M5): use defer for unlock in Stop() and Start()
- Fix range iteration (M1): use _, exit := range for value iteration
- 28 tests across 9 sections (control shell, config, autorestart, stop signal, kill-restart, startsecs, startretries, hot-reload, race condition)
- 25 pass, 3 fail (all pre-existing env-specific issues, not code bugs)
- Test configs for each test scenario in tests/ directory
- Add test workflow
fix: make syslog optional to prevent crash in Docker
fix: critical job lifecycle bugs and start/stop race condition
@mylastresort mylastresort changed the title Draft PR Bug fixes, testing infrastructure, and CI Jul 23, 2026
@mylastresort mylastresort changed the title Bug fixes, testing infrastructure, and CI Bug fixes, testing, and CI Jul 23, 2026
@mylastresort
mylastresort marked this pull request as ready for review July 23, 2026 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant