P07-01-WX: 仕上がった天候の機能の受入:自然天候・雨・嵐・世界樹と成人客のマナ霧・上部の表示と予報・保存と移行(マナ炉の産出 120 を除く。P07-01 の補助の作業。原単位への加算 0)
This commit is contained in:
@@ -3958,6 +3958,39 @@
|
||||
"path": "docs/plans/original-completion-2026-10-02/execution/p05-02/SPEC.md",
|
||||
"scope": "new P05-02 F6 restart reader marker; native execution pending"
|
||||
}
|
||||
},
|
||||
{
|
||||
"test": "tests/environment/test_p07_weather_runtime.gd",
|
||||
"template": "PASS: <checks> checks",
|
||||
"required": true,
|
||||
"fixed_check_count_used": false,
|
||||
"source_sha256_at_schema_audit": "11caac7e652213a708c270e136853b0fa053bcda502576da741f1f5d67cdd64b",
|
||||
"authority": {
|
||||
"path": "docs/plans/original-completion-2026-10-02/execution/p07-01/SPEC.md",
|
||||
"scope": "new P07-01 suite marker; native execution pending"
|
||||
}
|
||||
},
|
||||
{
|
||||
"test": "tests/environment/test_p07_weather_restart_1_write.gd",
|
||||
"template": "PASS: <checks> checks",
|
||||
"required": true,
|
||||
"fixed_check_count_used": false,
|
||||
"source_sha256_at_schema_audit": "ad8067f42348b803ce7736bee2f55f4b0789fefaeaaac702ff8a8800d926d8ea",
|
||||
"authority": {
|
||||
"path": "docs/plans/original-completion-2026-10-02/execution/p07-01/SPEC.md",
|
||||
"scope": "new P07-01 F7 restart writer marker; native execution pending"
|
||||
}
|
||||
},
|
||||
{
|
||||
"test": "tests/environment/test_p07_weather_restart_2_read.gd",
|
||||
"template": "PASS: <checks> checks",
|
||||
"required": true,
|
||||
"fixed_check_count_used": false,
|
||||
"source_sha256_at_schema_audit": "fb0a633c08cca1de66dc549f760f2a8e822c6c14c54f58e609de7f78c22fb469",
|
||||
"authority": {
|
||||
"path": "docs/plans/original-completion-2026-10-02/execution/p07-01/SPEC.md",
|
||||
"scope": "new P07-01 F7 restart reader marker; native execution pending"
|
||||
}
|
||||
}
|
||||
],
|
||||
"unknown_roster_suite_policy": "refuse, explicitly review its source/schema before accepting",
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"task": "P07-01",
|
||||
"spec": "docs/plans/original-completion-2026-10-02/execution/p07-01/SPEC.md",
|
||||
"rule": "SPEC F8: every changed expectation of an existing suite is listed with the value before and after and the reason. Only the natural-weather contract (A13, SPEC sections 4 and 5) causes these changes.",
|
||||
"changes": [
|
||||
{
|
||||
"suite": "tests/environment/test_runtime_weather.gd",
|
||||
"check": "old neutral save migration preserves other state",
|
||||
"before": "runtime.create_snapshot() == original (the whole snapshot after migrating a version 10 save equals the original new game)",
|
||||
"after": "the whole snapshot without systems.runtime.weather equals the original without it, and the migrated weather has last_draw_day -1 and no drawn day",
|
||||
"reason": "A13: a new game opening at 06:00 draws its first day (SPEC 4.1), and a pre-weather save has no draw and must not draw for the past (SPEC 5.2). Only the weather section can differ; every other system stays byte-equal."
|
||||
},
|
||||
{
|
||||
"suite": "tests/environment/test_runtime_weather.gd",
|
||||
"check": "future weather clock rejects atomically",
|
||||
"before": "the refused restore leaves runtime.create_snapshot() == original",
|
||||
"after": "the refused restore leaves runtime.create_snapshot() == the migrated snapshot taken just before",
|
||||
"reason": "The state before this refusal is the migrated state of the previous check, which now differs from the original only in the weather section; the check still proves the refusal is atomic."
|
||||
},
|
||||
{
|
||||
"suite": "tests/environment/test_weather_timeline.gd",
|
||||
"check": "malformed or contradictory state rejects atomically (unknown version case)",
|
||||
"before": "{\"version\": 2} is an unknown version",
|
||||
"after": "{\"version\": 3} is an unknown version",
|
||||
"reason": "Version 2 is now the current weather snapshot (natural state and rain holds, SPEC 5.1); version 1 is read as the legacy format (SPEC 5.2)."
|
||||
},
|
||||
{
|
||||
"suite": "tests/environment/test_weather_recovery.gd",
|
||||
"check": "disk-restored recovery occurs once at scheduled minute",
|
||||
"before": "after the recovery the pending weather list is empty",
|
||||
"after": "after the recovery the pending weather list equals only the opening day's natural draw (rain 16:30-22:30 for seed 424242)",
|
||||
"reason": "A13: the opening day's natural draw schedules its own start and return to clear (SPEC 4.1); the manually scheduled storm and recovery are still consumed exactly once."
|
||||
}
|
||||
],
|
||||
"unchanged_related_suites_passing_locally": [
|
||||
"tests/mvp/test_runtime_operations_integration.gd",
|
||||
"tests/s2/test_runtime_operations_cycle.gd",
|
||||
"tests/s2/test_runtime_mana_reserve.gd",
|
||||
"tests/s2/test_mana_reserve_cycle.gd",
|
||||
"tests/s3/test_guest_service.gd",
|
||||
"tests/s6/test_runtime_save_lifecycle.gd",
|
||||
"tests/s6/test_runtime_snapshot_serialization.gd",
|
||||
"tests/ui/test_main_dashboard.gd"
|
||||
],
|
||||
"local_run_scope": "diagnostic direct runs on a scratch stage; the formal evidence is the submitted S native collection, the registered validation and the final full roster"
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
# P07-01 実装の記録(実 Opus の実装担当、2026-10-24)
|
||||
|
||||
- 仕様: 同じフォルダの `SPEC.md`(固定の commit `4654789`、Runner の `spec_sha256` `2626d70b…7956`)。決定 A13(`PROVENANCE.json`)。
|
||||
- この記録は、仕様の §4・§5 を実装した場所と、実装担当として選んだ詳細、開示を書く。人の新しい承認は主張しない。
|
||||
|
||||
## 1. 実装した場所
|
||||
|
||||
- `scripts/environment/natural_weather_policy.gd`(新しい): A13 の値(確率の境 60・85・95、続く時間 360・240・120 分、開始の 29 個の 30 分刻み、雨の来客 50%、雨の延長の上限 240 分、霧のマナ ×1.2・性欲 ×1.5)と、1日1回の抽選の手順。天候の仕組みは確率を持たない方針のままにするため分けた。
|
||||
- `scripts/environment/weather_timeline.gd`(VERSION 2): 自然天候の状態(最後に抽選した日、その日の抽選)と雨の延長の記録を持つ。予定の規則(同じ分の別の種類・過去の時刻・上限)は変えない。その日の抽選の当てはめ(`apply_draw`)は、その日の 06:00 にだけ、1回だけ受け付ける。予定と重なれば `SCHEDULE_CONFLICT` で拒む。VERSION 1 の保存は、過去の抽選をさかのぼらない形で読む。
|
||||
- `autoload/simulation_runtime.gd`:
|
||||
- 系列 `weather` を足した。
|
||||
- 06:00 の抽選と出来事 `WEATHER_FORECAST_DRAWN`。新しいゲームが 06:00 に始まる時は、初期化の最後に開始の日を抽選する。
|
||||
- 来客の受付の境界は、雨の割合(`arrival_percent`)を渡す。
|
||||
- 帰りの判定は、雨の延長(`_hold_guest_for_rain`)を通す。
|
||||
- マナの境界は、霧の産出を渡す。
|
||||
- 客の生理の文脈に `mana_fog` を足した。
|
||||
- 予報を含む `get_weather_report`。
|
||||
- 復元では、延長の記録と客の予定を照合し、旧保存の系列を `world_seed` から作る。
|
||||
- `scripts/operations/operations_coordinator.gd`: 来客の計画を2段にした(行ごとの受け入れと持ち越しを決め、雨なら合計を floor(×50/100) まで後ろの行から減らし、減らした分は持ち越さない)。雨でない時の計画と客の ID は今と同じ。
|
||||
- `scripts/mana/mana_reserve_cycle.gd`: 境界の世界樹の産出を引数で受ける(既定 20、霧 24)。炉の受け入れの判定と `plan` も霧の量(24・120)を受ける。保存の照合は産出 20 と 24 だけを許す。上限 300(A06)は変えない。
|
||||
- `scripts/guest/guest_service.gd`: 文脈の真偽値 `mana_fog` を検査し、成人確認済みの客の正の性欲の増分 n を n + floor(n / 2)(= floor(1.5n))にする。
|
||||
- `scenes/main/main.gd`: 上部の天候の名前の表示はそのままにし、隣に予報(`WeatherForecastLabel`、「次: 晴れ 12:00」「次: 予定なし」)を足した。天候の名前の案内(tooltip)に効果の案内を出す。
|
||||
|
||||
## 2. 実装担当として選んだ詳細(SPEC §2 のとおり人の承認ではない)
|
||||
|
||||
- 抽選の乱数: 0〜99 の整数を1つ、晴れ以外は開始の枠(0〜28)を1つ引く。
|
||||
- 日の数え方: 絶対分 ÷ 1440 の切り捨て。06:00 ちょうどは、まだ抽選していない日として数える(新しいゲームの開始の日のため)。旧保存の移行では、06:00 を過ぎていればその日は抽選済みとして数える。
|
||||
- 当てはめに失敗した抽選(手で置いた予定と同じ分になる時など)は、系列を進めたまま `applied: false` と理由を出来事に残し、その日の予定は変えない。次の日の 06:00 には抽選する。
|
||||
- 雨の延長は、帰りの判定(客が「決める」状態の時)で行う。延長の後の時刻には天候に関わらず今の規則で帰る。帰った客の記録は、天候の境界で片づける。
|
||||
- 霧の性欲は、その分の正の増分だけに掛ける(減少と、成人確認の無い客は変えない)。
|
||||
|
||||
## 3. 開示
|
||||
|
||||
- マナ炉の施設と産出の経路は今のゲームに無い(P06 の未決定)。霧の炉の ×1.2(120)は、マナの貯蔵の規則(受け入れの判定と `plan`)にだけ入り、通常の営業で観測できるのは世界樹の産出(20→24)だけ。
|
||||
- 今の客の種類で性欲が増えるのは、成人確認済みの客(`adventurer` など)に Runtime が渡す昼 3・夜 7 だけなので、霧の効果は昼 4・夜 10 として表れる。
|
||||
- 予報はその日の予定だけを出す(翌日は 06:00 に決まる)。UI は今の部品のままで、完成の見た目ではない。Windows の実機は後。
|
||||
- 性能の調整はしていない。横断条件の性能の回帰は、最終の S の全 roster の既存の性能の suite の結果で見る。
|
||||
- 新しい出来事 `WEATHER_FORECAST_DRAWN` が毎日 1 件増える。出来事の番号は、その分だけ後ろへずれる。
|
||||
|
||||
## 4. 確かめ(局所。正式の証拠ではない)
|
||||
|
||||
- 既存の天候の 3 本(期待値の変更は `EXPECTATION_CHANGES.json`)、関係する既存の 8 本、新しい suite(88 checks)、再開の書き手(28 checks)と読み手(47 checks、別の process)が、scratch の stage で全て合格した。正式の証拠は、提出の S の native の収集、登録の validation、最終の S の全 roster。
|
||||
@@ -0,0 +1,53 @@
|
||||
# P07-01-WX 実装の記録(実 Opus の実装担当、2026-10-24)
|
||||
|
||||
- 仕様: 同じフォルダの `SPEC.md`(main `7ac2224` に固定。Runner の `spec_sha256` は `f1cd4262…fbd783`)。出典は `PROVENANCE.json`。
|
||||
- 原本への加算は 0。原 P07-01 の F1〜F8・炉 120・`AR.weather.fog_magic`・原 88 の分母は未達のまま。
|
||||
- 管理の記録は `artifacts/original-completion-2026-10-02/p07-01-wx-control-r01/` にある(git の外)。
|
||||
|
||||
## 1. 持ち越し(SPEC §3)
|
||||
|
||||
- 原 task の提出 S `dfacc83` の差分 24 ファイルを、`CARRY_OVER_DFACC83.patch`(SHA-256 `a880ea89…58f9`)で W に1回だけ当てた。
|
||||
- 当てた後、24 ファイル全部が manifest(`CARRY_OVER_DFACC83.json`)の bytes・SHA-256 と、S `dfacc83` の blob の両方に一致した(`CARRY_OVER_APPLY_R01.json`)。
|
||||
- 1回目は sandbox が W への書き込みを拒み、何も当たらなかった(W は clean のまま)。その記録を残してから当て直した。
|
||||
- 製品と試験は持ち越しのまま。変えたのは下の照合の道具だけ。
|
||||
|
||||
## 2. 照合の直し(`tools/run_p07_weather_tests.py` の `verify`)
|
||||
|
||||
- 原因:
|
||||
- S `dfacc83` の native の収集では、14 本の suite が全て PASS した。その後の照合が「exact controlled Guard/proof environment」で止まった。
|
||||
- 照合は `ordinary_cleanup_prepared` の suite の環境しか期待していなかった。`old_bounded_teardown` の suite(`tests/environment/test_p07_weather_runtime.gd` と `tests/ui/test_main_dashboard.gd`)には、共通の収集が `THE_TREE_AUDIO_TEARDOWN_PROOF_DIR` を渡しているのに、それを期待していなかった。
|
||||
- 直し(`VERIFY_OLD_BOUNDED_FIX_DRAFT_R01.md` のとおり):
|
||||
1. 段ごとの分類(ordinary・old_bounded)を、共通の収集(`tools/run_all_tests.py`)と同じ `phase_policy` から決める。
|
||||
2. 期待する環境:
|
||||
- ordinary の時は今のまま(`<段>-teardown/owned-audio` と `control.json`)。
|
||||
- old_bounded の時は `<段>-teardown`(共通の収集と同じ)。
|
||||
- どちらでもない時は無し。
|
||||
3. old_bounded の suite は、共通の `teardown_gate` で証明を照合し直し、収集の記録(`old_bounded_proof`)と一致することを求める。
|
||||
4. 照合を build の場所の写しにかけた時のために、`teardown_gate` が読む証明の path を読み替える。方法は ordinary の照合(`owners.read`)と同じ。照合の道具の中で作った module の写しだけを変え、共通の gate は変えていない。
|
||||
5. ordinary の証明・old_bounded の証明・`<段>-teardown` のファイルが、分類された suite にだけあることを求める(import と parse の段を含む)。
|
||||
- 消した検査は無い。任意の環境は許さない。
|
||||
|
||||
## 3. 訂正
|
||||
|
||||
- 持ち越した `../IMPLEMENTATION_NOTES.md` §3 の「(P06 の未決定)」は誤り。
|
||||
- 炉の産出を通常の営業で示すのに要るものは、次の3つ(SPEC §6):
|
||||
- P13 の炉の施設
|
||||
- D04 のユニットの消費
|
||||
- A06 の別承認
|
||||
- 持ち越しのファイルは bytes のまま残し、訂正はここに書く。
|
||||
|
||||
## 4. 確かめ(局所。正式の証拠ではない)
|
||||
|
||||
- 直した判定を、旧 S の native の生の出力(読むだけ)に当てた(`VERIFIER_FIX_LOCAL_CHECK_R01.json`)。照合の全体は、受領が旧い道具の bytes を固定しているので、旧い出力にはかけられない。
|
||||
- 16 段の環境と分類が記録と一致した。
|
||||
- bounded の 2 本の証明が、元の場所と別の場所の写しの両方で記録と一致した。
|
||||
- 直す前の期待は、元の失敗と同じ 000・011 の段で外れる。
|
||||
- 読み替えの無い写しと、1 byte 変えた写しは拒まれる。
|
||||
- 直した道具の `--prepare-only` は exit 0(engine 0)。
|
||||
- 製品は S `dfacc83` と同じ bytes なので、engine の局所の再実行はしていない。
|
||||
- 正式の証拠は、新しい S の native の収集、登録の validation、全 roster、独立レビュー。旧 S の結果は流用しない。
|
||||
|
||||
## 5. 開示
|
||||
|
||||
- 炉 120 と `AR.weather.fog_magic` は受け入れない(SPEC §6)。
|
||||
- 他の開示は、持ち越した `../IMPLEMENTATION_NOTES.md` §2・§3(P06 の句を除く)と `../EXPECTATION_CHANGES.json` のとおり。
|
||||
Reference in New Issue
Block a user