core: scheduling contracts を互換性を保ってリファクタリング

Open
#1,507 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
42/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Active
Tech stack
java
Domain
backend

Research direction

Read the eight named contracts under modules/microproject_core/src/main/java/com/microproject/schedule/ and criticalpath/HasSentinels.java, then inspect their XML, serialization, and caller references. Run the listed ClassRelocationsTest and scheduling tests to establish the current contracts and calculations. Done means all eight public contracts and the DelayableImpl UID, fields, and old aliases remain compatible, tests and source inventory pass, and at most 10 files change.

Written by the indexing model from the issue text.

Description

area: core enhancement priority: low status: ready

概要

スケジュール契約の初期実装が、設定 XML、依存型、シリアライズ互換を含む複数箇所に分かれています。
8つの小さな interface / rule を現行の型規約に合わせ、呼び出し側が依存する契約を明確にします。
DelayableImpl は POD などから復元される可能性があるため、保存形式と旧名 alias を維持します。
この作業ではスケジュール計算結果を変更しません。Refs #1441

作業手順

  1. modules/microproject_core/src/main/java/com/microproject/schedule/CanBeLeveled.java と SchedulingFields.java の interface 契約を確認し、設定 XML から参照される名前と振る舞いを保って整理する。
  2. Delayable.java と TimeSheetSchedule.java の契約を整理する。DelayableImpl の serialVersionUID、delay、levelingDelay フィールド、および旧名 alias を変えない。
  3. FixedDuration.java、FixedUnits.java、SchedulingRule.java の型/APIを整理し、各 rule の計算結果を維持する。
  4. ScheduleEventListener.java と criticalpath/HasSentinels.java の listener / sentinel 契約を維持して整理する。
  5. 対象ファイルと設定・直列化参照を調べ、ClassRelocationsTest とスケジュール関連テストを実行する。対象ソースとテストの変更は10ファイル以下にする。

検証

.\gradlew.bat :microproject_core:test --tests "com.microproject.schedule.ScheduleServiceConstraintTest" --tests "com.microproject.schedule.criticalpath.TaskScheduleTest" --tests "com.microproject.persistence.ClassRelocationsTest" --console=plain
.\gradlew.bat :microproject_core:test --console=plain
python scripts/test_source_inventory.py --check --output build/audit/test-source-inventory.json
git diff --check

完了条件

  • 8対象の公開契約が設定参照と既存呼び出し側で維持される
  • DelayableImpl の UID、delay / levelingDelay フィールド、旧名 alias が維持され、ClassRelocationsTest が通る
  • 既存 scheduling テストが通り、計算結果に差がない
  • 変更ファイルが10以下で、git diff --check と test source inventory が通る

範囲外

  • ScheduleWindow の書き直し(別 issue)
  • スケジューリング動作・出力の変更
  • POD / MPO の直列化名・フィールドの変更
  • #1441 の他の分類対象
Dominant language
Java
Stars
2
Forks
1
Avg merge
4h 52m
Merged PRs (30d)
349

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from tetsuji16/microProject

All issues in tetsuji16/microProject

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.