Define P18 original relationship preservation code contract

This commit is contained in:
Takeshi
2026-10-13 14:02:05 +09:00
parent 70e76cd073
commit d2a1f80a61
6 changed files with 129 additions and 6 deletions
@@ -1730,7 +1730,7 @@ P00〜P29のIDを維持して過去記録との対応を保つ。各項目には
### P18 関係パラメータ 盾 確定遷移
現在地: 原本の関係3値と盾の全面接続は未着手。
現在地: P18-01の原本・旧5軸保存の照合とバックエンド契約準備に着手。Opus 5.5は保存移行の複雑さからAstraを選択。3値・盾の実接続、通常表示一致、承認済み初期値、検証・独立レビューは未受入。
統合前提: P03, P17。原本対応: B-7.1, B-7.2, B-7.3。
@@ -0,0 +1,34 @@
[
{
"id": "P18-C-1",
"requirement_id": "P18-01-CODE",
"text": "Directional original Affection/Lust/Netorare and shield dedicated state; protagonist versus rival identities explicit; shield_max equals configured Affection. Unset is distinct from zero. No invented initial values, ceilings, thresholds, reduction or change coefficients; supplied numbers are validation fixtures only.",
"validation_ids": [
"p18-model"
]
},
{
"id": "P18-C-2",
"requirement_id": "P18-01-CODE",
"text": "Version-1 legacy five-axis relationships remain usable and all raw fields/values are preserved through a version-2 round trip. No affinity->Affection or dependence->Netorare original conversion. New original state is separate. Missing original records are unconfigured, not guessed zero values. Unknown versions, wrong types, duplicate identities, invalid references and corrupt original payloads reject atomically, preserving prior service/Runtime and input bytes.",
"validation_ids": [
"p18-model"
]
},
{
"id": "P18-C-3",
"requirement_id": "P18-01-CODE",
"text": "Real Runtime command/service registration, snapshot create/restore and rebind, player/staff identity validation, read-only original relationship projection through get_staff_management_report or an equally actual Runtime read-model. No unused model stub. Exact new/legacy/mixed round trips, restore failures, no mutation by reads, legacy unchanged behavior and events; no contacts, routes or duel behavior newly invented.",
"validation_ids": [
"p18-model"
]
},
{
"id": "P18-C-4",
"requirement_id": "P18-01-CODE",
"text": "Meaningful native isolated local and affected regression on exact source/settings/input with strict marker/source/artifact/PID/profile/cleanup provenance, separate Opus review, integration and affected final validation. This backend support task never claims the 88-delivery-unit P18-01 complete: normal UI rendering/display equality, approved initialization, required full final roster and applicable Windows final acceptance remain at the original unit until all actual evidence exists.",
"validation_ids": [
"p18-model"
]
}
]
@@ -0,0 +1,7 @@
{
"action": "wait",
"task_id": "P24-02",
"reason": "P24-02 is submitted (666c87b) and waiting for Runner validation and review. No worker is registered and the owner asked for wait this time. The P18-01 contract (explicit-value Original3 model, SNAPSHOT_VERSION 2 with the v1 legacy payload kept verbatim and no alias conversion, refuse-and-preserve for unknown or corrupt saves, unset shown as 未設定, conditions kept unmet) is only a proposal. Its allowed_paths need a read-only check by Runner first. Freezing and registering it are owner decisions.",
"codex_model": "gpt-6-astra",
"codex_model_reason": "P18-01 combines a save version migration, refuse-and-preserve handling for unknown or corrupt saves, legacy and original models side by side, and Runtime restore/rebind. A small mistake can lose data or bring back guessed conversions. With only 2 repair attempts, rework is likely to cost more than Astra, so the extra usage is justified. This choice does not authorize a run."
}
@@ -0,0 +1,12 @@
{
"p18-model": {
"argv": [
"{python}",
"-B",
"tools/run_p18_relationship_tests.py",
"--output",
"{build_dir}/p18-relationship-evidence"
],
"timeout_seconds": 1200
}
}
@@ -8494,7 +8494,7 @@
"D07",
"D08"
],
"state": "planned",
"state": "in_progress",
"supplement_ids": [],
"owner_roles": {
"implementation": "実装担当(担当者未割当)",
@@ -8503,7 +8503,7 @@
},
"legacy_state": "planned",
"state_scope": "package-level; completed means whole package accepted; partial implementation is not completion",
"current_summary": "P18-01 source and legacy-model/save meaning audit started. P18-02/03 planned. Original three-axis versus current generic five-axis difference, ordinary placement attack and irreversible branch acceptance remain incomplete.",
"current_summary": "P18-01 actual original/legacy save audit and backend implementation contract prepared. Opus5.5 recommends Astra for migration/atomic restore complexity. Backend code phase remains part of P18-01; no new delivery unit and no acceptance yet. UI and approved initialization remain unmet.",
"remaining_deliverables": [
{
"id": "P18-01",
@@ -8518,10 +8518,16 @@
"scope": "Original line143 correction and current relationship/duel call-site audit; not acceptance",
"linked_at_jst": "2026-10-13T13:46:18.655711+09:00",
"current_game_acceptance_inferred": false
},
{
"path": "docs/plans/original-completion-2026-10-02/execution/p18-01-contract-r01/opus-contract-decision-r01.json",
"sha256_at_integration": "e0b7094808385097fba664d9284d967a044d53fc8bd08e9d4a484f1f31d0032f",
"scope": "Actual Opus contract/model proposal only, action wait; no implementation acceptance",
"current_game_acceptance_inferred": false
}
],
"updated_at_jst": "2026-10-13T13:46:18.655711+09:00",
"progress_summary": "Started source/legacy-save meaning audit as P24 closure prerequisite. Original Affection/Lust/Netorare and Affection-bound shield maximum remain different from current direction-neutral trust/respect/affection/fear/dependence and independently configured shield_max. No inferred one-to-one migration. Original shield-break onset is confirmed, ordinary co-placement attack generation is unproven. No new implementation worker or acceptance claimed.",
"updated_at_jst": "2026-10-13T14:01:57.377446+09:00",
"progress_summary": "P18-01 actual original/legacy save audit and backend implementation contract prepared. Opus5.5 recommends Astra for migration/atomic restore complexity. Backend code phase remains part of P18-01; no new delivery unit and no acceptance yet. UI and approved initialization remain unmet.",
"remaining_gaps": [
"Implement original three-axis meaning and protagonist Affection-bound shield maximum across model/UI/save.",
"Preserve old generic five-axis facts without guessed migration; pin new/old/missing/unknown/corrupt save contract.",
@@ -8565,7 +8571,7 @@
],
"cross_cutting_acceptance_scope": "Completion requirements only, not achieved results. Apply each to relevant slices; non-applicable views require a recorded reason.",
"initial_revision_state": "planned",
"updated_at_jst": "2026-10-13T13:46:18.655711+09:00"
"updated_at_jst": "2026-10-13T14:01:57.377446+09:00"
},
{
"id": "P19",
+64
View File
@@ -0,0 +1,64 @@
{
"id": "P18-01-CODE",
"delivery_unit": "P18-01",
"title": "原本関係モデル・旧値保全・Runtime保存と読取経路",
"authority": "Human original-completion goal and authorized reordered multi-agent implementation; no new gameplay value approvals. Backend support of the same existing unit, not a new delivery unit or partial completion.",
"original_baseline_sha256": "75e4bdbdeb379c9269553f0c776bdb9cc96e01f2d6aa5ca650d132c63a8aeb1a",
"original_excerpt": "# 7. 恋愛・侵食システム詳細仕様書 【完全版】\n## 7.1 概要とコアコンセプト\n3つの感情パラメータと防御値「愛の盾」、直接対決「決闘」によってヒロインの運命(純愛・NTR・堕落)をシミュレートする。\n## 7.2 感情パラメータと「愛の盾」\n * **好感度 (Affection):** 主人公への愛。「愛の盾」の最大耐久値。\n * **淫乱度 (Lust):** 快楽への依存。盾の防御力(ダメージ軽減率)を下げる。\n * **NTR度 (Netorare):** ライバル依存。盾破壊後に上昇する。\n * **『愛の盾』:** NTR攻撃を無効化するバリア。耐久値0でブレイクし、NTR侵食が始まる。",
"plan_acceptance": "表示と状態が一致し、意味不明な値の一対一変換を行わない。",
"conditions": [
{
"id": "original_model",
"required": "Directional original Affection/Lust/Netorare and shield dedicated state; protagonist versus rival identities explicit; shield_max equals configured Affection. Unset is distinct from zero. No invented initial values, ceilings, thresholds, reduction or change coefficients; supplied numbers are validation fixtures only."
},
{
"id": "legacy_preservation",
"required": "Version-1 legacy five-axis relationships remain usable and all raw fields/values are preserved through a version-2 round trip. No affinity->Affection or dependence->Netorare original conversion. New original state is separate. Missing original records are unconfigured, not guessed zero values. Unknown versions, wrong types, duplicate identities, invalid references and corrupt original payloads reject atomically, preserving prior service/Runtime and input bytes."
},
{
"id": "runtime_save_read_model",
"required": "Real Runtime command/service registration, snapshot create/restore and rebind, player/staff identity validation, read-only original relationship projection through get_staff_management_report or an equally actual Runtime read-model. No unused model stub. Exact new/legacy/mixed round trips, restore failures, no mutation by reads, legacy unchanged behavior and events; no contacts, routes or duel behavior newly invented."
},
{
"id": "verified_backend",
"required": "Meaningful native isolated local and affected regression on exact source/settings/input with strict marker/source/artifact/PID/profile/cleanup provenance, separate Opus review, integration and affected final validation. This backend support task never claims the 88-delivery-unit P18-01 complete: normal UI rendering/display equality, approved initialization, required full final roster and applicable Windows final acceptance remain at the original unit until all actual evidence exists."
}
],
"scope": [
"scripts/relationship/original_relationship_state.gd",
"scripts/relationship/original_relationship_state.gd.uid",
"scripts/relationship/relationship_service.gd",
"autoload/simulation_runtime.gd",
"tests/s4/test_original_relationship_model.gd",
"tests/s4/test_original_relationship_model.gd.uid",
"tests/s4/test_original_relationship_runtime.gd",
"tests/s4/test_original_relationship_runtime.gd.uid",
"tools/run_p18_relationship_tests.py",
"tools/regression/suite-policy.json",
"docs/plans/original-completion-2026-10-02/execution/completion_marker_contracts.json",
"docs/plans/original-completion-2026-10-02/execution/p18-01-code/**"
],
"dependencies": {
"P03": "Reuse adopted atomic save candidate/restoration, preserve rejection and physical recovery safeguards; do not assert all P03 complete.",
"P17": "Actual hired staff identities and unique identity registry are used where required. All-seven recruitment and initial original values remain explicit unmet dependencies."
},
"implementation_rules": [
"Keep current RelationshipState five-axis API unchanged for legacy callers; add original dedicated explicit-config model and a clearly versioned containing service snapshot. Preserve legacy raw payload, including additional fields, without silently normalizing unknown fields away.",
"Do not fabricate approved initial parameters; expose unconfigured original values via actual Runtime read-model. A newly provided explicit complete model must validate all identity/value invariants before commit; distinguish explicit fixture input from production approval.",
"Separate v1/v2 parsing with no destructive input mutation or partial commit. Include old aliases as raw old facts only; they must never populate original values. Retain existing atomic Runtime snapshot and restore invariants.",
"No UI files are editable in this code task. Antigravity UI phase later uses the same read-model once fixed; original unit remains in_progress. No cap reset or duplicate P24 worker.",
"Implement tools/run_p18_relationship_tests.py as a strict narrow native collector reusing tools/run_all_tests.py/source_refs/execute_phase and existing owned_outer/Guard/diagnostic/marker contracts, fresh private CoW source and owned profiles, preserve default player logs/saves and process ownership. No raw Godot against player profile. Local+affected set: the two new P18 tests, s4 relationship_event_service/runtime_relationship_events, s6 runtime_snapshot_serialization/runtime_save_lifecycle, ui staff_management. Run import/all-script parse then native suites. --prepare-only previews bytes/capacity/roster without engines. Do not run duplicate full regression.",
"Worker may run static and prepare-only checks first; Root Runner owns authoritative native execution/review. Any environment denial is reported with exact evidence, not bypassed by weakening isolation. Worker must not commit/push/edit main or read credentials.",
"New tests need source-hashed strict markers, compatible with suite-policy and current roster discovery. No existing test body/assertion/limit weakening; only add exact new test records. Actual local failures are repaired before final native affected collection."
],
"remaining_unit_conditions": [
"Actual ordinary staff/heroine UI graph/value/shield rendering from identical Runtime state, Japanese labels and unset display; saved/restored state equality.",
"Production-approved initial values and any range/unit constraints not fixed by original; no synthetic fixture counted as approval or normal gameplay.",
"Exact final full required regression after related code/UI fixes batched, independent whole-unit review and current-main integration; same Windows release final applicable acceptance."
],
"reuse": [
"Existing relationship event and Runtime snapshot tests remain unchanged; their old raw evidence only where source/settings/input match.",
"P02-01 fixed representative saves, P02-02 producer/consumer save evidence remain retained, no unconditional whole-version reuse.",
"P24-02 candidate 666c87bd kept separate and unchanged."
]
}