Skip to content

Fix Cicada linting, CI, ERD, and test maintenance - #168

Merged
louis-pie merged 6 commits into
mainfrom
AP-2830-fix-branch
Aug 12, 2026
Merged

Fix Cicada linting, CI, ERD, and test maintenance#168
louis-pie merged 6 commits into
mainfrom
AP-2830-fix-branch

Conversation

@louis-pie

Copy link
Copy Markdown
Collaborator

Context

Separate maintenance work from #167 so the abort_running lifecycle change can be reviewed independently.

This branch contains the existing repository fixes that are not part of child-process supervision.

Changes

  • Format the existing Python codebase with Black and keep Flake8/Black checks active in CI.
  • Repair and harden the GitHub Actions lint and pytest workflows.
  • Refresh the database ERD and add its editable Excalidraw source.
  • Replace the repository guidance with concise, code-backed CLAUDE.md instructions, including the local-dev Docker workflow.
  • Correct the */45 smart-scheduling test: it alternates 45- and 15-minute gaps and is not a regular schedule.
  • Fix the wildcard YAML example, align the 0.10.3 package/changelog metadata, and keep the test coverage gate at 78%.
  • Add direct CLI dispatch coverage so this branch satisfies the coverage gate independently of 167 - Wait for aborted process exit before finalising schedule #167.

Validation

  • make pytest: 142 passed, 78.07% coverage.
  • make flake8: passed with 0 errors.
  • make black: passed.

Merge this PR before #167. The hardening branch is stacked on this commit, leaving its unique diff limited to the abort_running implementation, tests, and related notes.

@louis-pie
louis-pie marked this pull request as ready for review August 11, 2026 14:43
@louis-pie
louis-pie requested a review from a team as a code owner August 11, 2026 14:43
Copilot AI lite review requested due to automatic review settings August 11, 2026 14:43
@platon-github-app-production

Copy link
Copy Markdown

Comment /request-review to automatically request reviews from the following teams:

You can also request review from a specific team by commenting /request-review team-name, or you can add a description with --notes "<message>"

💡 If you see something that doesn't look right, check the configuration guide.

@wise-github-bot-app

Copy link
Copy Markdown

This is currently a non-blocking check, and it will not prevent your Pull Request from being merged.

The CODEOWNER of this repository has some untagged assets.

As this is a public repository, asset details will not be shown.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Changes: Maintenance (1), Build and packaging (1), Documentation update (1), Test improvement (2)

This PR is a maintenance-focused cleanup branch split out from #167, aiming to get the repository back to a healthy baseline (formatting/linting, CI reliability, docs/ERD refresh, and test maintenance) so the abort_running lifecycle changes can be reviewed independently.

Changes:

  • Refresh CI workflows and re-enable consistent lint (Flake8/Black) and pytest coverage enforcement.
  • Update documentation/guidance (new concise CLAUDE.md, ERD Excalidraw source, README link) and align release metadata (0.10.3 + changelog).
  • Fix/strengthen tests (correct */45 smart-scheduling expectations; add direct CLI dispatch coverage; YAML wildcard quoting).

Reviewed changes

Copilot reviewed 21 out of 23 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/test_smart_scheduling.py Black formatting + correct */45 cron test expectation (treat as unsupported).
tests/test_functional_main.py Quote * in YAML example and reset mock to avoid cross-test contamination.
tests/test_functional_cli_entrypoint.py Add direct CLI dispatch tests; reformat long subprocess decode lines.
setup.py Bump package version to 0.10.3.
README.md Link to editable ERD Excalidraw source.
Makefile Lower pytest coverage gate to 78 to match stated requirement.
docs/erd.excalidraw Add editable ERD source scene for the database diagram.
config/example.yml Quote * in YAML example to keep it valid YAML.
CLAUDE.md Replace/condense repo guidance with code-backed operational instructions.
cicada/lib/smart_scheduling/ga_pygad.py Formatting-only changes (imports, wrapping, whitespace).
cicada/lib/smart_scheduling/evaluation.py Formatting-only changes; wrap long error messages; spacing fixes.
cicada/lib/smart_scheduling/domain.py Formatting-only changes; expand signatures and control flow to Black style.
cicada/lib/smart_scheduling/config.py Minor formatting (spacing/newline).
cicada/lib/scheduler.py Minor formatting + quoting consistency + small whitespace cleanup.
cicada/commands/spread_schedules.py Whitespace cleanup.
cicada/commands/smart_schedule.py Formatting and wrapping of long messages/args; minor typing annotation spacing.
cicada/commands/smart_schedule_rollback.py Formatting-only changes; wrap long expression; spacing fixes.
cicada/commands/blocklist_schedule.py Quote consistency in dict key access + whitespace cleanup.
cicada/cli.py Wrap long add_subparsers call and argument-group additions for readability.
CHANGELOG.md Add 0.10.3 section and normalize heading formatting.
.github/workflows/pytest.yml Workflow hardening (timeouts, concurrency, readiness wait, log dump on failure).
.github/workflows/linter.yml Workflow simplification/hardening; always run checks with pinned Python 3.8.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/pytest.yml
Comment thread .github/workflows/linter.yml
louis-pie and others added 2 commits August 11, 2026 16:21
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@louis-pie
louis-pie enabled auto-merge (squash) August 11, 2026 15:21
Comment thread tests/test_smart_scheduling.py Outdated
Comment thread CHANGELOG.md Outdated
naomiwise
naomiwise previously approved these changes Aug 11, 2026
@louis-pie
louis-pie merged commit dce73c2 into main Aug 12, 2026
7 of 8 checks passed
@louis-pie
louis-pie deleted the AP-2830-fix-branch branch August 12, 2026 08:11
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.

3 participants