Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0084760ee0 | ||
|
|
f76ad96990 | ||
|
|
d2a1f80a61 | ||
|
|
70e76cd073 | ||
|
|
88b9fe030b | ||
|
|
0a8d6025cd | ||
|
|
82f4ff69e3 | ||
|
|
6ea80613f8 | ||
|
|
dee23f2710 | ||
|
|
71390fd7f6 | ||
|
|
a791117e98 | ||
|
|
020d6b014e | ||
|
|
a7a68be583 |
@@ -330,6 +330,7 @@ func initialize(clock: SimulationKernel, state: Variant, seed := DEFAULT_WORLD_S
|
||||
register_command_executor(&"begin_staff_task", Callable(self, "_execute_begin_staff_task"))
|
||||
register_command_executor(&"progress_staff_task", Callable(self, "_execute_progress_staff_task"))
|
||||
register_command_executor(&"create_relationship", Callable(self, "_execute_create_relationship"))
|
||||
register_command_executor(&"register_original_relationship", Callable(self, "_execute_register_original_relationship"))
|
||||
register_command_executor(&"change_relationship", Callable(self, "_execute_change_relationship"))
|
||||
register_command_executor(&"attack_relationship_shield", Callable(self, "_execute_attack_relationship_shield"))
|
||||
register_command_executor(&"request_route_lock", Callable(self, "_execute_request_route_lock"))
|
||||
@@ -1054,8 +1055,15 @@ func _restore_snapshot_internal(snapshot: Dictionary, recovery_mode: bool) -> bo
|
||||
):
|
||||
return false
|
||||
var restored_relationships := RelationshipService.new()
|
||||
restored_relationships.configure_original_identity_validator(
|
||||
func(payload: Dictionary) -> bool: return _original_relationship_identities_valid(payload, restored_staff)
|
||||
)
|
||||
if not restored_relationships.restore_snapshot(runtime_data[&"relationships"]):
|
||||
return false
|
||||
for relationship: RelationshipState in restored_relationships.get_relationships():
|
||||
for actor_id: StringName in [relationship.actor_a_id, relationship.actor_b_id]:
|
||||
if actor_id != &"player" and not restored_staff.has_staff(actor_id) and not restored_guests.has_guest(actor_id):
|
||||
return false
|
||||
var restored_events := EventService.new()
|
||||
for raw_definition: Variant in runtime_data[&"event_definitions"]:
|
||||
var definition := EventDefinition.from_variant(raw_definition)
|
||||
@@ -5378,6 +5386,9 @@ func _initialize_s4_relationship_events() -> void:
|
||||
func _configure_relationship_event_boundaries() -> void:
|
||||
if relationship_service == null or event_service == null:
|
||||
return
|
||||
relationship_service.configure_original_identity_validator(
|
||||
func(payload: Dictionary) -> bool: return _original_relationship_identities_valid(payload, staff_service)
|
||||
)
|
||||
relationship_service.configure_candidate_callback(
|
||||
Callable(self, "_on_relationship_threshold_candidate")
|
||||
)
|
||||
@@ -6759,6 +6770,30 @@ func _execute_progress_staff_task(command: SimulationCommand) -> CommandResult:
|
||||
result.command_id = command.command_id
|
||||
return result
|
||||
|
||||
func _original_relationship_identities_valid(payload: Dictionary, staff_registry: StaffService) -> bool:
|
||||
if payload.get("protagonist_id") != "player" or staff_registry == null:
|
||||
return false
|
||||
var subject := StringName(payload.get("subject_id", ""))
|
||||
var rival := StringName(payload.get("rival_id", ""))
|
||||
if subject == &"player" or rival == &"player" or subject == rival or not staff_registry.has_staff(subject):
|
||||
return false
|
||||
var heroine_definition := mvp_content_catalog.get_entry(&"unique_characters", subject)
|
||||
var rival_definition := mvp_content_catalog.get_entry(&"unique_characters", rival)
|
||||
var subject_staff := staff_registry.get_staff(subject)
|
||||
return subject_staff.employment_kind == StaffRuntime.EmploymentKind.UNIQUE \
|
||||
and heroine_definition.get(&"role_id") == String(subject_staff.role_id) \
|
||||
and heroine_definition.get(&"character_kind") == "heroine" \
|
||||
and rival_definition.get(&"character_kind") == "rival" \
|
||||
and heroine_definition.get(&"counterpart_id") == String(rival) \
|
||||
and rival_definition.get(&"counterpart_id") == String(subject)
|
||||
|
||||
|
||||
func _execute_register_original_relationship(command: SimulationCommand) -> CommandResult:
|
||||
var result := relationship_service.register_original_relationship(command.payload)
|
||||
result.command_id = command.command_id
|
||||
return result
|
||||
|
||||
|
||||
func _execute_create_relationship(command: SimulationCommand) -> CommandResult:
|
||||
var actor_a_id := StringName(command.payload.get(&"actor_a_id", command.payload.get("actor_a_id", "")))
|
||||
var actor_b_id := StringName(command.payload.get(&"actor_b_id", command.payload.get("actor_b_id", "")))
|
||||
@@ -10859,6 +10894,7 @@ func get_staff_management_report() -> Dictionary:
|
||||
&"can_edit": block_reason.is_empty(),
|
||||
&"assignment_block_reason": block_reason,
|
||||
&"unique_contract": _staff_unique_contract_report(staff),
|
||||
&"original_relationship": relationship_service.get_original_relationship(staff.staff_id),
|
||||
})
|
||||
var facilities: Array[Dictionary] = []
|
||||
for facility: FacilityInstance in facility_service.get_instances():
|
||||
|
||||
@@ -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。
|
||||
|
||||
|
||||
+16
-5
@@ -3,14 +3,25 @@
|
||||
"scope": "exact per-suite completion label/schema; all check counts from actual raw only",
|
||||
"rows": [
|
||||
{
|
||||
"test": "tests/ui/test_operations_notification.gd",
|
||||
"template": "Operations notification: <checks> checks, <failures> failures",
|
||||
"test": "tests/s4/test_original_relationship_model.gd",
|
||||
"template": "Original relationship model: <checks> checks, <failures> failures",
|
||||
"required": true,
|
||||
"fixed_check_count_used": false,
|
||||
"source_sha256_at_schema_audit": "9c26386c529b8c8135639e8d0f0ed390da7139d64ff1e268975b05948cab9147",
|
||||
"source_sha256_at_schema_audit": "ad509f5fb67ab91e1d1d99a08af51e4695e411b9a2541ea63ee22b1555cb0924",
|
||||
"authority": {
|
||||
"path": "docs/spec/acceptance/P24-02-code-r01.json",
|
||||
"scope": "new local suite source marker; actual execution pending"
|
||||
"path": "docs/spec/acceptance/P18-01-code-r01.json",
|
||||
"scope": "new backend suite marker; native execution pending"
|
||||
}
|
||||
},
|
||||
{
|
||||
"test": "tests/s4/test_original_relationship_runtime.gd",
|
||||
"template": "Original relationship runtime: <checks> checks, <failures> failures",
|
||||
"required": true,
|
||||
"fixed_check_count_used": false,
|
||||
"source_sha256_at_schema_audit": "374f3d31a65d2f2b62dfef29721c8c838575b856f4fa5a0bca31c6ba4c7e09dd",
|
||||
"authority": {
|
||||
"path": "docs/spec/acceptance/P18-01-code-r01.json",
|
||||
"scope": "new backend suite marker; native execution pending"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
# Owner-authorized model routing
|
||||
|
||||
Claude commander and independent reviewer: `claude-opus-5-5`.
|
||||
Codex default: `gpt-6.1-sol`. Alternative: `gpt-6-astra`, only when Claude Opus 5.5 selects it for the task and records a reason.
|
||||
|
||||
Use the persisted `owner_model_cli.py` coordinator entry point for commander and Codex dispatch/run, with `OWNER_RUNNER_CONTROL` pointing to the reviewed Runner checkout. It preserves ordinary Runner decisions, leases, contracts, sandbox, counters, acceptance and review gates. It is not a change to worker source or registered project digests.
|
||||
|
||||
The commander result adds `codex_model` and `codex_model_reason`. For a Codex run, the latest recorded commander proposal must be for the same task, have action `run`, and select an allowed model with a nonempty reason. Pass that exact recorded decision to ordinary dispatch. A model-selection-only `wait` decision never starts an implementation.
|
||||
|
||||
Example (replace PROJECT, TASK, CONTROL with actual registered values):
|
||||
|
||||
```sh
|
||||
OWNER_RUNNER_CONTROL=CONTROL python3 -B owner_model_cli.py --project PROJECT commander TASK --request 'Choose next action and Codex model under owner policy'
|
||||
OWNER_RUNNER_CONTROL=CONTROL python3 -B owner_model_cli.py --project PROJECT dispatch recorded-decision.json
|
||||
```
|
||||
|
||||
New-project defaults are also set in the Runner policy. Existing frozen project configurations are not rewritten; the explicit adapter applies owner-authorized model selection at invocation. Bare legacy CLI/MCP dispatch does not provide this routing; use this entry point for future Codex invocations. Antigravity model is unchanged.
|
||||
|
||||
Configuration and selected argv are distinct from actual inference evidence. Confirm the worker execution artifact after its next authorized run; no implementation is launched solely to test this setting.
|
||||
@@ -0,0 +1,69 @@
|
||||
"""Owner-requested model-only adapter; ordinary Runner CLI and gates unchanged."""
|
||||
import os
|
||||
import json
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
control = Path(os.environ['OWNER_RUNNER_CONTROL']).resolve()
|
||||
sys.path.insert(0, str(control))
|
||||
from runner.core import Runner
|
||||
|
||||
ALLOWED_CODEX_MODELS = ('gpt-6.1-sol', 'gpt-6-astra')
|
||||
original_llm = Runner.llm
|
||||
|
||||
def owner_model_llm(self, task_id, role, service, prompt, cwd, schema):
|
||||
if service == 'claude' and role == 'commander':
|
||||
schema = json.loads(json.dumps(schema))
|
||||
schema['required'] += ['codex_model', 'codex_model_reason']
|
||||
schema['properties']['codex_model'] = {'type': 'string', 'enum': list(ALLOWED_CODEX_MODELS)}
|
||||
schema['properties']['codex_model_reason'] = {'type': 'string', 'minLength': 1}
|
||||
prompt = ('Owner-authorized model policy: You, Claude Opus 5.5, select the Codex worker model for this task. '
|
||||
'Default gpt-6.1-sol. Select gpt-6-astra only when task difficulty warrants it; '
|
||||
'state concrete reasons and consider quality, time and usage. Return codex_model and codex_model_reason '
|
||||
'with the ordinary decision. Model choice does not authorize a run, repair, cap change or acceptance waiver.\n' + prompt)
|
||||
if service == 'codex':
|
||||
row = self.db.execute(
|
||||
"SELECT data FROM events WHERE task_id=? AND event='commander_proposal' ORDER BY id DESC LIMIT 1",
|
||||
(task_id,)).fetchone()
|
||||
if not row:
|
||||
raise ValueError('Codex model selection requires recorded Claude commander decision')
|
||||
decision = json.loads(row[0])['decision']
|
||||
chosen = decision.get('codex_model')
|
||||
if decision.get('task_id') != task_id or decision.get('action') != 'run' or chosen not in ALLOWED_CODEX_MODELS or not str(decision.get('codex_model_reason', '')).strip():
|
||||
raise ValueError('A recorded Claude run decision with explicit model and reason is required')
|
||||
self._owner_codex_model = chosen
|
||||
try:
|
||||
return original_llm(self, task_id, role, service, prompt, cwd, schema)
|
||||
finally:
|
||||
del self._owner_codex_model
|
||||
return original_llm(self, task_id, role, service, prompt, cwd, schema)
|
||||
|
||||
Runner.llm = owner_model_llm
|
||||
original = Runner.provider_argv
|
||||
|
||||
def owner_model_argv(self, service, role, runtime, schema):
|
||||
argv = original(self, service, role, runtime, schema)
|
||||
if service in ('claude', 'codex'):
|
||||
if '--model' in argv:
|
||||
position = argv.index('--model')
|
||||
del argv[position:position + 2]
|
||||
argv += ['--model', 'claude-opus-5-5' if service == 'claude' else getattr(self, '_owner_codex_model', 'gpt-6.1-sol')]
|
||||
return argv
|
||||
|
||||
Runner.provider_argv = owner_model_argv
|
||||
original_packet = Runner.packet
|
||||
|
||||
def packet_with_actual_evidence(self, task_id, role, sha=None):
|
||||
packet = original_packet(self, task_id, role, sha)
|
||||
extra = os.environ.get('OWNER_REVIEW_SUPPLEMENT')
|
||||
if role == 'reviewer' and extra:
|
||||
prefix, data = packet.split('\nDATA:\n', 1)
|
||||
body = json.loads(data)
|
||||
body['coordinator_actual_runtime_evidence'] = json.loads(Path(extra).read_text())
|
||||
assert len(json.dumps(body).encode()) < 500000, 'unchanged complete packet size guard'
|
||||
packet = prefix + '\nDATA:\n' + json.dumps(body, ensure_ascii=False)
|
||||
return packet
|
||||
|
||||
Runner.packet = packet_with_actual_evidence
|
||||
from runner.cli import main
|
||||
main()
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
{
|
||||
"plan_id": "P07-01",
|
||||
"canonical_head": "020d6b014e07012053dd7ac734b1e4cd882b08b3",
|
||||
"scope": "Independent existing-source applicability audit; no new implementation or formal unit completion",
|
||||
"original_authority": "docs/traceability/original/BASELINE.txt:74",
|
||||
"original_required": "雨:客足減/滞在延長; 嵐:新規客ゼロ; マナ霧:魔法効率UP/興奮度UP; plan also requires natural change and same-condition natural guest differences",
|
||||
"prior_source_commit": "4cefcff849d4dc1211caa5066e24bfae666cc2f4",
|
||||
"prior_source_files": 1304,
|
||||
"current_source_missing": [],
|
||||
"current_source_differences": [
|
||||
"assets/kenney/tiny_dungeon/Tiled/sampleMap.tmx",
|
||||
"assets/kenney/tiny_dungeon/Tiled/sampleSheet.tsx",
|
||||
"assets/kenney/tiny_dungeon/Visit Kenney.url",
|
||||
"assets/kenney/tiny_dungeon/Visit Patreon.url",
|
||||
"assets/kenney/tiny_town/Tiny Dungeon (base pack).url",
|
||||
"assets/kenney/tiny_town/Visit Kenney.url",
|
||||
"assets/kenney/tiny_town/Visit Patreon.url"
|
||||
],
|
||||
"whole_source_applicability": false,
|
||||
"actual_existing_weather_proofs": [
|
||||
{
|
||||
"path": "artifacts/original-completion-2026-10-02/p24-03-full173-native-r01/007-receipt.json",
|
||||
"sha256": "870780f304efdfd54546161eae9545be4e72d562fac34ca4b7aa3d8c62a14937",
|
||||
"test": "tests/environment/test_runtime_weather.gd",
|
||||
"passed": true,
|
||||
"actual_pid": 22729,
|
||||
"reported_checks": 16,
|
||||
"source_sha256": "047bb23573ef6a4c7e2483e3a2bfd244a3e2061fbf65c33fa08a52952a2655a0"
|
||||
},
|
||||
{
|
||||
"path": "artifacts/original-completion-2026-10-02/p24-03-full173-native-r01/008-receipt.json",
|
||||
"sha256": "6ad5bd805c0bfff1aa49efe92e3c3640ba55d1d3ae7692c47490bf18d73a69fa",
|
||||
"test": "tests/environment/test_weather_recovery.gd",
|
||||
"passed": true,
|
||||
"actual_pid": 22757,
|
||||
"reported_checks": 14,
|
||||
"source_sha256": "d71bf3fbf1fa1d43eae2c38161a44b18fc6cc34477a1ab9dd12fca54e4ee9089"
|
||||
},
|
||||
{
|
||||
"path": "artifacts/original-completion-2026-10-02/p24-03-full173-native-r01/009-receipt.json",
|
||||
"sha256": "33344e9df12d069450bb7294619b15751a57127b783ae5551ab5cc1344065840",
|
||||
"test": "tests/environment/test_weather_timeline.gd",
|
||||
"passed": true,
|
||||
"actual_pid": 22775,
|
||||
"reported_checks": 30,
|
||||
"source_sha256": "212dab5036f90ae2eaf1b75e0c0adaea4a572cdbfb31b07d0ef4336def4f4791"
|
||||
}
|
||||
],
|
||||
"completed_unit": false,
|
||||
"accepted_original_delivery_increment": 0,
|
||||
"known_unmet": [
|
||||
"Rain arrival reduction and stay extension not implemented in WeatherTimeline, approved multipliers/unit/update order missing",
|
||||
"Mana fog production efficiency and excitement bindings plus approved magnitudes missing",
|
||||
"Natural weather generation policy/duration/probability not approved or implemented; explicit schedule is not natural generation",
|
||||
"Ordinary operating guest distribution comparisons and separate-process resume acceptance remain required"
|
||||
],
|
||||
"next_action": "Preserve existing storm/save boundary proofs when hashes/config/inputs match. Do not invent rain/fog/probability values. This audit is independent of current UI/Runner source edits; no duplicated full regression."
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
# P18-01-CODE implementation handoff
|
||||
|
||||
Status: submitted for Runner validation; no acceptance or unit completion claimed.
|
||||
|
||||
Scope: dedicated original relationship state, lossless legacy snapshot preservation,
|
||||
Runtime registration and read projection, and the contract-listed tests and collector.
|
||||
Production initial values and gameplay coefficients are not supplied or inferred.
|
||||
|
||||
Validation: worker static inspection only; authoritative native local and affected
|
||||
validation, independent review, and integration belong to Runner.
|
||||
|
||||
Source inspection: HEAD matches d2a1f80a613e7c77b02b941026bc49c2d85db863.
|
||||
The acceptance specification without its final newline matches the contract SHA256
|
||||
04e9ae701b6ee1e399542564add695ca7fce54499e52dd2e907b1dbdc23a366d.
|
||||
|
||||
## Submitted behavior
|
||||
|
||||
- OriginalRelationshipState stores explicit directional subject/protagonist/rival
|
||||
facts with Affection, Lust, Netorare and shield current/max. All fields are
|
||||
required for a configured record. Numeric inputs must be finite numbers;
|
||||
shield current must be nonnegative and at most max, and max equals Affection.
|
||||
No additional emotion ranges, coefficients or production values are imposed.
|
||||
- RelationshipService retains its five-axis API. Its v2 snapshot contains the
|
||||
whole v1 payload under `legacy`, plus separate `original_relationships`.
|
||||
Top-level `relationships` is a compatibility projection for existing consumers;
|
||||
disagreement with `legacy.relationships` is rejected. Additional legacy fields,
|
||||
raw aliases, collection order and untouched values survive migration. The
|
||||
existing normalized state remains usable; only actual legacy changes are merged
|
||||
into retained raw facts. Aliases never initialize original fields.
|
||||
- Registration uses `register_original_relationship` with the complete payload.
|
||||
Runtime validates the protagonist against `player`, the subject against hired
|
||||
UNIQUE staff and its canonical role, and heroine/rival identities and reciprocal
|
||||
counterpart references against the existing unique-character catalog. Rival
|
||||
catalog membership does not invent recruitment. No new original update policy,
|
||||
contact, route, attack, threshold or duel behavior is defined.
|
||||
- Snapshot restore validates candidates before replacing live services, then
|
||||
rebinds the identity validator to live staff. Existing legacy actor references
|
||||
must resolve against player, restored staff or restored guests.
|
||||
- Every staff-management row exposes `original_relationship`. Missing records
|
||||
have `configured: false` and null values, distinct from explicit zero. Configured
|
||||
projections are copies, so reads and caller edits cannot change service state.
|
||||
|
||||
## Validation and handoff
|
||||
|
||||
Two new s4 suites exercise explicit/unset/zero data, malformed and nonfinite values,
|
||||
identity invariants, lossless raw aliases/extensions, new and mixed round trips,
|
||||
atomic service/Runtime rejection, actual hiring/commands, restore/rebind and reports.
|
||||
Existing test bodies and limits are unchanged. New marker and suite-policy rows
|
||||
are pinned to the exact new test sources.
|
||||
|
||||
`python3 -B tools/run_p18_relationship_tests.py --prepare-only` previews the exact
|
||||
seven-suite roster, source bytes, capacity and all-script parse count without
|
||||
engines, profiles, stage creation or test execution. The native collector reuses
|
||||
run_all_tests.source_refs/execute_phase and the existing Guard, owned_outer,
|
||||
diagnostic, artifact, PID, marker and cleanup gates. It stops at the first failure;
|
||||
Runner owns repair/validation sequencing and independent review.
|
||||
|
||||
Worker checks: Python AST syntax, JSON/source-marker consistency, allowed-path
|
||||
inspection, unchanged pre-existing marker/policy records, and git diff whitespace.
|
||||
Native import, GDScript parse and all seven suites remain **unexecuted** by worker.
|
||||
Worker reinspection on 2026-10-13 confirmed the existing submitted implementation
|
||||
and repeated Python AST, specification digest, exact new marker/policy source
|
||||
hashes, unchanged existing marker/policy records, and `git diff --check`.
|
||||
Prepare-only exited 0: seven suites, 1,311 source files / 67,287,056 bytes,
|
||||
308 parse paths, nine future native phases, 381,859,856 conservative required
|
||||
bytes and 1,773,187,072 available bytes. Engines and stages were both zero;
|
||||
actual checks were null and formal acceptance was false. Capacity is a preview
|
||||
at that instant, not a reservation or native result.
|
||||
An initial shell here-document temporary-file attempt was denied with
|
||||
`operation not permitted`; normal allowed-path patch edits worked. No isolation
|
||||
rule or permission was relaxed.
|
||||
|
||||
P18-C-1 through P18-C-3 are implementation submissions, not accepted results.
|
||||
P18-C-4 awaits Runner native local/affected evidence, separate Opus review,
|
||||
integration and final affected validation. The original P18-01 unit remains
|
||||
in_progress: ordinary Japanese UI rendering/equality, approved production values,
|
||||
all-seven recruitment, final full required roster and applicable Windows final
|
||||
acceptance remain outstanding. No git writes, other agents or Runner controls
|
||||
were used by worker.
|
||||
+80
@@ -0,0 +1,80 @@
|
||||
# P18-01-CODE recorded repair 2/2: collection / verification split
|
||||
|
||||
Resumes candidate `f76ad96990a4d7371b6ab667df0a068cc06be798`. No counter reset,
|
||||
game/test reconstruction, Runner change, commit or integration. Changes are confined
|
||||
to the narrow collector and this note. Existing game behavior evidence remains the
|
||||
retained Astra preflight; this worker did not rerun or reinterpret it as final proof.
|
||||
|
||||
## Modes
|
||||
|
||||
- Default: `python -B tools/run_p18_relationship_tests.py --output {build_dir}/p18-relationship-evidence`.
|
||||
Read-only verification in the ordinary registered sandbox. No subprocess call,
|
||||
process discovery, native launch, or access to the external player/private profiles.
|
||||
Current checkout source/settings/support/marker bytes and the locally configured
|
||||
`godot` binary are read for pins. Receipt-provided paths never select an external
|
||||
file to open. Original absolute paths remain historical identity strings.
|
||||
- `--collect`: Root orchestration only, outside Seatbelt. Uses the existing
|
||||
`source_refs`, private source copy, `execute_phase`, owned_outer, Guard, logger,
|
||||
diagnostic, marker and bounded cleanup contracts unchanged. Fresh output outside
|
||||
the checkout, with an existing parent, is required. Runs import, all 308 scripts,
|
||||
and exactly the seven fixed tests once. Owned profile bytes are archived after
|
||||
each phase. The final verifier runs after collection; no duplicate regression.
|
||||
“Root” identifies the authorized orchestrator, not a requirement to run as Unix uid 0.
|
||||
- `--prepare-only`: reports source bytes, available capacity, 308 parse paths and
|
||||
the exact seven-test/nine-phase roster; creates no stage/profile and starts no engine.
|
||||
|
||||
Only `--output`, `--collect`, `--prepare-only` and help are accepted. Duplicate,
|
||||
abbreviated, unknown and malformed flags, combined modes, traversal, symlinks,
|
||||
nonregular evidence and hardlinked evidence reject. Verification never rewrites
|
||||
raw paths or files. The ordinary-owner pure proof reader maps only the original
|
||||
output prefix to the supplied output and checks confinement before opening files.
|
||||
|
||||
## Receipt schema
|
||||
|
||||
`receipt.json` (`guarded-p18-v2`) is written last after successful collection.
|
||||
It contains the full relative source content map (bytes/SHA-256, no checkout-path
|
||||
dependency), its canonical JSON SHA-256, project and marker-contract SHA-256,
|
||||
engine SHA-256, and a complete relative file inventory with byte sizes/SHA-256.
|
||||
The inventory covers the retained private source, engine bytes, bootstraps,
|
||||
starters, raw stdout/stderr/native logger, phase receipts, START/END/process and
|
||||
both cleanup records, Guard reports, ordinary/audio ownership proofs, typed
|
||||
snapshots, and complete archived startup/runtime profiles. Only the enclosing
|
||||
receipt itself is outside its own inventory.
|
||||
|
||||
Verification checks the inventory and recomputes raw marker/diagnostic gates,
|
||||
source and helper pins, exact commands, START/END identity, all nine distinct PIDs
|
||||
and bounded cleanup, Guard conditions, proof gates, complete player before/after
|
||||
inventory equality, and seven test rows against nine phase receipts. It requires
|
||||
one exact `FULL_DEPENDENCY_PARSE checks=308 failures=0` marker. Old v1, absent,
|
||||
incomplete, mismatched or altered evidence rejects. A source change, including
|
||||
this collector, requires fresh Root collection; no source exemptions exist.
|
||||
|
||||
## Worker checks and environment observations
|
||||
|
||||
AST/in-memory compile and prepare-only passed. Prepare-only found 1311 source
|
||||
files, 308 parse scripts, seven tests and nine future phases, with sufficient
|
||||
reported capacity. Synthetic negative checks rejected missing receipts, changed
|
||||
hashes, symlinks, relative and absolute escapes, incomplete files and invalid or
|
||||
duplicate flags/mode combinations. Those checks replaced subprocess entry points
|
||||
and default-player access with fail-fast functions; neither was called. No native
|
||||
test, full regression, `--collect`, Runner operation or review was executed.
|
||||
|
||||
Environment evidence: a shell here-document failed with
|
||||
`zsh:1: can't create temp file for here document: operation not permitted`.
|
||||
The `python` alias was unavailable (`zsh:1: command not found: python`);
|
||||
worker checks used `/usr/bin/python3 -B`. Ordinary authorized file edits and
|
||||
temporary negative fixtures under the task allocation succeeded. No isolation
|
||||
or permission policy was changed. Root/Runner must provide the configured
|
||||
`python` command used by the fixed validator argv.
|
||||
|
||||
## Root next steps
|
||||
|
||||
1. On the final unchanged source, run the native `--collect` exactly once outside
|
||||
Seatbelt into the allocation build directory's fresh `p18-relationship-evidence`.
|
||||
Do not reuse old v1 evidence or run collection from ordinary Runner validation.
|
||||
2. Run ordinary Runner validation using the fixed default verify-only argv.
|
||||
3. Obtain a separate Opus review, then perform the authorized integration and
|
||||
affected final validation. This worker submits implementation, not acceptance.
|
||||
|
||||
P18-01 remains incomplete: ordinary UI rendering/display equality, approved initial
|
||||
values, the full final roster and applicable Windows final acceptance remain unmet.
|
||||
@@ -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"
|
||||
]
|
||||
}
|
||||
]
|
||||
+7
@@ -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."
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"p18-model": {
|
||||
"argv": [
|
||||
"{python}",
|
||||
"-B",
|
||||
"tools/run_p18_relationship_tests.py",
|
||||
"--output",
|
||||
"{build_dir}/p18-relationship-evidence"
|
||||
],
|
||||
"timeout_seconds": 1200
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,17 @@
|
||||
# 次に閉じる1件: P24-02 操作と通知
|
||||
|
||||
P24-03正式完了後の既着手単位。Main/通常OS/通知ログの既存成果を活用でき、重複調査・ゲーム重複実装を避ける。配置/無効操作/モーダル/停止再開/頭上フキダシ/ログ/重要警告/クリック代替/日本語入力・倍率の全条件は凍結仕様に列記。未確認の仕様・資産・上流接続はゼロと捏造せず条件ごとに残す。
|
||||
Claude Opus5.5の記録済み判断で、同じ登録タスク/既存worktreeを正式Antigravity IDE GUI経路へ移行した。repair2/上限2、spec/base/allowed_paths/全8条件/分母は不変。CLI互換性問題は別記録のまま、CLI重複workerや未受入Runnerコードのproduction採用はない。GUIは制限モードで実行している。
|
||||
|
||||
実装者はAntigravity1名、Claudeコマンダーと別Claude独立レビュー。局所・影響試験を先行し、関連変更を固めた後に正確な最終版の必須全回帰とOS検証を実行。旧UIログの限定証拠とP24-03の版付き証拠はソース/設定/入力/環境が適用する場合だけ再利用。Windows実機の条件は別記し、Macで可能な実装・受入は継続。原30/88・部分点なし・全条件成立後のみ完了を維持。
|
||||
実証は [gui-repair-r03](gui-repair-r03/) に保存。型・Window API・DomainEventStream購読・関係モデル表示・停止試験・test SHAを修正し、Root専用profileの実importはPASS。全GD parseでtests/ui/test_operations_notification.gd:311/312の未定義ManualSaveSlotsDialogScriptを検出したため局所7スイート前に停止。source/player/cleanup違反0。
|
||||
|
||||
同一GUI作業でこの参照とcheckerの必須証拠内容を修正している。例の負例だけを拒否する実装や説明文だけの合格は採用しない。正確なcandidate SHA、必要source manifest、実artifact種類/内容/入力/設定/環境/OS/保存再開/全rosterを検証し、未承認800x600下限を採用しない。盾消失をNTR開始へ偽装せず、未実装のNTR/決闘上流は原条件のまま未達に残す。
|
||||
|
||||
安定した変更をまとめてから guarded import/parse→局所/影響7→通常OS/実イベント/別process保存再開→最終候補の必須全回帰→別Opus独立review→main統合/最終検証。Windows同一配布版実機は必須のまま分離。P02-01/P24-03既完了を再実装せず、全30/88・部分点なしを維持。
|
||||
|
||||
初期GUI API診断で生成した範囲外2ファイルは内容SHA一致で退避した。通常playerの保存データ差分0、ログrotation3差分あり、この診断は保全成功/正式受入に数えない。以後Godot実行はRootの専用profile経路のみ。
|
||||
|
||||
追補r04: 未定義preloadを直した現候補の実import/全GD parseはPASS。最初の局所56/1 failureはobserver人物数と状態遷移数の不一致。条件を下げず同一担当で修正中、残り6スイート未実行。各native source/player/cleanup違反0。大量player明細はrawとgzipを内容保持で退避し、[参照記録](gui-repair-r03/player-guard-after-api-diagnostic.ref.json)に圧縮検証とログ差分を残す。
|
||||
|
||||
追補r05: 状態遷移履歴を整合させた新候補はimport/全GD parse/局所・影響7スイート477checks PASS、source/player/cleanup違反0。通常Runner submitで666c87bd7d7c961ae6d7d2ad8d52d6456c31015bに固定。提出後1313全source map差0とcleanを確認し局所証拠の適用を固定。候補branch codex/p24-02-operations-candidate-r03へpush済み、製品mainには未統合。全8通常実証/上流NTR・決闘/最終full/別Opus review/統合・最終は未了で、P24-02正式完了には数えない。
|
||||
|
||||
実OS追補: 固定666c87bdの実IME未確定・取消・確定、表示名テストの所有暗号slot保存、別PID80764→83514の通常一覧/通常読込を[限定観測記録](native-os-input-r01/observations.json)へ固定。dialog活性化は診断F8であり通常入口不足は未受入。3行差分案とP24-02追加repair1の回答待ち。全世界状態再開/実NTR・決闘/最終full/review/Windowsは未了のまま。
|
||||
|
||||
@@ -1,80 +0,0 @@
|
||||
{
|
||||
"contract_id": "P24-02",
|
||||
"title": "操作と通知の実装および証跡収集プロトコル",
|
||||
"worker": "agy",
|
||||
"base_commit": "1a5abc65163097d4b36a060d68f58c92093eb4e9",
|
||||
"spec_sha256": "738268b406e381ccab415b426d4a547b02e7cb2a481cefce65579a1e346834c7",
|
||||
"formal_acceptance_note": "Candidate source alone does not constitute acceptance completion. Native Godot execution has not been run by this worker. Root owns formal test execution, full regression, OS evidence generation, and final submission.",
|
||||
"implemented_paths": [
|
||||
"scenes/main/main.gd",
|
||||
"scenes/main/world_preview.gd",
|
||||
"scripts/ui/event_log_dialog.gd",
|
||||
"scripts/ui/manual_save_slots_dialog.gd",
|
||||
"scripts/ui/operation_feedback.gd",
|
||||
"scripts/ui/operation_feedback.gd.uid",
|
||||
"scripts/ui/operations_camera_controls.gd",
|
||||
"scripts/ui/operations_camera_controls.gd.uid",
|
||||
"tests/ui/test_operations_notification.gd",
|
||||
"tests/ui/test_operations_notification.gd.uid",
|
||||
"tests/ui/fixtures/operations_os_observer.gd",
|
||||
"tests/ui/fixtures/operations_os_observer.gd.uid",
|
||||
"tools/check_p24_operations_evidence.py"
|
||||
],
|
||||
"conditions_status": {
|
||||
"placement_and_invalid_drop": {
|
||||
"code_implemented": true,
|
||||
"formally_accepted": false,
|
||||
"status": "code_implemented_unverified_pending_root_execution",
|
||||
"details": "Grid snap, connection line warning, single-commit valid placement, rejection reason Japanese feedback without model/ledger corruption, click-based assignment alternative implemented in candidate code. Native Godot execution unverified, pending Root formal execution."
|
||||
},
|
||||
"modal_and_pause_resume": {
|
||||
"code_implemented": true,
|
||||
"formally_accepted": false,
|
||||
"status": "code_implemented_unverified_pending_root_execution",
|
||||
"details": "Modal open/close, focus management, modal_input_blocked suppressing behind-dialog input and assignment drops. Clock pause freezing advancement via real delta early-return; single resume continuing simulation. Pending commands and save identity intact on cancel/close. Native Godot execution unverified, pending Root formal execution."
|
||||
},
|
||||
"unit_bubbles": {
|
||||
"code_implemented": true,
|
||||
"formally_accepted": false,
|
||||
"status": "code_implemented_unverified_pending_root_execution",
|
||||
"details": "Unit overhead bubbles for Zzz (sleep/incapacitated/break), anger (strike/fleeing/abandoning/interrupted), heart (authoritative RelationshipState / RouteLock / love-shield). No unapproved loyalty/morale thresholds. Stale symbol removal logic implemented. Native Godot execution unverified, pending Root formal execution."
|
||||
},
|
||||
"event_log": {
|
||||
"code_implemented": true,
|
||||
"formally_accepted": false,
|
||||
"status": "code_implemented_unverified_pending_root_execution",
|
||||
"details": "Bounded recent 256 events, readable Japanese presentation, formatted amounts/times/reasons, duplicate event ID elimination. Reusing existing 256-entry stream contract. Native Godot execution unverified, pending Root formal execution."
|
||||
},
|
||||
"important_warning_cutin": {
|
||||
"code_implemented": true,
|
||||
"formally_accepted": false,
|
||||
"status": "partially_implemented_upstream_dependencies_pending",
|
||||
"details": "ImportantWarningCutinDialog connected to real DEFENSE_RAID_CREATED and RELATIONSHIP_SHIELD_CHANGED (shield=0, love-shield vanishing) domain events with stop/resume behavior. Generic INCIDENT_CREATED is not falsely treated as NTR. Duel occurrence triggers and full invasion upstream flow remain unimplemented upstream dependencies, explicitly documented as missing and not claimed complete. Native Godot execution unverified, pending Root formal execution."
|
||||
},
|
||||
"click_alternatives": {
|
||||
"code_implemented": true,
|
||||
"formally_accepted": false,
|
||||
"status": "code_implemented_unverified_pending_root_execution",
|
||||
"details": "OperationsCameraControls providing click equivalents for zoom in/out, pan up/down/left/right, reset view, grid toggle, layer toggle, and click-based staff assignment. Does not alter gameplay model. Manual P23 held gestures remain deferred. Native Godot execution unverified, pending Root formal execution."
|
||||
},
|
||||
"japanese_input_and_scale": {
|
||||
"code_implemented": true,
|
||||
"formally_accepted": false,
|
||||
"status": "code_implemented_unverified_pending_windows_and_root_execution",
|
||||
"details": "ManualSaveSlotsDialog LineEdit for editable Japanese save label (display_name metadata only), control char validation, default name fallback, cryptographic owned path (manual_ui_<hex32>) preservation, cancel discard semantics. Native Godot OS input handling (not browser). Same-Windows-release platform acceptance remains pending formal execution."
|
||||
},
|
||||
"final_validation_review": {
|
||||
"code_implemented": true,
|
||||
"formally_accepted": false,
|
||||
"status": "pending_root_full_roster_and_opus_review",
|
||||
"details": "Local unit suite (tests/ui/test_operations_notification.gd) with FixtureCleanup and OperationsOSObserver implemented and hashed. check_p24_operations_evidence.py strict verify-only checker implemented. Formal full regression, native OS verification, and independent separate Claude Opus review are owned by Root Runner and pending execution."
|
||||
}
|
||||
},
|
||||
"runner_verification_tasks": {
|
||||
"native_godot_test_suite": "Run tests/ui/test_operations_notification.gd under native Godot runner with isolated profile.",
|
||||
"evidence_checker": "tools/check_p24_operations_evidence.py --verify-only",
|
||||
"root_full_roster": "Root owns formal execution of required test roster on exact final game/source/settings.",
|
||||
"windows_release_acceptance": "Candidate Windows platform execution preserved for formal closure; not transferred from prior evidence.",
|
||||
"independent_opus_review": "Independent separate Claude review with actual runtime evidence (not pending templates alone) before formal submit."
|
||||
}
|
||||
}
|
||||
+221
@@ -0,0 +1,221 @@
|
||||
{
|
||||
"task_id": "P24-02",
|
||||
"audited_at_jst": "2026-10-13T11:49:03.689408+09:00",
|
||||
"production_head": "020d6b014e07012053dd7ac734b1e4cd882b08b3",
|
||||
"worker_base": "1a5abc65163097d4b36a060d68f58c92093eb4e9",
|
||||
"worker_source_refs": {
|
||||
"scenes/main/main.gd": {
|
||||
"path": "/Users/korizatou114/Projects/TheTree-managed-worktrees/p24-02-operations/P24-02-implement/scenes/main/main.gd",
|
||||
"bytes": 140367,
|
||||
"sha256": "8efd37e438552d6649b81bc52385dcfe4c810c0088245f205c45cd1726249566"
|
||||
},
|
||||
"scenes/main/world_preview.gd": {
|
||||
"path": "/Users/korizatou114/Projects/TheTree-managed-worktrees/p24-02-operations/P24-02-implement/scenes/main/world_preview.gd",
|
||||
"bytes": 71817,
|
||||
"sha256": "0e7d9f1aacf073e823b3b08266263f945f5d432bb9b4d865d60a9ad5b56f2c81"
|
||||
},
|
||||
"scripts/ui/event_log_dialog.gd": {
|
||||
"path": "/Users/korizatou114/Projects/TheTree-managed-worktrees/p24-02-operations/P24-02-implement/scripts/ui/event_log_dialog.gd",
|
||||
"bytes": 14929,
|
||||
"sha256": "c2189378e70f37159dd82c50bf7bff98bf0d6f51b924d58fac37dcad1b2ba986"
|
||||
},
|
||||
"scripts/ui/manual_save_slots_dialog.gd": {
|
||||
"path": "/Users/korizatou114/Projects/TheTree-managed-worktrees/p24-02-operations/P24-02-implement/scripts/ui/manual_save_slots_dialog.gd",
|
||||
"bytes": 8617,
|
||||
"sha256": "95a76f6f022dd9dd0b4d5b476b7e9edd152e53b29fa043ab80a9807c8a461066"
|
||||
},
|
||||
"scripts/ui/operation_feedback.gd": {
|
||||
"path": "/Users/korizatou114/Projects/TheTree-managed-worktrees/p24-02-operations/P24-02-implement/scripts/ui/operation_feedback.gd",
|
||||
"bytes": 8258,
|
||||
"sha256": "d23690bf57a36574f989c872cd12291ee7e0a410dcfb3790fe37ec6df8449d14"
|
||||
},
|
||||
"scripts/ui/operation_feedback.gd.uid": {
|
||||
"path": "/Users/korizatou114/Projects/TheTree-managed-worktrees/p24-02-operations/P24-02-implement/scripts/ui/operation_feedback.gd.uid",
|
||||
"bytes": 22,
|
||||
"sha256": "02c2795776f759c39b26e7458b85f8e11c7c7cdead59344d0af517a6a3ddb3c0"
|
||||
},
|
||||
"scripts/ui/operations_camera_controls.gd": {
|
||||
"path": "/Users/korizatou114/Projects/TheTree-managed-worktrees/p24-02-operations/P24-02-implement/scripts/ui/operations_camera_controls.gd",
|
||||
"bytes": 4783,
|
||||
"sha256": "a9ce91060b37241e20717e39cc75c51418c413042dc9c1589060ec82c70af71d"
|
||||
},
|
||||
"scripts/ui/operations_camera_controls.gd.uid": {
|
||||
"path": "/Users/korizatou114/Projects/TheTree-managed-worktrees/p24-02-operations/P24-02-implement/scripts/ui/operations_camera_controls.gd.uid",
|
||||
"bytes": 22,
|
||||
"sha256": "4430325f4c2ecfd29ffc92c06077fdf37827f013003cea24b987f90accfd4da8"
|
||||
},
|
||||
"tests/ui/test_operations_notification.gd": {
|
||||
"path": "/Users/korizatou114/Projects/TheTree-managed-worktrees/p24-02-operations/P24-02-implement/tests/ui/test_operations_notification.gd",
|
||||
"bytes": 13713,
|
||||
"sha256": "432969ebf92289671d1388b9e3e211e0d8c9573e89a88a3b418afa8c20304306"
|
||||
},
|
||||
"tests/ui/test_operations_notification.gd.uid": {
|
||||
"path": "/Users/korizatou114/Projects/TheTree-managed-worktrees/p24-02-operations/P24-02-implement/tests/ui/test_operations_notification.gd.uid",
|
||||
"bytes": 20,
|
||||
"sha256": "e336ec15680a79194a0f44855c5372f09bbb46f9cde4c5988a35c1edd3dec999"
|
||||
},
|
||||
"tests/ui/fixtures/operations_os_observer.gd": {
|
||||
"path": "/Users/korizatou114/Projects/TheTree-managed-worktrees/p24-02-operations/P24-02-implement/tests/ui/fixtures/operations_os_observer.gd",
|
||||
"bytes": 2323,
|
||||
"sha256": "76facaabb58e8e318c34ad575516730ba0f2ae5aa550bf2504fb676755b8ab0d"
|
||||
},
|
||||
"tests/ui/fixtures/operations_os_observer.gd.uid": {
|
||||
"path": "/Users/korizatou114/Projects/TheTree-managed-worktrees/p24-02-operations/P24-02-implement/tests/ui/fixtures/operations_os_observer.gd.uid",
|
||||
"bytes": 21,
|
||||
"sha256": "62eac33a87578378712f2bd0b3872cb2adee55ba64541a2a8d12982d682d78c6"
|
||||
},
|
||||
"tools/check_p24_operations_evidence.py": {
|
||||
"path": "/Users/korizatou114/Projects/TheTree-managed-worktrees/p24-02-operations/P24-02-implement/tools/check_p24_operations_evidence.py",
|
||||
"bytes": 5311,
|
||||
"sha256": "063761c267b10023e8731671442b4d87f435c630a136883f2c6fe6e622184479"
|
||||
},
|
||||
"tools/run_all_tests.py": {
|
||||
"path": "/Users/korizatou114/Projects/TheTree-managed-worktrees/p24-02-operations/P24-02-implement/tools/run_all_tests.py",
|
||||
"bytes": 26387,
|
||||
"sha256": "1d56dc16ab34f5a8f77f3ed7e833fb6d9fe73aa37cf297a0597e41bfa9c9e4b4"
|
||||
},
|
||||
"tools/regression/suite-policy.json": {
|
||||
"path": "/Users/korizatou114/Projects/TheTree-managed-worktrees/p24-02-operations/P24-02-implement/tools/regression/suite-policy.json",
|
||||
"bytes": 16614,
|
||||
"sha256": "71525b9fd220c92f37dd943831a3f7ac0fd3948557cbb89eb4415b3cce19fd8a"
|
||||
},
|
||||
"docs/plans/original-completion-2026-10-02/execution/completion_marker_contracts.json": {
|
||||
"path": "/Users/korizatou114/Projects/TheTree-managed-worktrees/p24-02-operations/P24-02-implement/docs/plans/original-completion-2026-10-02/execution/completion_marker_contracts.json",
|
||||
"bytes": 186129,
|
||||
"sha256": "bd278a1185f0e9ff127740849ddc8f47775bf96b93480d3474bba4c25ffe8315"
|
||||
}
|
||||
},
|
||||
"formal_acceptance": false,
|
||||
"all8_conditions_accepted": false,
|
||||
"current_native_import": {
|
||||
"path": "/Users/korizatou114/Projects/とりにく工房ゲーム制作部/artifacts/original-completion-2026-10-02/p24-02-import-diagnostic-r01/local-ended.json",
|
||||
"bytes": 12016,
|
||||
"sha256": "2bf49ed460535713fdbf55de90660a227b2e71292712e2da3c9e0b411b38a9cf"
|
||||
},
|
||||
"native_source_input": {
|
||||
"path": "/Users/korizatou114/Projects/とりにく工房ゲーム制作部/artifacts/original-completion-2026-10-02/p24-02-import-diagnostic-r01/runner-input.json",
|
||||
"bytes": 322044,
|
||||
"sha256": "d03b817d577fc19fc1b6d70807165363635546a1a9496e273be87524487e8150"
|
||||
},
|
||||
"conditions": [
|
||||
{
|
||||
"id": "placement_and_invalid_drop",
|
||||
"required": "Original grid snap and connection warnings; valid placement commits once, invalid placement/assignment explains the actual rejection, leaves model/ledger/selection intact, supports equivalent click-based operation.",
|
||||
"accepted": false,
|
||||
"current_evidence": "Candidate implementation incomplete; native import failed; required ordinary OS and exact final-version evidence not complete."
|
||||
},
|
||||
{
|
||||
"id": "modal_and_pause_resume",
|
||||
"required": "Modal open/cancel/confirm, input focus, pausing and resuming preserve pending commands and save identity. Behind-dialog input cannot accidentally build or change assignment. Actual pause freezes simulation and ordinary resume continues exactly once.",
|
||||
"accepted": false,
|
||||
"current_evidence": "Candidate implementation incomplete; native import failed; required ordinary OS and exact final-version evidence not complete."
|
||||
},
|
||||
{
|
||||
"id": "unit_bubbles",
|
||||
"required": "Unit overhead Zzz, anger, heart correspond to actual existing state. Observe source/model/render bindings and switching/removal without stale symbols; do not invent gameplay thresholds or hidden approved values.",
|
||||
"accepted": false,
|
||||
"current_evidence": "Candidate implementation incomplete; native import failed; required ordinary OS and exact final-version evidence not complete."
|
||||
},
|
||||
{
|
||||
"id": "event_log",
|
||||
"required": "Actual production events reach bounded recent log in sequence, readable Japanese with correct amounts/time/reasons, no duplicate events across pause/load. Reuse accepted256-entry log only with matching source applicability.",
|
||||
"accepted": false,
|
||||
"current_evidence": "Candidate implementation incomplete; native import failed; required ordinary OS and exact final-version evidence not complete."
|
||||
},
|
||||
{
|
||||
"id": "important_warning_cutin",
|
||||
"required": "Original important-warning UI for invasion start, duel, defense start is connected to actual existing signals/states with clear text, dismiss/stop/resume behavior; fixture-only signal injection is local testing, not proof ordinary production trigger. Missing upstream/catalog/assets remain explicit dependencies, do not claim complete.",
|
||||
"accepted": false,
|
||||
"current_evidence": "Candidate implementation incomplete; native import failed; required ordinary OS and exact final-version evidence not complete."
|
||||
},
|
||||
{
|
||||
"id": "click_alternatives",
|
||||
"required": "Provide/verify click equivalents for necessary pointer/drag/modifier navigation and assignment operations. Reuse existing step/zoom/bounds mechanisms and scales; presentation controls must not change gameplay model. Manual P23 held gestures remain deferred, not waived or relabeled.",
|
||||
"accepted": false,
|
||||
"current_evidence": "Candidate implementation incomplete; native import failed; required ordinary OS and exact final-version evidence not complete."
|
||||
},
|
||||
{
|
||||
"id": "japanese_input_and_scale",
|
||||
"required": "Actual OS Japanese composition/confirmation/cancel, persisted display of valid Japanese text and clear invalid-input feedback, representative window/display scales with clipping/focus/modal inspection. Use existing save display_name metadata for an editable optional Japanese save label if a suitable text field is absent; retain existing default name, cryptographic owned path, old-save preservation and cancel semantics. Do not add new gameplay numbers or rename save paths to user text. Explicitly classify macOS current development verification and still-required same-Windows-release platform acceptance; do not transfer prior Windows evidence.",
|
||||
"accepted": false,
|
||||
"current_evidence": "Candidate implementation incomplete; native import failed; required ordinary OS and exact final-version evidence not complete."
|
||||
},
|
||||
{
|
||||
"id": "final_validation_review",
|
||||
"required": "Static/import, local/affected tests first; batch related fixes then run required full roster on exact final game/source/settings. Exact version/source hashes/config/inputs/artifacts and condition status. Independent separate Claude review with actual runtime evidence (not pending templates alone), current-main integration and final validation. All required conditions/evidence must hold to close P24-02; no partial credit, no counts as acceptance.",
|
||||
"accepted": false,
|
||||
"current_evidence": "Candidate implementation incomplete; native import failed; required ordinary OS and exact final-version evidence not complete."
|
||||
}
|
||||
],
|
||||
"acceptance_required_findings": [
|
||||
{
|
||||
"id": "compile_staff_draw_pos",
|
||||
"condition": "unit_bubbles",
|
||||
"path": "scenes/main/world_preview.gd",
|
||||
"line": 1187,
|
||||
"evidence": {
|
||||
"path": "/Users/korizatou114/Projects/とりにく工房ゲーム制作部/artifacts/original-completion-2026-10-02/p24-02-import-diagnostic-r01/local-ended.json",
|
||||
"bytes": 12016,
|
||||
"sha256": "2bf49ed460535713fdbf55de90660a227b2e71292712e2da3c9e0b411b38a9cf"
|
||||
},
|
||||
"required_fix": "Use an explicit Vector2 for the Dictionary-returned draw position; then import/parse the exact submission."
|
||||
},
|
||||
{
|
||||
"id": "compile_window_property",
|
||||
"condition": "important_warning_cutin",
|
||||
"path": "scripts/ui/operation_feedback.gd",
|
||||
"line": 125,
|
||||
"evidence": {
|
||||
"path": "/Users/korizatou114/Projects/とりにく工房ゲーム制作部/artifacts/original-completion-2026-10-02/p24-02-import-diagnostic-r01/local-ended.json",
|
||||
"bytes": 12016,
|
||||
"sha256": "2bf49ed460535713fdbf55de90660a227b2e71292712e2da3c9e0b411b38a9cf"
|
||||
},
|
||||
"required_fix": "Use an existing Window sizing API instead of Control.custom_minimum_size; preserve UI scale behavior."
|
||||
},
|
||||
{
|
||||
"id": "nonexistent_event_signal",
|
||||
"condition": "important_warning_cutin",
|
||||
"path": "scenes/main/main.gd",
|
||||
"line": 990,
|
||||
"required_fix": "Use actual DomainEventStream.subscribe/unsubscribe; rebind on replaced stream after load/new game, preserve event-ID dedup. Do not identify every INCIDENT_CREATED as NTR or omit duel."
|
||||
},
|
||||
{
|
||||
"id": "heart_model_test_disagreement",
|
||||
"condition": "unit_bubbles",
|
||||
"path": "tests/ui/test_operations_notification.gd",
|
||||
"line": 145,
|
||||
"required_fix": "Remove unapproved loyalty/morale threshold expectations. Connect the helper to real relationship state and render call; use valid Object.get single-argument API."
|
||||
},
|
||||
{
|
||||
"id": "zero_duration_pause_test",
|
||||
"condition": "modal_and_pause_resume",
|
||||
"path": "tests/ui/test_operations_notification.gd",
|
||||
"line": 120,
|
||||
"required_fix": "Test actual nonzero elapsed advancement while paused, then one ordinary resume; verify pending commands and no behind-modal build."
|
||||
},
|
||||
{
|
||||
"id": "checker_false_acceptance",
|
||||
"condition": "final_validation_review",
|
||||
"evidence": {
|
||||
"path": "/Users/korizatou114/Projects/とりにく工房ゲーム制作部/docs/plans/original-completion-2026-10-02/execution/p24-02/current-audit-r03/checker-negative-cases.json",
|
||||
"bytes": 5251,
|
||||
"sha256": "40c6ddf92b6a17d412ae70cab779ac853e9b7f63b25bea9015aef50e4078ed69"
|
||||
},
|
||||
"required_fix": "Reject absent artifacts/OS/source proofs, nonexistent paths, fake PID claims, truthy strings and unknown conditions. Validate candidate SHA, not frozen base as candidate; verify hashes/version/input/settings/environment applicability."
|
||||
},
|
||||
{
|
||||
"id": "unfrozen_suite_hash",
|
||||
"condition": "final_validation_review",
|
||||
"path": "tools/regression/suite-policy.json",
|
||||
"required_fix": "Replace pending with the exact finalized test digest after fixes; preserve the required whole roster and strict markers."
|
||||
}
|
||||
],
|
||||
"implementation_plan": [
|
||||
"Preserve same worker worktree; fix all listed acceptance-required faults as one batch.",
|
||||
"Exact finalized submission: import/parse, local and affected7 suites, no duplicate full regression.",
|
||||
"Healthy real AGY transfer proof plus unchanged source; original log with actual permission denial must reject.",
|
||||
"Actual ordinary macOS Japanese composition/confirmation/cancel/labels/window scales and real warning triggers; injected fixtures remain local proof only.",
|
||||
"Required exact final full roster; separate Claude Opus5.5 review; current-main integration and final checks. Windows-specific same-release checks remain separate and required."
|
||||
],
|
||||
"not_in_scope": "Unrelated UX improvements and gameplay numeric defaults. No worker or production game edits were made by this audit."
|
||||
}
|
||||
+140
@@ -0,0 +1,140 @@
|
||||
{
|
||||
"accepted": false,
|
||||
"source": "/Users/korizatou114/Projects/TheTree-managed-worktrees/p24-02-operations/P24-02-implement/tools/check_p24_operations_evidence.py",
|
||||
"source_sha256": "063761c267b10023e8731671442b4d87f435c630a136883f2c6fe6e622184479",
|
||||
"cases": [
|
||||
{
|
||||
"case": "booleans_without_any_proof",
|
||||
"input": {
|
||||
"task_id": "P24-02",
|
||||
"commit": "1a5abc65163097d4b36a060d68f58c92093eb4e9",
|
||||
"conditions": {
|
||||
"placement_and_invalid_drop": true,
|
||||
"modal_and_pause_resume": true,
|
||||
"unit_bubbles": true,
|
||||
"event_log": true,
|
||||
"important_warning_cutin": true,
|
||||
"click_alternatives": true,
|
||||
"japanese_input_and_scale": true,
|
||||
"final_validation_review": true
|
||||
}
|
||||
},
|
||||
"exit_code": 0,
|
||||
"expected_nonzero": true,
|
||||
"false_acceptance": true,
|
||||
"stdout": "Reading evidence index from: /var/folders/41/j8fq6vqj2993cmyprl6p76pw0000gn/T/p24-checker-negative-sd_ej3a8/index.json\nSUCCESS: All 8 required operations and notification conditions verified.\n",
|
||||
"stderr": "WARNING: OS process environment proof is minimal or missing\n"
|
||||
},
|
||||
{
|
||||
"case": "missing_source_file",
|
||||
"input": {
|
||||
"task_id": "P24-02",
|
||||
"commit": "1a5abc65163097d4b36a060d68f58c92093eb4e9",
|
||||
"conditions": {
|
||||
"placement_and_invalid_drop": true,
|
||||
"modal_and_pause_resume": true,
|
||||
"unit_bubbles": true,
|
||||
"event_log": true,
|
||||
"important_warning_cutin": true,
|
||||
"click_alternatives": true,
|
||||
"japanese_input_and_scale": true,
|
||||
"final_validation_review": true
|
||||
},
|
||||
"source_hashes": {
|
||||
"no-such-required-file.gd": "0000000000000000000000000000000000000000000000000000000000000000"
|
||||
}
|
||||
},
|
||||
"exit_code": 0,
|
||||
"expected_nonzero": true,
|
||||
"false_acceptance": true,
|
||||
"stdout": "Reading evidence index from: /var/folders/41/j8fq6vqj2993cmyprl6p76pw0000gn/T/p24-checker-negative-sd_ej3a8/index.json\nSUCCESS: All 8 required operations and notification conditions verified.\n",
|
||||
"stderr": "WARNING: OS process environment proof is minimal or missing\n"
|
||||
},
|
||||
{
|
||||
"case": "fake_os_pid",
|
||||
"input": {
|
||||
"task_id": "P24-02",
|
||||
"commit": "1a5abc65163097d4b36a060d68f58c92093eb4e9",
|
||||
"conditions": {
|
||||
"placement_and_invalid_drop": true,
|
||||
"modal_and_pause_resume": true,
|
||||
"unit_bubbles": true,
|
||||
"event_log": true,
|
||||
"important_warning_cutin": true,
|
||||
"click_alternatives": true,
|
||||
"japanese_input_and_scale": true,
|
||||
"final_validation_review": true
|
||||
},
|
||||
"os_environment": {
|
||||
"pid": 999999999
|
||||
}
|
||||
},
|
||||
"exit_code": 0,
|
||||
"expected_nonzero": true,
|
||||
"false_acceptance": true,
|
||||
"stdout": "Reading evidence index from: /var/folders/41/j8fq6vqj2993cmyprl6p76pw0000gn/T/p24-checker-negative-sd_ej3a8/index.json\nSUCCESS: All 8 required operations and notification conditions verified.\n",
|
||||
"stderr": ""
|
||||
},
|
||||
{
|
||||
"case": "truthy_string_status",
|
||||
"input": {
|
||||
"task_id": "P24-02",
|
||||
"commit": "1a5abc65163097d4b36a060d68f58c92093eb4e9",
|
||||
"conditions": {
|
||||
"placement_and_invalid_drop": {
|
||||
"passed": "false"
|
||||
},
|
||||
"modal_and_pause_resume": {
|
||||
"passed": "false"
|
||||
},
|
||||
"unit_bubbles": {
|
||||
"passed": "false"
|
||||
},
|
||||
"event_log": {
|
||||
"passed": "false"
|
||||
},
|
||||
"important_warning_cutin": {
|
||||
"passed": "false"
|
||||
},
|
||||
"click_alternatives": {
|
||||
"passed": "false"
|
||||
},
|
||||
"japanese_input_and_scale": {
|
||||
"passed": "false"
|
||||
},
|
||||
"final_validation_review": {
|
||||
"passed": "false"
|
||||
}
|
||||
}
|
||||
},
|
||||
"exit_code": 0,
|
||||
"expected_nonzero": true,
|
||||
"false_acceptance": true,
|
||||
"stdout": "Reading evidence index from: /var/folders/41/j8fq6vqj2993cmyprl6p76pw0000gn/T/p24-checker-negative-sd_ej3a8/index.json\nSUCCESS: All 8 required operations and notification conditions verified.\n",
|
||||
"stderr": "WARNING: OS process environment proof is minimal or missing\n"
|
||||
},
|
||||
{
|
||||
"case": "unknown_condition_ignored",
|
||||
"input": {
|
||||
"task_id": "P24-02",
|
||||
"commit": "1a5abc65163097d4b36a060d68f58c92093eb4e9",
|
||||
"conditions": {
|
||||
"placement_and_invalid_drop": true,
|
||||
"modal_and_pause_resume": true,
|
||||
"unit_bubbles": true,
|
||||
"event_log": true,
|
||||
"important_warning_cutin": true,
|
||||
"click_alternatives": true,
|
||||
"japanese_input_and_scale": true,
|
||||
"final_validation_review": true,
|
||||
"invented": true
|
||||
}
|
||||
},
|
||||
"exit_code": 0,
|
||||
"expected_nonzero": true,
|
||||
"false_acceptance": true,
|
||||
"stdout": "Reading evidence index from: /var/folders/41/j8fq6vqj2993cmyprl6p76pw0000gn/T/p24-checker-negative-sd_ej3a8/index.json\nSUCCESS: All 8 required operations and notification conditions verified.\n",
|
||||
"stderr": "WARNING: OS process environment proof is minimal or missing\n"
|
||||
}
|
||||
]
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"source": "/Users/korizatou114/Projects/とりにく工房ゲーム制作部/artifacts/original-completion-2026-10-02/p24-02-import-diagnostic-r01/runner-input.json",
|
||||
"source_sha256": "d03b817d577fc19fc1b6d70807165363635546a1a9496e273be87524487e8150",
|
||||
"candidate_worktree": "/Users/korizatou114/Projects/TheTree-managed-worktrees/p24-02-operations/P24-02-implement",
|
||||
"source_files_compared": 1313,
|
||||
"mismatches": [],
|
||||
"native_import_failure_applies": true,
|
||||
"formal_acceptance": false
|
||||
}
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
{
|
||||
"formal_acceptance": false,
|
||||
"source_sha256": "f456b0e24bf2aa4540320ecfee3255cf5e879551e003adda12190ca6026d8638",
|
||||
"input": {
|
||||
"task_id": "P24-02",
|
||||
"commit": "1a5abc65163097d4b36a060d68f58c92093eb4e9",
|
||||
"conditions": {
|
||||
"placement_and_invalid_drop": {
|
||||
"passed": true,
|
||||
"details": "claim without any actual evidence"
|
||||
},
|
||||
"modal_and_pause_resume": {
|
||||
"passed": true,
|
||||
"details": "claim without any actual evidence"
|
||||
},
|
||||
"unit_bubbles": {
|
||||
"passed": true,
|
||||
"details": "claim without any actual evidence"
|
||||
},
|
||||
"event_log": {
|
||||
"passed": true,
|
||||
"details": "claim without any actual evidence"
|
||||
},
|
||||
"important_warning_cutin": {
|
||||
"passed": true,
|
||||
"details": "claim without any actual evidence"
|
||||
},
|
||||
"click_alternatives": {
|
||||
"passed": true,
|
||||
"details": "claim without any actual evidence"
|
||||
},
|
||||
"japanese_input_and_scale": {
|
||||
"passed": true,
|
||||
"details": "claim without any actual evidence"
|
||||
},
|
||||
"final_validation_review": {
|
||||
"passed": true,
|
||||
"details": "claim without any actual evidence"
|
||||
}
|
||||
},
|
||||
"os_environment": {
|
||||
"pid": 1,
|
||||
"platform": "macOS",
|
||||
"window_size": [
|
||||
1,
|
||||
1
|
||||
]
|
||||
},
|
||||
"source_hashes": {
|
||||
"tools/check_p24_operations_evidence.py": "f456b0e24bf2aa4540320ecfee3255cf5e879551e003adda12190ca6026d8638"
|
||||
}
|
||||
},
|
||||
"exit_code": 0,
|
||||
"expected_nonzero": true,
|
||||
"false_acceptance": true,
|
||||
"stdout": "Reading evidence index from: /private/var/folders/41/j8fq6vqj2993cmyprl6p76pw0000gn/T/p24-no-artifact-negative-g6y1chaf/index.json\nSUCCESS: All 8 required operations and notification conditions and integrity checks verified.\n",
|
||||
"stderr": ""
|
||||
}
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"formal_acceptance": false,
|
||||
"worker_first_batch_complete": true,
|
||||
"submitted": false,
|
||||
"source_refs": {
|
||||
"scenes/main/main.gd": {
|
||||
"sha256": "c375ddabc59771f8ddeaa6464c59c98e58a11cd936aa82dde74645594a9fe4e0",
|
||||
"bytes": 141626
|
||||
},
|
||||
"scenes/main/world_preview.gd": {
|
||||
"sha256": "20b15f13ddf3cf753ff0d646e4e85e16417adbf78beca21ce78283668d9c5581",
|
||||
"bytes": 72781
|
||||
},
|
||||
"scripts/ui/operation_feedback.gd": {
|
||||
"sha256": "894d0229dd447616b6eacd7f9cc706724683500b6a35507f2d9dd31cd9e800c0",
|
||||
"bytes": 10138
|
||||
},
|
||||
"tests/ui/test_operations_notification.gd": {
|
||||
"sha256": "55bc83d4c42ab0914b31693d424b516ac20f8d179e8ed8fbbb2688f4b598a5dc",
|
||||
"bytes": 16697
|
||||
},
|
||||
"tools/check_p24_operations_evidence.py": {
|
||||
"sha256": "f456b0e24bf2aa4540320ecfee3255cf5e879551e003adda12190ca6026d8638",
|
||||
"bytes": 9286
|
||||
},
|
||||
"tools/regression/suite-policy.json": {
|
||||
"sha256": "b3de18ed4bfbada7af386de0e2acdf588659848b93bb035636c7399b3e2e0e5c",
|
||||
"bytes": 16671
|
||||
},
|
||||
"docs/plans/original-completion-2026-10-02/execution/completion_marker_contracts.json": {
|
||||
"sha256": "36412d7f9940b88908ff419c706d41431210d760810545cf524c4fd858624127",
|
||||
"bytes": 186186
|
||||
},
|
||||
"docs/plans/original-completion-2026-10-02/execution/p24-02/collector_protocol.json": {
|
||||
"sha256": "e695f36d73e51e99850984777c799e1832100392d63d923c5d4824d185f3ccf9",
|
||||
"bytes": 5520
|
||||
}
|
||||
},
|
||||
"test_sha256": "55bc83d4c42ab0914b31693d424b516ac20f8d179e8ed8fbbb2688f4b598a5dc",
|
||||
"policy_sha_matches": false,
|
||||
"native_tests_executed_on_this_batch": false,
|
||||
"root_failed_negative": "/Users/korizatou114/Projects/とりにく工房ゲーム制作部/docs/plans/original-completion-2026-10-02/execution/p24-02/gui-repair-r03/checker-no-artifact-negative-r02.json",
|
||||
"same_worker_followup_live": true,
|
||||
"reason": "General missing-artifact negative still accepted; proof validation and warning semantics are being corrected before frozen preflight.",
|
||||
"source_refs_snapshot_phase": "Live follow-up; files may change between reads. Not an immutable candidate or coherent full map."
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"formal_acceptance": false,
|
||||
"live_worker_snapshot_not_final": true,
|
||||
"source_refs": {
|
||||
"scenes/main/world_preview.gd": {
|
||||
"sha256": "20b15f13ddf3cf753ff0d646e4e85e16417adbf78beca21ce78283668d9c5581",
|
||||
"bytes": 72781
|
||||
},
|
||||
"scripts/ui/operation_feedback.gd": {
|
||||
"sha256": "894d0229dd447616b6eacd7f9cc706724683500b6a35507f2d9dd31cd9e800c0",
|
||||
"bytes": 10138
|
||||
}
|
||||
},
|
||||
"static_observations": {
|
||||
"explicit_staff_draw_position": true,
|
||||
"invalid_Window_property_removed": true,
|
||||
"Window_min_size_Vector2i": true,
|
||||
"staff_relationship_passed_to_bubble": true
|
||||
},
|
||||
"native_validation_executed_on_this_snapshot": false
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"project": "the-tree-p24-02-operations",
|
||||
"task_id": "P24-02",
|
||||
"route": "Antigravity IDE GUI / documented semi-automatic ui-packet route",
|
||||
"worktree": "/Users/korizatou114/Projects/TheTree-managed-worktrees/p24-02-operations/P24-02-implement",
|
||||
"registered_repairs": 2,
|
||||
"registered_max_repair_attempts": 2,
|
||||
"recorded_commander_decision": "/Users/korizatou114/Projects/とりにく工房ゲーム制作部/docs/plans/original-completion-2026-10-02/execution/p24-02/gui-repair-r03/p24-02-gui-repair-decision-r03.json",
|
||||
"ui_packet_sha256": "9a36317bf9b8bf2bb5792d8faf20b599c36a6bb357205bb08c26325570f84a0a",
|
||||
"app_bundle_id": "com.google.antigravity-ide",
|
||||
"observed_window": "P24-02-implement",
|
||||
"observed_at_jst": "2026-10-13T11:59:12.204395+09:00",
|
||||
"selected_model": "Gemini3.8FlashHigh",
|
||||
"model_scope": "UI selected model, exact inference model ID not exposed",
|
||||
"workspace_trust": "restricted; did not trust parent or enable automatic workspace execution",
|
||||
"observed_agent_status": "Working .. and Cancel button after actual send",
|
||||
"CLI_worker_started": false,
|
||||
"extra_repair_cap_requested_or_applied": false,
|
||||
"formal_acceptance": false,
|
||||
"OS_acceptance": false,
|
||||
"cost": null,
|
||||
"next": "Wait for same GUI session, inspect actual output and source scope, then ordinary Runner submit/validate/independent Opus review. No duplicate worker.",
|
||||
"diagnostic_scope_correction": {
|
||||
"generated_files_retained": "/Users/korizatou114/Projects/とりにく工房ゲーム制作部/artifacts/original-completion-2026-10-02/p24-02-gui-generated-diagnostics-r03/retention.json",
|
||||
"agent_command_cancelled": true,
|
||||
"reason": "API dump generated outside allowed_paths. Same GUI session continued with code-only instruction. Native tests owned by Root.",
|
||||
"GUI_model_unchanged": true,
|
||||
"current_GUI_worker_continued": true,
|
||||
"extra_worker_started": false
|
||||
}
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"formal_acceptance": false,
|
||||
"preflight_only": true,
|
||||
"native_result_ref": {
|
||||
"path": "/Users/korizatou114/Projects/とりにく工房ゲーム制作部/artifacts/original-completion-2026-10-02/p24-02-local-native-preflight-r03/local-ended.json",
|
||||
"sha256": "da6046c42d82ab0babd824ae7040b3bae62c716e2461ac4e84f74f1978e893e8"
|
||||
},
|
||||
"native_input_ref": {
|
||||
"path": "/Users/korizatou114/Projects/とりにく工房ゲーム制作部/artifacts/original-completion-2026-10-02/p24-02-local-native-preflight-r03/runner-input.json",
|
||||
"sha256": "fab68e59e1bdbd17669cc2680d96c93e1ee1ca5a04f25a8eba929f2cdcad5fbd"
|
||||
},
|
||||
"actual_pids": [
|
||||
61380,
|
||||
61466
|
||||
],
|
||||
"import_passed": true,
|
||||
"parse_passed": false,
|
||||
"local_suites_executed": 0,
|
||||
"planned_local_suites": 7,
|
||||
"guard_errors": [],
|
||||
"cleanup_errors": [],
|
||||
"failed_script": "tests/ui/test_operations_notification.gd",
|
||||
"failed_lines": [
|
||||
311,
|
||||
312
|
||||
],
|
||||
"failure": "ManualSaveSlotsDialogScript identifier not declared",
|
||||
"same_GUI_worker_repair_live": true,
|
||||
"extra_repair_attempt_requested_or_reset": false,
|
||||
"next": "Same source batch: add valid existing preload/class reference, update exact test SHA, correct evidence validator semantics; new frozen guarded preflight afterward."
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"formal_acceptance": false,
|
||||
"preflight_only": true,
|
||||
"native_result": {
|
||||
"path": "/Users/korizatou114/Projects/とりにく工房ゲーム制作部/artifacts/original-completion-2026-10-02/p24-02-local-native-preflight-r04/local-ended.json",
|
||||
"sha256": "7afa6d9f56c1e93521be51fe8aa7ea2ac5d103c69eafd526b5c80e2ad7400a90"
|
||||
},
|
||||
"native_input": {
|
||||
"path": "/Users/korizatou114/Projects/とりにく工房ゲーム制作部/artifacts/original-completion-2026-10-02/p24-02-local-native-preflight-r04/runner-input.json",
|
||||
"sha256": "f1191aec5fa1315da328e12d12236ab777e03a141991ff9940f97be3f7854bb3"
|
||||
},
|
||||
"actual_pids": [
|
||||
68758,
|
||||
68849,
|
||||
68958
|
||||
],
|
||||
"import_passed": true,
|
||||
"all_GD_parse_passed": true,
|
||||
"local_suite": {
|
||||
"path": "tests/ui/test_operations_notification.gd",
|
||||
"actual_pid": 68958,
|
||||
"checks": 56,
|
||||
"failures": 1,
|
||||
"passed": false,
|
||||
"failure": "Observer tracked at least 3 unit bubble events",
|
||||
"cause": "Latest-state map keyed by actor ID counted unique actors, not transitions of one actor."
|
||||
},
|
||||
"remaining_local_suites_unexecuted": 6,
|
||||
"guard_errors": [],
|
||||
"cleanup_errors": [],
|
||||
"same_GUI_worker_fix_live": true,
|
||||
"next": "Preserve current-state map and record/verify actual transitions without invented actors or weakened minimum. Finalize test hash, then freeze and run related7 suites."
|
||||
}
|
||||
+74
@@ -0,0 +1,74 @@
|
||||
{
|
||||
"formal_acceptance": false,
|
||||
"submitted_commit": "666c87bd7d7c961ae6d7d2ad8d52d6456c31015b",
|
||||
"submitted_worktree_clean": true,
|
||||
"preflight_source_map_files": 1313,
|
||||
"preflight_source_vs_submitted_mismatches": [],
|
||||
"preflight_applicability": "Exact1313-file contents checked after ordinary Runner submit. Commit metadata changed, tested source content unchanged. Local/affected scope only.",
|
||||
"import_passed": true,
|
||||
"all_GD_parse_passed": true,
|
||||
"local_suites": [
|
||||
{
|
||||
"path": "tests/ui/test_operations_notification.gd",
|
||||
"passed": true,
|
||||
"actual_pid": 74228,
|
||||
"checks": 58
|
||||
},
|
||||
{
|
||||
"path": "tests/ui/test_event_log_ui.gd",
|
||||
"passed": true,
|
||||
"actual_pid": 74249,
|
||||
"checks": 34
|
||||
},
|
||||
{
|
||||
"path": "tests/ui/test_original_build_pointer.gd",
|
||||
"passed": true,
|
||||
"actual_pid": 74275,
|
||||
"checks": 50
|
||||
},
|
||||
{
|
||||
"path": "tests/ui/test_staff_management.gd",
|
||||
"passed": true,
|
||||
"actual_pid": 74350,
|
||||
"checks": 131
|
||||
},
|
||||
{
|
||||
"path": "tests/ui/test_selection_lifecycle.gd",
|
||||
"passed": true,
|
||||
"actual_pid": 74382,
|
||||
"checks": 38
|
||||
},
|
||||
{
|
||||
"path": "tests/ui/test_selection_autosave.gd",
|
||||
"passed": true,
|
||||
"actual_pid": 74417,
|
||||
"checks": 75
|
||||
},
|
||||
{
|
||||
"path": "tests/ui/test_ui_presentation_audio_contract.gd",
|
||||
"passed": true,
|
||||
"actual_pid": 74657,
|
||||
"checks": 91
|
||||
}
|
||||
],
|
||||
"total_checks": 477,
|
||||
"guard_errors": [],
|
||||
"cleanup_errors": [],
|
||||
"full_regression": false,
|
||||
"result_ref": {
|
||||
"path": "/Users/korizatou114/Projects/とりにく工房ゲーム制作部/artifacts/original-completion-2026-10-02/p24-02-local-native-preflight-r05/local-ended.json",
|
||||
"sha256": "c70c00b174ed33fbdf7164f23915e57c66f21417c3e36433473697cad983962d"
|
||||
},
|
||||
"input_ref": {
|
||||
"path": "/Users/korizatou114/Projects/とりにく工房ゲーム制作部/artifacts/original-completion-2026-10-02/p24-02-local-native-preflight-r05/runner-input.json",
|
||||
"sha256": "0faa9fbcb8a5610de78bf0a64c300ae9726cd06e97eab74b46ee4c5069d95a86"
|
||||
},
|
||||
"remaining_required": [
|
||||
"all8 condition actual OS/IME/scales/event/save proofs",
|
||||
"actual NTR/duel upstream production triggers",
|
||||
"exact final required full roster",
|
||||
"separate Opus independent review",
|
||||
"current-main integration/final validation",
|
||||
"same-release Windows platform acceptance"
|
||||
]
|
||||
}
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
import importlib.util,hashlib,json,os,shutil,sys,uuid
|
||||
from pathlib import Path
|
||||
sys.dont_write_bytecode=True
|
||||
ROOT=Path('/Users/korizatou114/Projects/TheTree-managed-worktrees/p24-02-operations/P24-02-implement')
|
||||
OUT=Path('/Users/korizatou114/Projects/とりにく工房ゲーム制作部/artifacts/original-completion-2026-10-02/p24-02-local-native-preflight-r03')
|
||||
spec=importlib.util.spec_from_file_location('p24_existing_native_runner',ROOT/'tools/run_all_tests.py');r=importlib.util.module_from_spec(spec);spec.loader.exec_module(r)
|
||||
paths=['tests/ui/test_operations_notification.gd','tests/ui/test_event_log_ui.gd','tests/ui/test_original_build_pointer.gd','tests/ui/test_staff_management.gd','tests/ui/test_selection_lifecycle.gd','tests/ui/test_selection_autosave.gd','tests/ui/test_ui_presentation_audio_contract.gd']
|
||||
import subprocess
|
||||
candidate=subprocess.check_output(['git','rev-parse','HEAD'],cwd=ROOT,text=True).strip()
|
||||
r.require(len(sys.argv)==2 and candidate==sys.argv[1], 'exact expected submitted commit')
|
||||
dirty_status=subprocess.check_output(['git','status','--porcelain'],cwd=ROOT,text=True)
|
||||
# Preflight only: exact source map and ordinary guards remain; no submitted-version acceptance.
|
||||
|
||||
refs=r.source_refs(ROOT);before=refs;expected={n:{'bytes':v['bytes'],'sha256':v['sha256']} for n,v in refs.items()};policy=r.read(ROOT/'tools/regression/suite-policy.json');r.policy_coverage(paths,refs,policy)
|
||||
markers=r.module('p24_local_markers',ROOT/'tools/strict_test_markers.py');cp=ROOT/'docs/plans/original-completion-2026-10-02/execution/completion_marker_contracts.json';contracts=markers.load_contracts(cp)
|
||||
outer=r.module('p24_local_owned_outer',ROOT/'tools/regression/owned_outer.py');r.require(not outer.native.helper['live_engines'](),'another Godot is live');r.require(shutil.disk_usage(OUT.parent).free>=500*1024*1024,'local admission free>=500MiB')
|
||||
OUT.mkdir(parents=True,exist_ok=False);stage=OUT/'stage';stage.mkdir();(OUT/'starters').mkdir();(OUT/'bootstrap').mkdir()
|
||||
for n,pin in r.read(ROOT/'tools/regression/bootstrap-scripts.json').items():
|
||||
data=pin['text'].encode();r.require(hashlib.sha256(data).hexdigest()==pin['sha256'],'bootstrap exact');(OUT/'bootstrap'/n).write_bytes(data)
|
||||
for n,pin in refs.items():
|
||||
target=stage/n;target.parent.mkdir(parents=True,exist_ok=True);r.copy_source(Path(pin['path']),target)
|
||||
r.require(r.inventory(stage,stage=True)==expected,'whole separate CoW stage exact')
|
||||
protected=r.default_player(ROOT);public=(stage/'project.godot').read_bytes();parse=['res://'+n for n in sorted(refs) if n.endswith('.gd')];r.write(OUT/'parse-paths.json',parse)
|
||||
selected={'root_before':before,'map':{n:p['sha256'] for n,p in refs.items()},'timeout':300};engine='/Applications/Godot.app/Contents/MacOS/Godot'
|
||||
r.write(OUT/'runner-input.json',{'protocol':'guarded-operations-local-v1','full_regression':False,'source_commit':candidate,'source_state':'guarded dirty preflight snapshot; not submitted acceptance','dirty_status':dirty_status,'selected_source_map':selected['map'],'roster':paths,'full_roster':r.roster(ROOT),'owner_runner_pid':os.getpid(),'stage':str(stage),'default_player_before':protected,'engine':engine,'engine_sha256':r.sha(engine),'marker_contract_sha256':r.sha(cp),'execution_controller_sha256':r.sha(Path(__file__)),'existing_phase_controller_sha256':r.sha(ROOT/'tools/run_all_tests.py')})
|
||||
diagnostics=r.module('p24_local_diagnostics',ROOT/'tools/regression/diagnostic_gate.py');owners=r.module('p24_local_owners',ROOT/'tools/regression/ordinary_proof_gate.py');audio=r.module('p24_local_audio',ROOT/'tools/regression/audio_evidence_gate.py')
|
||||
rows=[];phases=[];previous={};error=None
|
||||
try:
|
||||
for label,test in [('import',None),('parse',None)]+[(str(i).zfill(3),n)for i,n in enumerate(paths)]:
|
||||
row=r.execute_phase(engine,stage,OUT,label,test,selected,expected,previous,policy,contracts,parse,public,protected,ROOT,outer,markers,diagnostics,owners,audio);phases.append(row)
|
||||
if test:rows.append(row)
|
||||
print(json.dumps({'phase':label,'test':test,'passed':row['passed'],'actual_pid':row.get('actual_pid'),'checks':row.get('reported_checks'),'error':row.get('validation_error') or row.get('guard_error')},ensure_ascii=False),flush=True)
|
||||
r.require(row['passed'],'first local phase failure; no retry')
|
||||
except BaseException as e:error=type(e).__name__+': '+str(e)
|
||||
finally:cleanup,cleanup_errors=outer.finish_captured(outer.OWNED)
|
||||
guards=[]
|
||||
try:
|
||||
r.require(r.source_refs(ROOT)==before,'whole source unchanged');r.require(r.default_player(ROOT)==protected,'default player unchanged');r.require(r.inventory(stage,stage=True)==dict(expected,**previous),'whole stage and generated file set exact')
|
||||
except BaseException as e:guards.append(type(e).__name__+': '+str(e))
|
||||
passed=not error and not guards and not cleanup_errors and len(phases)==len(paths)+2 and all(x['passed'] for x in phases)
|
||||
r.write(OUT/'local-ended.json',{'protocol':'guarded-operations-local-v1','full_regression':False,'passed':passed,'error':error,'guard_errors':guards,'cleanup_errors':cleanup_errors,'final_owned_cleanup':cleanup,'actual_captured_pids':[p.pid for p in outer.OWNED],'phases':phases,'rows':rows,'original_unit_accepted':False,'preflight_only':True,'OS_input_executed':False,'cross_process_executed':False,'independent_review_executed':False})
|
||||
print(json.dumps({'selected_local_passed':passed,'executed_suites':len(rows),'planned_local_suites':len(paths),'error':error,'guard_errors':guards,'cleanup_errors':cleanup_errors,'full_regression':False}),flush=True)
|
||||
sys.exit(0 if passed else 1)
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
/Users/korizatou114/Projects/TheTree-managed-worktrees/p24-02-operations/P24-02-implement
|
||||
{
|
||||
"project": "the-tree-p24-02-operations",
|
||||
"acceptance_completed": 0,
|
||||
"acceptance_total": 1,
|
||||
"tasks": [
|
||||
{
|
||||
"id": "P24-02",
|
||||
"state": "repair_ready",
|
||||
"submitted": null,
|
||||
"candidate": null,
|
||||
"main_base": null,
|
||||
"reason": null,
|
||||
"repairs": 2
|
||||
}
|
||||
],
|
||||
"costs": [
|
||||
{
|
||||
"id": "e8250e57aa204d2b898bf8eb0091dc8d",
|
||||
"service": "claude",
|
||||
"api_cost_usd": null,
|
||||
"estimated_cost_usd": 0.037015599999999996,
|
||||
"subscription_usage": null,
|
||||
"usage_json": "{\"input_tokens\": 2, \"cache_creation_input_tokens\": 7697, \"cache_read_input_tokens\": 1668, \"output_tokens\": 589, \"output_tokens_details\": {\"thinking_tokens\": 88}, \"server_tool_use\": {\"web_search_requests\": 0, \"web_fetch_requests\": 0}, \"service_tier\": \"standard\", \"cache_creation\": {\"ephemeral_1h_input_tokens\": 7697, \"ephemeral_5m_input_tokens\": 0}, \"inference_geo\": \"global\", \"iterations\": [], \"speed\": \"standard\", \"fallback_credit\": null}"
|
||||
},
|
||||
{
|
||||
"id": "2be30fb95a1b4898bc7be87ad072f8ec",
|
||||
"service": "agy",
|
||||
"api_cost_usd": null,
|
||||
"estimated_cost_usd": null,
|
||||
"subscription_usage": null,
|
||||
"usage_json": null
|
||||
},
|
||||
{
|
||||
"id": "a87e5506f962452b90a7caaca6fd4883",
|
||||
"service": "claude",
|
||||
"api_cost_usd": null,
|
||||
"estimated_cost_usd": 0.051924,
|
||||
"subscription_usage": null,
|
||||
"usage_json": "{\"input_tokens\": 2, \"cache_creation_input_tokens\": 10405, \"cache_read_input_tokens\": 0, \"output_tokens\": 1030, \"output_tokens_details\": {\"thinking_tokens\": 267}, \"server_tool_use\": {\"web_search_requests\": 0, \"web_fetch_requests\": 0}, \"service_tier\": \"standard\", \"cache_creation\": {\"ephemeral_1h_input_tokens\": 10405, \"ephemeral_5m_input_tokens\": 0}, \"inference_geo\": \"global\", \"iterations\": [], \"speed\": \"standard\", \"fallback_credit\": null}"
|
||||
},
|
||||
{
|
||||
"id": "142e2e2bbcaa46918e89e97039cf4cbb",
|
||||
"service": "agy",
|
||||
"api_cost_usd": null,
|
||||
"estimated_cost_usd": null,
|
||||
"subscription_usage": null,
|
||||
"usage_json": null
|
||||
},
|
||||
{
|
||||
"id": "bedd8c9098004e439a05692b9e991112",
|
||||
"service": "claude",
|
||||
"api_cost_usd": null,
|
||||
"estimated_cost_usd": 0.11623440000000002,
|
||||
"subscription_usage": null,
|
||||
"usage_json": "{\"input_tokens\": 2, \"cache_creation_input_tokens\": 9277, \"cache_read_input_tokens\": 1752, \"output_tokens\": 2083, \"output_tokens_details\": {\"thinking_tokens\": 617}, \"server_tool_use\": {\"web_search_requests\": 0, \"web_fetch_requests\": 0}, \"service_tier\": \"standard\", \"cache_creation\": {\"ephemeral_1h_input_tokens\": 9277, \"ephemeral_5m_input_tokens\": 0}, \"inference_geo\": \"global\", \"iterations\": [], \"speed\": \"standard\", \"fallback_credit\": null}"
|
||||
}
|
||||
],
|
||||
"cost_note": "nullは未取得。estimated_cost_usdはAPI請求額とは別。API自動切替無効。"
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"action": "request-repair",
|
||||
"task_id": "P24-02",
|
||||
"reason": "判断: 残り1回の通常repair(2回目、repairs 1→2/上限2)を、Runner READMEの正式GUI経路を使って同じ登録タスクP24-02に対して実行します。CLIはexit124で止まりましたが、同じworktreeの変更は残っています。また、受入audit current-audit-r03で必須修正が7件に絞られています。このため、新しいタスクや別worktreeは作らず、同じ契約のまま続けるのが妥当です。\n\nゲートの扱い: AGY CLI 1.3.3の認証adapter互換性は未検証のままとし、「CLI互換性ゲート未解決」として別に記録します。CLIの再run、重複CLI実装、他workerの起動は行いません。GUI経路は、このゲートを回避するものではありません。正式に定められた別の経路として、run記録に「経路=GUI」と明記します。\n\n変更しないもの: 受入条件(8条件、受入分母1)、spec_sha256 738268b4…、base_commit 1a5abc6、allowed_paths、修正上限2、権限、課金方法(API自動切替は無効のまま)。\n\nGUIでの作業手順:\n1. Runner prepare: 既存のworktreeと未コミット差分を消さずに再利用し、内容がaudit r03の時点と同じであることを確認する。\n2. Runner ui-packet: 必須修正7件だけを入れたrepair packetを作る。\n - Godot importの2コンパイル不具合\n - 実在しないevent_published signalの参照をやめ、既存のsignalへ接続する\n - 頭上heart表示を実際のモデルの状態と試験に一致させる(新しい閾値は作らない)\n - advance_minutes(0)で停止を確認している試験を、実際の停止と再開1回の確認に直す\n - checker5種がすべてfalseでもacceptanceになる不具合を直し、不正・欠落・未知の証拠ではfailさせる\n - pending試験SHAの扱い: 実際の実行証拠に置き換えるか、置き換えられなければ不合格として明記する\n - 上記に加えてaudit r03の残り1件\n3. 担当者がAntigravity IDEで既存worktreeを開き、allowed_paths内だけを修正する。workerはcommitしない。ローカルではGodot import/staticチェックと、関係するUI試験だけを実行する。full rosterはRoot Runnerが担当する。\n4. Runner submit: 同一worktreeのexact差分を提出する。\n5. Runner validate: validation_id=p24-operations、つまり`tools/check_p24_operations_evidence.py --verify-only`とrequired rosterを実行する。\n6. 別セッションのOpusが、実際の実行証拠をもとに独立reviewする。\n7. 合格した場合だけintegrationの準備に進む。main統合と承認はオーナーが判断する。\n\n失敗時の扱い: 今回のrepairでも不合格なら上限に達するため、追加repairは行わずblockedとしてオーナー判断を待ちます。合格証拠や仕様の数値は捏造しません。Windowsに依存する条件は未受入として残します。",
|
||||
"codex_model": "gpt-6.1-sol",
|
||||
"codex_model_reason": "既定のgpt-6.1-solを選びます。修正対象はaudit r03で7件に限定されていて、対象ファイルもallowed_paths内に固定されています。前回の失敗はexit124、つまり時間切れで、推論の質が足りなかった証拠ではありません。今回はGUI経路で人がIDEを操作して修正するので、gpt-6-astraの追加コストと時間に見合う上積みは見込めません。checkerの判定ロジックやsignalの接続は、validateと別Opus reviewで独立に確認されます。なお、モデルの選択はrunの実行、修正上限の変更、受入の免除のいずれも許可するものではありません。"
|
||||
}
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
{
|
||||
"project": "the-tree-p24-02-operations",
|
||||
"acceptance_completed": 0,
|
||||
"acceptance_total": 1,
|
||||
"tasks": [
|
||||
{
|
||||
"id": "P24-02",
|
||||
"state": "repair_ready",
|
||||
"submitted": null,
|
||||
"candidate": null,
|
||||
"main_base": null,
|
||||
"reason": null,
|
||||
"repairs": 2
|
||||
}
|
||||
],
|
||||
"costs": [
|
||||
{
|
||||
"id": "e8250e57aa204d2b898bf8eb0091dc8d",
|
||||
"service": "claude",
|
||||
"api_cost_usd": null,
|
||||
"estimated_cost_usd": 0.037015599999999996,
|
||||
"subscription_usage": null,
|
||||
"usage_json": "{\"input_tokens\": 2, \"cache_creation_input_tokens\": 7697, \"cache_read_input_tokens\": 1668, \"output_tokens\": 589, \"output_tokens_details\": {\"thinking_tokens\": 88}, \"server_tool_use\": {\"web_search_requests\": 0, \"web_fetch_requests\": 0}, \"service_tier\": \"standard\", \"cache_creation\": {\"ephemeral_1h_input_tokens\": 7697, \"ephemeral_5m_input_tokens\": 0}, \"inference_geo\": \"global\", \"iterations\": [], \"speed\": \"standard\", \"fallback_credit\": null}"
|
||||
},
|
||||
{
|
||||
"id": "2be30fb95a1b4898bc7be87ad072f8ec",
|
||||
"service": "agy",
|
||||
"api_cost_usd": null,
|
||||
"estimated_cost_usd": null,
|
||||
"subscription_usage": null,
|
||||
"usage_json": null
|
||||
},
|
||||
{
|
||||
"id": "a87e5506f962452b90a7caaca6fd4883",
|
||||
"service": "claude",
|
||||
"api_cost_usd": null,
|
||||
"estimated_cost_usd": 0.051924,
|
||||
"subscription_usage": null,
|
||||
"usage_json": "{\"input_tokens\": 2, \"cache_creation_input_tokens\": 10405, \"cache_read_input_tokens\": 0, \"output_tokens\": 1030, \"output_tokens_details\": {\"thinking_tokens\": 267}, \"server_tool_use\": {\"web_search_requests\": 0, \"web_fetch_requests\": 0}, \"service_tier\": \"standard\", \"cache_creation\": {\"ephemeral_1h_input_tokens\": 10405, \"ephemeral_5m_input_tokens\": 0}, \"inference_geo\": \"global\", \"iterations\": [], \"speed\": \"standard\", \"fallback_credit\": null}"
|
||||
},
|
||||
{
|
||||
"id": "142e2e2bbcaa46918e89e97039cf4cbb",
|
||||
"service": "agy",
|
||||
"api_cost_usd": null,
|
||||
"estimated_cost_usd": null,
|
||||
"subscription_usage": null,
|
||||
"usage_json": null
|
||||
},
|
||||
{
|
||||
"id": "bedd8c9098004e439a05692b9e991112",
|
||||
"service": "claude",
|
||||
"api_cost_usd": null,
|
||||
"estimated_cost_usd": 0.11623440000000002,
|
||||
"subscription_usage": null,
|
||||
"usage_json": "{\"input_tokens\": 2, \"cache_creation_input_tokens\": 9277, \"cache_read_input_tokens\": 1752, \"output_tokens\": 2083, \"output_tokens_details\": {\"thinking_tokens\": 617}, \"server_tool_use\": {\"web_search_requests\": 0, \"web_fetch_requests\": 0}, \"service_tier\": \"standard\", \"cache_creation\": {\"ephemeral_1h_input_tokens\": 9277, \"ephemeral_5m_input_tokens\": 0}, \"inference_geo\": \"global\", \"iterations\": [], \"speed\": \"standard\", \"fallback_credit\": null}"
|
||||
}
|
||||
],
|
||||
"cost_note": "nullは未取得。estimated_cost_usdはAPI請求額とは別。API自動切替無効。"
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"formal_acceptance": false,
|
||||
"raw_retained": {
|
||||
"path": "/Users/korizatou114/Projects/とりにく工房ゲーム制作部/artifacts/original-completion-2026-10-02/p24-02-gui-generated-diagnostics-r03/player-guard-after-api-diagnostic.json",
|
||||
"bytes": 311619,
|
||||
"sha256": "dd96ed79a987e09d2dc99e70cf7331d83084f13af75a3ea30de91a4af324df26"
|
||||
},
|
||||
"compressed_retained": {
|
||||
"path": "/Users/korizatou114/Projects/とりにく工房ゲーム制作部/artifacts/original-completion-2026-10-02/p24-02-gui-generated-diagnostics-r03/player-guard-after-api-diagnostic.json.gz",
|
||||
"bytes": 56909,
|
||||
"sha256": "62123e21d8f469e1bbc1715246e86e617effca7ae45028561cdad8f86e19d2f0",
|
||||
"uncompressed_sha256": "dd96ed79a987e09d2dc99e70cf7331d83084f13af75a3ea30de91a4af324df26",
|
||||
"content_bytes_verified_equal": true
|
||||
},
|
||||
"before_after_detail_unchanged": true,
|
||||
"save_data_changed": false,
|
||||
"changed_paths": [
|
||||
"logs/godot.log",
|
||||
"logs/godot2026-10-02T14.01.51.log",
|
||||
"logs/godot2026-10-13T12.00.13.log"
|
||||
],
|
||||
"all_player_files_preserved": false,
|
||||
"scope": "Complete immutable before/after player file metadata retained. Git/AI review packet carries this pointer and material result. API diagnostic is not formal acceptance."
|
||||
}
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
{
|
||||
"project": "the-tree-p24-02-operations",
|
||||
"acceptance_completed": 0,
|
||||
"acceptance_total": 1,
|
||||
"tasks": [
|
||||
{
|
||||
"id": "P24-02",
|
||||
"state": "submitted",
|
||||
"submitted": "666c87bd7d7c961ae6d7d2ad8d52d6456c31015b",
|
||||
"candidate": null,
|
||||
"main_base": null,
|
||||
"reason": null,
|
||||
"repairs": 2
|
||||
}
|
||||
],
|
||||
"costs": [
|
||||
{
|
||||
"id": "e8250e57aa204d2b898bf8eb0091dc8d",
|
||||
"service": "claude",
|
||||
"api_cost_usd": null,
|
||||
"estimated_cost_usd": 0.037015599999999996,
|
||||
"subscription_usage": null,
|
||||
"usage_json": "{\"input_tokens\": 2, \"cache_creation_input_tokens\": 7697, \"cache_read_input_tokens\": 1668, \"output_tokens\": 589, \"output_tokens_details\": {\"thinking_tokens\": 88}, \"server_tool_use\": {\"web_search_requests\": 0, \"web_fetch_requests\": 0}, \"service_tier\": \"standard\", \"cache_creation\": {\"ephemeral_1h_input_tokens\": 7697, \"ephemeral_5m_input_tokens\": 0}, \"inference_geo\": \"global\", \"iterations\": [], \"speed\": \"standard\", \"fallback_credit\": null}"
|
||||
},
|
||||
{
|
||||
"id": "2be30fb95a1b4898bc7be87ad072f8ec",
|
||||
"service": "agy",
|
||||
"api_cost_usd": null,
|
||||
"estimated_cost_usd": null,
|
||||
"subscription_usage": null,
|
||||
"usage_json": null
|
||||
},
|
||||
{
|
||||
"id": "a87e5506f962452b90a7caaca6fd4883",
|
||||
"service": "claude",
|
||||
"api_cost_usd": null,
|
||||
"estimated_cost_usd": 0.051924,
|
||||
"subscription_usage": null,
|
||||
"usage_json": "{\"input_tokens\": 2, \"cache_creation_input_tokens\": 10405, \"cache_read_input_tokens\": 0, \"output_tokens\": 1030, \"output_tokens_details\": {\"thinking_tokens\": 267}, \"server_tool_use\": {\"web_search_requests\": 0, \"web_fetch_requests\": 0}, \"service_tier\": \"standard\", \"cache_creation\": {\"ephemeral_1h_input_tokens\": 10405, \"ephemeral_5m_input_tokens\": 0}, \"inference_geo\": \"global\", \"iterations\": [], \"speed\": \"standard\", \"fallback_credit\": null}"
|
||||
},
|
||||
{
|
||||
"id": "142e2e2bbcaa46918e89e97039cf4cbb",
|
||||
"service": "agy",
|
||||
"api_cost_usd": null,
|
||||
"estimated_cost_usd": null,
|
||||
"subscription_usage": null,
|
||||
"usage_json": null
|
||||
},
|
||||
{
|
||||
"id": "bedd8c9098004e439a05692b9e991112",
|
||||
"service": "claude",
|
||||
"api_cost_usd": null,
|
||||
"estimated_cost_usd": 0.11623440000000002,
|
||||
"subscription_usage": null,
|
||||
"usage_json": "{\"input_tokens\": 2, \"cache_creation_input_tokens\": 9277, \"cache_read_input_tokens\": 1752, \"output_tokens\": 2083, \"output_tokens_details\": {\"thinking_tokens\": 617}, \"server_tool_use\": {\"web_search_requests\": 0, \"web_fetch_requests\": 0}, \"service_tier\": \"standard\", \"cache_creation\": {\"ephemeral_1h_input_tokens\": 9277, \"ephemeral_5m_input_tokens\": 0}, \"inference_geo\": \"global\", \"iterations\": [], \"speed\": \"standard\", \"fallback_credit\": null}"
|
||||
}
|
||||
],
|
||||
"cost_note": "nullは未取得。estimated_cost_usdはAPI請求額とは別。API自動切替無効。"
|
||||
}
|
||||
+16
File diff suppressed because one or more lines are too long
+179
@@ -0,0 +1,179 @@
|
||||
{
|
||||
"candidate": "666c87bd7d7c961ae6d7d2ad8d52d6456c31015b",
|
||||
"formal_acceptance": false,
|
||||
"normal_new_save_entry_accepted": false,
|
||||
"diagnostic_entry": "F8 Root recorder called exact production show_new_save; source unchanged. Not ordinary gameplay entry proof.",
|
||||
"observed_IME_states": [
|
||||
{
|
||||
"ime_text": "t",
|
||||
"ime_selection": [
|
||||
1,
|
||||
0
|
||||
],
|
||||
"label_text": "",
|
||||
"label_focused": true,
|
||||
"modal_input_blocked": true,
|
||||
"window_size": [
|
||||
1280,
|
||||
720
|
||||
]
|
||||
},
|
||||
{
|
||||
"ime_text": "テス",
|
||||
"ime_selection": [
|
||||
2,
|
||||
0
|
||||
],
|
||||
"label_text": "",
|
||||
"label_focused": true,
|
||||
"modal_input_blocked": true,
|
||||
"window_size": [
|
||||
1280,
|
||||
720
|
||||
]
|
||||
},
|
||||
{
|
||||
"ime_text": "テスト",
|
||||
"ime_selection": [
|
||||
3,
|
||||
0
|
||||
],
|
||||
"label_text": "",
|
||||
"label_focused": true,
|
||||
"modal_input_blocked": true,
|
||||
"window_size": [
|
||||
1280,
|
||||
720
|
||||
]
|
||||
},
|
||||
{
|
||||
"ime_text": "てすと",
|
||||
"ime_selection": [
|
||||
3,
|
||||
0
|
||||
],
|
||||
"label_text": "",
|
||||
"label_focused": true,
|
||||
"modal_input_blocked": true,
|
||||
"window_size": [
|
||||
1280,
|
||||
720
|
||||
]
|
||||
},
|
||||
{
|
||||
"ime_text": "t",
|
||||
"ime_selection": [
|
||||
1,
|
||||
0
|
||||
],
|
||||
"label_text": "",
|
||||
"label_focused": true,
|
||||
"modal_input_blocked": true,
|
||||
"window_size": [
|
||||
1280,
|
||||
720
|
||||
]
|
||||
}
|
||||
],
|
||||
"IME_confirm_actual": true,
|
||||
"IME_cancel_actual": "Actual Escape twice cleared pending IME before committing next composition; source event sequence retained.",
|
||||
"saved_display_name": "テスト",
|
||||
"owned_save_slot": "manual_ui_028e44393fbef29c5cf3482ed611232f",
|
||||
"save_manifest": {
|
||||
"path": "/Users/korizatou114/Library/Application Support/TheTree-PCK-tests-39076deb130d4d469b74b4d368bcd7a8-p24-02-os/saves/manual_ui_028e44393fbef29c5cf3482ed611232f/manifest.json",
|
||||
"bytes": 679,
|
||||
"sha256": "6581074e2d6e40d4044f50d0d79c6146503f07b1ab3b98370454e5427f801e3c"
|
||||
},
|
||||
"window_sizes_observed": [
|
||||
[
|
||||
1024,
|
||||
608
|
||||
],
|
||||
[
|
||||
1280,
|
||||
720
|
||||
]
|
||||
],
|
||||
"producer_pid": 80764,
|
||||
"consumer_pid": 83514,
|
||||
"normal_load_in_consumer": true,
|
||||
"consumer_loaded_save_path": "user://saves/manual_ui_028e44393fbef29c5cf3482ed611232f",
|
||||
"all_required_world_state_restart_proven": false,
|
||||
"source_default_player_cleanup_guard_errors": [],
|
||||
"raw_refs": [
|
||||
{
|
||||
"path": "/Users/korizatou114/Projects/とりにく工房ゲーム制作部/artifacts/original-completion-2026-10-02/p24-02-native-os-ime-diagnostic-r01/events.jsonl",
|
||||
"bytes": 7668,
|
||||
"sha256": "4e27ad89db7f54da6a8c08caf8c47f89c73b894d42a9c761d8d4c7aa26d5bbac"
|
||||
},
|
||||
{
|
||||
"path": "/Users/korizatou114/Projects/とりにく工房ゲーム制作部/artifacts/original-completion-2026-10-02/p24-02-native-os-ime-diagnostic-r01/ended.json",
|
||||
"bytes": 727662,
|
||||
"sha256": "a6d1c802e381ed343f09661ed3bc9a70de94acc819afd6f7f4092f416eab2dbf"
|
||||
},
|
||||
{
|
||||
"path": "/Users/korizatou114/Projects/とりにく工房ゲーム制作部/artifacts/original-completion-2026-10-02/p24-02-native-os-ime-consumer-r01/events.jsonl",
|
||||
"bytes": 1511,
|
||||
"sha256": "5e9b67c80ee545a7a5130e185b8857b2c92b31c336fc177375f6ef14430921c1"
|
||||
},
|
||||
{
|
||||
"path": "/Users/korizatou114/Projects/とりにく工房ゲーム制作部/artifacts/original-completion-2026-10-02/p24-02-native-os-ime-consumer-r01/ended.json",
|
||||
"bytes": 727662,
|
||||
"sha256": "c24d98b8556735dad7dc7d293b43179511adfcc2f70a9203eac906d601ec8121"
|
||||
}
|
||||
],
|
||||
"screenshots": [
|
||||
{
|
||||
"path": "/Users/korizatou114/Projects/とりにく工房ゲーム制作部/artifacts/original-completion-2026-10-02/p24-02-native-os-ime-diagnostic-r01/small-dialog.jpg",
|
||||
"bytes": 127364,
|
||||
"sha256": "adf92d912cef52577e6e6421a30556bec6e1dd15a0a321e133b4d7e102187837",
|
||||
"media_type": "image/jpeg"
|
||||
},
|
||||
{
|
||||
"path": "/Users/korizatou114/Projects/とりにく工房ゲーム制作部/artifacts/original-completion-2026-10-02/p24-02-native-os-ime-diagnostic-r01/saved-japanese-slot.jpg",
|
||||
"bytes": 168434,
|
||||
"sha256": "62a65ee2d437ca1d86bdb9f821ee246e32c9511769a8da5ef50d19a8f5e34beb",
|
||||
"media_type": "image/jpeg"
|
||||
},
|
||||
{
|
||||
"path": "/Users/korizatou114/Projects/とりにく工房ゲーム制作部/artifacts/original-completion-2026-10-02/p24-02-native-os-ime-consumer-r01/japanese-slot-after-restart.jpg",
|
||||
"bytes": 170100,
|
||||
"sha256": "9d7d0e8480159b12b5b83bed7609843c060b8450533e7dafe52a2e1072ccfd6d",
|
||||
"media_type": "image/jpeg"
|
||||
},
|
||||
{
|
||||
"path": "/Users/korizatou114/Projects/とりにく工房ゲーム制作部/artifacts/original-completion-2026-10-02/p24-02-native-os-ime-consumer-r01/ordinary-load-result.jpg",
|
||||
"bytes": 168163,
|
||||
"sha256": "c5231b5ea55c380965be34cdedec802fa96b9a9a6f8ed1f52ace25e3c0a6e509",
|
||||
"media_type": "image/jpeg"
|
||||
}
|
||||
],
|
||||
"remaining": [
|
||||
"Ordinary new named-save UI entry missing; runtime dialog route is currently migration-only",
|
||||
"Actual NTR and duel upstream triggers",
|
||||
"Final full roster, separate Opus review, integration/final",
|
||||
"Windows same release platform proof"
|
||||
],
|
||||
"actual_IME_end_transitions": [
|
||||
{
|
||||
"ticks_msec": 98020,
|
||||
"prior_ime_text": "てすと",
|
||||
"ime_text": "",
|
||||
"committed_label_text": "",
|
||||
"save_path": "user://saves/manual_ui"
|
||||
},
|
||||
{
|
||||
"ticks_msec": 119748,
|
||||
"prior_ime_text": "t",
|
||||
"ime_text": "",
|
||||
"committed_label_text": "テスト",
|
||||
"save_path": "user://saves/manual_ui"
|
||||
}
|
||||
],
|
||||
"ordinary_entry_missing_source_evidence": {
|
||||
"file": "scenes/main/main.gd",
|
||||
"save_button": "_save_manual: direct save",
|
||||
"new_save_dialog_calls": "only FORMAT_MIGRATION_REQUIRED branch plus internal helper",
|
||||
"source_sha256": "c375ddabc59771f8ddeaa6464c59c98e58a11cd936aa82dde74645594a9fe4e0"
|
||||
}
|
||||
}
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
extends SceneTree
|
||||
var main: Control
|
||||
var observer: Node
|
||||
func _initialize() -> void:
|
||||
call_deferred("_start")
|
||||
func _start() -> void:
|
||||
var scene: PackedScene = load("res://scenes/main/main.tscn")
|
||||
main = scene.instantiate()
|
||||
root.add_child(main)
|
||||
observer = PassiveRecorder.new()
|
||||
observer.main = main
|
||||
observer.out_dir = OS.get_environment("P24_OS_OUTPUT")
|
||||
root.add_child(observer)
|
||||
root.title = "The Tree P24-02 OS candidate 666c87b"
|
||||
|
||||
class PassiveRecorder extends Node:
|
||||
var main: Control
|
||||
var out_dir: String
|
||||
var log: FileAccess
|
||||
var previous: Dictionary = {}
|
||||
var elapsed := 0.0
|
||||
var rows := 0
|
||||
func _ready() -> void:
|
||||
log = FileAccess.open(out_dir.path_join("events.jsonl"), FileAccess.WRITE)
|
||||
emit_record("started", {"pid": OS.get_process_id(), "platform": OS.get_name(), "candidate": "666c87bd7d7c961ae6d7d2ad8d52d6456c31015b", "source": "passive_root_diagnostic_not_acceptance"})
|
||||
func emit_record(kind: String, value: Dictionary) -> void:
|
||||
if rows >= 10000 or log == null:
|
||||
return
|
||||
var record := {"kind": kind, "pid": OS.get_process_id(), "ticks_msec": Time.get_ticks_msec(), "value": value}
|
||||
log.store_line(JSON.stringify(record))
|
||||
log.flush()
|
||||
rows += 1
|
||||
func _input(event: InputEvent) -> void:
|
||||
if event is InputEventKey:
|
||||
if event.pressed and not event.echo and event.keycode == KEY_F8:
|
||||
emit_record("diagnostic_dialog_entry", {"normal_gameplay_entry": false, "reason": "ordinary entry missing in frozen candidate"})
|
||||
main.call("_ensure_manual_save_slots").show_new_save(main.get("manual_save_path"))
|
||||
emit_record("key", {"keycode": event.keycode, "physical_keycode": event.physical_keycode, "unicode": event.unicode, "pressed": event.pressed, "echo": event.echo, "shift": event.shift_pressed, "ctrl": event.ctrl_pressed, "alt": event.alt_pressed, "meta": event.meta_pressed})
|
||||
elif event is InputEventMouseButton:
|
||||
emit_record("mouse_button", {"button": event.button_index, "pressed": event.pressed, "position": [event.position.x, event.position.y]})
|
||||
func _process(delta: float) -> void:
|
||||
elapsed += delta
|
||||
if elapsed < 0.1:
|
||||
return
|
||||
elapsed = 0.0
|
||||
var dialog: Variant = main.get("manual_save_slots_dialog")
|
||||
var label: Variant = dialog.get("_label_edit") if dialog != null else null
|
||||
var focus: Control = get_viewport().gui_get_focus_owner()
|
||||
var window: Window = get_tree().root
|
||||
var state := {"ime_text": DisplayServer.ime_get_text(), "ime_selection": [DisplayServer.ime_get_selection().x, DisplayServer.ime_get_selection().y], "label_text": String(label.text) if label != null else "", "label_rect": [label.get_global_rect().position.x, label.get_global_rect().position.y, label.size.x, label.size.y] if label != null else [], "label_focused": label.has_focus() if label != null else false, "dialog_visible": dialog.visible if dialog != null else false, "window_size": [window.size.x, window.size.y], "window_position": [window.position.x, window.position.y], "content_scale_factor": window.content_scale_factor, "screen_scale": DisplayServer.screen_get_scale(window.current_screen), "focus_name": String(focus.name) if focus != null else "", "save_path": String(main.get("manual_save_path")), "modal_input_blocked": bool(main.get("world_preview").get("modal_input_blocked"))}
|
||||
if state != previous:
|
||||
emit_record("state", state)
|
||||
previous = state.duplicate(true)
|
||||
func _exit_tree() -> void:
|
||||
if log != null:
|
||||
emit_record("observer_exit", {"rows": rows})
|
||||
log.close()
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
--- a/scenes/main/main.gd
|
||||
+++ b/scenes/main/main.gd
|
||||
@@ -793 +793 @@
|
||||
- load_menu.text = "読込 ▾"
|
||||
+ load_menu.text = "保存・読込 ▾"
|
||||
@@ -799,0 +800 @@
|
||||
+ load_menu.get_popup().add_item("新しい名前で別スロット保存",3)
|
||||
@@ -803 +804,2 @@
|
||||
- elif id == 2: _show_manual_load_slots())
|
||||
+ elif id == 2: _show_manual_load_slots()
|
||||
+ elif id == 3: _ensure_manual_save_slots().show_new_save(manual_save_path))
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
import os,sys,uuid,json,hashlib,importlib.util,subprocess,time
|
||||
from pathlib import Path
|
||||
sys.dont_write_bytecode=True
|
||||
R=Path('/Users/korizatou114/Projects/TheTree-managed-worktrees/p24-02-operations/P24-02-implement')
|
||||
A=Path('/Users/korizatou114/Projects/とりにく工房ゲーム制作部/artifacts/original-completion-2026-10-02')
|
||||
OUT=A/'p24-02-native-os-ime-consumer-r01';stage=A/'p24-02-local-native-preflight-r05/stage'
|
||||
s=importlib.util.spec_from_file_location('p24_os_runner',R/'tools/run_all_tests.py');r=importlib.util.module_from_spec(s);s.loader.exec_module(r)
|
||||
outer=r.module('p24_os_owned',R/'tools/regression/owned_outer.py');r.require(not outer.native.helper['live_engines'](),'external engine present')
|
||||
r.require(r.read(stage.parent/'local-ended.json')['passed'],'local7 passed before OS')
|
||||
r.require(subprocess.check_output(['git','rev-parse','HEAD'],cwd=R,text=True).strip()=='666c87bd7d7c961ae6d7d2ad8d52d6456c31015b','exact immutable candidate')
|
||||
r.require(not subprocess.check_output(['git','status','--porcelain'],cwd=R,text=True),'candidate clean')
|
||||
refs=r.source_refs(R);before=r.inventory(stage,stage=True);protected=r.default_player(R);public=(stage/'project.godot').read_bytes()
|
||||
for n,pin in refs.items():r.require(r.sha(stage/n)==pin['sha256'],'tested stage source exact '+n)
|
||||
profile=Path('/Users/korizatou114/Library/Application Support/TheTree-PCK-tests-39076deb130d4d469b74b4d368bcd7a8-p24-02-os');profile_name=profile.name;r.require(profile.exists(),"actual producer owned profile exists")
|
||||
r.require(__import__('shutil').disk_usage(OUT).free>=500*1024*1024,'disk admission')
|
||||
base={'candidate':'666c87bd7d7c961ae6d7d2ad8d52d6456c31015b','source_map':{n:v['sha256'] for n,v in refs.items()},'stage':str(stage),'profile':str(profile),'owner_pid':os.getpid(),'default_before':protected,'source_before':refs,'formal_acceptance':False,'no_injected_gameplay_or_input':True,'controller_sha256':r.sha(Path(__file__)),'recorder_sha256':r.sha(OUT/'passive_os.gd')}
|
||||
r.write(OUT/'started.json',base);error=None;children=[];rows=[]
|
||||
try:
|
||||
(stage/'project.godot').write_bytes(r.private_project(public,profile_name));env=r.fresh_environment(dict(os.environ));env['P24_OS_OUTPUT']=str(OUT)
|
||||
argv=['/Applications/Godot.app/Contents/MacOS/Godot','--path',str(stage),'--script',str(OUT/'passive_os.gd')]
|
||||
with (OUT/'engine-native.log').open('w') as log:
|
||||
p=subprocess.Popen(argv,cwd=stage,env=env,stdout=log,stderr=subprocess.STDOUT);children.append(p)
|
||||
r.write(OUT/'process-started.json',dict(base,actual_pid=p.pid,command=argv,monotonic_ns=time.monotonic_ns()))
|
||||
print(json.dumps({'actual_pid':p.pid,'profile':str(profile),'events':str(OUT/'events.jsonl')}),flush=True)
|
||||
p.wait(timeout=900)
|
||||
r.require(p.returncode==0,'ordinary native exit0');raw=(OUT/'engine-native.log').read_text();r.require('ERROR:' not in raw and 'SCRIPT ERROR:' not in raw,'native diagnostics failed')
|
||||
rows.append({'actual_pid':p.pid,'exit_code':p.returncode,'engine_ended':True,'log_sha256':r.sha(OUT/'engine-native.log')})
|
||||
except BaseException as e:error=type(e).__name__+': '+str(e)
|
||||
finally:
|
||||
cleanup,cleanup_errors=outer.finish_captured(children);(stage/'project.godot').write_bytes(public)
|
||||
guards=[]
|
||||
try:
|
||||
r.require(r.source_refs(R)==refs,'candidate whole source unchanged');r.require(r.inventory(stage,stage=True)==before,'whole stage source unchanged');r.require(r.default_player(R)==protected,'default player unchanged')
|
||||
except BaseException as e:guards.append(type(e).__name__+': '+str(e))
|
||||
r.write(OUT/'ended.json',dict(base,rows=rows,error=error,guard_errors=guards,cleanup_errors=cleanup_errors,owned_cleanup=cleanup,passed=not(error or guards or cleanup_errors) and len(rows)==1,formal_acceptance=False))
|
||||
print(json.dumps({'ended':True,'error':error,'guards':guards,'rows':rows}),flush=True)
|
||||
sys.exit(1 if error or guards or cleanup_errors else 0)
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
import os,sys,uuid,json,hashlib,importlib.util,subprocess,time
|
||||
from pathlib import Path
|
||||
sys.dont_write_bytecode=True
|
||||
R=Path('/Users/korizatou114/Projects/TheTree-managed-worktrees/p24-02-operations/P24-02-implement')
|
||||
A=Path('/Users/korizatou114/Projects/とりにく工房ゲーム制作部/artifacts/original-completion-2026-10-02')
|
||||
OUT=A/'p24-02-native-os-ime-diagnostic-r01';stage=A/'p24-02-local-native-preflight-r05/stage'
|
||||
s=importlib.util.spec_from_file_location('p24_os_runner',R/'tools/run_all_tests.py');r=importlib.util.module_from_spec(s);s.loader.exec_module(r)
|
||||
outer=r.module('p24_os_owned',R/'tools/regression/owned_outer.py');r.require(not outer.native.helper['live_engines'](),'external engine present')
|
||||
r.require(r.read(stage.parent/'local-ended.json')['passed'],'local7 passed before OS')
|
||||
r.require(subprocess.check_output(['git','rev-parse','HEAD'],cwd=R,text=True).strip()=='666c87bd7d7c961ae6d7d2ad8d52d6456c31015b','exact immutable candidate')
|
||||
r.require(not subprocess.check_output(['git','status','--porcelain'],cwd=R,text=True),'candidate clean')
|
||||
refs=r.source_refs(R);before=r.inventory(stage,stage=True);protected=r.default_player(R);public=(stage/'project.godot').read_bytes()
|
||||
for n,pin in refs.items():r.require(r.sha(stage/n)==pin['sha256'],'tested stage source exact '+n)
|
||||
nonce=uuid.uuid4().hex;profile_name='TheTree-PCK-tests-'+nonce+'-p24-02-os';profile=r.profile_path(profile_name);r.require(not profile.exists(),'fresh private profile');profile.mkdir()
|
||||
r.require(__import__('shutil').disk_usage(OUT).free>=500*1024*1024,'disk admission')
|
||||
base={'candidate':'666c87bd7d7c961ae6d7d2ad8d52d6456c31015b','source_map':{n:v['sha256'] for n,v in refs.items()},'stage':str(stage),'profile':str(profile),'owner_pid':os.getpid(),'default_before':protected,'source_before':refs,'formal_acceptance':False,'no_injected_gameplay_or_input':True,'controller_sha256':r.sha(Path(__file__)),'recorder_sha256':r.sha(OUT/'passive_os.gd')}
|
||||
r.write(OUT/'started.json',base);error=None;children=[];rows=[]
|
||||
try:
|
||||
(stage/'project.godot').write_bytes(r.private_project(public,profile_name));env=r.fresh_environment(dict(os.environ));env['P24_OS_OUTPUT']=str(OUT)
|
||||
argv=['/Applications/Godot.app/Contents/MacOS/Godot','--path',str(stage),'--script',str(OUT/'passive_os.gd')]
|
||||
with (OUT/'engine-native.log').open('w') as log:
|
||||
p=subprocess.Popen(argv,cwd=stage,env=env,stdout=log,stderr=subprocess.STDOUT);children.append(p)
|
||||
r.write(OUT/'process-started.json',dict(base,actual_pid=p.pid,command=argv,monotonic_ns=time.monotonic_ns()))
|
||||
print(json.dumps({'actual_pid':p.pid,'profile':str(profile),'events':str(OUT/'events.jsonl')}),flush=True)
|
||||
p.wait(timeout=900)
|
||||
r.require(p.returncode==0,'ordinary native exit0');raw=(OUT/'engine-native.log').read_text();r.require('ERROR:' not in raw and 'SCRIPT ERROR:' not in raw,'native diagnostics failed')
|
||||
rows.append({'actual_pid':p.pid,'exit_code':p.returncode,'engine_ended':True,'log_sha256':r.sha(OUT/'engine-native.log')})
|
||||
except BaseException as e:error=type(e).__name__+': '+str(e)
|
||||
finally:
|
||||
cleanup,cleanup_errors=outer.finish_captured(children);(stage/'project.godot').write_bytes(public)
|
||||
guards=[]
|
||||
try:
|
||||
r.require(r.source_refs(R)==refs,'candidate whole source unchanged');r.require(r.inventory(stage,stage=True)==before,'whole stage source unchanged');r.require(r.default_player(R)==protected,'default player unchanged')
|
||||
except BaseException as e:guards.append(type(e).__name__+': '+str(e))
|
||||
r.write(OUT/'ended.json',dict(base,rows=rows,error=error,guard_errors=guards,cleanup_errors=cleanup_errors,owned_cleanup=cleanup,passed=not(error or guards or cleanup_errors) and len(rows)==1,formal_acceptance=False))
|
||||
print(json.dumps({'ended':True,'error':error,'guards':guards,'rows':rows}),flush=True)
|
||||
sys.exit(1 if error or guards or cleanup_errors else 0)
|
||||
-21
@@ -1,21 +0,0 @@
|
||||
Owner-approved registered P24-02 repair3/3, exact existing W HEAD666c87bd. Earlier GUI messages were truncated input and are superseded. Apply only these two exact patches to scenes/main/main.gd; preserve all gameplay values/conditions and save semantics. Do not launch Godot, retry LSP, edit project.godot/caches/player data/settings/other sources, remove files, change permissions/billing, commit or push. Only git diff --check and git diff -- scenes/main/main.gd for static checks; Root owns native and OS validation. After editing report exact diff and that native/acceptance remain pending.
|
||||
|
||||
--- a/scenes/main/main.gd
|
||||
+++ b/scenes/main/main.gd
|
||||
@@ -793 +793 @@
|
||||
- load_menu.text = "読込 ▾"
|
||||
+ load_menu.text = "保存・読込 ▾"
|
||||
@@ -799,0 +800 @@
|
||||
+ load_menu.get_popup().add_item("新しい名前で別スロット保存",3)
|
||||
@@ -803 +804,2 @@
|
||||
- elif id == 2: _show_manual_load_slots())
|
||||
+ elif id == 2: _show_manual_load_slots()
|
||||
+ elif id == 3: _ensure_manual_save_slots().show_new_save(manual_save_path))
|
||||
|
||||
--- a/scenes/main/main.gd
|
||||
+++ b/scenes/main/main.gd
|
||||
@@ -3199,2 +3199,2 @@
|
||||
- show_warning_cutin(OperationFeedbackScript.CUTIN_INVASION, "重要警告:愛の盾消失", "愛の盾が消失しました。人物関係を確認してください。")
|
||||
-
|
||||
+ show_warning_cutin(OperationFeedbackScript.CUTIN_INVASION, "重要警告:NTR侵食開始", "愛の盾が破られ、NTR侵食が始まりました。人物関係を確認してください。")
|
||||
+
|
||||
+88
@@ -0,0 +1,88 @@
|
||||
{
|
||||
"task_id": "P24-02",
|
||||
"formal_completed": false,
|
||||
"original_unit_count": 88,
|
||||
"completed_units": 10,
|
||||
"initial_job": "8dd1699eb0ee470898c7a97dfaa9dd44",
|
||||
"terminal_provider_status": "SUCCESS",
|
||||
"runner_failure": "Antigravity tool error",
|
||||
"actual_cause": "Five missing-file view_file calls were treated as fatal although provider continued creating files and returned SUCCESS/submitted. No permission denial.",
|
||||
"raw_provider_artifact": "/Users/korizatou114/Library/Application Support/agent-control/the-tree-p24-02-operations/runs/2be30fb95a1b4898bc7be87ad072f8ec/stdout.log",
|
||||
"raw_sha256": "f7e5ad9fbaaf547816b83745d62b28bad893ac8ad0de324458d2ac4c6d6802c5",
|
||||
"tool_errors": [
|
||||
{
|
||||
"type": "TOOL_ERROR",
|
||||
"message": "declaring permissions: cortex tool view_file: convert tool call for permissions: model output error: invalid tool call error (invalid_args) failed to read file: stat /Users/korizatou114/Projects/TheTree-managed-worktrees/p24-02-operations/P24-02-implement/scripts/ui/operation_feedback.gd: no such file or directory"
|
||||
},
|
||||
{
|
||||
"type": "TOOL_ERROR",
|
||||
"message": "declaring permissions: cortex tool view_file: convert tool call for permissions: model output error: invalid tool call error (invalid_args) failed to read file: stat /Users/korizatou114/Projects/TheTree-managed-worktrees/p24-02-operations/P24-02-implement/scripts/ui/operations_camera_controls.gd: no such file or directory"
|
||||
},
|
||||
{
|
||||
"type": "TOOL_ERROR",
|
||||
"message": "declaring permissions: cortex tool view_file: convert tool call for permissions: model output error: invalid tool call error (invalid_args) failed to read file: stat /Users/korizatou114/Projects/TheTree-managed-worktrees/p24-02-operations/P24-02-implement/tests/ui/test_operations_notification.gd: no such file or directory"
|
||||
},
|
||||
{
|
||||
"type": "TOOL_ERROR",
|
||||
"message": "declaring permissions: cortex tool view_file: convert tool call for permissions: model output error: invalid tool call error (invalid_args) failed to read file: stat /Users/korizatou114/Projects/TheTree-managed-worktrees/p24-02-operations/P24-02-implement/tools/check_p24_operations_evidence.py: no such file or directory"
|
||||
},
|
||||
{
|
||||
"type": "TOOL_ERROR",
|
||||
"message": "declaring permissions: cortex tool view_file: convert tool call for permissions: model output error: invalid tool call error (invalid_args) failed to read file: stat /Users/korizatou114/Projects/TheTree-managed-worktrees/p24-02-operations/P24-02-implement/docs/plans/original-completion-2026-10-02/execution/p24-02/plan.json: no such file or directory"
|
||||
}
|
||||
],
|
||||
"existing_changes_preserved": true,
|
||||
"duplicate_implementers": 0,
|
||||
"repair_job": "428e2abe4ad94a5288347341216c4262",
|
||||
"commander_job": "f6bb47cd5710446789cd32e510e646ee",
|
||||
"commander_decision": {
|
||||
"action": "run",
|
||||
"task_id": "P24-02",
|
||||
"reason": "状態はrepair_ready(repairs=1/最大2)で、repair操作は済んでいます。次は同一P24-02 Antigravity workerを、既存変更を保持したまま再開します。新規workerは起動せず、重複実装もしません。dispatch前に、Runnerが下記を isolated control の prompts/ui.txt へ追記してください。\n1) check_p24_operations_evidence.py: 8条件それぞれの厳密な証拠検証にします。bool=trueだけでSUCCESSにしません。OS証拠欠損はWARNINGでなくfailにします。sourceとartifactのhashを検証します。固定baseをcandidateとして扱いません。未知の条件・型・キーは拒否します。\n2) operation_feedback.gd: morale/loyalty等の独自しきい値を削除します。元の状態と既存の確定値だけを使います。\n3) 侵食開始・決闘・防衛開始は、実在するsignal名をソースで照合して本番経路に配線します。fixture注入だけでは証明になりません。\n4) test_operations_notification.gd: 未宣言のManualSaveSlotsDialogScriptと、存在不明なAPI/enumを修正します。advance_minutes(0)でpauseを試験するのをやめ、実際のpause/resumeで一度だけ再開されることを確認します。\n5) 実行順は import/静的検査、局所試験、影響試験です。全回帰の重複実行はしません。\n6) ブラウザE2Eは使いません。Godotネイティブの通常OS試験はrootが実施します。\n7) allowed_paths外の変更、試験の削除・弱体化、証拠の捏造は禁止です。\n初回の停止原因は、過去5件の未存在新規ファイルview_fileエラーをRunnerが一律停止とした扱いで、権限不足ではありません。このエラーは致命扱いにしないでください。Windows同一リリースの受入は未了の依存として明記します。"
|
||||
},
|
||||
"dispatch_job": "1c0838b03e834dadb3111e55f4f6e799",
|
||||
"repairs": 1,
|
||||
"max_repairs": 2,
|
||||
"context_control": "/private/tmp/the-tree-p24-02-control-r02",
|
||||
"permission_policy_changed": false,
|
||||
"at": "2026-10-13T01:49:27.467348+00:00",
|
||||
"additional_actual_failure": {
|
||||
"run": "142e2e2bbcaa46918e89e97039cf4cbb",
|
||||
"shell_command": "git status",
|
||||
"output": "sandbox-exec: sandbox_apply: Operation not permitted",
|
||||
"classification": "Antigravity inner sandbox nested within existing mandatory Runner outer Seatbelt; UI source editing continues"
|
||||
},
|
||||
"independent_support": {
|
||||
"project": "the-tree-runner-agy-execution",
|
||||
"task": "RP24-02",
|
||||
"spec": "/Users/korizatou114/Projects/TheTree-managed-worktrees/runner-p13-recovery-source/docs/spec/RP24-02.json",
|
||||
"base": "831364de7eb9abacfafb0266776c949cfce23cd8",
|
||||
"commander_job": "7cf29d626da44a94961d598284ca8e5a",
|
||||
"scope": [
|
||||
"runner/core.py",
|
||||
"tests/test_runner.py"
|
||||
],
|
||||
"not_original_unit": true,
|
||||
"permissions_increase": false,
|
||||
"actual_outer_boundary_retained": true,
|
||||
"reason": "Restore required shell execution and narrowly classify recovered read-only errors; do not block game changes or weaken acceptance.",
|
||||
"dispatch_job": "939c9defa0f4478eb983aa150e810e3c"
|
||||
},
|
||||
"root_local_verification_prepared": {
|
||||
"controller": "/private/tmp/the-tree-p24-02-local-native-r01.py",
|
||||
"sha256": "dfaa7eeb1d8053f3f466fa287f90797b1068318d3c5c6d12ea7c2aafe80d57b5",
|
||||
"execution": "Not executed. Requires clean exact submitted SHA.",
|
||||
"selected_suites": [
|
||||
"tests/ui/test_operations_notification.gd",
|
||||
"tests/ui/test_event_log_ui.gd",
|
||||
"tests/ui/test_original_build_pointer.gd",
|
||||
"tests/ui/test_staff_management.gd",
|
||||
"tests/ui/test_selection_lifecycle.gd",
|
||||
"tests/ui/test_selection_autosave.gd",
|
||||
"tests/ui/test_ui_presentation_audio_contract.gd"
|
||||
],
|
||||
"order": "import, parse all GDScripts, local and affected7; full roster later once fixes batched",
|
||||
"protection": "Existing native owned runner and private profile/source/default-player guards reused",
|
||||
"capacity_observed": "3.2GiB available; prior formal regression178MiB; no full regression launched"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"job_id": "8dd1699eb0ee470898c7a97dfaa9dd44",
|
||||
"state": "running",
|
||||
"task_state": "implementing",
|
||||
"worktree": "/Users/korizatou114/Projects/TheTree-managed-worktrees/p24-02-operations/P24-02-implement",
|
||||
"project": "the-tree-p24-02-operations",
|
||||
"task_id": "P24-02",
|
||||
"worker": "agy",
|
||||
"commander_job": "5591b6942d614c46aff60b5caa342c8b",
|
||||
"base_commit": "1a5abc65163097d4b36a060d68f58c92093eb4e9",
|
||||
"spec_ref": "docs/spec/acceptance/P24-02-code-r01.json",
|
||||
"required_condition_groups": 8,
|
||||
"at_jst": "2026-10-13T09:47:56.706347+09:00",
|
||||
"formal_completed": false,
|
||||
"original_unit_count": 88,
|
||||
"duplicate_implementers": 0
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
# P24-02 closure prerequisites
|
||||
|
||||
Candidate 666c87bd remains submitted and unaccepted. Root corrected an earlier misreading: original BASELINE line143 explicitly says shield durability zero/break starts NTR erosion. The existing shield_changed -> RELATIONSHIP_SHIELD_CHANGED(old_value/new_value) -> subscribed Main cut-in path can represent this boundary. The candidate wording “love shield lost” must be restored to original NTR-start meaning; proposed-original-ntr-warning.patch is not adopted. This correction does not invent a new gameplay value.
|
||||
|
||||
Ordinary automatic rival co-placement attack is not yet proven. Existing confirmed call site is the attack_relationship_shield command executor. P18-01/02 own original relationship model/save and contact/boundary contracts. Current generic five metrics remain different from original Affection/Lust/Netorare; retain legacy facts and do not infer a migration.
|
||||
|
||||
P19-01 owns all three duel types and original win/loss shield/actor/ledger effects. Candidate production scripts/autoload show no duel generator, executor or saved duel state; CUTIN_DUEL is only a presentation definition. Do not add fictional events and call it ordinary gameplay acceptance. P21-01 owns ordinary defense/threat generation; DEFENSE_RAID_CREATED service callback exists but ordinary-trigger proof is still required.
|
||||
|
||||
Opus commander selected default Codex6.1Sol for the small P24 display/menu repair and recommended verifying upstream acceptance, P01-01 scope/catalog gaps, then P18-01/02, P19-01/P21-01 before final P24 actual-warning acceptance. No additional worker, repair, source adoption, or cap change was launched by this audit. User authorization for extra P24 repair is still pending. All30/88 and no partial credit remain.
|
||||
+125
@@ -0,0 +1,125 @@
|
||||
{
|
||||
"formal_acceptance": false,
|
||||
"candidate": "666c87bd7d7c961ae6d7d2ad8d52d6456c31015b",
|
||||
"baseline_sha256": "75e4bdbdeb379c9269553f0c776bdb9cc96e01f2d6aa5ca650d132c63a8aeb1a",
|
||||
"source_original_conditions": [
|
||||
{
|
||||
"line": 140,
|
||||
"text": " * **好感度 (Affection):** 主人公への愛。「愛の盾」の最大耐久値。"
|
||||
},
|
||||
{
|
||||
"line": 141,
|
||||
"text": " * **淫乱度 (Lust):** 快楽への依存。盾の防御力(ダメージ軽減率)を下げる。"
|
||||
},
|
||||
{
|
||||
"line": 142,
|
||||
"text": " * **NTR度 (Netorare):** ライバル依存。盾破壊後に上昇する。"
|
||||
},
|
||||
{
|
||||
"line": 143,
|
||||
"text": " * **『愛の盾』:** NTR攻撃を無効化するバリア。耐久値0でブレイクし、NTR侵食が始まる。"
|
||||
},
|
||||
{
|
||||
"line": 145,
|
||||
"text": " 1. **盾への攻撃:** ライバルと同配置時、盾耐久値が減少。"
|
||||
},
|
||||
{
|
||||
"line": 146,
|
||||
"text": " 2. **ブレイク:** 耐久値0で「心の隙間」発生。"
|
||||
},
|
||||
{
|
||||
"line": 147,
|
||||
"text": " 3. **NTR進行:** ライバル接触で直接NTR度が上昇。"
|
||||
},
|
||||
{
|
||||
"line": 149,
|
||||
"text": "## 7.4 決闘システム (Duel System)"
|
||||
},
|
||||
{
|
||||
"line": 151,
|
||||
"text": " * **種類:** 武力決闘、商談決闘、夜の決闘(性技対決)。"
|
||||
},
|
||||
{
|
||||
"line": 152,
|
||||
"text": " * **リターン:** ライバル追放・隷属化、「愛の盾」全回復。"
|
||||
},
|
||||
{
|
||||
"line": 153,
|
||||
"text": " * **リスク:** 敗北時、ヒロインを即座に強奪されNTRルート確定。"
|
||||
},
|
||||
{
|
||||
"line": 226,
|
||||
"text": " * **カットイン:** 「NTR侵食開始」などの重要警告、決闘発生、防衛戦開始演出。"
|
||||
}
|
||||
],
|
||||
"correction": "Earlier Root instruction separated shield break from NTR onset without checking explicit original line143. That instruction was wrong. Positive-old to zero shield transition is original-defined NTR onset; candidate wording needs correction. No candidate source has been edited.",
|
||||
"existing_NTR_event_path": {
|
||||
"service": "scripts/relationship/relationship_service.gd apply_shield_attack old>0,new0 shield_changed",
|
||||
"runtime": "autoload/simulation_runtime.gd _on_relationship_shield_changed publishes RELATIONSHIP_SHIELD_CHANGED with old_value/new_value",
|
||||
"candidate_UI": "scenes/main/main.gd subscribes wildcard and handles the same transition, currently says love shield lost",
|
||||
"ordinary_same_placement_generation": "not proven; only command execution call site confirmed, no natural rival-placement attack accepted",
|
||||
"owners": [
|
||||
"P18-01",
|
||||
"P18-02",
|
||||
"P18-03"
|
||||
]
|
||||
},
|
||||
"duel_scan": {
|
||||
"command": [
|
||||
"git",
|
||||
"-C",
|
||||
"/Users/korizatou114/Projects/TheTree-managed-worktrees/p24-02-operations/P24-02-implement",
|
||||
"grep",
|
||||
"-n",
|
||||
"-i",
|
||||
"-E",
|
||||
"duel|決闘",
|
||||
"666c87bd7d7c961ae6d7d2ad8d52d6456c31015b",
|
||||
"--",
|
||||
"scripts",
|
||||
"autoload"
|
||||
],
|
||||
"exit_code": 0,
|
||||
"hits": [
|
||||
"666c87bd7d7c961ae6d7d2ad8d52d6456c31015b:scripts/ui/operation_feedback.gd:15:const CUTIN_DUEL := &\"duel\"",
|
||||
"666c87bd7d7c961ae6d7d2ad8d52d6456c31015b:scripts/ui/operation_feedback.gd:146:## Important warning cut-in dialog: invasion start, duel, defense start"
|
||||
],
|
||||
"interpretation": "Candidate scripts hits are UI CUTIN_DUEL definition. No production simulation duel generator/executor/save state shown. Absence is not complete-game acceptance.",
|
||||
"owner": "P19-01"
|
||||
},
|
||||
"defense_owner": "P21-01",
|
||||
"all_conditions_accepted": false,
|
||||
"proposal_adopted": false,
|
||||
"source_pins": {
|
||||
"scenes/main/main.gd": {
|
||||
"sha256": "c375ddabc59771f8ddeaa6464c59c98e58a11cd936aa82dde74645594a9fe4e0",
|
||||
"bytes": 141626
|
||||
},
|
||||
"scripts/relationship/relationship_service.gd": {
|
||||
"sha256": "76d49e4fdb50e9a185f7ba5065d257682a11aece1c76272208ba8555ffd534c2",
|
||||
"bytes": 18981
|
||||
},
|
||||
"autoload/simulation_runtime.gd": {
|
||||
"sha256": "d52a995ae715542bbc550f68d35889540658275d12e04ae0b21ac276f5843f39",
|
||||
"bytes": 609584
|
||||
}
|
||||
},
|
||||
"relationship_model_gap": {
|
||||
"source_original_axes": [
|
||||
"Affection",
|
||||
"Lust",
|
||||
"Netorare"
|
||||
],
|
||||
"current_metric_ids": [
|
||||
"trust",
|
||||
"respect",
|
||||
"affection",
|
||||
"fear",
|
||||
"dependence"
|
||||
],
|
||||
"current_shield_max": "independently configured rather than bound to original protagonist Affection",
|
||||
"prior_source_audit": "docs/traceability/original/historical_requirements_2026-09-22.json B-7.2 already records same mismatch",
|
||||
"current_verification": "Current RelationshipState METRIC_IDS and configure remain mismatched; no approved replacement found in searched source authority files.",
|
||||
"disposition": "P18-01 original model/save contract first. Retain legacy values without fabricated one-to-one migration; initial/limit/coefficients require original or approved authority."
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"action": "wait",
|
||||
"task_id": "P24-02",
|
||||
"reason": "P24-02 (submitted 666c87bd, repairs 2/2 used) cannot formally close yet. Under the all-8-conditions rule two conditions are blocked. (1) japanese_input_and_scale: there is no normal new-save-label UI entry; it only opens via diagnostic F8, and the owner has not yet answered on the menu diff proposal or the one-extra-repair request. (2) important_warning_cutin: per the prior worker's record, NTR invasion start and duel generation have no upstream in current production, and the spec forbids claiming complete while upstream is missing. Reordering is justified because P24-02 cannot close until upstream exists. I could not read the original, the plans or the source in this session, so I am not naming which upstream plan ID owns these events. Read-only evidence needed: (a) the BASELINE chapters defining invasion start and duel; (b) the plan ID that owns these events and its state, from the docs/plans/original-completion-2026-10-02 plan table; (c) a grep of 666c87bd for production emit/ledger sites for invasion/duel signals (absence counts as evidence); (d) ordinary-trigger runtime observation of DEFENSE_RAID_CREATED, with fixture injection excluded. Next close candidate = the owning upstream plan, only if it is independently closable and needs no new values. No worker or repair launched; caps, acceptance denominator and budget unchanged.",
|
||||
"codex_model": "gpt-6.1-sol",
|
||||
"codex_model_reason": "No run is being made, so keep the default. Astra is a candidate only for the upcoming upstream invasion/duel implementation, which spans simulation state, events and UI, where misreading the original would force acceptance rework. Decide after evidence (b)/(c) sizes the work."
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"action": "wait",
|
||||
"task_id": "P24-02",
|
||||
"reason": "P24-02はsubmitted(666c87b)・repairs=2で上限に達しており、追加repair1へのオーナー回答を待っている。BASELINE line143(耐久値0でブレイクしNTR侵食開始)により「盾消失≠NTR開始」というRootの指示は誤りと確定した。表示をNTR侵食開始に戻す1行差分はmain.gdの範囲内の原文準拠修正だが、未採用で、適用にはオーナー判断が要る。shield 0遷移からカットインまでの経路は証明済み。ただし通常の同配置(line145)からの自動attackは未証明で、確認できたcallsiteは_execute_attack_relationship_shieldだけ。決闘はCUTIN_DUELのUI定義しかなく、generator/executor/save stateがない。important_warning_cutin条件は上流に依存する:侵食開始はP18-01/02、決闘はP19-01(P18/P05依存)、防衛はP21-01(P05/P13/P14/P17依存)で、いずれもplanned。P03/P17/P05/P13/P14の受入状況は未確認のまま推測しない。P01-01(catalog・追加施設の適用範囲)はin_progress。部分点なしの規定により、P24-02はこれらを明示依存として残し、完了と主張しない。先行作業の順序は「上流の受入状況確認→P01-01→P18-01/02→P19-01・P21-01→P24-02のカットイン実信号での最終検証」。新しいworkerもrepairも起動しない。",
|
||||
"codex_model": "gpt-6.1-sol",
|
||||
"codex_model_reason": "今回はwaitで起動しないため、既定のgpt-6.1-solを選ぶ。オーナー承認後に想定される作業はmain.gdの1行の表示修正と既存の証拠経路での再検証で、難しくなく、品質・時間・使用量の面で上位モデルは要らない。P18/P19の関係モデルや決闘シミュレーションの設計はgpt-6-astraが向く可能性があるが、別タスクとして起票するときに改めて判断する。"
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
--- a/scenes/main/main.gd
|
||||
+++ b/scenes/main/main.gd
|
||||
@@ -3199,2 +3199,2 @@
|
||||
- show_warning_cutin(OperationFeedbackScript.CUTIN_INVASION, "重要警告:愛の盾消失", "愛の盾が消失しました。人物関係を確認してください。")
|
||||
-
|
||||
+ show_warning_cutin(OperationFeedbackScript.CUTIN_INVASION, "重要警告:NTR侵食開始", "愛の盾が破られ、NTR侵食が始まりました。人物関係を確認してください。")
|
||||
+
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"action": "wait",
|
||||
"task_id": "RP24-02",
|
||||
"reason": "この呼び出しはモデル選択だけです。dispatch、修正回数の追加、状態変更は行わないため、actionはwaitにします。RP24-02は現在repair_pendingです。修正回数はrepairs=2で、上限のmax_repair_attempts=2にすでに達しています。次の実装を行うかどうか、修正上限を扱うかどうかは、オーナーが判断する必要があります。今回のモデル選択は、追加の実行や修正、受入条件の緩和を認めるものではありません。",
|
||||
"codex_model": "gpt-6.1-sol",
|
||||
"codex_model_reason": "既定のgpt-6.1-solを選びます。残っている作業の範囲は狭く、変更先はallowed_pathsのrunner/core.pyとtests/test_runner.pyの2ファイルだけです。具体的な作業は3つです。(1) 許可するstep_typeに、実ストリームの先頭にあるuser_input/DONEを加えます。(2) 既存の拒否経路の中で、permission-denialを検出します。(3) 正例と負例の試験を追加します。原因はすでに特定されています。読み取り専用の修正案は、実際のstdout(2be30fb9…, sha256 f7e5ad9f…)の再生で成功しています。sandbox除去、self-test pin、runner-unitの57件は、レビューですでに合格しています。前回の差し戻しは、試験データが実ストリームと一致していなかったために起きました。推論の難しさが原因ではありません。この点は、モデルを上げるよりも、作業指示で対処する方が確実です。実ストリームに沿ったuser_inputを含むfixtureと、未知step・permission拒否・ワークスペース外・不正形式の負例を、必須として指示します。gpt-6-astraは時間と使用量が増えますが、この規模の作業では品質がはっきり上がる見込みは小さいと判断しました。ただし、修正上限に達していて失敗の余地がないことを、オーナーがより重く見る場合は、astraに切り替えることも妥当です。"
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"id": "e61cce59721949aab3817d44e5eeeaa1",
|
||||
"status": "failed",
|
||||
"artifact": "/Users/korizatou114/Library/Application Support/agent-control/the-tree-runner-agy-execution/runs/e61cce59721949aab3817d44e5eeeaa1",
|
||||
"pid": null,
|
||||
"exit_code": null,
|
||||
"formal_acceptance": false,
|
||||
"process_started": false,
|
||||
"reason": "Installed AGY CLI1.3.3; submitted adapter pins1.3.2. Compatibility probe rejected before provider subprocess launch. No repeated probe, no pin bypass or production adoption."
|
||||
}
|
||||
+27
File diff suppressed because one or more lines are too long
+83
File diff suppressed because one or more lines are too long
+31
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"task_id": "RP24-02",
|
||||
"commit": "3fa7c0b1f982ecf2d55a772c909dd4aa0a0409ba",
|
||||
"status": "changes_requested",
|
||||
"summary": "I checked acceptance item RP24-02 against the spec, the diff, the full sources, the Runner validation result, and the coordinator's replay of a real run. Status: changes requested.\n\nWhat passed:\n- The scope stays within runner/core.py and tests/test_runner.py.\n- No tests were deleted or disabled. The formal suite ran 56 tests and all passed (51 baseline plus 5 new).\n- The trusted self-test pin for RP24-02 checks the frozen base commit and the spec hash, and pairing a task with the wrong project is rejected.\n- The inner `--sandbox` flag was removed from the Antigravity command line, and no `--dangerously-skip-permissions` was added.\n- The recovered-error audit is written to `recovered-read-errors.json` in the run artifact, alongside the stdout hash. The original stdout is not modified.\n\nWhy it is not a pass:\n1. The fix fails on the real data it was meant to handle. The coordinator replayed the actual run 2be30fb95a1b4898bc7be87ad072f8ec through `agy_result` and it failed with \"GateError: Antigravity unknown event\". Real Antigravity output begins with an `init` event, and `agy_result` rejects every event before the final result unless it is a `step_update`. The spec's central case (recovered missing-file read errors followed by a valid result) is therefore still rejected in production.\n2. The test fixtures are synthetic and do not match the real output shape. They have no `init` event and no ACTIVE, `agent_response`/`text_delta`, `checkpoint` or `finish` steps, which is why the suite is green while the real replay fails.\n3. Removing the inner sandbox is only checked by looking at the command line. The spec requires a real shell run under the actual Antigravity outer sandbox profile that succeeds within the allowed write scope, while writes outside it and credential reads stay denied. That test is missing.\n\nNot done yet, as the spec expects at this stage: the isolated bootstrap, the full host suite before production adoption, and integration/final validation (`production_adopted` is false).",
|
||||
"acceptance_ids": [
|
||||
"RP24-02"
|
||||
],
|
||||
"findings": [
|
||||
{
|
||||
"severity": "high",
|
||||
"message": "The real replay fails. Running the actual immutable stdout from run 2be30fb95a1b4898bc7be87ad072f8ec (input sha256 f7e5ad9f...) through agy_result raises 'GateError: Antigravity unknown event'. Real Antigravity streams start with an {\"event\":\"init\",...} line, and agy_result requires every event before the final result to be step_update. The spec's main case, five view_file ENOENT errors inside the workspace followed by SUCCESS/submitted, is still rejected. The fix should explicitly accept a single leading init event, after strictly checking its shape and that its cwd equals the task workspace, while still rejecting any other unknown event types."
|
||||
},
|
||||
{
|
||||
"severity": "high",
|
||||
"message": "There is no real outer-sandbox shell test for the Antigravity profile. The only check on removing --sandbox is test_agy_single_outer_boundary_argv, which inspects argv. The spec requires real tests under seatbelt(..., service='agy'): a bounded shell command such as git status in the worktree succeeds; writes inside the allowed paths succeed; writes to README.md, git metadata, CONTROL or provider-auth are denied; and Keychain/credential reads are denied. None of these exist. The observed failure ('sandbox_apply: Operation not permitted') has not been shown to be fixed under the outer profile."
|
||||
},
|
||||
{
|
||||
"severity": "medium",
|
||||
"message": "The recovered-read fixtures do not match the real stream format. test_agy_observed_recovered_read_and_rejects and test_agy_recovered_result_schema_and_identity leave out the init event, the ACTIVE→ERROR step pairs, agent_response steps with text_delta and usage, and the checkpoint and finish steps. Add a positive fixture shaped like the real stream (a trimmed copy of the real log structure is enough), plus negative cases: init not first, a duplicate init, an init cwd outside the workspace, an unknown step_type with an error, and a provider failure after a recovered error."
|
||||
},
|
||||
{
|
||||
"severity": "low",
|
||||
"message": "test_trusted_authorization_matrix only covers RP24-01. There is no positive or negative matrix case for the new RP24-02 pin, for example the RP24-02 project with the wrong base or spec hash, the wrong spec_ref, or the RP24-01 task id under the RP24-02 project. The code rejects these cases, but no test proves it."
|
||||
},
|
||||
{
|
||||
"severity": "low",
|
||||
"message": "The stderr permission-denied pattern now also matches 'operation not permitted' and 'access.*denied'. That is a reasonable fail-closed choice, but 'access.*denied' is broad and could reject benign provider log lines. No test covers the new patterns."
|
||||
}
|
||||
]
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"task_id": "RP24-02",
|
||||
"commit": "09262f37c14397118d51b6b43c35ddbee14fcfa2",
|
||||
"status": "changes_requested",
|
||||
"summary": "受入項目RP24-02を、仕様・差分・ソース・Runner試験結果と照合しました。結論は差し戻しです。\n二重sandboxの除去は満たしています。外側Seatbeltは維持されており、`--sandbox`だけを外し、`--dangerously-skip-permissions`も追加していません。self-test pinの拡張も満たしています。対象はproject/task/base/spec SHAの完全一致に限られ、RP24-01の互換性と既存の拒否経路も残っています。Runner試験runner-unitは成功(57件)しています。\n一方、中核要件である「実際に観測された回復済みview_file ENOENTを、正当な結果として分類する」が実データで成立していません。coordinatorが実際のstdout(2be30fb9…, sha256 f7e5ad9f…)を再生したところ、提出コードは step_index 0 の `user_input`/DONE を `Antigravity unknown step` として拒否しました。このstdoutは、本タスクの起点になった実際の失敗ログです。\n新規試験は、この`user_input`ステップを含まない合成fixtureで書かれていたため、この欠陥を検出できませんでした。読み取り専用の修正案(許可するstep_typeに`user_input`を追加し、正例と負例の試験を追加)は再生に成功しています。ただし採用も正式検証もされていません。\nこのため、現在の提出コミットでは受入を満たしたと判断できません。",
|
||||
"acceptance_ids": [
|
||||
"RP24-02"
|
||||
],
|
||||
"findings": [
|
||||
{
|
||||
"severity": "high",
|
||||
"message": "中核要件が実データで未達です。agy_result(runner/core.py)が許可するstep_typeは (tool, agent_response, checkpoint, finish) だけです。実際のAntigravity出力の先頭 step_index 0 `user_input` DONE が拒否され、観測された5件のview_file ENOENTを含む元ログ(2be30fb9…)の再生が `Antigravity unknown step` で失敗します。次の2点を対応してください: (1) 通常の`user_input`(stateはDONEのみ、error・tool_infoなし)を許可する。(2) 実ログと同じ構造(各stepのconversation_id、step0のuser_input、ACTIVE→ERRORの対、結果レコードのresponse/structured_output)の正例fixtureをtests/test_runner.pyに追加する。"
|
||||
},
|
||||
{
|
||||
"severity": "medium",
|
||||
"message": "検証が不足しています。新規の正例fixture(test_agy_observed_recovered_read_and_rejects)は、実ログの構造を再現しない合成データでした。そのため、提出時点の57件成功は実際の転送形式で受入できることを示しません。observedの実ストリームと同じ形の正例と、user_inputがERRORの場合・tool_infoやerrorを持つ場合などの負例を追加してください。"
|
||||
},
|
||||
{
|
||||
"severity": "medium",
|
||||
"message": "権限拒否の検出がstderrに限られています。実ログでは、`run_command` が state=DONE のまま tool_info.output に `sandbox-exec: sandbox_apply: Operation not permitted` を返していました。現在のagy_resultは、DONEのtool出力に含まれる拒否文言を検査しません。sandbox除去後は再発しにくいものの、仕様の「permission/authorization系エラーは拒否を維持し、曖昧な結果を隠さない」に照らすと抜けがあります。tool出力中のsandbox_apply/Operation not permitted を拒否するか監査に記録し、その試験を追加することを推奨します。"
|
||||
},
|
||||
{
|
||||
"severity": "low",
|
||||
"message": "trusted_self_test では、SELF_TEST_PINS を参照した直後に RP24-01 の pin を再代入する分岐が重複しています。既存試験が SELF_TEST_BASE / SELF_TEST_SPEC_SHA を patch するための措置と読めますが、意図をコメントで明記するか、pinを毎回動的に組み立てる形に統一してください。"
|
||||
},
|
||||
{
|
||||
"severity": "low",
|
||||
"message": "実シェルの試験(test_agy_actual_outer_shell_and_boundaries)は、service=agy の外側profileで git status の成功、許可範囲への書き込み、範囲外の拒否を確認しており妥当です。ただし、実際のagy CLIからrun_commandを経由したシェル実行は含まれません。正式採用前に、root trusted host での実運用確認の結果を証跡として残してください。"
|
||||
}
|
||||
]
|
||||
}
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
{
|
||||
"formal_acceptance": false,
|
||||
"actual_healthy_stream_proven": false,
|
||||
"proposal_adopted": false,
|
||||
"synthetic_control": true,
|
||||
"derived_from_original_sha256": "f7e5ad9fbaaf547816b83745d62b28bad893ac8ad0de324458d2ac4c6d6802c5",
|
||||
"proposal_sha256": "0fa718fbe28e7e0c341b1718cde76838d43a9dadb00bc5f41f29a41074aad824",
|
||||
"explicit_fixture_modifications": [
|
||||
{
|
||||
"record_index": 4,
|
||||
"field": "step_update.tool_info.output",
|
||||
"from": "sandbox-exec: sandbox_apply: Operation not permitted\r\n",
|
||||
"to": "",
|
||||
"reason": "Synthetic control only. Never classify this modified stream as actual healthy provider evidence."
|
||||
}
|
||||
],
|
||||
"positive_control_recovered_reads": 5,
|
||||
"negative_cases": [
|
||||
{
|
||||
"case": "user_input_ERROR",
|
||||
"rejected": true,
|
||||
"reason": "Antigravity malformed user input"
|
||||
},
|
||||
{
|
||||
"case": "user_input_tool_info",
|
||||
"rejected": true,
|
||||
"reason": "Antigravity malformed user input"
|
||||
},
|
||||
{
|
||||
"case": "user_input_error",
|
||||
"rejected": true,
|
||||
"reason": "Antigravity malformed user input"
|
||||
},
|
||||
{
|
||||
"case": "user_input_bool_index",
|
||||
"rejected": true,
|
||||
"reason": "Antigravity malformed user input"
|
||||
},
|
||||
{
|
||||
"case": "unknown_step",
|
||||
"rejected": true,
|
||||
"reason": "Antigravity unknown step"
|
||||
},
|
||||
{
|
||||
"case": "duplicate_init",
|
||||
"rejected": true,
|
||||
"reason": "Antigravity malformed init"
|
||||
},
|
||||
{
|
||||
"case": "outside_init_cwd",
|
||||
"rejected": true,
|
||||
"reason": "Antigravity malformed init"
|
||||
},
|
||||
{
|
||||
"case": "failed_terminal",
|
||||
"rejected": true,
|
||||
"reason": "Antigravity terminal result不足"
|
||||
},
|
||||
{
|
||||
"case": "restore_actual_shell_denial",
|
||||
"rejected": true,
|
||||
"reason": "Antigravity shell permission denied"
|
||||
}
|
||||
],
|
||||
"remaining_required": "Fresh healthy actual CLI1.3.3 stream, full submitted-suite validation, independent Opus review and ordinary integration before adoption."
|
||||
}
|
||||
+1209
File diff suppressed because it is too large
Load Diff
+31
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"scope": "Read-only proposal negative checks, not Runner formal validation",
|
||||
"cases": [
|
||||
{
|
||||
"case": "user_input_error",
|
||||
"rejected": true,
|
||||
"error": "Antigravity failed step"
|
||||
},
|
||||
{
|
||||
"case": "unknown_step",
|
||||
"rejected": true,
|
||||
"error": "Antigravity unknown step"
|
||||
},
|
||||
{
|
||||
"case": "duplicate_init",
|
||||
"rejected": true,
|
||||
"error": "Antigravity malformed init"
|
||||
},
|
||||
{
|
||||
"case": "outside_init_cwd",
|
||||
"rejected": true,
|
||||
"error": "Antigravity malformed init"
|
||||
},
|
||||
{
|
||||
"case": "terminal_failure",
|
||||
"rejected": true,
|
||||
"error": "Antigravity terminal result不足"
|
||||
}
|
||||
],
|
||||
"passed": true
|
||||
}
|
||||
+1219
File diff suppressed because it is too large
Load Diff
+24
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"formal_acceptance": false,
|
||||
"proposal_adopted": false,
|
||||
"worker_or_production_source_changed": false,
|
||||
"proposal_source_sha256": "0fa718fbe28e7e0c341b1718cde76838d43a9dadb00bc5f41f29a41074aad824",
|
||||
"actual_original_stream": {
|
||||
"path": "/Users/korizatou114/Library/Application Support/agent-control/the-tree-p24-02-operations/runs/2be30fb95a1b4898bc7be87ad072f8ec/stdout.log",
|
||||
"sha256": "f7e5ad9fbaaf547816b83745d62b28bad893ac8ad0de324458d2ac4c6d6802c5",
|
||||
"rejected": true,
|
||||
"reason": "Antigravity shell permission denied",
|
||||
"shell_denials": [
|
||||
{
|
||||
"record_index": 4,
|
||||
"step_index": 2,
|
||||
"state": "DONE",
|
||||
"output": "sandbox-exec: sandbox_apply: Operation not permitted\r\n",
|
||||
"command_parameters": {
|
||||
"CommandLine": "git status"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"correction": "Original full stdout is not a positive fixture: it contains actual shell permission denial. Earlier user_input-only replay acceptance is insufficient. Do not remove denial events and describe the result as an actual positive stream. A fresh healthy actual stream and full negative replay are required."
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
--- a/runner/core.py
|
||||
+++ b/runner/core.py
|
||||
@@ -107,12 +107,22 @@
|
||||
require(not event.get("error"), "Antigravity provider error")
|
||||
step = event.get("step_update")
|
||||
require(isinstance(step, dict), "Antigravity malformed step")
|
||||
- require(step.get("step_type") in ("tool", "agent_response", "checkpoint", "finish")
|
||||
+ require(step.get("step_type") in ("user_input", "tool", "agent_response", "checkpoint", "finish")
|
||||
and step.get("state") in ("ACTIVE", "DONE", "ERROR"), "Antigravity unknown step")
|
||||
require(not step.get("error"), "Antigravity provider error")
|
||||
+ if step.get("step_type") == "user_input":
|
||||
+ require(step.get("state") == "DONE" and "tool_info" not in step
|
||||
+ and "error" not in step and type(step.get("step_index")) is int
|
||||
+ and step["step_index"] == 0, "Antigravity malformed user input")
|
||||
+ continue
|
||||
info = step.get("tool_info", {})
|
||||
require(isinstance(info, dict), "Antigravity malformed tool")
|
||||
error = info.get("error")
|
||||
+ if info.get("name") == "run_command" and "output" in info:
|
||||
+ output = info["output"]
|
||||
+ require(isinstance(output, str), "Antigravity malformed shell output")
|
||||
+ require(not re.search(r"(?im)^\s*(?:sandbox-exec: sandbox_apply: Operation not permitted|(?:error: )?(?:permission denied|operation not permitted|access denied))\s*$", output),
|
||||
+ "Antigravity shell permission denied")
|
||||
if error is None:
|
||||
require(step.get("state") not in ("ERROR", "FAILED", "CANCELLED"), "Antigravity failed step")
|
||||
continue
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"scope": "Read-only concrete proposal and actual transport replay, not formal acceptance. Production and worker sources untouched.",
|
||||
"submitted_source": "09262f37c14397118d51b6b43c35ddbee14fcfa2",
|
||||
"actual_original_error": "Antigravity unknown step: actual user_input DONE at step0",
|
||||
"proposed_change": "Allow observed ordinary user_input step type; existing ERROR/failure/path/tool/result schema guards remain. Add positive real envelope fixture and negative error cases in worker.",
|
||||
"source_before_sha256": "b17b51cd48cf45b56d45238043376e010f89472e3a1697f49022dec0d1b8fc31",
|
||||
"proposal_sha256": "482f8ffd26e9456c6fe37891181db55b0941a022823e4fe2a30d1c1b3e626c46",
|
||||
"input_sha256": "f7e5ad9fbaaf547816b83745d62b28bad893ac8ad0de324458d2ac4c6d6802c5",
|
||||
"proposal_replay_passed": true,
|
||||
"recovered_exact_errors": 5,
|
||||
"result_schema_passed": true,
|
||||
"runner_formal_acceptance": false,
|
||||
"adopted": false
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
--- a/runner/core.py
|
||||
+++ b/runner/core.py
|
||||
@@ -107,7 +107,7 @@
|
||||
require(not event.get("error"), "Antigravity provider error")
|
||||
step = event.get("step_update")
|
||||
require(isinstance(step, dict), "Antigravity malformed step")
|
||||
- require(step.get("step_type") in ("tool", "agent_response", "checkpoint", "finish")
|
||||
+ require(step.get("step_type") in ("user_input", "tool", "agent_response", "checkpoint", "finish")
|
||||
and step.get("state") in ("ACTIVE", "DONE", "ERROR"), "Antigravity unknown step")
|
||||
require(not step.get("error"), "Antigravity provider error")
|
||||
info = step.get("tool_info", {})
|
||||
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"source": "Direct human instruction: claudeの、モデルはopus 5.5にして",
|
||||
"claude": "claude-opus-5-5",
|
||||
"roles": [
|
||||
"commander",
|
||||
"reviewer"
|
||||
],
|
||||
"scope": "All future Claude development invocations. New project default policy set. Existing immutable registered projects use explicit model-only CLI override; no state DB/config digest/acceptance/permissions/caps altered.",
|
||||
"confirmation": {
|
||||
"artifact": "/Users/korizatou114/Library/Application Support/agent-control/the-tree-runner-agy-execution/runs/05fe74e0467a48bbb80bba7591d473fd",
|
||||
"argv_model": "claude-opus-5-5",
|
||||
"modelUsage": [
|
||||
"claude-opus-5-5"
|
||||
],
|
||||
"role": "reviewer",
|
||||
"original_game_acceptance": false
|
||||
},
|
||||
"codex": {
|
||||
"default": "gpt-6.1-sol",
|
||||
"alternative": "gpt-6-astra",
|
||||
"decision_owner": "Claude Opus 5.5 commander",
|
||||
"selection": "Task-specific recorded commander decision with codex_model and codex_model_reason. Astra selected only when Claude judges necessary. No additional worker is started by model selection.",
|
||||
"current_task_selection": {
|
||||
"task": "RP24-02",
|
||||
"model": "gpt-6.1-sol",
|
||||
"reason": "既定のgpt-6.1-solを選びます。残っている作業の範囲は狭く、変更先はallowed_pathsのrunner/core.pyとtests/test_runner.pyの2ファイルだけです。具体的な作業は3つです。(1) 許可するstep_typeに、実ストリームの先頭にあるuser_input/DONEを加えます。(2) 既存の拒否経路の中で、permission-denialを検出します。(3) 正例と負例の試験を追加します。原因はすでに特定されています。読み取り専用の修正案は、実際のstdout(2be30fb9…, sha256 f7e5ad9f…)の再生で成功しています。sandbox除去、self-test pin、runner-unitの57件は、レビューですでに合格しています。前回の差し戻しは、試験データが実ストリームと一致していなかったために起きました。推論の難しさが原因ではありません。この点は、モデルを上げるよりも、作業指示で対処する方が確実です。実ストリームに沿ったuser_inputを含むfixtureと、未知step・permission拒否・ワークスペース外・不正形式の負例を、必須として指示します。gpt-6-astraは時間と使用量が増えますが、この規模の作業では品質がはっきり上がる見込みは小さいと判断しました。ただし、修正上限に達していて失敗の余地がないことを、オーナーがより重く見る場合は、astraに切り替えることも妥当です。",
|
||||
"action": "wait",
|
||||
"evidence": "/Users/korizatou114/Projects/とりにく工房ゲーム制作部/docs/plans/original-completion-2026-10-02/execution/rp24-02-codex-model-decision-r01.json",
|
||||
"actual_codex_inference_confirmed": false
|
||||
}
|
||||
},
|
||||
"agy": "unchanged",
|
||||
"existing_project_override_controller": {
|
||||
"path": "/private/tmp/the-tree-owner-model-cli.py",
|
||||
"sha256": "bca36b7129b80404ca2b719749e3795097f5c3b725fd9d1deba94bfd61bf3709",
|
||||
"persistent_path": "/Users/korizatou114/Projects/とりにく工房ゲーム制作部/docs/plans/original-completion-2026-10-02/execution/owner_model_cli.py"
|
||||
},
|
||||
"codex_source": "Direct human instruction: codexは6.1 solを使用して。必要であればastra。判断はclaude opus 5.5が行なう"
|
||||
}
|
||||
@@ -254,6 +254,6 @@
|
||||
"validate_facility_value_contracts.py": "91640e2a76cd6cc9186f7b85c0bf379b24b6cac0d48962815235ee628e7ae43e",
|
||||
"validate_plan.py": "23678227d9b3c556f1bd903f4b5b3147c4a82ce5085e10055481026803451b80",
|
||||
"validator_update_checks.json": "f997d0f3de2cea29550840b1d5cb23647d64f81329de46758551e2b6c8fecc27",
|
||||
"work_packages.json": "6f3b7abd82affcb94fd32f53b08ea1a5544d4d9f540c761d9a734bb571aeea88"
|
||||
"work_packages.json": "1682bd3fe49a16f520cede855ca07814212541b2090971327954d6569245517c"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8494,7 +8494,7 @@
|
||||
"D07",
|
||||
"D08"
|
||||
],
|
||||
"state": "planned",
|
||||
"state": "in_progress",
|
||||
"supplement_ids": [],
|
||||
"owner_roles": {
|
||||
"implementation": "実装担当(担当者未割当)",
|
||||
@@ -8503,15 +8503,37 @@
|
||||
},
|
||||
"legacy_state": "planned",
|
||||
"state_scope": "package-level; completed means whole package accepted; partial implementation is not completion",
|
||||
"current_summary": "原本の関係3値と盾の全面接続は未着手。",
|
||||
"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",
|
||||
"title": "関係モデルと保存",
|
||||
"work": "原本の3値と盾を専用モデルへ接続し、旧関係値を保全する。",
|
||||
"acceptance": "表示と状態が一致し、意味不明な値の一対一変換を行わない。",
|
||||
"state": "planned",
|
||||
"evidence": []
|
||||
"state": "in_progress",
|
||||
"evidence": [
|
||||
{
|
||||
"path": "docs/plans/original-completion-2026-10-02/execution/p24-02/upstream-audit-r01/audit.json",
|
||||
"sha256_at_integration": "8dad65be88797faa1b2683f66924218591087f5419d589d21861e18dbc6eceef",
|
||||
"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-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.",
|
||||
"Distinguish source/approved initial values, coefficients and thresholds from unset required values; do not expose unset as confirmed zero/default.",
|
||||
"Verify necessary P03/P17 slice acceptance, required tests, independent Opus review and integration/final evidence."
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "P18-02",
|
||||
@@ -8548,7 +8570,8 @@
|
||||
"既存代表負荷の性能回帰を計測"
|
||||
],
|
||||
"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"
|
||||
"initial_revision_state": "planned",
|
||||
"updated_at_jst": "2026-10-13T14:01:57.377446+09:00"
|
||||
},
|
||||
{
|
||||
"id": "P19",
|
||||
@@ -15644,7 +15667,7 @@
|
||||
},
|
||||
"legacy_state": "in_progress",
|
||||
"state_scope": "package-level; completed means whole package accepted; partial implementation is not completion",
|
||||
"current_summary": "P24-03全7条件を正式完了。P24-01全インスペクターは予定、P24-02操作と通知は着手中。パッケージ全体の完成には数えない。",
|
||||
"current_summary": "P24-03正式完了済み。P24-02固定666c87bd local7/477 PASS、実macOS IMEと保存名/別PID通常読込を限定証拠として取得。通常新規入力欄入口に不足を発見、3行差分案と追加repair1の確認を準備。全8条件/実上流/最終full/独立review/統合/Windowsは未了。",
|
||||
"remaining_deliverables": [
|
||||
{
|
||||
"id": "P24-01",
|
||||
@@ -15664,13 +15687,73 @@
|
||||
{
|
||||
"path": "artifacts/original-completion-2026-10-02/p20-log-limited-native-actual-root-review-r03/review.json",
|
||||
"sha256": "8eec3a8492aa74f571eb21447c6911cea64d176e0f813152f226b2b4122ba387"
|
||||
},
|
||||
{
|
||||
"path": "docs/plans/original-completion-2026-10-02/execution/p24-02/runner-start-r01.json",
|
||||
"sha256_at_integration": "06494300f7004df0c4586d560f6465d37a2b9d7376561152ebb6684f35abc702",
|
||||
"scope": "Actual single Ag y UI implementer dispatch on frozen full8 condition contract; original acceptance pending"
|
||||
},
|
||||
{
|
||||
"path": "docs/plans/original-completion-2026-10-02/execution/p24-02/runner-continuation-r02.json",
|
||||
"sha256": "f89764065abd32c828a25a0de316ad50168d891d6ed68020ddfe9803386b3774",
|
||||
"scope": "Same-worker repair1 continuation, actual commander decision and preserved initial tool errors; no acceptance"
|
||||
},
|
||||
{
|
||||
"path": "artifacts/original-completion-2026-10-02/p24-02-checker-negative-r01/result.json",
|
||||
"sha256": "9d6bb35fb9496ebf065a7d8f30711abf5051b1e30d274f1457af6582623de712",
|
||||
"scope": "Initial checker fails required negative case: missing OS/source/artifact evidence falsely returns0; diagnostic only"
|
||||
},
|
||||
{
|
||||
"path": "docs/plans/original-completion-2026-10-02/execution/p24-02/current-audit-r03/audit.json",
|
||||
"sha256_at_integration": "476cb02d5f1a1cf3c2dc44b7281d3eec0c9dad066a165403087fcb4d3eeab756",
|
||||
"scope": "Actual dirty candidate scoped8-condition audit/native import failed/checker5 false positives; not acceptance",
|
||||
"linked_at_jst": "2026-10-13T11:50:29.145011+09:00",
|
||||
"current_game_acceptance_inferred": false
|
||||
},
|
||||
{
|
||||
"path": "docs/plans/original-completion-2026-10-02/execution/p24-02/gui-repair-r03/native-preflight-r03.json",
|
||||
"sha256_at_integration": "b0003c44de00c421821f1a6a4be77a0881924f985ec3f057b515c34da9ffbc16",
|
||||
"scope": "Same GUI repair2 preflight: actual import pass/parse failure/no locals; no acceptance",
|
||||
"linked_at_jst": "2026-10-13T12:29:03.675567+09:00",
|
||||
"current_game_acceptance_inferred": false
|
||||
},
|
||||
{
|
||||
"path": "docs/plans/original-completion-2026-10-02/execution/p24-02/gui-repair-r03/native-preflight-r04.json",
|
||||
"sha256_at_integration": "5b967f7206feb9f3b51490e9fab855fe4146d03a26e1cad44a9218051518446d",
|
||||
"scope": "Actual new candidate import/whole GD parse pass; first local56/1 failure; others unexecuted; not acceptance",
|
||||
"linked_at_jst": "2026-10-13T12:48:11.613309+09:00",
|
||||
"current_game_acceptance_inferred": false
|
||||
},
|
||||
{
|
||||
"path": "docs/plans/original-completion-2026-10-02/execution/p24-02/gui-repair-r03/native-preflight-r05-submitted-applicability.json",
|
||||
"sha256_at_integration": "93ec76b5aaa7948d42531d98a9d56f08f8480f5be0edcd49b2d941cc7cac8c0c",
|
||||
"scope": "Exact submitted666c87bd source map1313/0differences; import/wholeGDparse/local7 477 pass; full/OS/formal acceptance false",
|
||||
"linked_at_jst": "2026-10-13T12:56:24.761769+09:00",
|
||||
"current_game_acceptance_inferred": false
|
||||
},
|
||||
{
|
||||
"path": "docs/plans/original-completion-2026-10-02/execution/p24-02/native-os-input-r01/observations.json",
|
||||
"sha256_at_integration": "8786a749bbbd25ab3f97f827fc9eb03b046751768ff142f38fb7ae92bd78c678",
|
||||
"scope": "Actual Mac IME diagnostic activation + Japanese metadata save/restart ordinary load PID80764->83514; ordinary new-save entry not accepted; whole world/platform false",
|
||||
"linked_at_jst": "2026-10-13T13:27:18.303123+09:00",
|
||||
"current_game_acceptance_inferred": false
|
||||
},
|
||||
{
|
||||
"path": "docs/plans/original-completion-2026-10-02/execution/p24-02/upstream-audit-r01/audit.json",
|
||||
"sha256_at_integration": "8dad65be88797faa1b2683f66924218591087f5419d589d21861e18dbc6eceef",
|
||||
"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
|
||||
}
|
||||
],
|
||||
"updated_at_jst": "2026-10-13T09:40:31.868894+09:00",
|
||||
"progress_summary": "P24-03完了後の次対象として再開。既存256通知ログ・実viewport8操作・別process314機能23parseの限定証拠と、P24-03の通常OS選択/保存証拠を引継ぐ。原建設/通知UXに沿い、配置・無効ドロップ説明・モーダル・停止再開・フキダシ/ログ/カットイン・クリック代替・日本語入力/表示倍率の不足を現版で確認して限定修正する。P23の手動保持入力延期を免除扱いにせず、Windowsが実際に必要な条件だけを分離する。既存証拠の適用性は各条件に照合、未知の数量/仕様は設定しない。",
|
||||
"updated_at_jst": "2026-10-13T13:46:18.655711+09:00",
|
||||
"progress_summary": "P24-02の既存worktreeを引き継ぎ、Claude Opus5.5の記録済み判断で正式GUI経路へ移行。通常repair2/上限2、契約/分母/権限/課金変更なし。Antigravity IDEの制限モードで同一担当が編集し、型/Window API/実DomainEventStream購読/関係モデルの頭上表示/実時間停止試験/試験SHAを更新。初期API診断の範囲外生成物2件は内容SHA一致で退避、通常playerの保存差分0だがログrotation3差分を記録し非受入とする。実追加負例によりcheckerの証拠なし誤合格を再確認し、任意artifact/未承認表示下限/候補SHAと必要証拠内容の不備を提出前の同一作業内で是正中。Root専用profileの現候補preflightはimport PID61380 PASS、全GD parse PID61466で試験の未定義ManualSaveSlotsDialogScript参照2件FAIL。局所7スイート未実行、source/player/cleanup guard違反0。全回帰重複0、submit/独立正式review/統合/受入は未了。NTR・決闘の実生成と通常OS/同一Windows証拠を未達のまま保持。 修正版r04で実import PID68758と全GD parse PID68849はPASS。初局所PID68958は56checks/1failure(observerが人物数と状態遷移数を混同)で停止し、残り6は未実行。source/player/cleanup違反0。同じGUI repair2で意味を保つ履歴記録の修正中。 最終r05の実import/全GD parse/局所・影響7スイート477checksはPASS、source/player/cleanup違反0。通常Runner submitで666c87bd7d7c961ae6d7d2ad8d52d6456c31015bへ固定、提出後1313全ソースSHA差0/cleanを確認し、local証拠の限定再利用を記録。候補コードはcodex/p24-02-operations-candidate-r03へpush、main製品コードには未統合。全8条件の実証、上流NTR/決闘、最終full、独立Opus reviewは未了のまま。 固定666c87bdで通常OS入力を実行。通常の新規保存名欄入口が不足するため、診断F8から同一製品dialogを開いた実IME記録を通常入口証拠と分離。native PID80764でローマ字キー→未確定テスト/取消/確定をDisplayServer値とキー列で実記録し、表示名テストを暗号所有スロットへ保存。別PID83514の通常読込一覧/通常読込で同名と保存pathを確認。各source/default player/cleanup違反0。1280x720/1024x608とJPEG実画面を保存。全世界状態一致や通常新規入口は未受入。新規入口3行差分案を作り、P24-02だけ追加repair1(上限2→3、カウンタresetなし)の回答待ち。 Original line143 recheck corrected Root instruction: shield positive-to-zero break starts NTR erosion. Existing shield_changed/RELATIONSHIP_SHIELD_CHANGED/Main subscription is present. Candidate warning wording needs the proposed one-line original-derived correction. Ordinary same-placement attack is unproven; no duel production generator/executor/save state found. Opus orders upstream acceptance/P01 scope -> P18-01/02 -> P19-01/P21-01 -> final P24 actual warnings.",
|
||||
"remaining_gaps": [
|
||||
"全操作項目と現版UI・元の通知UX・既存証拠の条件別照合、および適用環境/対象版付きの検証契約を確定する。",
|
||||
"配置/無効操作/モーダル/停止再開/通知表現/クリック代替/日本語入力/表示倍率の不足を修正し、局所・影響・同一最終版必須回帰と独立レビューを取得する。"
|
||||
"固定666c87bdのimport/全GDparse/local7 477はPASSとして再利用。実OS日本語IMEの未確定/取消/確定/保存metadata/別PID通常読込を限定証拠として保存。通常新規保存欄入口が不足し、診断起動を通常入口として合格にはしない。作成済み3行差分を同一タスクへ反映する追加repair1の回答待ち。",
|
||||
"証拠checkerは例の5負例を拒否しても説明文・PID1・checker1ファイルのみで一度誤合格。具体artifact種類/内容、正しい実候補SHA/必要source manifest/入力/設定/環境/OSreceipt/IME/実event/別process保存再開/実全rosterを照合する。未承認800x600下限を採用せず、希薄な証拠を合格へ替えない。",
|
||||
"Original line143 defines shield break as NTR onset. Restore candidate wording wrongly changed by Root. Reuse existing event subscription; ordinary co-placement attack belongs to P18-01/02, duel types/results/save to P19-01, natural defense proof to P21-01. Fixture injection cannot substitute for ordinary triggers.",
|
||||
"実macOSのIMEと保存名/通常読込、1280x720/1024x608の画面を取得済み。ただし保存名dialogは診断入口による活性化であり通常new-save到達性は不足。実NTR/決闘生成と全world/台帳/人物/イベントの別process一致、Windows同一版は未了。",
|
||||
"関連修正後の最終版で必須全回帰、別セッションClaude Opus5.5独立レビュー、現在main統合と最終検証を通す。同一Windows配布版の実機受入は別条件として未了。P24-02全8条件未達を維持。Supporting RP24-02の追加修正上限の質問は別件であり、GUI作業の上限はリセットしない。"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -16081,7 +16164,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": "in_progress",
|
||||
"updated_at_jst": "2026-10-13T09:40:31.868894+09:00",
|
||||
"updated_at_jst": "2026-10-13T13:46:18.655711+09:00",
|
||||
"execution_progress": {
|
||||
"current1277_checkpoint": {
|
||||
"at_jst": "2026-10-02T22:55:59.434380+09:00",
|
||||
|
||||
@@ -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."
|
||||
]
|
||||
}
|
||||
+2
-119
@@ -22,8 +22,6 @@ const SupplyManagementPanelScript := preload("res://scripts/ui/supply_management
|
||||
const BusinessManagementPanelScript := preload("res://scripts/ui/business_management_panel.gd")
|
||||
const DefenseManagementPanelScript := preload("res://scripts/ui/defense_management_panel.gd")
|
||||
const WorldPreviewScript := preload("res://scenes/main/world_preview.gd")
|
||||
const OperationsCameraControlsScript := preload("res://scripts/ui/operations_camera_controls.gd")
|
||||
const OperationFeedbackScript := preload("res://scripts/ui/operation_feedback.gd")
|
||||
const LayerSkin := preload("res://scripts/ui/layer_interface_skin.gd")
|
||||
const DefaultVisualTheme := preload("res://assets/themes/japanese_fantasy/visual-theme-v1.tres")
|
||||
var _last_presented_close_minute := 0
|
||||
@@ -147,8 +145,6 @@ var alert_icon_node: TextureRect
|
||||
var resource_labels: Dictionary = {}
|
||||
var resource_icon_nodes: Dictionary = {}
|
||||
var world_preview: WorldPreview
|
||||
var operations_camera_controls: OperationsCameraControls
|
||||
var important_warning_cutin: OperationFeedback.ImportantWarningCutinDialog
|
||||
var front_button: Button
|
||||
var back_button: Button
|
||||
var excavation_button: Button
|
||||
@@ -210,7 +206,6 @@ var _pending_excavation_commands: Dictionary = {}
|
||||
var _pending_hire_commands: Dictionary = {}
|
||||
var _staff_candidate_panel_open := false
|
||||
var _operations_start_report: Dictionary = {}
|
||||
var _subscribed_event_stream: Variant = null
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
@@ -249,7 +244,6 @@ func _ready() -> void:
|
||||
|
||||
|
||||
func _exit_tree() -> void:
|
||||
_unbind_domain_event_stream()
|
||||
var tree := get_tree()
|
||||
if tree != null:
|
||||
if tree.root.close_requested.is_connected(_on_window_close_requested):
|
||||
@@ -408,18 +402,6 @@ func _build_interface() -> void:
|
||||
management_panel.offset_bottom = -8
|
||||
management_panel.visible = false
|
||||
|
||||
operations_camera_controls = OperationsCameraControlsScript.new()
|
||||
operations_camera_controls.name = "OperationsCameraControls"
|
||||
operations_camera_controls.configure(world_preview, self)
|
||||
world_preview.add_child(operations_camera_controls)
|
||||
operations_camera_controls.set_anchors_and_offsets_preset(Control.PRESET_BOTTOM_RIGHT)
|
||||
operations_camera_controls.offset_right = -12
|
||||
operations_camera_controls.offset_bottom = -12
|
||||
|
||||
important_warning_cutin = OperationFeedbackScript.ImportantWarningCutinDialog.new()
|
||||
important_warning_cutin.visibility_changed.connect(_update_modal_input_guard)
|
||||
add_child(important_warning_cutin)
|
||||
|
||||
layout.add_child(_create_bottom_bar())
|
||||
|
||||
|
||||
@@ -459,7 +441,6 @@ func _create_top_bar() -> Control:
|
||||
_set_status(message,success)
|
||||
_refresh_dashboard()
|
||||
)
|
||||
rank_dialog.visibility_changed.connect(_update_modal_input_guard)
|
||||
add_child(rank_dialog)
|
||||
rank_button.pressed.connect(rank_dialog.show_rank)
|
||||
|
||||
@@ -775,7 +756,6 @@ func _create_bottom_bar() -> Control:
|
||||
row.add_child(management_toggle_button)
|
||||
event_log_dialog = EventLogDialogScript.new()
|
||||
event_log_dialog.configure(_runtime)
|
||||
event_log_dialog.visibility_changed.connect(_update_modal_input_guard)
|
||||
add_child(event_log_dialog)
|
||||
var event_log_button := _button("記録", event_log_dialog.show_events, 62)
|
||||
event_log_button.name = "EventLogButton"
|
||||
@@ -790,19 +770,17 @@ func _create_bottom_bar() -> Control:
|
||||
row.add_child(audio_button)
|
||||
var load_menu := MenuButton.new()
|
||||
load_menu.name = "SaveLoadMenu"
|
||||
load_menu.text = "保存・読込 ▾"
|
||||
load_menu.text = "読込 ▾"
|
||||
load_menu.custom_minimum_size = Vector2(64,28)
|
||||
load_menu.add_theme_font_size_override("font_size",12)
|
||||
_apply_button_style(load_menu)
|
||||
load_menu.get_popup().add_item("手動セーブを読み込む",0)
|
||||
load_menu.get_popup().add_item("旧寸法を修正して読み込む",1)
|
||||
load_menu.get_popup().add_item("保存スロットを選んで読込",2)
|
||||
load_menu.get_popup().add_item("新しい名前で別スロット保存",3)
|
||||
load_menu.get_popup().id_pressed.connect(func(id: int):
|
||||
if id == 0: _load_manual()
|
||||
elif id == 1: _preview_dimension_migration()
|
||||
elif id == 2: _show_manual_load_slots()
|
||||
elif id == 3: _ensure_manual_save_slots().show_new_save(manual_save_path))
|
||||
elif id == 2: _show_manual_load_slots())
|
||||
row.add_child(load_menu)
|
||||
|
||||
palette_scroll = ScrollContainer.new()
|
||||
@@ -969,9 +947,6 @@ func _connect_signals() -> void:
|
||||
world_preview.staff_assignment_dropped.connect(func(data: Dictionary, facility_id: StringName) -> void:
|
||||
staff_management_panel.assign_from_drop(data, facility_id)
|
||||
)
|
||||
world_preview.staff_assignment_clicked.connect(func(staff_id: StringName, facility_id: StringName) -> void:
|
||||
assign_staff_by_click(facility_id, staff_id)
|
||||
)
|
||||
world_preview.legacy_stair_selected.connect(_on_legacy_stair_selected)
|
||||
world_preview.legacy_stair_selected.connect(_on_audio_world_selection)
|
||||
world_preview.construction_selected.connect(_on_construction_selected)
|
||||
@@ -990,7 +965,6 @@ func _connect_signals() -> void:
|
||||
_runtime.connect(&"save_operation_completed", Callable(self, "_on_save_operation_completed"))
|
||||
if _runtime.has_signal(&"command_completed"):
|
||||
_runtime.connect(&"command_completed", Callable(self, "_on_command_completed"))
|
||||
_bind_domain_event_stream()
|
||||
|
||||
|
||||
func _populate_build_palette() -> void:
|
||||
@@ -2302,7 +2276,6 @@ func _ensure_manual_save_slots() -> Variant:
|
||||
manual_save_slots_dialog = ManualSaveSlotsDialogScript.new()
|
||||
manual_save_slots_dialog.connect(&"new_slot_requested", _save_new_manual_slot)
|
||||
manual_save_slots_dialog.connect(&"load_slot_requested", _load_selected_manual_slot)
|
||||
manual_save_slots_dialog.visibility_changed.connect(_update_modal_input_guard)
|
||||
add_child(manual_save_slots_dialog)
|
||||
return manual_save_slots_dialog
|
||||
|
||||
@@ -2379,7 +2352,6 @@ func _apply_loaded_interface(result: Dictionary) -> void:
|
||||
_restore_product_interface_selection(result.get(&"manifest", {}))
|
||||
_refresh_dashboard()
|
||||
_update_pause_and_speed()
|
||||
_bind_domain_event_stream()
|
||||
|
||||
|
||||
func _valid_interface_selection_version(value: Variant) -> bool:
|
||||
@@ -2965,7 +2937,6 @@ func _ensure_guest_observer() -> GuestObservationPanel:
|
||||
content.size_flags_horizontal = Control.SIZE_EXPAND_FILL
|
||||
guest_observer.add_child(scroll)
|
||||
scroll.add_child(content)
|
||||
guest_observer.visibility_changed.connect(_update_modal_input_guard)
|
||||
add_child(guest_observer)
|
||||
return guest_observer.find_child("GuestObservationPanel", true, false) as GuestObservationPanel
|
||||
|
||||
@@ -2993,7 +2964,6 @@ func _preview_dimension_migration() -> void:
|
||||
dimension_migration_dialog.cancel_button_text="戻る"
|
||||
dimension_migration_dialog.confirmed.connect(_confirm_dimension_migration)
|
||||
dimension_migration_dialog.canceled.connect(func(): _dimension_migration_digest="")
|
||||
dimension_migration_dialog.visibility_changed.connect(_update_modal_input_guard)
|
||||
add_child(dimension_migration_dialog)
|
||||
var lines: PackedStringArray=[]
|
||||
for change: Dictionary in report[&"changes"]:
|
||||
@@ -3113,90 +3083,3 @@ func _submit_ui_command(
|
||||
if _audio_feedback != null:
|
||||
return _audio_feedback.submit_command(command_type, payload, actor_id, target_id, priority, execute_at, idempotency_key)
|
||||
return _runtime.call(&"submit_command", command_type, payload, actor_id, target_id, priority, execute_at, idempotency_key)
|
||||
|
||||
|
||||
func assign_staff_by_click(facility_id: StringName, staff_id: StringName = &"") -> void:
|
||||
if staff_management_panel == null:
|
||||
return
|
||||
var target_staff := staff_id
|
||||
if target_staff.is_empty():
|
||||
target_staff = StringName(staff_management_panel.get("selected_staff_id"))
|
||||
if target_staff.is_empty():
|
||||
_set_status("配属する従業員を一覧から選択してください。", false)
|
||||
return
|
||||
var queue_id: int = int(staff_management_panel.get("_queue_instance_id"))
|
||||
var template_val: Variant = staff_management_panel.get("_draft_template_id")
|
||||
var drop_data := {
|
||||
&"kind": &"staff_assignment",
|
||||
&"staff_id": target_staff,
|
||||
&"template_id": template_val if template_val != null else &"DAY",
|
||||
&"queue_instance_id": queue_id,
|
||||
}
|
||||
staff_management_panel.assign_from_drop(drop_data, facility_id)
|
||||
|
||||
|
||||
func _update_modal_input_guard() -> void:
|
||||
if world_preview == null:
|
||||
return
|
||||
var any_visible := false
|
||||
for dialog: Variant in [manual_save_slots_dialog, event_log_dialog, rank_dialog, dimension_migration_dialog, guest_observer, defense_manager, important_warning_cutin]:
|
||||
if dialog != null and is_instance_valid(dialog) and dialog is Window and bool(dialog.visible):
|
||||
any_visible = true
|
||||
break
|
||||
world_preview.modal_input_blocked = any_visible
|
||||
|
||||
|
||||
func _ensure_important_warning_cutin() -> OperationFeedback.ImportantWarningCutinDialog:
|
||||
if important_warning_cutin == null:
|
||||
important_warning_cutin = OperationFeedbackScript.ImportantWarningCutinDialog.new()
|
||||
important_warning_cutin.visibility_changed.connect(_update_modal_input_guard)
|
||||
add_child(important_warning_cutin)
|
||||
return important_warning_cutin
|
||||
|
||||
|
||||
func show_warning_cutin(kind: StringName, heading: String, message: String) -> void:
|
||||
_ensure_important_warning_cutin().show_cutin(kind, heading, message)
|
||||
|
||||
|
||||
func _bind_domain_event_stream() -> void:
|
||||
_unbind_domain_event_stream()
|
||||
if _runtime == null or not is_instance_valid(_runtime):
|
||||
return
|
||||
var stream: Variant = _runtime.get(&"domain_events") if _runtime is Object and "domain_events" in _runtime else null
|
||||
if stream != null and is_instance_valid(stream) and stream.has_method(&"subscribe"):
|
||||
stream.subscribe(DomainEventStream.WILDCARD_EVENT_TYPE, &"main_scene", Callable(self, "_on_domain_event_published"))
|
||||
_subscribed_event_stream = stream
|
||||
|
||||
|
||||
func _unbind_domain_event_stream() -> void:
|
||||
if _subscribed_event_stream != null and is_instance_valid(_subscribed_event_stream):
|
||||
if _subscribed_event_stream.has_method(&"unsubscribe"):
|
||||
_subscribed_event_stream.unsubscribe(DomainEventStream.WILDCARD_EVENT_TYPE, &"main_scene")
|
||||
_subscribed_event_stream = null
|
||||
|
||||
|
||||
func _on_domain_event_published(event: Variant) -> void:
|
||||
var event_type: StringName = &""
|
||||
var payload: Dictionary = {}
|
||||
if event is Dictionary:
|
||||
event_type = StringName(event.get(&"event_type", event.get("event_type", &"")))
|
||||
var raw_payload: Variant = event.get(&"payload", event.get("payload", {}))
|
||||
if raw_payload is Dictionary:
|
||||
payload = raw_payload
|
||||
elif event is Object:
|
||||
if "event_type" in event:
|
||||
event_type = StringName(event.get(&"event_type"))
|
||||
if "payload" in event:
|
||||
var raw_payload: Variant = event.get(&"payload")
|
||||
if raw_payload is Dictionary:
|
||||
payload = raw_payload
|
||||
match event_type:
|
||||
&"DEFENSE_RAID_CREATED":
|
||||
show_warning_cutin(OperationFeedbackScript.CUTIN_DEFENSE, "防衛戦開始演出", "敵の襲撃が発生しました!防衛部隊を配置してください。")
|
||||
&"RELATIONSHIP_SHIELD_CHANGED":
|
||||
# Existing love-shield vanishing transition
|
||||
var old_val: int = int(payload.get(&"old_value", payload.get("old_value", -1)))
|
||||
var new_val: int = int(payload.get(&"new_value", payload.get("new_value", -1)))
|
||||
if old_val > 0 and new_val == 0:
|
||||
show_warning_cutin(OperationFeedbackScript.CUTIN_INVASION, "重要警告:NTR侵食開始", "愛の盾が破られ、NTR侵食が始まりました。人物関係を確認してください。")
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ extends Control
|
||||
|
||||
signal facility_selected(instance_id: StringName)
|
||||
signal staff_assignment_dropped(data: Dictionary, facility_id: StringName)
|
||||
signal staff_assignment_clicked(staff_id: StringName, facility_id: StringName)
|
||||
signal construction_selected(job_id: StringName)
|
||||
signal legacy_stair_selected(stair_id: StringName)
|
||||
signal cell_clicked(cell: Vector3i)
|
||||
@@ -16,7 +15,6 @@ enum LayerMode {
|
||||
BACK,
|
||||
}
|
||||
|
||||
const OperationFeedbackScript := preload("res://scripts/ui/operation_feedback.gd")
|
||||
const RoomPresentation := preload("res://scripts/ui/room_presentation.gd")
|
||||
const People := preload("res://scripts/ui/pixel_people.gd")
|
||||
const PixelArt := preload("res://scripts/ui/pixel_tower_art.gd")
|
||||
@@ -59,11 +57,6 @@ var zoom_level := 1.0
|
||||
var pan_offset := Vector2.ZERO
|
||||
var show_grid := false
|
||||
var pan_mode := false
|
||||
var modal_input_blocked := false:
|
||||
set(value):
|
||||
modal_input_blocked = value
|
||||
if modal_input_blocked:
|
||||
_end_pan_drag()
|
||||
var _drawing := false
|
||||
var _draw_cache: Dictionary = {}
|
||||
|
||||
@@ -427,9 +420,6 @@ func facility_at_canvas(canvas_position: Vector2) -> StringName:
|
||||
|
||||
|
||||
func _gui_input(event: InputEvent) -> void:
|
||||
if modal_input_blocked:
|
||||
accept_event()
|
||||
return
|
||||
if event is InputEventMouseButton:
|
||||
if not event.pressed and event.button_index == _drag_button:
|
||||
_end_pan_drag()
|
||||
@@ -1155,10 +1145,6 @@ func _draw_actors() -> void:
|
||||
else:
|
||||
position += _actor_offset(guest.current_cell,counts)
|
||||
_draw_pixel_actor(position,key,false,int(guest.state),receiving,false,_guest_activity(guest))
|
||||
var rel_guest: Variant = _guest_relationship(guest.guest_id)
|
||||
var guest_bubble := OperationFeedbackScript.resolve_guest_bubble(guest, rel_guest)
|
||||
if guest_bubble != OperationFeedbackScript.BUBBLE_NONE:
|
||||
_draw_unit_bubble(position, guest_bubble)
|
||||
var staff_service: Variant = _service(&"staff_service")
|
||||
if staff_service != null and staff_service.has_method(&"get_staff_members"):
|
||||
for staff: Variant in staff_service.call(&"get_staff_members"):
|
||||
@@ -1185,12 +1171,7 @@ func _draw_actors() -> void:
|
||||
position = _rescue_treatment_position(staff.staff_id, position)
|
||||
if position.is_finite(): _draw_pixel_actor(position,key,true,int(staff.state),false,false)
|
||||
continue
|
||||
var staff_draw_pos: Vector2 = _queue_positions.get(key, _staff_work_position(staff, position+_actor_offset(staff.current_cell,counts)))
|
||||
_draw_pixel_actor(staff_draw_pos,key,true,int(staff.state),false,not String(staff.carried_inventory_id).is_empty(),_staff_work_animation(staff))
|
||||
var rel_staff: Variant = _staff_relationship(staff.staff_id)
|
||||
var staff_bubble := OperationFeedbackScript.resolve_staff_bubble(staff, rel_staff)
|
||||
if staff_bubble != OperationFeedbackScript.BUBBLE_NONE:
|
||||
_draw_unit_bubble(staff_draw_pos, staff_bubble)
|
||||
_draw_pixel_actor(_queue_positions.get(key, _staff_work_position(staff, position+_actor_offset(staff.current_cell,counts))),key,true,int(staff.state),false,not String(staff.carried_inventory_id).is_empty(),_staff_work_animation(staff))
|
||||
for key: Variant in _actor_tracks.keys():
|
||||
if not alive.has(key):
|
||||
_actor_tracks.erase(key)
|
||||
@@ -1319,54 +1300,6 @@ func _draw_pixel_actor(center: Vector2, key: String, staff: bool, state: int, re
|
||||
People.draw(self, at, p, mode, frame, variant, staff, float(track.get(&"direction", 1.0)) < 0.0)
|
||||
|
||||
|
||||
func _draw_unit_bubble(actor_center: Vector2, bubble_type: StringName) -> void:
|
||||
var world_pixel := _cell_dimensions().x / 16.0
|
||||
var p := maxf(floorf(world_pixel * 0.75), 1.0) if world_pixel >= 2.0 else world_pixel * 0.75
|
||||
var bubble_pos := actor_center + Vector2(-9 * p, _cell_dimensions().y * 0.5 - 3 * world_pixel - 32 * p)
|
||||
var bubble_size := Vector2(18 * p, 13 * p)
|
||||
var rect := Rect2(bubble_pos.round(), bubble_size.round())
|
||||
draw_rect(rect, Color("ffffff", 0.94))
|
||||
draw_rect(rect, Color("303c40", 0.85), false, 1.0)
|
||||
var tri_p1 := Vector2(rect.get_center().x - 2.5 * p, rect.end.y)
|
||||
var tri_p2 := Vector2(rect.get_center().x + 2.5 * p, rect.end.y)
|
||||
var tri_p3 := Vector2(rect.get_center().x, rect.end.y + 3.5 * p)
|
||||
draw_colored_polygon(PackedVector2Array([tri_p1, tri_p2, tri_p3]), Color("ffffff", 0.94))
|
||||
draw_line(tri_p1, tri_p3, Color("303c40", 0.85), 1.0)
|
||||
draw_line(tri_p2, tri_p3, Color("303c40", 0.85), 1.0)
|
||||
|
||||
var font := ThemeDB.fallback_font
|
||||
var font_size := clampi(int(9 * p), 9, 14)
|
||||
match bubble_type:
|
||||
OperationFeedbackScript.BUBBLE_ZZZ:
|
||||
draw_string(font, rect.position + Vector2(2 * p, rect.size.y - 3 * p), "Zzz", HORIZONTAL_ALIGNMENT_CENTER, rect.size.x - 4 * p, font_size, Color("2d68c4"))
|
||||
OperationFeedbackScript.BUBBLE_ANGER:
|
||||
draw_string(font, rect.position + Vector2(2 * p, rect.size.y - 3 * p), "💢", HORIZONTAL_ALIGNMENT_CENTER, rect.size.x - 4 * p, font_size, Color("d63031"))
|
||||
OperationFeedbackScript.BUBBLE_HEART:
|
||||
draw_string(font, rect.position + Vector2(2 * p, rect.size.y - 3 * p), "♥", HORIZONTAL_ALIGNMENT_CENTER, rect.size.x - 4 * p, font_size, Color("e84393"))
|
||||
|
||||
|
||||
func _staff_relationship(staff_id: StringName) -> Variant:
|
||||
var service: Variant = _service(&"relationship_service")
|
||||
if service == null or not service.has_method(&"get_relationships"):
|
||||
return null
|
||||
for rel_val: Variant in service.call(&"get_relationships"):
|
||||
if rel_val is RelationshipState:
|
||||
if rel_val.actor_a_id == staff_id or rel_val.actor_b_id == staff_id:
|
||||
return rel_val
|
||||
return null
|
||||
|
||||
|
||||
func _guest_relationship(guest_id: StringName) -> Variant:
|
||||
var service: Variant = _service(&"relationship_service")
|
||||
if service == null or not service.has_method(&"get_relationships"):
|
||||
return null
|
||||
for rel_val: Variant in service.call(&"get_relationships"):
|
||||
if rel_val is RelationshipState:
|
||||
if rel_val.actor_a_id == guest_id or rel_val.actor_b_id == guest_id:
|
||||
return rel_val
|
||||
return null
|
||||
|
||||
|
||||
func _draw_excavation_jobs() -> void:
|
||||
var excavation: Variant = _service(&"excavation_service")
|
||||
if excavation == null or not excavation.has_method(&"get_jobs"):
|
||||
@@ -1661,8 +1594,6 @@ func _resting_staff_position(staff_id: StringName, fallback: Vector2) -> Vector2
|
||||
|
||||
|
||||
func _can_drop_data(_position: Vector2, data: Variant) -> bool:
|
||||
if modal_input_blocked:
|
||||
return false
|
||||
return data is Dictionary and data.get(&"kind", &"") == &"staff_assignment" and data.get(&"staff_id", &"") is StringName
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
class_name OriginalRelationshipState
|
||||
extends RefCounted
|
||||
|
||||
## Explicit facts only. Numeric values are not production initialization approval.
|
||||
## No update, attack, reduction, threshold or route policy is defined here.
|
||||
const FIELDS := ["subject_id", "protagonist_id", "rival_id", "affection", "lust", "netorare", "shield_current", "shield_max"]
|
||||
var _payload: Dictionary = {}
|
||||
|
||||
|
||||
static func from_snapshot(value: Variant) -> OriginalRelationshipState:
|
||||
if not value is Dictionary or value.size() != FIELDS.size():
|
||||
return null
|
||||
for field: String in FIELDS:
|
||||
if not value.has(field):
|
||||
return null
|
||||
for field: String in ["subject_id", "protagonist_id", "rival_id"]:
|
||||
if not (value[field] is String or value[field] is StringName) or String(value[field]).is_empty():
|
||||
return null
|
||||
if value["subject_id"] == value["protagonist_id"] or value["subject_id"] == value["rival_id"] or value["protagonist_id"] == value["rival_id"]:
|
||||
return null
|
||||
for field: String in ["affection", "lust", "netorare", "shield_current", "shield_max"]:
|
||||
if not (value[field] is int or value[field] is float):
|
||||
return null
|
||||
if value[field] is float and not is_finite(value[field]):
|
||||
return null
|
||||
if value["shield_max"] != value["affection"] or value["shield_current"] < 0 or value["shield_current"] > value["shield_max"]:
|
||||
return null
|
||||
var state := OriginalRelationshipState.new()
|
||||
state._payload = value.duplicate(true)
|
||||
return state
|
||||
|
||||
|
||||
func create_snapshot() -> Dictionary:
|
||||
return _payload.duplicate(true)
|
||||
|
||||
|
||||
func subject_id() -> StringName:
|
||||
return StringName(_payload.get("subject_id", ""))
|
||||
@@ -0,0 +1 @@
|
||||
uid://cqxwpbkgjtnsa
|
||||
@@ -9,8 +9,9 @@ signal route_lock_changed(relationship_id: StringName, old_lock: int, new_lock:
|
||||
|
||||
const RelationshipStateType = preload("res://scripts/relationship/relationship_state.gd")
|
||||
const CommandResultType = preload("res://scripts/core/command_result.gd")
|
||||
const OriginalStateType = preload("res://scripts/relationship/original_relationship_state.gd")
|
||||
|
||||
const SNAPSHOT_VERSION := 1
|
||||
const SNAPSHOT_VERSION := 2
|
||||
const DAILY_AUTOMATIC_DELTA_LIMIT := 10
|
||||
const GATED_THRESHOLDS: Array[int] = [50, 80]
|
||||
const STAGE_THRESHOLDS: Array[int] = [20, 50, 80, 100]
|
||||
@@ -22,6 +23,46 @@ var _pair_index: Dictionary = {}
|
||||
var _threshold_candidates: Array[Dictionary] = []
|
||||
var _next_candidate_sequence := 1
|
||||
var _candidate_callback := Callable()
|
||||
var _original_records: Dictionary = {}
|
||||
var _original_identity_validator := Callable()
|
||||
var _legacy_raw: Dictionary = {}
|
||||
var _legacy_baselines: Dictionary = {}
|
||||
var _container_raw: Dictionary = {}
|
||||
|
||||
|
||||
func configure_original_identity_validator(callback: Callable) -> RelationshipService:
|
||||
_original_identity_validator = callback
|
||||
return self
|
||||
|
||||
|
||||
func register_original_relationship(payload: Variant) -> CommandResult:
|
||||
var state := OriginalStateType.from_snapshot(payload)
|
||||
if state == null:
|
||||
return _invalid("Original relationship requires complete explicit facts.")
|
||||
if not _original_identity_validator.is_valid() or not bool(_original_identity_validator.call(state.create_snapshot())):
|
||||
return _invalid("Original relationship identities are not registered.")
|
||||
if _original_records.has(state.subject_id()):
|
||||
return _duplicate("Original relationship subject", state.subject_id())
|
||||
_original_records[state.subject_id()] = state.create_snapshot()
|
||||
last_error = ""
|
||||
return _success({&"subject_id": state.subject_id()})
|
||||
|
||||
|
||||
func get_original_relationship(subject_id: StringName) -> Dictionary:
|
||||
if _original_records.has(subject_id):
|
||||
var result: Dictionary = _original_records[subject_id].duplicate(true)
|
||||
result[&"configured"] = true
|
||||
return result
|
||||
return {&"configured": false, &"subject_id": subject_id,
|
||||
&"protagonist_id": null, &"rival_id": null, &"affection": null,
|
||||
&"lust": null, &"netorare": null, &"shield_current": null, &"shield_max": null}
|
||||
|
||||
|
||||
func validate_original_identities() -> bool:
|
||||
for payload: Dictionary in _original_records.values():
|
||||
if not _original_identity_validator.is_valid() or not bool(_original_identity_validator.call(payload.duplicate(true))):
|
||||
return false
|
||||
return true
|
||||
|
||||
|
||||
func configure_candidate_callback(callback: Callable = Callable()) -> RelationshipService:
|
||||
@@ -329,6 +370,8 @@ func consume_threshold_candidate(candidate_id: StringName) -> Dictionary:
|
||||
|
||||
func validate_invariants() -> Dictionary:
|
||||
var errors: Array[String] = []
|
||||
if not validate_original_identities():
|
||||
errors.append("Original relationship identity reference is invalid.")
|
||||
var seen_pairs: Dictionary = {}
|
||||
for relationship_id: StringName in _sorted_name_keys(_relationships):
|
||||
var state := get_relationship(relationship_id)
|
||||
@@ -347,22 +390,92 @@ func validate_invariants() -> Dictionary:
|
||||
func create_snapshot() -> Dictionary:
|
||||
var relationships: Array[Dictionary] = []
|
||||
for state: RelationshipState in get_relationships():
|
||||
relationships.append(state.create_snapshot())
|
||||
var current := state.create_snapshot()
|
||||
var original: Dictionary = _legacy_baselines.get(state.relationship_id, {})
|
||||
var raw: Dictionary = {}
|
||||
for entry: Dictionary in _legacy_raw.get(&"relationships", []):
|
||||
if StringName(_value(entry, &"relationship_id", "")) == state.relationship_id:
|
||||
raw = entry
|
||||
break
|
||||
relationships.append(_merge_legacy_changes(raw, original, current) if not original.is_empty() else current)
|
||||
var candidates := _threshold_candidates.duplicate(true)
|
||||
candidates.sort_custom(
|
||||
func(a: Dictionary, b: Dictionary) -> bool:
|
||||
return String(a.get(&"candidate_id", "")) < String(b.get(&"candidate_id", ""))
|
||||
)
|
||||
return {
|
||||
&"version": SNAPSHOT_VERSION,
|
||||
&"relationships": relationships,
|
||||
&"threshold_candidates": candidates,
|
||||
&"next_candidate_sequence": _next_candidate_sequence,
|
||||
}
|
||||
var legacy := _legacy_raw.duplicate(true)
|
||||
legacy[&"version"] = 1
|
||||
# Preserve input collection order as well as every untouched raw field.
|
||||
if _legacy_raw.has(&"relationships"):
|
||||
var ordered: Array[Dictionary] = []
|
||||
for raw: Dictionary in _legacy_raw[&"relationships"]:
|
||||
for entry: Dictionary in relationships:
|
||||
if _value(entry, &"relationship_id", "") == _value(raw, &"relationship_id", ""):
|
||||
ordered.append(entry)
|
||||
for entry: Dictionary in relationships:
|
||||
if not ordered.has(entry):
|
||||
ordered.append(entry)
|
||||
relationships = ordered
|
||||
if legacy.get(&"relationships") != relationships:
|
||||
legacy[&"relationships"] = relationships
|
||||
var current_candidates := _threshold_candidates.duplicate(true) if not _legacy_raw.is_empty() else candidates
|
||||
if legacy.get(&"threshold_candidates") != current_candidates:
|
||||
legacy[&"threshold_candidates"] = current_candidates
|
||||
legacy[&"next_candidate_sequence"] = _next_candidate_sequence
|
||||
var result := _container_raw.duplicate(true)
|
||||
result[&"version"] = SNAPSHOT_VERSION
|
||||
result[&"legacy"] = legacy
|
||||
# Compatibility projection for existing snapshot consumers; the nested v1
|
||||
# record remains lossless, including extension names reserved by v2.
|
||||
if result.get(&"relationships") != relationships:
|
||||
result[&"relationships"] = relationships.duplicate(true)
|
||||
var originals: Array[Dictionary] = []
|
||||
for payload: Dictionary in _original_records.values():
|
||||
originals.append(payload.duplicate(true))
|
||||
if result.get(&"original_relationships") != originals:
|
||||
result[&"original_relationships"] = originals
|
||||
return result
|
||||
|
||||
|
||||
static func _merge_legacy_changes(raw: Dictionary, baseline: Dictionary, current: Dictionary) -> Dictionary:
|
||||
var result := raw.duplicate(true)
|
||||
for key: Variant in baseline:
|
||||
if not current.has(key):
|
||||
result.erase(key)
|
||||
for key: Variant in current:
|
||||
if baseline.has(key) and current[key] == baseline[key]:
|
||||
continue
|
||||
if current[key] is Dictionary and baseline.get(key) is Dictionary and result.get(key) is Dictionary:
|
||||
result[key] = _merge_legacy_changes(result[key], baseline[key], current[key])
|
||||
else:
|
||||
result[key] = current[key]
|
||||
return result
|
||||
|
||||
|
||||
func restore_snapshot(snapshot: Dictionary) -> bool:
|
||||
var parsed := _parse_snapshot(snapshot)
|
||||
var version: Variant = _value(snapshot, &"version", null)
|
||||
if not version is int or version not in [1, SNAPSHOT_VERSION]:
|
||||
last_error = "Unsupported Relationship snapshot version."
|
||||
return false
|
||||
var legacy: Variant = snapshot if version == 1 else _value(snapshot, &"legacy", null)
|
||||
var originals: Variant = [] if version == 1 else _value(snapshot, &"original_relationships", null)
|
||||
if not legacy is Dictionary or not originals is Array:
|
||||
last_error = "Malformed Relationship snapshot container."
|
||||
return false
|
||||
if version == SNAPSHOT_VERSION and _value(snapshot, &"relationships", null) != _value(legacy, &"relationships", null):
|
||||
last_error = "Legacy compatibility projection disagrees with its source."
|
||||
return false
|
||||
var original_records: Dictionary = {}
|
||||
for raw: Variant in originals:
|
||||
var state := OriginalStateType.from_snapshot(raw)
|
||||
if state == null or original_records.has(state.subject_id()):
|
||||
last_error = "Invalid or duplicate original relationship."
|
||||
return false
|
||||
if not _original_identity_validator.is_valid() or not bool(_original_identity_validator.call(state.create_snapshot())):
|
||||
last_error = "Invalid original relationship identity reference."
|
||||
return false
|
||||
original_records[state.subject_id()] = state.create_snapshot()
|
||||
var parsed := _parse_snapshot(legacy)
|
||||
if not bool(parsed.get(&"ok", false)):
|
||||
last_error = String(parsed.get(&"error", "Invalid Relationship snapshot."))
|
||||
return false
|
||||
@@ -370,12 +483,18 @@ func restore_snapshot(snapshot: Dictionary) -> bool:
|
||||
_pair_index = parsed[&"pair_index"]
|
||||
_threshold_candidates = parsed[&"threshold_candidates"]
|
||||
_next_candidate_sequence = int(parsed[&"next_candidate_sequence"])
|
||||
_original_records = original_records
|
||||
_legacy_raw = legacy.duplicate(true)
|
||||
_container_raw = snapshot.duplicate(true) if version == SNAPSHOT_VERSION else {}
|
||||
_legacy_baselines = {}
|
||||
for state: RelationshipState in get_relationships():
|
||||
_legacy_baselines[state.relationship_id] = state.create_snapshot()
|
||||
last_error = ""
|
||||
return true
|
||||
|
||||
|
||||
func _parse_snapshot(snapshot: Dictionary) -> Dictionary:
|
||||
if int(_value(snapshot, &"version", 0)) != SNAPSHOT_VERSION:
|
||||
if not _value(snapshot, &"version", null) is int or _value(snapshot, &"version", null) != 1:
|
||||
return {&"ok": false, &"error": "Unsupported Relationship snapshot version."}
|
||||
var raw_relationships: Variant = _value(snapshot, &"relationships", null)
|
||||
var raw_candidates: Variant = _value(snapshot, &"threshold_candidates", null)
|
||||
@@ -384,7 +503,7 @@ func _parse_snapshot(snapshot: Dictionary) -> Dictionary:
|
||||
var relationships: Dictionary = {}
|
||||
var pair_index: Dictionary = {}
|
||||
for raw_state: Variant in raw_relationships:
|
||||
if not raw_state is Dictionary:
|
||||
if not raw_state is Dictionary or not _legacy_types_valid(raw_state):
|
||||
return {&"ok": false, &"error": "Relationship snapshot entry is malformed."}
|
||||
var state := RelationshipStateType.from_snapshot(raw_state)
|
||||
if not state.is_valid() or relationships.has(state.relationship_id):
|
||||
@@ -398,6 +517,9 @@ func _parse_snapshot(snapshot: Dictionary) -> Dictionary:
|
||||
for raw_candidate: Variant in raw_candidates:
|
||||
if not raw_candidate is Dictionary:
|
||||
return {&"ok": false, &"error": "Threshold candidate is malformed."}
|
||||
for key: String in ["candidate_id", "relationship_id"]:
|
||||
if not (raw_candidate.get(key) is String or raw_candidate.get(key) is StringName):
|
||||
return {&"ok": false, &"error": "Threshold candidate identity type is invalid."}
|
||||
var candidate: Dictionary = raw_candidate.duplicate(true)
|
||||
var candidate_id := StringName(candidate.get(&"candidate_id", candidate.get("candidate_id", "")))
|
||||
var relationship_id := StringName(candidate.get(&"relationship_id", candidate.get("relationship_id", "")))
|
||||
@@ -405,6 +527,8 @@ func _parse_snapshot(snapshot: Dictionary) -> Dictionary:
|
||||
return {&"ok": false, &"error": "Threshold candidate reference is invalid."}
|
||||
candidate_ids[candidate_id] = true
|
||||
candidates.append(candidate)
|
||||
if not _value(snapshot, &"next_candidate_sequence", null) is int:
|
||||
return {&"ok": false, &"error": "Relationship candidate sequence type is invalid."}
|
||||
var next_sequence := int(_value(snapshot, &"next_candidate_sequence", 0))
|
||||
if next_sequence < 1:
|
||||
return {&"ok": false, &"error": "Relationship candidate sequence is invalid."}
|
||||
@@ -417,6 +541,44 @@ func _parse_snapshot(snapshot: Dictionary) -> Dictionary:
|
||||
}
|
||||
|
||||
|
||||
static func _legacy_types_valid(raw: Dictionary) -> bool:
|
||||
for key: String in ["relationship_id", "actor_a_id", "actor_b_id"]:
|
||||
if not (raw.get(key) is String or raw.get(key) is StringName):
|
||||
return false
|
||||
for key: String in ["shield_max", "shield_current", "last_event_at", "daily_attack_count", "attack_day", "metric_delta_day"]:
|
||||
if raw.has(key) and not raw[key] is int:
|
||||
return false
|
||||
for key: String in ["metrics", "action_counts", "daily_metric_deltas", "flags", "crossed_thresholds"]:
|
||||
if raw.has(key) and not raw[key] is Dictionary:
|
||||
return false
|
||||
for key: String in ["trust", "respect", "affection", "fear", "dependence", "affinity", "obligation"]:
|
||||
var metrics: Dictionary = raw.get("metrics", raw)
|
||||
if metrics.has(key) and not metrics[key] is int:
|
||||
return false
|
||||
for key: String in ["action_counts", "daily_metric_deltas"]:
|
||||
for value: Variant in raw.get(key, {}).values():
|
||||
if not value is int:
|
||||
return false
|
||||
for key: String in ["action_counts", "flags"]:
|
||||
for identity: Variant in raw.get(key, {}):
|
||||
if not (identity is String or identity is StringName):
|
||||
return false
|
||||
for value: Variant in raw.get("flags", {}).values():
|
||||
if not value is bool:
|
||||
return false
|
||||
for value: Variant in raw.get("crossed_thresholds", {}).values():
|
||||
if not value is Array:
|
||||
return false
|
||||
for threshold: Variant in value:
|
||||
if not threshold is int:
|
||||
return false
|
||||
if raw.has("route_id") and not (raw["route_id"] is String or raw["route_id"] is StringName):
|
||||
return false
|
||||
if raw.has("route_lock") and not (raw["route_lock"] is int or raw["route_lock"] is String or raw["route_lock"] is StringName):
|
||||
return false
|
||||
return true
|
||||
|
||||
|
||||
func _register_threshold_candidate(
|
||||
state: RelationshipState,
|
||||
metric_id: StringName,
|
||||
|
||||
@@ -158,18 +158,8 @@ func get_event_rows() -> Array[Dictionary]:
|
||||
var stream: Variant = _runtime.get("domain_events")
|
||||
if stream == null or not stream.has_method("recent_events"):
|
||||
return rows
|
||||
var seen_ids: Dictionary = {}
|
||||
for event: SimulationDomainEvent in stream.recent_events():
|
||||
var dict: Dictionary = event.to_dictionary()
|
||||
var eid: String = String(dict.get("event_id", ""))
|
||||
if not eid.is_empty():
|
||||
if seen_ids.has(eid):
|
||||
continue
|
||||
seen_ids[eid] = true
|
||||
rows.append(dict)
|
||||
# Bound to recent 256 entries in strict sequence
|
||||
if rows.size() > 256:
|
||||
rows = rows.slice(rows.size() - 256)
|
||||
rows.append(event.to_dictionary())
|
||||
return rows
|
||||
|
||||
|
||||
@@ -211,12 +201,9 @@ func _select_row(index: int) -> void:
|
||||
var row: Dictionary = _rows[index]
|
||||
_selected_event_id = String(row["event_id"])
|
||||
var presentation := get_event_presentation(row)
|
||||
var detail_text := "%s\n%s\n対象(現在の名称):%s" % [
|
||||
_details.text = "%s\n%s\n対象(現在の名称):%s" % [
|
||||
presentation[&"time"], presentation[&"title"], presentation[&"targets"],
|
||||
]
|
||||
if not String(presentation.get(&"extra", "")).is_empty():
|
||||
detail_text += "\n" + String(presentation[&"extra"])
|
||||
_details.text = detail_text
|
||||
_details.tooltip_text = presentation[&"supplement"]
|
||||
|
||||
|
||||
@@ -238,30 +225,13 @@ func get_event_presentation(row: Dictionary) -> Dictionary:
|
||||
names.append(resolved)
|
||||
if unknown_count > 0:
|
||||
names.append("名称を確認できない対象(%d件)" % unknown_count)
|
||||
|
||||
var title_text := String(EVENT_NAMES.get(StringName(row.get("event_type", "")), "未識別の記録"))
|
||||
var extras: Array[String] = []
|
||||
|
||||
# Check for amount / gold / cost
|
||||
var payload: Dictionary = row.get("payload", {}) if row.get("payload") is Dictionary else {}
|
||||
var amount_val: Variant = row.get("amount", payload.get("amount", row.get("gold", payload.get("gold", null))))
|
||||
if amount_val != null and (amount_val is int or amount_val is float) and int(amount_val) != 0:
|
||||
extras.append("金額:G%+d" % int(amount_val) if int(amount_val) < 0 else "金額:G%d" % int(amount_val))
|
||||
|
||||
# Check for reason
|
||||
var reason_val: Variant = row.get("reason", payload.get("reason", row.get("error", payload.get("error", ""))))
|
||||
if not String(reason_val).is_empty():
|
||||
extras.append("理由:%s" % String(reason_val))
|
||||
|
||||
return {
|
||||
&"title": title_text,
|
||||
&"title": String(EVENT_NAMES.get(StringName(row.get("event_type", "")), "未識別の記録")),
|
||||
&"time": _format_minute(int(row.get("absolute_minute", 0))),
|
||||
&"targets": "、".join(names) if not names.is_empty() else "対象の指定なし",
|
||||
&"extra": " ".join(extras),
|
||||
&"supplement": "補足情報\n記録:%s\n種別:%s\n対象:%s\n発行元:%s%s" % [
|
||||
&"supplement": "補足情報\n記録:%s\n種別:%s\n対象:%s\n発行元:%s" % [
|
||||
row.get("event_id", ""), row.get("event_type", ""),
|
||||
"、".join(raw_ids), row.get("source_service", ""),
|
||||
"\n" + "\n".join(extras) if not extras.is_empty() else "",
|
||||
],
|
||||
}
|
||||
|
||||
|
||||
@@ -12,38 +12,19 @@ var _new_path := ""
|
||||
var _new_name := ""
|
||||
var _message: Label
|
||||
var _slots: ItemList
|
||||
var _label_edit: LineEdit
|
||||
var _validation_label: Label
|
||||
var _rows: Array[Dictionary] = []
|
||||
|
||||
func _ready() -> void:
|
||||
name = "ManualSaveSlotsDialog"
|
||||
cancel_button_text = "戻る"
|
||||
var column := VBoxContainer.new()
|
||||
column.custom_minimum_size = Vector2(460, 240)
|
||||
column.custom_minimum_size = Vector2(460, 220)
|
||||
add_child(column)
|
||||
_message = Label.new()
|
||||
_message.name = "ManualSaveSlotsMessage"
|
||||
_message.custom_minimum_size.x = 460
|
||||
_message.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART
|
||||
column.add_child(_message)
|
||||
|
||||
_label_edit = LineEdit.new()
|
||||
_label_edit.name = "ManualSaveLabelEdit"
|
||||
_label_edit.custom_minimum_size = Vector2(460, 32)
|
||||
_label_edit.placeholder_text = "セーブデータの名前(日本語入力可)"
|
||||
_label_edit.max_length = 60
|
||||
_label_edit.text_changed.connect(_on_label_text_changed)
|
||||
column.add_child(_label_edit)
|
||||
_label_edit.hide()
|
||||
|
||||
_validation_label = Label.new()
|
||||
_validation_label.name = "ManualSaveValidationLabel"
|
||||
_validation_label.add_theme_font_size_override("font_size", 11)
|
||||
_validation_label.add_theme_color_override("font_color", Color("e06c75"))
|
||||
column.add_child(_validation_label)
|
||||
_validation_label.hide()
|
||||
|
||||
_slots = ItemList.new()
|
||||
_slots.name = "ManualSaveSlotsList"
|
||||
_slots.custom_minimum_size = Vector2(460, 150)
|
||||
@@ -69,20 +50,9 @@ func show_new_save(current_path: String) -> void:
|
||||
_new_name = "手動保存 " + Time.get_datetime_string_from_system(false, true)
|
||||
var fresh: bool = not _new_path.is_empty() and is_fresh_slot(_new_path)
|
||||
get_ok_button().disabled = not fresh
|
||||
_message.text = "今の進行は、元の保存とは別に保存します。\n元の保存は残り、あとから読込一覧で選べます。\n保存の名前(日本語入力対応):" if fresh else "新しい保存先を用意できませんでした。\n元の保存は変更していません。"
|
||||
if fresh:
|
||||
_label_edit.show()
|
||||
_label_edit.text = _new_name
|
||||
_validation_label.hide()
|
||||
else:
|
||||
_label_edit.hide()
|
||||
_validation_label.hide()
|
||||
popup_centered(Vector2i(520, 320))
|
||||
if fresh:
|
||||
_label_edit.grab_focus()
|
||||
_label_edit.select_all()
|
||||
else:
|
||||
get_cancel_button().grab_focus()
|
||||
_message.text = "今の進行は、元の保存とは別に保存します。\n元の保存は残り、あとから読込一覧で選べます。\n\n" + _new_name if fresh else "新しい保存先を用意できませんでした。\n元の保存は変更していません。"
|
||||
popup_centered(Vector2i(520, 300))
|
||||
get_cancel_button().grab_focus()
|
||||
|
||||
func show_load_slots(current_path: String) -> void:
|
||||
_clear_choice()
|
||||
@@ -91,8 +61,6 @@ func show_load_slots(current_path: String) -> void:
|
||||
title = "保存スロットを選んで読込"
|
||||
ok_button_text = "選んで読込"
|
||||
_message.text = "読み込む保存を選んでください。\n現在の未保存の進行は、選んだ保存で置き換わります。"
|
||||
_label_edit.hide()
|
||||
_validation_label.hide()
|
||||
_slots.show()
|
||||
_slots.clear()
|
||||
_rows = read_slot_rows(_directory)
|
||||
@@ -153,48 +121,12 @@ static func read_slot_rows(directory: String) -> Array[Dictionary]:
|
||||
rows.append({&"path": path, &"label": label, &"loadable": loadable})
|
||||
return rows
|
||||
|
||||
static func is_valid_label_text(text: String) -> Dictionary:
|
||||
if text.length() > 60:
|
||||
return {&"ok": false, &"error": "セーブ名は60文字以内で入力してください。"}
|
||||
for i in range(text.length()):
|
||||
var c := text.unicode_at(i)
|
||||
if c < 32 and c != 9:
|
||||
return {&"ok": false, &"error": "制御文字は入力できません。"}
|
||||
return {&"ok": true, &"error": ""}
|
||||
|
||||
func _on_label_text_changed(new_text: String) -> void:
|
||||
if _mode != "new":
|
||||
return
|
||||
var fresh: bool = not _new_path.is_empty() and is_fresh_slot(_new_path)
|
||||
if not fresh:
|
||||
get_ok_button().disabled = true
|
||||
return
|
||||
var check := is_valid_label_text(new_text)
|
||||
if not bool(check[&"ok"]):
|
||||
_validation_label.text = String(check[&"error"])
|
||||
_validation_label.show()
|
||||
get_ok_button().disabled = true
|
||||
else:
|
||||
_validation_label.hide()
|
||||
get_ok_button().disabled = false
|
||||
|
||||
func _select_slot(index: int) -> void:
|
||||
get_ok_button().disabled = index < 0 or index >= _rows.size() or not _rows[index][&"loadable"]
|
||||
|
||||
func _confirm_choice() -> void:
|
||||
if _mode == "new":
|
||||
if not is_fresh_slot(_new_path):
|
||||
_clear_choice()
|
||||
return
|
||||
var raw_name := _label_edit.text.strip_edges() if _label_edit != null else ""
|
||||
var check := is_valid_label_text(raw_name)
|
||||
if not bool(check[&"ok"]):
|
||||
_validation_label.text = String(check[&"error"])
|
||||
_validation_label.show()
|
||||
get_ok_button().disabled = true
|
||||
return
|
||||
var final_name := raw_name if not raw_name.is_empty() else _new_name
|
||||
new_slot_requested.emit(_new_path, final_name)
|
||||
if _mode == "new" and is_fresh_slot(_new_path):
|
||||
new_slot_requested.emit(_new_path, _new_name)
|
||||
elif _mode == "load":
|
||||
var selected: PackedInt32Array = _slots.get_selected_items()
|
||||
if selected.size() == 1 and selected[0] >= 0 and selected[0] < _rows.size() and _rows[selected[0]][&"loadable"]:
|
||||
@@ -205,15 +137,8 @@ func _clear_choice() -> void:
|
||||
_mode = ""
|
||||
_new_path = ""
|
||||
_new_name = ""
|
||||
if _label_edit != null:
|
||||
_label_edit.text = ""
|
||||
_label_edit.hide()
|
||||
if _validation_label != null:
|
||||
_validation_label.hide()
|
||||
_rows.clear()
|
||||
|
||||
func apply_layer_skin(layer: int) -> void:
|
||||
if _message != null: LayerSkin.register_text(_message, layer)
|
||||
if _validation_label != null: LayerSkin.register_status_text(_validation_label, false, layer)
|
||||
LayerSkin.apply_tree(self, layer)
|
||||
|
||||
|
||||
@@ -1,219 +0,0 @@
|
||||
class_name OperationFeedback
|
||||
extends RefCounted
|
||||
|
||||
## Operation and notification UX helpers: rejection explanations,
|
||||
## overhead unit bubbles, and important warning cut-in dialogs.
|
||||
## Presentation-only: never modifies the simulation model or ledger directly.
|
||||
|
||||
const BUBBLE_NONE := &""
|
||||
const BUBBLE_ZZZ := &"zzz"
|
||||
const BUBBLE_ANGER := &"anger"
|
||||
const BUBBLE_HEART := &"heart"
|
||||
|
||||
const CUTIN_INVASION := &"invasion"
|
||||
const CUTIN_DEFENSE := &"defense"
|
||||
const CUTIN_DUEL := &"duel"
|
||||
|
||||
const ASSIGNMENT_REASONS := {
|
||||
&"STAFF_NOT_FOUND": "従業員が見つかりません。",
|
||||
&"FACILITY_NOT_FOUND": "配属先が見つかりません。施設が完成しているか確認してください。",
|
||||
&"ROLE_MISMATCH": "この施設には役割が合いません。必要な職種を確認してください。",
|
||||
&"NO_ACCESS": "従業員が配属先へ移動できません。通路と従業員ドアを確認してください。",
|
||||
&"NO_PATH": "従業員が配属先へ移動できません。通路と従業員ドアを確認してください。",
|
||||
&"STAFF_BUSY": "作業中のため変更できません。作業完了後に再試行してください。",
|
||||
&"CAPACITY_EXCEEDED": "配属先の人員上限を超えています。",
|
||||
&"FACILITY_FULL": "配属先の人員上限を超えています。",
|
||||
&"NO_ROUTE": "配属先へ移動できません。通路と従業員ドアを確認してください。",
|
||||
&"INVALID_TEMPLATE": "日勤または夜勤を選択してください。",
|
||||
&"STAFF_UNAVAILABLE": "この従業員は現在、勤務を変更できません。状態をご確認ください。",
|
||||
&"DEFENSE_LOCKED": "防衛参加中は勤務を変更できません。",
|
||||
&"EVENT_LOCKED": "イベント参加中は勤務を変更できません。",
|
||||
&"FACILITY_UNSTAFFED": "この施設は人員を配属する施設ではありません。",
|
||||
&"SHIFT_CONFLICT": "既存の勤務と時間が重なります。勤務予定を確認してください。",
|
||||
&"BANKRUPT": "運営終了後は配属を変更できません。",
|
||||
}
|
||||
|
||||
const PLACEMENT_REASONS := {
|
||||
"INVALID_DEFINITION": "施設データが不正です",
|
||||
"MISSING_DEPENDENCY": "建設システムを利用できません",
|
||||
"OUT_OF_BOUNDS": "世界の範囲外です",
|
||||
"ZONE_MISMATCH": "地上・境界・地下の条件が合いません",
|
||||
"LAYER_MISMATCH": "表層/裏層が合いません",
|
||||
"OVERLAP": "ほかの施設または工事と重なります",
|
||||
"UNSUPPORTED": "構造を支えられません",
|
||||
"INSUFFICIENT_RESOURCES": "建設資源が不足しています",
|
||||
}
|
||||
|
||||
|
||||
static func resolve_staff_bubble(staff: Variant, relationship: Variant = null) -> StringName:
|
||||
if staff == null:
|
||||
return BUBBLE_NONE
|
||||
var state_val: int = int(staff.get(&"state")) if staff is Object and "state" in staff else (int(staff.get("state", -1)) if staff is Dictionary else -1)
|
||||
# Sleeping, incapacitated, or on break corresponds to Zzz
|
||||
if state_val in [StaffRuntime.State.SLEEPING, StaffRuntime.State.INCAPACITATED, StaffRuntime.State.BREAKING]:
|
||||
return BUBBLE_ZZZ
|
||||
# Strike or fleeing corresponds to anger (no fictional morale thresholds)
|
||||
if state_val in [StaffRuntime.State.STRIKE, StaffRuntime.State.FLEEING]:
|
||||
return BUBBLE_ANGER
|
||||
# Heart must derive from actual existing intimacy/love-shield state with source authority
|
||||
if relationship != null:
|
||||
var shield := 0
|
||||
var route_lock_val := 0
|
||||
var affection := 0
|
||||
if relationship is RelationshipState:
|
||||
shield = relationship.shield_current
|
||||
route_lock_val = int(relationship.route_lock)
|
||||
affection = int(relationship.metrics.get(&"affection", 0))
|
||||
elif relationship is Dictionary:
|
||||
shield = int(relationship.get(&"shield_current", relationship.get("shield_current", 0)))
|
||||
route_lock_val = int(relationship.get(&"route_lock", relationship.get("route_lock", 0)))
|
||||
var m: Variant = relationship.get(&"metrics", relationship.get("metrics", {}))
|
||||
if m is Dictionary:
|
||||
affection = int(m.get(&"affection", m.get("affection", 0)))
|
||||
elif relationship is Object:
|
||||
if "shield_current" in relationship:
|
||||
shield = int(relationship.get(&"shield_current"))
|
||||
if "route_lock" in relationship:
|
||||
route_lock_val = int(relationship.get(&"route_lock"))
|
||||
if "metrics" in relationship:
|
||||
var m: Variant = relationship.get(&"metrics")
|
||||
if m is Dictionary:
|
||||
affection = int(m.get(&"affection", m.get("affection", 0)))
|
||||
if shield > 0 or affection > 0 or route_lock_val in [RelationshipState.RouteLock.EXCLUSIVE_PENDING, RelationshipState.RouteLock.EXCLUSIVE_LOCKED]:
|
||||
return BUBBLE_HEART
|
||||
# Without authoritative relationship intimacy / love-shield state, mapping is unmapped/none
|
||||
return BUBBLE_NONE
|
||||
|
||||
|
||||
static func resolve_guest_bubble(guest: Variant, relationship: Variant = null) -> StringName:
|
||||
if guest == null:
|
||||
return BUBBLE_NONE
|
||||
var state_val: int = int(guest.get(&"state")) if guest is Object and "state" in guest else (int(guest.get("state", -1)) if guest is Dictionary else -1)
|
||||
# Incapacitated corresponds to Zzz
|
||||
if state_val == GuestRuntime.State.INCAPACITATED:
|
||||
return BUBBLE_ZZZ
|
||||
# Abandoning, fleeing, interrupted, or out of patience in queue corresponds to anger
|
||||
if state_val in [GuestRuntime.State.ABANDONING, GuestRuntime.State.FLEEING, GuestRuntime.State.INTERRUPTED]:
|
||||
return BUBBLE_ANGER
|
||||
var patience: int = int(guest.get(&"patience_remaining")) if guest is Object and "patience_remaining" in guest else (int(guest.get("patience_remaining", 1)) if guest is Dictionary else 1)
|
||||
if state_val == GuestRuntime.State.QUEUING and patience <= 0:
|
||||
return BUBBLE_ANGER
|
||||
# Heart must derive from actual existing intimacy/love-shield state with source authority
|
||||
if relationship != null:
|
||||
var shield := 0
|
||||
var route_lock_val := 0
|
||||
var affection := 0
|
||||
if relationship is RelationshipState:
|
||||
shield = relationship.shield_current
|
||||
route_lock_val = int(relationship.route_lock)
|
||||
affection = int(relationship.metrics.get(&"affection", 0))
|
||||
elif relationship is Dictionary:
|
||||
shield = int(relationship.get(&"shield_current", relationship.get("shield_current", 0)))
|
||||
route_lock_val = int(relationship.get(&"route_lock", relationship.get("route_lock", 0)))
|
||||
var m: Variant = relationship.get(&"metrics", relationship.get("metrics", {}))
|
||||
if m is Dictionary:
|
||||
affection = int(m.get(&"affection", m.get("affection", 0)))
|
||||
elif relationship is Object:
|
||||
if "shield_current" in relationship:
|
||||
shield = int(relationship.get(&"shield_current"))
|
||||
if "route_lock" in relationship:
|
||||
route_lock_val = int(relationship.get(&"route_lock"))
|
||||
if "metrics" in relationship:
|
||||
var m: Variant = relationship.get(&"metrics")
|
||||
if m is Dictionary:
|
||||
affection = int(m.get(&"affection", m.get("affection", 0)))
|
||||
if shield > 0 or affection > 0 or route_lock_val in [RelationshipState.RouteLock.EXCLUSIVE_PENDING, RelationshipState.RouteLock.EXCLUSIVE_LOCKED]:
|
||||
return BUBBLE_HEART
|
||||
return BUBBLE_NONE
|
||||
|
||||
|
||||
static func get_assignment_rejection_text(reason: StringName) -> String:
|
||||
return ASSIGNMENT_REASONS.get(reason, "配属を変更できませんでした。条件を確認してください。")
|
||||
|
||||
|
||||
static func get_placement_rejection_text(report: Dictionary) -> String:
|
||||
var reasons: Array = report.get(&"reasons", report.get("reasons", []))
|
||||
var error_codes: Array = report.get(&"error_codes", report.get("error_codes", []))
|
||||
if not error_codes.is_empty():
|
||||
var code: String = String(error_codes[0])
|
||||
if PLACEMENT_REASONS.has(code):
|
||||
return PLACEMENT_REASONS[code]
|
||||
if not reasons.is_empty():
|
||||
return String(reasons[0])
|
||||
return "指定したマスには建築できません。配置条件を確認してください。"
|
||||
|
||||
|
||||
## Important warning cut-in dialog: invasion start, duel, defense start
|
||||
class ImportantWarningCutinDialog extends AcceptDialog:
|
||||
signal cutin_dismissed(kind: StringName)
|
||||
|
||||
var _current_kind: StringName = &""
|
||||
var _queue: Array[Dictionary] = []
|
||||
var _cutin_active := false
|
||||
var _pre_cutin_user_paused := false
|
||||
var _title_label: Label
|
||||
var _body_label: Label
|
||||
|
||||
func _init() -> void:
|
||||
name = "ImportantWarningCutinDialog"
|
||||
title = "重要警告"
|
||||
ok_button_text = "確認"
|
||||
unresizable = true
|
||||
min_size = Vector2i(480, 200)
|
||||
size = Vector2i(480, 200)
|
||||
|
||||
var vbox := VBoxContainer.new()
|
||||
vbox.custom_minimum_size = Vector2(460, 140)
|
||||
vbox.add_theme_constant_override("separation", 10)
|
||||
add_child(vbox)
|
||||
|
||||
_title_label = Label.new()
|
||||
_title_label.name = "CutinTitleLabel"
|
||||
_title_label.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER
|
||||
_title_label.add_theme_font_size_override("font_size", 16)
|
||||
_title_label.add_theme_color_override("font_color", Color("ff7b7b"))
|
||||
vbox.add_child(_title_label)
|
||||
|
||||
_body_label = Label.new()
|
||||
_body_label.name = "CutinBodyLabel"
|
||||
_body_label.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART
|
||||
_body_label.size_flags_vertical = Control.SIZE_EXPAND_FILL
|
||||
_body_label.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER
|
||||
_body_label.add_theme_font_size_override("font_size", 13)
|
||||
vbox.add_child(_body_label)
|
||||
|
||||
confirmed.connect(_on_dismissed)
|
||||
canceled.connect(_on_dismissed)
|
||||
close_requested.connect(_on_dismissed)
|
||||
|
||||
func show_cutin(kind: StringName, heading: String, message: String) -> void:
|
||||
if _cutin_active:
|
||||
_queue.append({&"kind": kind, &"heading": heading, &"message": message})
|
||||
return
|
||||
_cutin_active = true
|
||||
var clock := get_node_or_null("/root/GameClock")
|
||||
if clock != null:
|
||||
_pre_cutin_user_paused = bool(clock.get("paused"))
|
||||
if not _pre_cutin_user_paused:
|
||||
clock.set_paused(true)
|
||||
_display_cutin(kind, heading, message)
|
||||
|
||||
func _display_cutin(kind: StringName, heading: String, message: String) -> void:
|
||||
_current_kind = kind
|
||||
_title_label.text = heading
|
||||
_body_label.text = message
|
||||
popup_centered(Vector2i(500, 220))
|
||||
get_ok_button().grab_focus()
|
||||
|
||||
func _on_dismissed() -> void:
|
||||
var kind := _current_kind
|
||||
_current_kind = &""
|
||||
cutin_dismissed.emit(kind)
|
||||
if not _queue.is_empty():
|
||||
var next: Dictionary = _queue.pop_front()
|
||||
_display_cutin(next[&"kind"], next[&"heading"], next[&"message"])
|
||||
else:
|
||||
_cutin_active = false
|
||||
var clock := get_node_or_null("/root/GameClock")
|
||||
if clock != null and not _pre_cutin_user_paused:
|
||||
clock.set_paused(false)
|
||||
@@ -1 +0,0 @@
|
||||
uid://c8p24opfeedback
|
||||
@@ -1,145 +0,0 @@
|
||||
class_name OperationsCameraControls
|
||||
extends HBoxContainer
|
||||
|
||||
## Presentation-only camera and navigation controls providing click alternatives
|
||||
## for pointer drag, wheel scroll, and modifier-based navigation.
|
||||
## Does not alter the underlying simulation model or game state.
|
||||
|
||||
const LayerSkin := preload("res://scripts/ui/layer_interface_skin.gd")
|
||||
|
||||
signal zoom_in_requested
|
||||
signal zoom_out_requested
|
||||
signal reset_view_requested
|
||||
signal pan_requested(direction: Vector2)
|
||||
signal grid_toggle_requested
|
||||
signal layer_toggle_requested
|
||||
|
||||
var zoom_in_button: Button
|
||||
var zoom_out_button: Button
|
||||
var reset_button: Button
|
||||
var pan_up_button: Button
|
||||
var pan_down_button: Button
|
||||
var pan_left_button: Button
|
||||
var pan_right_button: Button
|
||||
var grid_button: Button
|
||||
var layer_button: Button
|
||||
|
||||
var _world_preview: Variant
|
||||
var _main_scene: Variant
|
||||
var _buttons: Array[Button] = []
|
||||
|
||||
|
||||
func _init() -> void:
|
||||
name = "OperationsCameraControls"
|
||||
add_theme_constant_override("separation", 4)
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
_build_ui()
|
||||
|
||||
|
||||
func configure(preview: Variant, main_scene: Variant = null) -> void:
|
||||
_world_preview = preview
|
||||
_main_scene = main_scene
|
||||
|
||||
|
||||
func _build_ui() -> void:
|
||||
# Navigation Pan Buttons
|
||||
pan_left_button = _create_button("◀", "左へ移動", func() -> void: _on_pan_step(Vector2(1, 0)))
|
||||
pan_up_button = _create_button("▲", "上へ移動", func() -> void: _on_pan_step(Vector2(0, 1)))
|
||||
pan_down_button = _create_button("▼", "下へ移動", func() -> void: _on_pan_step(Vector2(0, -1)))
|
||||
pan_right_button = _create_button("▶", "右へ移動", func() -> void: _on_pan_step(Vector2(-1, 0)))
|
||||
|
||||
# Zoom Buttons
|
||||
zoom_in_button = _create_button("+", "拡大表示", _on_zoom_in)
|
||||
zoom_out_button = _create_button("-", "縮小表示", _on_zoom_out)
|
||||
|
||||
# Reset / Focus
|
||||
reset_button = _create_button("全体", "表示範囲全体を収める", _on_reset_view)
|
||||
|
||||
# Grid & Layer Toggle
|
||||
grid_button = _create_button("マス目", "グリッド線の表示/非表示を切り替え", _on_grid_toggle)
|
||||
layer_button = _create_button("表/裏", "フロアの表層/裏層を切り替え", _on_layer_toggle)
|
||||
|
||||
|
||||
func _create_button(text_label: String, tooltip: String, callback: Callable) -> Button:
|
||||
var btn := Button.new()
|
||||
btn.text = text_label
|
||||
btn.tooltip_text = tooltip
|
||||
btn.custom_minimum_size = Vector2(30, 26)
|
||||
btn.focus_mode = Control.FOCUS_NONE
|
||||
btn.add_theme_font_size_override("font_size", 11)
|
||||
btn.pressed.connect(callback)
|
||||
add_child(btn)
|
||||
_buttons.append(btn)
|
||||
return btn
|
||||
|
||||
|
||||
func _on_zoom_in() -> void:
|
||||
if _world_preview != null and _world_preview.has_method(&"set_zoom"):
|
||||
var current: float = float(_world_preview.get("zoom_level"))
|
||||
_world_preview.set_zoom(current + 0.5)
|
||||
zoom_in_requested.emit()
|
||||
|
||||
|
||||
func _on_zoom_out() -> void:
|
||||
if _world_preview != null and _world_preview.has_method(&"set_zoom"):
|
||||
var current: float = float(_world_preview.get("zoom_level"))
|
||||
_world_preview.set_zoom(current - 0.5)
|
||||
zoom_out_requested.emit()
|
||||
|
||||
|
||||
func _on_pan_step(direction: Vector2) -> void:
|
||||
var delta := Vector2(32, 48) * direction
|
||||
if _world_preview != null:
|
||||
if _world_preview.has_method(&"_cell_dimensions"):
|
||||
var dims: Vector2 = _world_preview.call(&"_cell_dimensions")
|
||||
delta = direction * dims
|
||||
var offset: Vector2 = _world_preview.get("pan_offset")
|
||||
_world_preview.set("pan_offset", offset + delta)
|
||||
if _world_preview.has_method(&"_clamp_pan"):
|
||||
_world_preview.call(&"_clamp_pan")
|
||||
_world_preview.queue_redraw()
|
||||
pan_requested.emit(delta)
|
||||
|
||||
|
||||
func _on_pan(delta: Vector2) -> void:
|
||||
if _world_preview != null:
|
||||
var offset: Vector2 = _world_preview.get("pan_offset")
|
||||
_world_preview.set("pan_offset", offset + delta)
|
||||
if _world_preview.has_method(&"_clamp_pan"):
|
||||
_world_preview.call(&"_clamp_pan")
|
||||
_world_preview.queue_redraw()
|
||||
pan_requested.emit(delta)
|
||||
|
||||
|
||||
func _on_reset_view() -> void:
|
||||
if _world_preview != null:
|
||||
if _world_preview.has_method(&"focus_operating_area"):
|
||||
_world_preview.call(&"focus_operating_area")
|
||||
elif _world_preview.has_method(&"reset_view"):
|
||||
_world_preview.call(&"reset_view")
|
||||
reset_view_requested.emit()
|
||||
|
||||
|
||||
func _on_grid_toggle() -> void:
|
||||
if _world_preview != null:
|
||||
var current_grid: bool = bool(_world_preview.get("show_grid"))
|
||||
_world_preview.set("show_grid", not current_grid)
|
||||
_world_preview.queue_redraw()
|
||||
grid_toggle_requested.emit()
|
||||
|
||||
|
||||
func _on_layer_toggle() -> void:
|
||||
if _main_scene != null and _main_scene.has_method(&"_toggle_layer"):
|
||||
_main_scene.call(&"_toggle_layer")
|
||||
elif _world_preview != null:
|
||||
var current_mode: int = int(_world_preview.get("layer_mode"))
|
||||
_world_preview.set("layer_mode", 1 if current_mode == 0 else 0)
|
||||
layer_toggle_requested.emit()
|
||||
|
||||
|
||||
func apply_layer_skin(layer: int) -> void:
|
||||
for btn: Button in _buttons:
|
||||
LayerSkin.register_toggle_text(btn, layer)
|
||||
LayerSkin.apply_tree(self, layer)
|
||||
@@ -1 +0,0 @@
|
||||
uid://c9p24cameractrl
|
||||
@@ -0,0 +1,110 @@
|
||||
extends SceneTree
|
||||
|
||||
const Model = preload("res://scripts/relationship/original_relationship_state.gd")
|
||||
const Service = preload("res://scripts/relationship/relationship_service.gd")
|
||||
var _checks := 0
|
||||
var _failures := 0
|
||||
|
||||
|
||||
func _initialize() -> void:
|
||||
call_deferred("_run")
|
||||
|
||||
|
||||
func _expect(value: bool, message: String) -> void:
|
||||
_checks += 1
|
||||
if not value:
|
||||
_failures += 1
|
||||
push_error(message)
|
||||
|
||||
|
||||
static func fixture() -> Dictionary:
|
||||
# Validation fixtures, never approved initialization or range limits.
|
||||
return {"subject_id": "heroine_anri", "protagonist_id": "player", "rival_id": "rival_rai",
|
||||
"affection": 142.5, "lust": 23.25, "netorare": 11, "shield_current": 90.5, "shield_max": 142.5}
|
||||
|
||||
|
||||
func _service() -> RelationshipService:
|
||||
return Service.new().configure_original_identity_validator(
|
||||
func(p: Dictionary) -> bool:
|
||||
return p["subject_id"] == "heroine_anri" and p["protagonist_id"] == "player" and p["rival_id"] == "rival_rai"
|
||||
)
|
||||
|
||||
|
||||
func _run() -> void:
|
||||
var service := _service()
|
||||
var before := var_to_bytes(service.create_snapshot())
|
||||
var unset := service.get_original_relationship(&"heroine_anri")
|
||||
_expect(not unset[&"configured"] and unset[&"affection"] == null, "missing record is unset")
|
||||
unset[&"affection"] = 999
|
||||
_expect(var_to_bytes(service.create_snapshot()) == before, "reads own their dictionaries")
|
||||
var payload := fixture()
|
||||
var payload_bytes := var_to_bytes(payload)
|
||||
_expect(service.register_original_relationship(payload).is_success(), "complete directional fixture registers")
|
||||
payload["affection"] = 0
|
||||
_expect(service.get_original_relationship(&"heroine_anri")["affection"] == 142.5, "caller cannot mutate stored facts")
|
||||
_expect(not service.register_original_relationship(fixture()).is_success(), "duplicate subject rejected")
|
||||
var saved := service.create_snapshot()
|
||||
var restored := _service()
|
||||
_expect(restored.restore_snapshot(saved), "new-only v2 restores")
|
||||
_expect(var_to_bytes(restored.create_snapshot()) == var_to_bytes(saved), "new-only exact bytes")
|
||||
_expect(var_to_bytes(fixture()) == payload_bytes, "fixture is explicit and stable")
|
||||
for field: String in Model.FIELDS:
|
||||
var missing := fixture()
|
||||
missing.erase(field)
|
||||
_expect(Model.from_snapshot(missing) == null, "missing required field " + field)
|
||||
for value: Variant in [null, true, "12", INF, NAN, {}, []]:
|
||||
var wrong := fixture()
|
||||
wrong["lust"] = value
|
||||
_expect(Model.from_snapshot(wrong) == null, "wrong/nonfinite numeric value rejected")
|
||||
for patch: Dictionary in [{"shield_max": 1}, {"shield_current": -1}, {"shield_current": 143}, {"rival_id": "player"}, {"subject_id": "player"}]:
|
||||
var wrong := fixture()
|
||||
wrong.merge(patch, true)
|
||||
_expect(Model.from_snapshot(wrong) == null, "value/identity invariant rejected")
|
||||
var zero := fixture()
|
||||
for field: String in ["affection", "lust", "netorare", "shield_current", "shield_max"]:
|
||||
zero[field] = 0
|
||||
_expect(Model.from_snapshot(zero) != null, "explicit zero is configured")
|
||||
var legacy := {"version": 1, "relationships": [{"relationship_id": "old", "actor_a_id": "player", "actor_b_id": "heroine_anri",
|
||||
"metrics": {"affinity": 117, "dependence": 29, "extension": {"opaque": [3, "keep"]}}, "extra": ["raw", 2.5]}],
|
||||
"threshold_candidates": [], "next_candidate_sequence": 1, "extension": {"version": 70}}
|
||||
var legacy_bytes := var_to_bytes(legacy)
|
||||
var migrated := _service()
|
||||
_expect(migrated.restore_snapshot(legacy), "legacy aliases still usable")
|
||||
_expect(migrated.get_relationship(&"old").get_metric(&"affection") == 100, "legacy normalization behavior retained")
|
||||
_expect(not migrated.get_original_relationship(&"heroine_anri")[&"configured"], "legacy never configures original facts")
|
||||
_expect(var_to_bytes(migrated.create_snapshot()[&"legacy"]) == legacy_bytes, "all raw legacy values and extensions preserved")
|
||||
_expect(var_to_bytes(legacy) == legacy_bytes, "legacy input bytes untouched")
|
||||
_expect(migrated.register_original_relationship(fixture()).is_success(), "mixed state registers independently")
|
||||
var mixed := migrated.create_snapshot()
|
||||
_expect(restored.restore_snapshot(mixed), "mixed snapshot restores")
|
||||
_expect(var_to_bytes(restored.create_snapshot()) == var_to_bytes(mixed), "mixed exact bytes")
|
||||
_expect(migrated.apply_value_change(&"old", &"trust", 3, 0).is_success(), "legacy changes still apply")
|
||||
var changed: Dictionary = migrated.create_snapshot()[&"legacy"]
|
||||
_expect(changed["relationships"][0]["metrics"]["affinity"] == 117 and changed["relationships"][0]["metrics"]["trust"] == 3, "changed metric preserves raw alias")
|
||||
for version: Variant in [0, 3, "2", 2.0, true]:
|
||||
var bad := mixed.duplicate(true)
|
||||
bad[&"version"] = version
|
||||
_rejected(restored, bad)
|
||||
var duplicate := mixed.duplicate(true)
|
||||
duplicate[&"original_relationships"].append(fixture())
|
||||
_rejected(restored, duplicate)
|
||||
for patch: Dictionary in [{"rival_id": "unknown"}, {"protagonist_id": "unknown"}, {"lust": false}, {"shield_max": 10}]:
|
||||
var bad := mixed.duplicate(true)
|
||||
bad[&"original_relationships"][0].merge(patch, true)
|
||||
_rejected(restored, bad)
|
||||
var bad_legacy := legacy.duplicate(true)
|
||||
bad_legacy["relationships"][0]["metrics"]["affinity"] = "117"
|
||||
_rejected(restored, bad_legacy)
|
||||
bad_legacy = legacy.duplicate(true)
|
||||
bad_legacy["relationships"].append(bad_legacy["relationships"][0].duplicate(true))
|
||||
_rejected(restored, bad_legacy)
|
||||
print("Original relationship model: %d checks, %d failures" % [_checks, _failures])
|
||||
quit(_failures)
|
||||
|
||||
|
||||
func _rejected(service: RelationshipService, payload: Dictionary) -> void:
|
||||
var before := var_to_bytes(service.create_snapshot())
|
||||
var input := var_to_bytes(payload)
|
||||
_expect(not service.restore_snapshot(payload), "corrupt snapshot rejected")
|
||||
_expect(var_to_bytes(service.create_snapshot()) == before, "rejection preserves prior state")
|
||||
_expect(var_to_bytes(payload) == input, "rejection preserves input bytes")
|
||||
@@ -0,0 +1 @@
|
||||
uid://cqxwpbkgjtnsb
|
||||
@@ -0,0 +1,78 @@
|
||||
extends SceneTree
|
||||
|
||||
const Fixtures = preload("res://tests/s4/test_original_relationship_model.gd")
|
||||
var _checks := 0
|
||||
var _failures := 0
|
||||
|
||||
|
||||
func _initialize() -> void:
|
||||
call_deferred("_run")
|
||||
|
||||
|
||||
func _expect(value: bool, message: String) -> void:
|
||||
_checks += 1
|
||||
if not value:
|
||||
_failures += 1
|
||||
push_error(message)
|
||||
|
||||
|
||||
func _run() -> void:
|
||||
var clock = load("res://autoload/game_clock.gd").new()
|
||||
var state = load("res://autoload/game_state.gd").new()
|
||||
var runtime = load("res://autoload/simulation_runtime.gd").new()
|
||||
clock.reset(1, 6, 0)
|
||||
state.reset()
|
||||
_expect(runtime.initialize(clock, state, 18001)[&"valid"], "Runtime initialized")
|
||||
clock.set_paused(true)
|
||||
var fixture := Fixtures.fixture()
|
||||
_expect(not runtime.relationship_service.register_original_relationship(fixture).is_success(), "unhired subject rejected by service boundary")
|
||||
_expect(runtime.submit_command(&"hire_staff_candidate", {&"candidate_id": &"heroine_anri"}).is_success(), "actual approved Anri hire")
|
||||
var read_before := var_to_bytes(runtime.create_snapshot())
|
||||
var report: Dictionary = runtime.get_staff_management_report()
|
||||
var found := false
|
||||
for row: Dictionary in report[&"staff"]:
|
||||
if row[&"staff_id"] == &"heroine_anri":
|
||||
found = true
|
||||
_expect(not row[&"original_relationship"][&"configured"] and row[&"original_relationship"][&"affection"] == null, "actual report exposes unset")
|
||||
_expect(found, "hired staff appears in actual report")
|
||||
_expect(var_to_bytes(runtime.create_snapshot()) == read_before, "unset report read has no mutation")
|
||||
var old_events: Array = runtime.domain_events.create_snapshot()["recent_events"]
|
||||
_expect(runtime.submit_command(&"register_original_relationship", fixture).is_success(), "registered Runtime command stores explicit fixture")
|
||||
var new_events: Array = runtime.domain_events.create_snapshot()["recent_events"]
|
||||
_expect(new_events.size() == old_events.size() + 1 and new_events[-1][&"event_type"] == "COMMAND_COMPLETED", "only existing command completion event is emitted")
|
||||
_expect(runtime.relationship_service.create_relationship(&"legacy", &"heroine_anri", &"player", {&"affinity": 44}).is_success(), "legacy service remains usable")
|
||||
var saved: Dictionary = runtime.create_snapshot()
|
||||
var input := var_to_bytes(saved)
|
||||
_expect(runtime.restore_snapshot(saved), "mixed Runtime snapshot restores")
|
||||
_expect(var_to_bytes(runtime.create_snapshot()) == input, "Runtime snapshot exact round trip")
|
||||
_expect(var_to_bytes(saved) == input, "restore preserves caller bytes")
|
||||
read_before = var_to_bytes(runtime.create_snapshot())
|
||||
report = runtime.get_staff_management_report()
|
||||
for row: Dictionary in report[&"staff"]:
|
||||
if row[&"staff_id"] == &"heroine_anri":
|
||||
var original: Dictionary = row[&"original_relationship"]
|
||||
_expect(original[&"configured"] and original["affection"] == 142.5 and original["shield_max"] == 142.5, "restored report equals stored original values")
|
||||
original["affection"] = -99
|
||||
_expect(var_to_bytes(runtime.create_snapshot()) == read_before, "configured report owns projection containers")
|
||||
for patch: Dictionary in [{"subject_id": "missing"}, {"protagonist_id": "rival_rai"}, {"rival_id": "missing"}, {"shield_current": 999}, {"lust": "bad"}]:
|
||||
var corrupt := saved.duplicate(true)
|
||||
corrupt[&"systems"][&"runtime"][&"relationships"][&"original_relationships"][0].merge(patch, true)
|
||||
var bad_bytes := var_to_bytes(corrupt)
|
||||
var service_before: Variant = runtime.relationship_service
|
||||
_expect(not runtime.restore_snapshot(corrupt), "bad original Runtime restore rejected")
|
||||
_expect(runtime.relationship_service == service_before, "failed restore preserves service identity")
|
||||
_expect(var_to_bytes(runtime.create_snapshot()) == read_before, "failed restore preserves whole Runtime")
|
||||
_expect(var_to_bytes(corrupt) == bad_bytes, "failed restore preserves input")
|
||||
var v1 := saved.duplicate(true)
|
||||
v1[&"systems"][&"runtime"][&"relationships"] = saved[&"systems"][&"runtime"][&"relationships"][&"legacy"].duplicate(true)
|
||||
_expect(runtime.restore_snapshot(v1), "Runtime accepts genuine v1 relationship payload")
|
||||
_expect(not runtime.relationship_service.get_original_relationship(&"heroine_anri")[&"configured"], "v1 restore does not map legacy affection")
|
||||
var invalid := fixture.duplicate(true)
|
||||
invalid["rival_id"] = "missing"
|
||||
_expect(not runtime.relationship_service.register_original_relationship(invalid).is_success(), "restore rebind keeps identity validator")
|
||||
_expect(runtime.relationship_service.register_original_relationship(fixture).is_success(), "restored service accepts correct identities")
|
||||
runtime.free()
|
||||
clock.free()
|
||||
state.free()
|
||||
print("Original relationship runtime: %d checks, %d failures" % [_checks, _failures])
|
||||
quit(_failures)
|
||||
@@ -0,0 +1 @@
|
||||
uid://cqxwpbkgjtnsc
|
||||
@@ -1,101 +0,0 @@
|
||||
class_name OperationsOSObserver
|
||||
extends RefCounted
|
||||
|
||||
## Passive actual Main/runtime observer for P24-02 operations and notification evidence.
|
||||
## Captures OS process environment, screen scale, bubble state, and modal identity
|
||||
## without modifying the active simulation model.
|
||||
## Local unit fixture observations are strictly separated from candidate normal OS
|
||||
## input evidence (which requires formal native OS capture receipts).
|
||||
|
||||
var pid := 0
|
||||
var platform := ""
|
||||
var window_size := Vector2i.ZERO
|
||||
var observations: Array[Dictionary] = []
|
||||
var bubble_records: Dictionary = {} # Maps actor_id -> latest bubble record
|
||||
var bubble_history: Array[Dictionary] = [] # Chronological history of all bubble state transition events
|
||||
var modal_records: Array[Dictionary] = []
|
||||
var cutin_records: Array[Dictionary] = []
|
||||
var save_records: Array[Dictionary] = []
|
||||
|
||||
|
||||
func _init() -> void:
|
||||
pid = OS.get_process_id()
|
||||
platform = OS.get_name()
|
||||
|
||||
|
||||
func capture_environment(tree: SceneTree, main: Control) -> Dictionary:
|
||||
var root: Window = tree.root if tree != null else null
|
||||
window_size = root.size if root != null else Vector2i.ZERO
|
||||
var report := {
|
||||
&"pid": pid,
|
||||
&"platform": platform,
|
||||
&"window_size": [window_size.x, window_size.y],
|
||||
&"main_present": is_instance_valid(main),
|
||||
&"captured_at_msec": Time.get_ticks_msec(),
|
||||
&"fixture_scope": &"local_unit_fixture_only_not_native_os_input_evidence",
|
||||
}
|
||||
observations.append(report)
|
||||
return report
|
||||
|
||||
|
||||
func record_bubble(actor_id: StringName, kind: StringName, source_state: int) -> void:
|
||||
var record := {
|
||||
&"actor_id": actor_id,
|
||||
&"kind": kind,
|
||||
&"source_state": source_state,
|
||||
&"recorded_at": Time.get_ticks_msec(),
|
||||
}
|
||||
bubble_records[actor_id] = record
|
||||
bubble_history.append(record)
|
||||
|
||||
|
||||
func get_latest_bubble(actor_id: StringName) -> Dictionary:
|
||||
return bubble_records.get(actor_id, {})
|
||||
|
||||
|
||||
func get_bubble_history() -> Array[Dictionary]:
|
||||
return bubble_history.duplicate(true)
|
||||
|
||||
|
||||
func record_modal_event(dialog_name: String, action: String, details: Dictionary = {}) -> void:
|
||||
modal_records.append({
|
||||
&"dialog_name": dialog_name,
|
||||
&"action": action,
|
||||
&"details": details.duplicate(true),
|
||||
&"recorded_at": Time.get_ticks_msec(),
|
||||
})
|
||||
|
||||
|
||||
func record_cutin(kind: StringName, heading: String, message: String) -> void:
|
||||
cutin_records.append({
|
||||
&"kind": kind,
|
||||
&"heading": heading,
|
||||
&"message": message,
|
||||
&"recorded_at": Time.get_ticks_msec(),
|
||||
})
|
||||
|
||||
|
||||
func record_save_label(path: String, display_name: String, is_fresh: bool) -> void:
|
||||
save_records.append({
|
||||
&"path": path,
|
||||
&"display_name": display_name,
|
||||
&"is_fresh": is_fresh,
|
||||
&"recorded_at": Time.get_ticks_msec(),
|
||||
})
|
||||
|
||||
|
||||
func get_summary() -> Dictionary:
|
||||
return {
|
||||
&"pid": pid,
|
||||
&"platform": platform,
|
||||
&"window_size": [window_size.x, window_size.y],
|
||||
&"observations_count": observations.size(),
|
||||
&"unique_actors_tracked": bubble_records.size(),
|
||||
&"bubbles_tracked": bubble_history.size(),
|
||||
&"bubble_history_count": bubble_history.size(),
|
||||
&"bubble_events_count": bubble_history.size(),
|
||||
&"modals_tracked": modal_records.size(),
|
||||
&"cutins_tracked": cutin_records.size(),
|
||||
&"saves_tracked": save_records.size(),
|
||||
&"fixture_scope": &"local_unit_fixture_only_not_native_os_input_evidence",
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
uid://copobserver001
|
||||
@@ -1,334 +0,0 @@
|
||||
extends SceneTree
|
||||
|
||||
const FixtureCleanup := preload("res://tests/helpers/ui_audio_fixture_cleanup.gd")
|
||||
const OperationFeedbackScript := preload("res://scripts/ui/operation_feedback.gd")
|
||||
const OperationsOSObserverScript := preload("res://tests/ui/fixtures/operations_os_observer.gd")
|
||||
const ManualSaveSlotsDialogScript := preload("res://scripts/ui/manual_save_slots_dialog.gd")
|
||||
|
||||
var _checks := 0
|
||||
var _failures := 0
|
||||
|
||||
|
||||
func _initialize() -> void:
|
||||
call_deferred("_run")
|
||||
|
||||
|
||||
func _expect(ok: bool, message: String) -> void:
|
||||
_checks += 1
|
||||
if not ok:
|
||||
_failures += 1
|
||||
push_error("FAIL: " + message)
|
||||
|
||||
|
||||
func _run() -> void:
|
||||
var observer := OperationsOSObserverScript.new()
|
||||
var runtime: Variant = root.get_node("SimulationRuntime")
|
||||
var clock: Variant = root.get_node("GameClock")
|
||||
var state: Variant = root.get_node("GameState")
|
||||
|
||||
clock.reset(1, 6, 0)
|
||||
state.reset()
|
||||
runtime.initialize(clock, state, 42534)
|
||||
clock.set_paused(true)
|
||||
root.size = Vector2i(1440, 810)
|
||||
|
||||
var main: Control = load("res://scenes/main/main.tscn").instantiate()
|
||||
root.add_child(main)
|
||||
runtime.configure_save_policy({&"enabled": false, &"daily_checkpoint_enabled": false})
|
||||
|
||||
await process_frame
|
||||
await process_frame
|
||||
|
||||
var preview: WorldPreview = main.get("world_preview")
|
||||
_expect(preview != null, "WorldPreview exists in Main")
|
||||
var env_report: Dictionary = observer.capture_environment(self, main)
|
||||
_expect(env_report[&"pid"] > 0, "Observer captured actual process PID")
|
||||
|
||||
# =========================================================================
|
||||
# Condition 1: placement_and_invalid_drop (Grid snap, warnings, invalid rejection)
|
||||
# =========================================================================
|
||||
var def_registry: Variant = runtime.get("definition_registry")
|
||||
var reception_def: Variant = def_registry.get_facility(&"reception") if def_registry != null else null
|
||||
_expect(reception_def != null, "Reception facility definition exists")
|
||||
|
||||
# Valid placement commits once
|
||||
var valid_cell := Vector3i(-8, 0, 0)
|
||||
var build_result: Variant = runtime.submit_command(&"build_facility", {
|
||||
&"definition_id": &"reception",
|
||||
&"origin": valid_cell,
|
||||
&"rotation": 0
|
||||
})
|
||||
_expect(build_result.is_success(), "Valid facility construction commits once")
|
||||
|
||||
# Advance time for facility to finish construction
|
||||
clock.advance_minutes(120)
|
||||
var facilities: Array = runtime.construction_service.get_facilities()
|
||||
_expect(not facilities.is_empty(), "Facility construction completed in world")
|
||||
var facility_id := StringName(facilities[0][&"instance_id"])
|
||||
|
||||
# Connection warning on preview
|
||||
preview.set_build_definition(reception_def, 0)
|
||||
var connection_preview: Dictionary = preview.get_build_preview_report(Vector3i(10, 10, 0))
|
||||
_expect(connection_preview.has(&"connection"), "Build preview includes connection warning report")
|
||||
|
||||
# Invalid placement rejection explanation
|
||||
var invalid_preview: Dictionary = preview.get_build_preview_report(Vector3i(999, 999, 0))
|
||||
var rejection_text := OperationFeedbackScript.get_placement_rejection_text(invalid_preview)
|
||||
_expect(not rejection_text.is_empty(), "Invalid placement explains actual rejection reason: " + rejection_text)
|
||||
preview.clear_build_definition()
|
||||
|
||||
# Staff assignment via drop
|
||||
var staff_panel: StaffManagementPanel = main.get("staff_management_panel")
|
||||
_expect(staff_panel != null, "StaffManagementPanel exists")
|
||||
_expect(runtime.staff_service.create_staff(&"op_worker_1", &"cleaner", {}).is_success(), "Create test employee")
|
||||
staff_panel.refresh()
|
||||
|
||||
var drop_payload := {
|
||||
&"kind": &"staff_assignment",
|
||||
&"staff_id": &"op_worker_1",
|
||||
&"template_id": &"DAY",
|
||||
&"queue_instance_id": int(staff_panel.get("_queue_instance_id"))
|
||||
}
|
||||
staff_panel.assign_from_drop(drop_payload, facility_id)
|
||||
_expect(staff_panel.selected_staff_id == &"op_worker_1", "Drop assignment preserves employee selection")
|
||||
|
||||
# Invalid assignment rejection explains actual reason and leaves model intact
|
||||
var before_model: Dictionary = runtime.create_snapshot()
|
||||
var invalid_drop := {
|
||||
&"kind": &"staff_assignment",
|
||||
&"staff_id": &"non_existent_staff",
|
||||
&"template_id": &"DAY",
|
||||
&"queue_instance_id": int(staff_panel.get("_queue_instance_id"))
|
||||
}
|
||||
staff_panel.assign_from_drop(invalid_drop, facility_id)
|
||||
var after_model: Dictionary = runtime.create_snapshot()
|
||||
_expect(SimulationDigest.compute(before_model) == SimulationDigest.compute(after_model), "Invalid drop leaves simulation model completely intact")
|
||||
|
||||
# Click-based assignment alternative
|
||||
_expect(main.has_method(&"assign_staff_by_click"), "Main provides click-based assignment alternative")
|
||||
staff_panel.select_staff(&"op_worker_1")
|
||||
main.call(&"assign_staff_by_click", facility_id, &"op_worker_1")
|
||||
_expect(staff_panel.selected_staff_id == &"op_worker_1", "Click-based assignment succeeds and leaves selection intact")
|
||||
|
||||
# =========================================================================
|
||||
# Condition 2: modal_and_pause_resume (Modal input block, pause freezes simulation)
|
||||
# =========================================================================
|
||||
var save_dialog: ConfirmationDialog = main.call(&"_ensure_manual_save_slots")
|
||||
_expect(save_dialog != null, "Save slots dialog is available")
|
||||
var initial_manual_path: String = main.manual_save_path
|
||||
save_dialog.show_new_save("user://saves/manual_ui")
|
||||
await process_frame
|
||||
_expect(preview.modal_input_blocked, "Behind-dialog input is blocked while modal is open")
|
||||
# Behind-dialog drop assignment is rejected while modal is open
|
||||
var drop_test_payload := {
|
||||
&"kind": &"staff_assignment",
|
||||
&"staff_id": &"op_worker_1",
|
||||
&"template_id": &"DAY",
|
||||
}
|
||||
_expect(not preview._can_drop_data(Vector2.ZERO, drop_test_payload), "Modal suppresses behind-dialog staff assignment drop")
|
||||
# Cancel modal preserves save identity and unblocks behind-dialog input
|
||||
save_dialog.hide()
|
||||
save_dialog.emit_signal(&"canceled")
|
||||
await process_frame
|
||||
_expect(not preview.modal_input_blocked, "Modal close unblocks behind-dialog input")
|
||||
_expect(main.manual_save_path == initial_manual_path, "Modal cancellation preserves existing save identity")
|
||||
|
||||
# Pause freezes simulation via process_real_delta/accumulator; ordinary resume continues exactly once
|
||||
var clock_paused_before: bool = bool(clock.get("paused"))
|
||||
clock.set_paused(true)
|
||||
var min_paused: int = int(clock.get("absolute_minute"))
|
||||
# Passing non-zero real delta while paused returns 0 ticks and does not advance simulation minute
|
||||
var paused_ticks: int = clock.process_real_delta(SimulationKernel.REAL_SECONDS_PER_GAME_MINUTE * 2.0)
|
||||
_expect(paused_ticks == 0, "Paused clock returns 0 ticks on non-zero real process delta")
|
||||
_expect(int(clock.get("absolute_minute")) == min_paused, "Paused clock freezes minute advancement on real process delta")
|
||||
# Ordinary resume continues exactly once
|
||||
clock.set_paused(false)
|
||||
var resumed_ticks: int = clock.process_real_delta(SimulationKernel.REAL_SECONDS_PER_GAME_MINUTE)
|
||||
_expect(resumed_ticks == 1, "Resumed clock on real process delta advances exactly one tick")
|
||||
_expect(int(clock.get("absolute_minute")) == min_paused + 1, "Resumed clock advances simulation minute exactly once")
|
||||
clock.set_paused(clock_paused_before)
|
||||
|
||||
# =========================================================================
|
||||
# Condition 3: unit_bubbles (Zzz, anger, heart from real states)
|
||||
# =========================================================================
|
||||
var test_staff: StaffRuntime = runtime.staff_service.get_staff(&"op_worker_1")
|
||||
_expect(test_staff != null, "Worker runtime exists for bubble test")
|
||||
|
||||
# SLEEPING / INCAPACITATED -> Zzz
|
||||
test_staff.state = StaffRuntime.State.SLEEPING
|
||||
var bubble_zzz: StringName = OperationFeedbackScript.resolve_staff_bubble(test_staff)
|
||||
_expect(bubble_zzz == OperationFeedbackScript.BUBBLE_ZZZ, "Sleeping staff resolves to Zzz bubble")
|
||||
observer.record_bubble(&"op_worker_1", bubble_zzz, test_staff.state)
|
||||
|
||||
# STRIKE / FLEEING -> anger (no unapproved morale thresholds)
|
||||
test_staff.state = StaffRuntime.State.STRIKE
|
||||
var bubble_anger: StringName = OperationFeedbackScript.resolve_staff_bubble(test_staff)
|
||||
_expect(bubble_anger == OperationFeedbackScript.BUBBLE_ANGER, "Strike staff resolves to anger bubble")
|
||||
observer.record_bubble(&"op_worker_1", bubble_anger, test_staff.state)
|
||||
|
||||
# Authoritative RelationshipState / RouteLock -> heart (no unapproved loyalty/morale thresholds)
|
||||
var rel_state := RelationshipState.new()
|
||||
rel_state.configure(&"rel_op_1", &"heroine_anri", &"op_worker_1", {
|
||||
&"shield_max": 100,
|
||||
&"shield_current": 100,
|
||||
&"route_lock": RelationshipState.RouteLock.EXCLUSIVE_PENDING,
|
||||
&"route_id": &"pure_love",
|
||||
&"metrics": {&"affection": 80}
|
||||
})
|
||||
test_staff.state = StaffRuntime.State.AVAILABLE
|
||||
var bubble_heart: StringName = OperationFeedbackScript.resolve_staff_bubble(test_staff, rel_state)
|
||||
_expect(bubble_heart == OperationFeedbackScript.BUBBLE_HEART, "Authoritative relationship model resolves to heart bubble")
|
||||
observer.record_bubble(&"op_worker_1", bubble_heart, test_staff.state)
|
||||
|
||||
# Switching state back to normal working -> clears bubble without stale symbol
|
||||
test_staff.state = StaffRuntime.State.WORKING
|
||||
var bubble_work: StringName = OperationFeedbackScript.resolve_staff_bubble(test_staff)
|
||||
_expect(bubble_work == OperationFeedbackScript.BUBBLE_NONE, "Normal working staff clears bubble without stale symbol")
|
||||
var neutral_rel := RelationshipState.new()
|
||||
neutral_rel.configure(&"rel_op_neutral", &"heroine_anri", &"op_worker_1", {
|
||||
&"shield_max": 100,
|
||||
&"shield_current": 0,
|
||||
&"route_lock": RelationshipState.RouteLock.NONE,
|
||||
&"route_id": &"",
|
||||
&"metrics": {&"affection": 0}
|
||||
})
|
||||
var bubble_cleared: StringName = OperationFeedbackScript.resolve_staff_bubble(test_staff, neutral_rel)
|
||||
_expect(bubble_cleared == OperationFeedbackScript.BUBBLE_NONE, "Neutral relationship model clears heart bubble")
|
||||
observer.record_bubble(&"op_worker_1", bubble_cleared, test_staff.state)
|
||||
_expect(observer.get_latest_bubble(&"op_worker_1").get(&"kind", &"") == OperationFeedbackScript.BUBBLE_NONE, "Observer confirms stale bubble symbol is removed on transition to normal")
|
||||
|
||||
# Guest bubble: Incapacitated -> Zzz
|
||||
var test_guest := GuestRuntime.new()
|
||||
test_guest.guest_id = &"bubble_guest"
|
||||
test_guest.state = GuestRuntime.State.INCAPACITATED
|
||||
_expect(OperationFeedbackScript.resolve_guest_bubble(test_guest) == OperationFeedbackScript.BUBBLE_ZZZ, "Incapacitated guest resolves to Zzz bubble")
|
||||
|
||||
# Guest bubble: Abandoning -> anger
|
||||
test_guest.state = GuestRuntime.State.ABANDONING
|
||||
_expect(OperationFeedbackScript.resolve_guest_bubble(test_guest) == OperationFeedbackScript.BUBBLE_ANGER, "Abandoning guest resolves to anger bubble")
|
||||
|
||||
# Guest bubble: Normal moving -> no bubble
|
||||
test_guest.state = GuestRuntime.State.MOVING
|
||||
_expect(OperationFeedbackScript.resolve_guest_bubble(test_guest) == OperationFeedbackScript.BUBBLE_NONE, "Normal moving guest clears bubble without stale symbol")
|
||||
|
||||
# =========================================================================
|
||||
# Condition 4: event_log (Bounded 256, formatted Japanese, deduplicated)
|
||||
# =========================================================================
|
||||
var event_dialog: EventLogDialog = main.get("event_log_dialog")
|
||||
_expect(event_dialog != null, "EventLogDialog exists in Main")
|
||||
var event_rows: Array[Dictionary] = event_dialog.get_event_rows()
|
||||
_expect(event_rows.size() <= 256, "Event rows bounded to recent 256 entries")
|
||||
|
||||
var sample_event := {
|
||||
"event_id": "evt_test_001",
|
||||
"event_type": "DEFENSE_RAID_CREATED",
|
||||
"absolute_minute": 360,
|
||||
"entity_ids": [],
|
||||
"amount": -500,
|
||||
"reason": "RAID_START"
|
||||
}
|
||||
var presentation: Dictionary = event_dialog.get_event_presentation(sample_event)
|
||||
_expect(presentation[&"title"] == "襲撃が発生", "Event type resolves to readable Japanese title")
|
||||
_expect("G-500" in presentation[&"extra"] or "500" in presentation[&"extra"], "Event presentation includes amount details")
|
||||
|
||||
# =========================================================================
|
||||
# Condition 5: important_warning_cutin (Invasion / Duel / Defense start)
|
||||
# =========================================================================
|
||||
_expect(main.has_method(&"show_warning_cutin"), "Main provides show_warning_cutin")
|
||||
main.call(&"show_warning_cutin", OperationFeedbackScript.CUTIN_DEFENSE, "防衛戦開始演出", "敵の襲撃が発生しました!")
|
||||
var cutin: OperationFeedback.ImportantWarningCutinDialog = main.get("important_warning_cutin")
|
||||
_expect(cutin != null and cutin.visible, "Important warning cut-in is displayed")
|
||||
observer.record_cutin(OperationFeedbackScript.CUTIN_DEFENSE, "防衛戦開始演出", "敵の襲撃が発生しました!")
|
||||
cutin.hide()
|
||||
cutin.emit_signal(&"confirmed")
|
||||
await process_frame
|
||||
_expect(not cutin.visible, "Important warning cut-in dismisses cleanly")
|
||||
|
||||
# Real domain event triggers: DEFENSE_RAID_CREATED and RELATIONSHIP_SHIELD_CHANGED break
|
||||
main.call(&"_on_domain_event_published", {
|
||||
&"event_type": &"DEFENSE_RAID_CREATED",
|
||||
&"payload": {&"raid_id": &"raid_test_01"}
|
||||
})
|
||||
_expect(cutin != null and cutin.visible, "DEFENSE_RAID_CREATED domain event triggers defense cutin")
|
||||
cutin.hide()
|
||||
cutin.emit_signal(&"confirmed")
|
||||
await process_frame
|
||||
|
||||
main.call(&"_on_domain_event_published", {
|
||||
&"event_type": &"RELATIONSHIP_SHIELD_CHANGED",
|
||||
&"payload": {&"old_value": 50, &"new_value": 0}
|
||||
})
|
||||
_expect(cutin != null and cutin.visible, "Shield vanishing to 0 triggers love shield warning cutin")
|
||||
cutin.hide()
|
||||
cutin.emit_signal(&"confirmed")
|
||||
await process_frame
|
||||
|
||||
# Generic INCIDENT_CREATED does not falsely trigger warning cutin
|
||||
main.call(&"_on_domain_event_published", {
|
||||
&"event_type": &"INCIDENT_CREATED",
|
||||
&"payload": {&"incident_type": &"illegal_facility"}
|
||||
})
|
||||
_expect(not cutin.visible, "Generic INCIDENT_CREATED does not trigger warning cutin")
|
||||
|
||||
# =========================================================================
|
||||
# Condition 6: click_alternatives (OperationsCameraControls click equivalents)
|
||||
# =========================================================================
|
||||
var camera_ctrl: OperationsCameraControls = main.get("operations_camera_controls")
|
||||
_expect(camera_ctrl != null, "OperationsCameraControls exists in Main")
|
||||
|
||||
var initial_zoom: float = preview.zoom_level
|
||||
camera_ctrl.zoom_in_button.emit_signal(&"pressed")
|
||||
_expect(preview.zoom_level > initial_zoom, "Click zoom in increments zoom level")
|
||||
|
||||
camera_ctrl.zoom_out_button.emit_signal(&"pressed")
|
||||
_expect(is_equal_approx(preview.zoom_level, initial_zoom), "Click zoom out restores zoom level")
|
||||
|
||||
var initial_pan: Vector2 = preview.pan_offset
|
||||
camera_ctrl.pan_up_button.emit_signal(&"pressed")
|
||||
_expect(preview.pan_offset != initial_pan, "Click pan moves pan offset")
|
||||
|
||||
camera_ctrl.reset_button.emit_signal(&"pressed")
|
||||
_expect(preview.zoom_level >= 0.5 and preview.zoom_level <= 4.0, "Click reset maintains valid viewport framing")
|
||||
|
||||
var grid_before: bool = preview.show_grid
|
||||
camera_ctrl.grid_button.emit_signal(&"pressed")
|
||||
_expect(preview.show_grid != grid_before, "Click grid button toggles grid display")
|
||||
camera_ctrl.grid_button.emit_signal(&"pressed")
|
||||
|
||||
# =========================================================================
|
||||
# Condition 7: japanese_input_and_scale (Japanese save label, cryptographic path)
|
||||
# =========================================================================
|
||||
var label_edit: LineEdit = save_dialog.find_child("ManualSaveLabelEdit", true, false) as LineEdit
|
||||
_expect(label_edit != null, "Manual save slots dialog contains LineEdit for Japanese label input")
|
||||
|
||||
save_dialog.show_new_save("user://saves/manual_ui")
|
||||
_expect(not label_edit.text.is_empty(), "Save label has valid Japanese default text: " + label_edit.text)
|
||||
|
||||
# User inputs Japanese text
|
||||
var custom_label := "世界樹第壱号拠点・本番セーブ"
|
||||
label_edit.text = custom_label
|
||||
label_edit.emit_signal(&"text_changed", custom_label)
|
||||
_expect(save_dialog.get_ok_button().disabled == false, "Valid Japanese text allows save confirmation")
|
||||
|
||||
# Clear / cancel semantics
|
||||
save_dialog.hide()
|
||||
save_dialog.emit_signal(&"canceled")
|
||||
_expect(label_edit.text.is_empty(), "Dialog cancel clears input label")
|
||||
|
||||
# Cryptographic owned path check
|
||||
_expect(ManualSaveSlotsDialogScript.is_owned_slot_name("manual_ui_0123456789abcdef0123456789abcdef"), "Cryptographic slot path regex matches owned specification")
|
||||
_expect(not ManualSaveSlotsDialogScript.is_owned_slot_name("user_custom_folder_name"), "User custom folder name rejected from cryptographic slot rule")
|
||||
|
||||
# =========================================================================
|
||||
# Condition 8: final_validation_review (All 8 conditions checked, ordinary cleanup)
|
||||
# =========================================================================
|
||||
var observer_summary: Dictionary = observer.get_summary()
|
||||
_expect(observer_summary[&"pid"] > 0, "Observer tracks non-zero PID")
|
||||
_expect(observer_summary[&"bubbles_tracked"] >= 3, "Observer tracked at least 3 unit bubble events")
|
||||
_expect(observer_summary[&"unique_actors_tracked"] >= 1, "Observer maintains latest state map for tracked actors")
|
||||
|
||||
var cleanup: Dictionary = await FixtureCleanup.free_owner_and_wait(self, main)
|
||||
_expect(bool(cleanup.get(&"passed", false)), "Ordinary Main fixture and audio cleanup succeeds")
|
||||
|
||||
print("Operations notification: %d checks, %d failures" % [_checks, _failures])
|
||||
quit(1 if _failures else 0)
|
||||
@@ -1 +0,0 @@
|
||||
uid://copnotify0001
|
||||
@@ -1,747 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
"""P24-02 Operations and Notification Acceptance Evidence Validator.
|
||||
|
||||
Strict verify-only validator enforcing schema, scope source manifest,
|
||||
concrete condition-specific evidence artifacts, OS execution receipts,
|
||||
cross-process restart proof, and all 8 required conditions:
|
||||
- placement_and_invalid_drop
|
||||
- modal_and_pause_resume
|
||||
- unit_bubbles
|
||||
- event_log
|
||||
- important_warning_cutin
|
||||
- click_alternatives
|
||||
- japanese_input_and_scale
|
||||
- final_validation_review
|
||||
"""
|
||||
|
||||
import argparse
|
||||
import hashlib
|
||||
import json
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
REQUIRED_CONDITIONS = [
|
||||
"placement_and_invalid_drop",
|
||||
"modal_and_pause_resume",
|
||||
"unit_bubbles",
|
||||
"event_log",
|
||||
"important_warning_cutin",
|
||||
"click_alternatives",
|
||||
"japanese_input_and_scale",
|
||||
"final_validation_review",
|
||||
]
|
||||
|
||||
REQUIRED_SCOPE_FILES = [
|
||||
"scenes/main/main.gd",
|
||||
"scenes/main/world_preview.gd",
|
||||
"scripts/ui/event_log_dialog.gd",
|
||||
"scripts/ui/manual_save_slots_dialog.gd",
|
||||
"scripts/ui/operation_feedback.gd",
|
||||
"scripts/ui/operation_feedback.gd.uid",
|
||||
"scripts/ui/operations_camera_controls.gd",
|
||||
"scripts/ui/operations_camera_controls.gd.uid",
|
||||
"tests/ui/test_operations_notification.gd",
|
||||
"tests/ui/test_operations_notification.gd.uid",
|
||||
"tests/ui/fixtures/operations_os_observer.gd",
|
||||
"tests/ui/fixtures/operations_os_observer.gd.uid",
|
||||
"tools/check_p24_operations_evidence.py",
|
||||
"tools/run_all_tests.py",
|
||||
"tools/regression/suite-policy.json",
|
||||
"docs/plans/original-completion-2026-10-02/execution/completion_marker_contracts.json",
|
||||
]
|
||||
|
||||
EXPECTED_TASK_ID = "P24-02"
|
||||
EXPECTED_BASE_COMMIT = "1a5abc65163097d4b36a060d68f58c92093eb4e9"
|
||||
EXPECTED_SPEC_SHA256 = "738268b406e381ccab415b426d4a547b02e7cb2a481cefce65579a1e346834c7"
|
||||
HEX64_PATTERN = re.compile(r"^[0-9a-f]{64}$")
|
||||
HEX_COMMIT_PATTERN = re.compile(r"^[0-9a-f]{40}$|^[0-9a-f]{64}$")
|
||||
JAPANESE_CHAR_PATTERN = re.compile(r"[\u3040-\u309F\u30A0-\u30FF\u4E00-\u9FFF]")
|
||||
MAX_VALID_PID = 4_194_304
|
||||
|
||||
|
||||
def compute_sha256(path: Path) -> str:
|
||||
return hashlib.sha256(path.read_bytes()).hexdigest()
|
||||
|
||||
|
||||
def get_actual_git_head() -> str:
|
||||
env_head = os.environ.get("CANDIDATE_COMMIT", os.environ.get("TARGET_HEAD"))
|
||||
if env_head:
|
||||
cleaned = env_head.strip().lower()
|
||||
if HEX_COMMIT_PATTERN.match(cleaned) and not (set(cleaned) <= {"0"} or set(cleaned) <= {"f"}):
|
||||
return cleaned
|
||||
try:
|
||||
import subprocess
|
||||
res = subprocess.run(["git", "rev-parse", "HEAD"], capture_output=True, text=True, timeout=5)
|
||||
if res.returncode == 0:
|
||||
h = res.stdout.strip().lower()
|
||||
if HEX_COMMIT_PATTERN.match(h) and not (set(h) <= {"0"} or set(h) <= {"f"}):
|
||||
return h
|
||||
except Exception:
|
||||
pass
|
||||
return ""
|
||||
|
||||
|
||||
def get_required_suite_roster(root: Path) -> list[str]:
|
||||
tests_dir = root / "tests"
|
||||
if not tests_dir.is_dir():
|
||||
return []
|
||||
roster = ["tests/run_tests.gd"]
|
||||
for p in sorted(tests_dir.rglob("test*.gd")):
|
||||
rel = p.relative_to(root).as_posix()
|
||||
if "export" not in p.relative_to(root).parts and rel != "tests/s0/test_kernel_and_save.gd":
|
||||
roster.append(rel)
|
||||
return sorted(list(set(roster)))
|
||||
|
||||
|
||||
def find_index_file(custom_path: str = None) -> Path:
|
||||
if custom_path:
|
||||
p = Path(custom_path)
|
||||
if p.is_file():
|
||||
return p.resolve()
|
||||
if p.is_dir():
|
||||
candidate = p / "index.json"
|
||||
if candidate.is_file():
|
||||
return candidate.resolve()
|
||||
candidate2 = p / "p24-operations-evidence" / "index.json"
|
||||
if candidate2.is_file():
|
||||
return candidate2.resolve()
|
||||
|
||||
build_dir = os.environ.get("BUILD_OUTPUT_DIR")
|
||||
if build_dir:
|
||||
candidate = Path(build_dir) / "p24-operations-evidence" / "index.json"
|
||||
if candidate.is_file():
|
||||
return candidate.resolve()
|
||||
candidate2 = Path(build_dir) / "index.json"
|
||||
if candidate2.is_file():
|
||||
return candidate2.resolve()
|
||||
|
||||
candidates = [
|
||||
Path(".runtime/P24-02/build/p24-operations-evidence/index.json"),
|
||||
Path("docs/plans/original-completion-2026-10-02/execution/p24-02/evidence/index.json"),
|
||||
Path("artifacts/p24-02-operations/index.json"),
|
||||
]
|
||||
for c in candidates:
|
||||
if c.is_file():
|
||||
return c.resolve()
|
||||
|
||||
return None
|
||||
|
||||
|
||||
def _is_bare_or_dummy_artifact(data: dict) -> bool:
|
||||
if not isinstance(data, dict):
|
||||
return True
|
||||
if len(data) <= 1:
|
||||
return True
|
||||
trivial_keys = {"pid", "status", "passed", "id", "timestamp", "name", "contract_id"}
|
||||
if set(data.keys()).issubset(trivial_keys):
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
def _validate_condition_artifact_content(
|
||||
cond: str,
|
||||
art_data: dict,
|
||||
art_type: str,
|
||||
evidence_dir: Path,
|
||||
root_data: dict,
|
||||
validated_artifacts: dict,
|
||||
) -> tuple[bool, str]:
|
||||
if not isinstance(art_data, dict):
|
||||
return False, f"Artifact content for condition '{cond}' must be a JSON object"
|
||||
|
||||
if _is_bare_or_dummy_artifact(art_data):
|
||||
return False, f"Artifact for condition '{cond}' is a bare self-declaration/PID-only JSON without substantive evidence details"
|
||||
|
||||
if cond == "placement_and_invalid_drop":
|
||||
if "grid_snap" not in art_data:
|
||||
return False, "Missing 'grid_snap' in placement evidence"
|
||||
if "connection_warning" not in art_data:
|
||||
return False, "Missing 'connection_warning' in placement evidence"
|
||||
if not art_data.get("valid_placement"):
|
||||
return False, "Missing 'valid_placement' in placement evidence"
|
||||
if not art_data.get("invalid_placement_rejection"):
|
||||
return False, "Missing 'invalid_placement_rejection' in placement evidence"
|
||||
if not art_data.get("click_assignment"):
|
||||
return False, "Missing 'click_assignment' in placement evidence"
|
||||
|
||||
elif cond == "modal_and_pause_resume":
|
||||
if not art_data.get("modal_input_blocked"):
|
||||
return False, "Missing 'modal_input_blocked': true in modal/pause evidence"
|
||||
if not art_data.get("behind_dialog_suppressed") and not (
|
||||
art_data.get("behind_dialog_build_suppressed") and art_data.get("behind_dialog_drop_suppressed")
|
||||
):
|
||||
return False, "Missing behind-dialog input suppression verification in modal evidence"
|
||||
if not art_data.get("clock_pause"):
|
||||
return False, "Missing 'clock_pause' (freezing simulation on real delta) in modal/pause evidence"
|
||||
if not art_data.get("clock_resume"):
|
||||
return False, "Missing 'clock_resume' (advancing exactly once on real delta) in modal/pause evidence"
|
||||
if not art_data.get("save_identity_preserved"):
|
||||
return False, "Missing 'save_identity_preserved': true in modal/pause evidence"
|
||||
|
||||
# Separate process restart verification (別process restart・保存再開とPID)
|
||||
cross_proc = art_data.get("cross_process", art_data.get("process_restart", root_data.get("cross_process")))
|
||||
if not cross_proc or not isinstance(cross_proc, dict):
|
||||
return False, "Missing verified separate process restart evidence ('cross_process' or 'process_restart' with distinct producer and consumer PIDs)"
|
||||
|
||||
producer_pid = cross_proc.get("producer_pid")
|
||||
consumer_pid = cross_proc.get("consumer_pid")
|
||||
|
||||
# Support artifact-linked cross-process structure (P24-03 pattern)
|
||||
if (producer_pid is None or consumer_pid is None) and "producer" in cross_proc and "consumer" in cross_proc:
|
||||
prod_art_id = cross_proc["producer"]
|
||||
cons_art_id = cross_proc["consumer"]
|
||||
if prod_art_id in validated_artifacts and cons_art_id in validated_artifacts:
|
||||
try:
|
||||
prod_json = json.loads(validated_artifacts[prod_art_id]["file"].read_text(encoding="utf-8"))
|
||||
cons_json = json.loads(validated_artifacts[cons_art_id]["file"].read_text(encoding="utf-8"))
|
||||
producer_pid = prod_json.get("pid")
|
||||
consumer_pid = cons_json.get("pid")
|
||||
if prod_json.get("manifest_sha256") and cons_json.get("manifest_sha256"):
|
||||
if prod_json["manifest_sha256"] != cons_json["manifest_sha256"]:
|
||||
return False, "Cross-process restart manifest_sha256 mismatch between producer and consumer"
|
||||
if prod_json.get("world_sha256") and cons_json.get("world_sha256"):
|
||||
if prod_json["world_sha256"] != cons_json["world_sha256"]:
|
||||
return False, "Cross-process restart world_sha256 mismatch between producer and consumer"
|
||||
except Exception as e:
|
||||
return False, f"Failed to parse cross-process producer/consumer artifacts: {e}"
|
||||
|
||||
if isinstance(producer_pid, bool) or not isinstance(producer_pid, int) or producer_pid <= 1:
|
||||
return False, f"Invalid or missing cross-process producer_pid: {producer_pid!r}"
|
||||
if isinstance(consumer_pid, bool) or not isinstance(consumer_pid, int) or consumer_pid <= 1:
|
||||
return False, f"Invalid or missing cross-process consumer_pid: {consumer_pid!r}"
|
||||
if producer_pid == consumer_pid:
|
||||
return False, f"Cross-process restart requires distinct processes; producer and consumer share identical PID {producer_pid}"
|
||||
|
||||
state_preserved = (
|
||||
cross_proc.get("same_manifest_world") is True
|
||||
or cross_proc.get("whole_model_and_screen_values_equal") is True
|
||||
or cross_proc.get("state_preserved") is True
|
||||
or ("manifest_sha256" in cross_proc and "world_sha256" in cross_proc)
|
||||
or ("producer" in cross_proc and "consumer" in cross_proc)
|
||||
)
|
||||
if not state_preserved:
|
||||
return False, "Cross-process restart evidence missing proof of save/world consistency across distinct processes"
|
||||
|
||||
elif cond == "unit_bubbles":
|
||||
if not art_data.get("zzz_bubble"):
|
||||
return False, "Missing 'zzz_bubble' in unit bubbles evidence"
|
||||
if not art_data.get("anger_bubble"):
|
||||
return False, "Missing 'anger_bubble' in unit bubbles evidence"
|
||||
if not art_data.get("heart_bubble"):
|
||||
return False, "Missing 'heart_bubble' with authoritative relationship model in unit bubbles evidence"
|
||||
if not art_data.get("stale_removal"):
|
||||
return False, "Missing 'stale_removal' state transition clearing in unit bubbles evidence"
|
||||
|
||||
tracked = art_data.get("bubbles_tracked", art_data.get("bubble_events_count", 0))
|
||||
if isinstance(tracked, bool) or not isinstance(tracked, int) or tracked < 3:
|
||||
return False, f"Unit bubbles evidence must track at least 3 bubble events, got: {tracked!r}"
|
||||
|
||||
elif cond == "event_log":
|
||||
limit = art_data.get("recent_limit")
|
||||
if isinstance(limit, bool) or not isinstance(limit, int) or limit > 256 or limit <= 0:
|
||||
return False, f"Event log recent limit must be positive int <= 256, got: {limit!r}"
|
||||
if not art_data.get("readable_japanese"):
|
||||
return False, "Missing 'readable_japanese': true in event log evidence"
|
||||
if not art_data.get("deduplicated"):
|
||||
return False, "Missing 'deduplicated': true in event log evidence"
|
||||
events = art_data.get("events")
|
||||
if not isinstance(events, list) or not events:
|
||||
return False, "Event log evidence must include non-empty 'events' list"
|
||||
for i, ev in enumerate(events):
|
||||
if not isinstance(ev, dict):
|
||||
return False, f"Event log row {i} must be a dictionary"
|
||||
if not ev.get("event_id") or not ev.get("event_type"):
|
||||
return False, f"Event log row {i} missing event_id or event_type"
|
||||
title = ev.get("title", "")
|
||||
if not isinstance(title, str) or not JAPANESE_CHAR_PATTERN.search(title):
|
||||
return False, f"Event log row {i} title must contain readable Japanese, got: {title!r}"
|
||||
|
||||
elif cond == "important_warning_cutin":
|
||||
if not art_data.get("defense_cutin"):
|
||||
return False, "Missing 'defense_cutin' in cutin evidence"
|
||||
if not art_data.get("shield_vanishing_cutin"):
|
||||
return False, "Missing 'shield_vanishing_cutin' in cutin evidence"
|
||||
if not art_data.get("simulation_stop") or not art_data.get("simulation_resume"):
|
||||
return False, "Missing simulation stop/resume behavior in cutin evidence"
|
||||
|
||||
elif cond == "click_alternatives":
|
||||
for k in ["zoom_in", "zoom_out", "pan", "reset", "grid_toggle", "click_assignment"]:
|
||||
if not art_data.get(k):
|
||||
return False, f"Missing '{k}' click alternative in click alternatives evidence"
|
||||
if not art_data.get("presentation_only"):
|
||||
return False, "Missing 'presentation_only': true (no model corruption) in click evidence"
|
||||
|
||||
elif cond == "japanese_input_and_scale":
|
||||
# IME composition verification
|
||||
ime_comp = art_data.get("ime_composition")
|
||||
if not isinstance(ime_comp, dict):
|
||||
return False, "Missing or invalid 'ime_composition' evidence object (must be JSON object with composition details)"
|
||||
comp_text = ime_comp.get("text", ime_comp.get("composition_string", ime_comp.get("value", "")))
|
||||
if not isinstance(comp_text, str) or not JAPANESE_CHAR_PATTERN.search(comp_text):
|
||||
return False, f"'ime_composition' must contain Japanese text, got: {comp_text!r}"
|
||||
cursor = ime_comp.get("cursor_position", ime_comp.get("cursor", ime_comp.get("position")))
|
||||
if cursor is not None and (isinstance(cursor, bool) or not isinstance(cursor, int) or cursor < 0):
|
||||
return False, f"'ime_composition' cursor position must be non-negative integer, got: {cursor!r}"
|
||||
|
||||
# IME confirm verification
|
||||
ime_conf = art_data.get("ime_confirm")
|
||||
if not isinstance(ime_conf, dict):
|
||||
return False, "Missing or invalid 'ime_confirm' evidence object (must be JSON object with confirmation details)"
|
||||
conf_text = ime_conf.get("text", ime_conf.get("confirmed_text", ime_conf.get("value", "")))
|
||||
if not isinstance(conf_text, str) or not JAPANESE_CHAR_PATTERN.search(conf_text):
|
||||
return False, f"'ime_confirm' must contain confirmed Japanese text, got: {conf_text!r}"
|
||||
if not (ime_conf.get("applied") is True or ime_conf.get("confirmed") is True or ime_conf.get("status") in ("confirmed", "applied")):
|
||||
return False, "Missing 'applied': true or 'confirmed': true in 'ime_confirm' evidence"
|
||||
|
||||
# IME cancel verification
|
||||
ime_canc = art_data.get("ime_cancel")
|
||||
if not isinstance(ime_canc, dict):
|
||||
return False, "Missing or invalid 'ime_cancel' evidence object (must be JSON object with cancel details)"
|
||||
if not (
|
||||
ime_canc.get("canceled") is True
|
||||
or ime_canc.get("reverted") is True
|
||||
or ime_canc.get("cleared") is True
|
||||
or ime_canc.get("status") in ("canceled", "reverted", "cleared")
|
||||
):
|
||||
return False, "Missing cancel/revert confirmation in 'ime_cancel' evidence"
|
||||
|
||||
# Cryptographic owned save slot path
|
||||
path_str = art_data.get("cryptographic_owned_path")
|
||||
if not path_str or not isinstance(path_str, str):
|
||||
return False, f"Missing 'cryptographic_owned_path' in Japanese input evidence: {path_str!r}"
|
||||
slot_filename = Path(path_str).name
|
||||
if not re.match(r"^manual_ui_[0-9a-f]{32}$", slot_filename):
|
||||
return False, f"Invalid cryptographic owned save slot filename (must match ^manual_ui_[0-9a-f]{{32}}$): {slot_filename!r}"
|
||||
|
||||
if not art_data.get("invalid_input_feedback"):
|
||||
return False, "Missing 'invalid_input_feedback' in Japanese input evidence"
|
||||
|
||||
# Window scales inspection list
|
||||
window_scales = art_data.get("window_scales")
|
||||
if not isinstance(window_scales, list) or not window_scales:
|
||||
return False, "Missing 'window_scales' inspection list in scale evidence"
|
||||
for i, entry in enumerate(window_scales):
|
||||
if not isinstance(entry, dict):
|
||||
return False, f"window_scales entry {i} must be a dictionary"
|
||||
ws = entry.get("window_size", entry.get("size"))
|
||||
if ws is not None:
|
||||
if not isinstance(ws, (list, tuple)) or len(ws) != 2:
|
||||
return False, f"window_scales entry {i} window_size must be 2-element [w, h]"
|
||||
ew, eh = ws
|
||||
if isinstance(ew, bool) or isinstance(eh, bool) or not isinstance(ew, int) or not isinstance(eh, int) or ew <= 0 or eh <= 0:
|
||||
return False, f"window_scales entry {i} dimensions must be positive integers: {ws!r}"
|
||||
readability = entry.get("readability")
|
||||
if readability is not True and (not isinstance(readability, str) or not readability.strip()):
|
||||
return False, f"window_scales entry {i} lacks verified 'readability': true or legibility description"
|
||||
clipping = entry.get("clipping")
|
||||
if clipping is not False and clipping not in ("none", "no_clipping"):
|
||||
return False, f"window_scales entry {i} has unexpected clipping: {clipping!r} (expected false or 'none')"
|
||||
focus = entry.get("focus")
|
||||
if focus is not True:
|
||||
return False, f"window_scales entry {i} missing 'focus': true"
|
||||
sc = entry.get("screenshot")
|
||||
if sc:
|
||||
if not isinstance(sc, str) or not sc.endswith(".png"):
|
||||
return False, f"window_scales entry {i} screenshot must be a .png file: {sc!r}"
|
||||
sc_path = evidence_dir / sc if evidence_dir else Path(sc)
|
||||
if not sc_path.is_file() or sc_path.stat().st_size == 0:
|
||||
return False, f"window_scales entry {i} screenshot missing or empty on disk: {sc!r}"
|
||||
|
||||
# Windows acceptance remains pending; macOS verified
|
||||
if art_data.get("windows_acceptance") is True:
|
||||
return False, "Premature claim of Windows acceptance; Windows release acceptance must remain separate pending condition"
|
||||
|
||||
elif cond == "final_validation_review":
|
||||
suite = art_data.get("test_suite")
|
||||
if suite != "tests/ui/test_operations_notification.gd":
|
||||
return False, f"Unexpected test suite in final validation review: {suite!r}"
|
||||
failures = art_data.get("failures")
|
||||
if isinstance(failures, bool) or not isinstance(failures, int) or failures != 0:
|
||||
return False, f"Test failures must be 0, got: {failures!r}"
|
||||
checks = art_data.get("checks")
|
||||
if isinstance(checks, bool) or not isinstance(checks, int) or checks <= 0:
|
||||
return False, f"Test checks must be positive integer, got: {checks!r}"
|
||||
|
||||
# Full roster verification (全rosterの実スイート集合/ソース一致/結果を照合する)
|
||||
full_roster = art_data.get("full_roster")
|
||||
if not full_roster or not isinstance(full_roster, dict):
|
||||
# Check if root index provides full_regression dict
|
||||
full_roster = root_data.get("full_regression")
|
||||
if not full_roster or not isinstance(full_roster, dict):
|
||||
return False, "Missing 'full_roster' summary in final validation review evidence"
|
||||
|
||||
repo_root = Path(".").resolve()
|
||||
required_suites = get_required_suite_roster(repo_root)
|
||||
total_required = len(required_suites)
|
||||
|
||||
reported_suites = full_roster.get("total_suites", full_roster.get("suites_count", full_roster.get("suites")))
|
||||
if isinstance(reported_suites, int):
|
||||
if reported_suites < total_required:
|
||||
return False, f"Full roster reports only {reported_suites} suites, but repository requires at least {total_required} suites"
|
||||
|
||||
roster_failures = full_roster.get("failures")
|
||||
if roster_failures is not None and (isinstance(roster_failures, bool) or not isinstance(roster_failures, int) or roster_failures != 0):
|
||||
return False, f"Full roster regression reported failures: {roster_failures!r}"
|
||||
|
||||
# Check suite entries if provided in full_roster or referenced all-tests artifact
|
||||
suite_entries = full_roster.get("results", full_roster.get("rows", full_roster.get("all_tests")))
|
||||
if not suite_entries and "rows" in full_roster and full_roster["rows"] in validated_artifacts:
|
||||
rows_art = validated_artifacts[full_roster["rows"]]
|
||||
try:
|
||||
suite_entries = json.loads(rows_art["file"].read_text(encoding="utf-8"))
|
||||
except Exception:
|
||||
suite_entries = None
|
||||
|
||||
if isinstance(suite_entries, list) and suite_entries:
|
||||
seen_suites = set()
|
||||
for entry in suite_entries:
|
||||
if not isinstance(entry, dict):
|
||||
continue
|
||||
s_path = entry.get("test", entry.get("suite", entry.get("path")))
|
||||
if s_path:
|
||||
seen_suites.add(s_path)
|
||||
p = repo_root / s_path
|
||||
if not p.is_file():
|
||||
return False, f"Full roster suite does not exist on disk: {s_path}"
|
||||
expected_sha = entry.get("source_sha256")
|
||||
if expected_sha and HEX64_PATTERN.match(expected_sha):
|
||||
actual_sha = compute_sha256(p)
|
||||
if actual_sha != expected_sha:
|
||||
return False, f"Full roster source SHA256 mismatch for {s_path}: expected {expected_sha}, got {actual_sha}"
|
||||
e_fails = entry.get("failures", entry.get("reported_failures", 0))
|
||||
if isinstance(e_fails, int) and e_fails != 0:
|
||||
return False, f"Full roster suite {s_path} failed with {e_fails} failures"
|
||||
e_passed = entry.get("passed", entry.get("completion", {}).get("passed") if isinstance(entry.get("completion"), dict) else None)
|
||||
if e_passed is False:
|
||||
return False, f"Full roster suite {s_path} marked passed: false"
|
||||
|
||||
missing_from_roster = set(required_suites) - seen_suites
|
||||
if missing_from_roster and len(seen_suites) >= total_required:
|
||||
pass
|
||||
elif missing_from_roster and len(suite_entries) >= total_required:
|
||||
pass
|
||||
elif missing_from_roster:
|
||||
return False, f"Full roster execution missing required suites: {sorted(list(missing_from_roster))[:5]}"
|
||||
|
||||
return True, ""
|
||||
|
||||
|
||||
def verify_evidence(index_path: Path) -> bool:
|
||||
print(f"Reading evidence index from: {index_path}")
|
||||
try:
|
||||
data = json.loads(index_path.read_text(encoding="utf-8"))
|
||||
except Exception as e:
|
||||
print(f"ERROR: Failed to read/parse index JSON: {e}", file=sys.stderr)
|
||||
return False
|
||||
|
||||
if not isinstance(data, dict):
|
||||
print("ERROR: Evidence index root must be a JSON object", file=sys.stderr)
|
||||
return False
|
||||
|
||||
# Requirement A: Task ID, base commit, spec SHA256, and candidate version
|
||||
task_id = data.get("task_id", data.get("contract_id", data.get("id")))
|
||||
if task_id != EXPECTED_TASK_ID:
|
||||
print(f"ERROR: Unexpected task ID: {task_id!r} (expected {EXPECTED_TASK_ID!r})", file=sys.stderr)
|
||||
return False
|
||||
|
||||
base_commit = data.get("base_commit", data.get("commit"))
|
||||
if base_commit != EXPECTED_BASE_COMMIT:
|
||||
print(f"ERROR: Base commit mismatch: {base_commit!r} (expected {EXPECTED_BASE_COMMIT!r})", file=sys.stderr)
|
||||
return False
|
||||
|
||||
# spec_sha256 is strictly mandatory
|
||||
spec_sha = data.get("spec_sha256")
|
||||
if not spec_sha or not isinstance(spec_sha, str) or spec_sha != EXPECTED_SPEC_SHA256:
|
||||
print(f"ERROR: Missing or invalid spec_sha256: {spec_sha!r} (expected {EXPECTED_SPEC_SHA256!r})", file=sys.stderr)
|
||||
return False
|
||||
|
||||
# Candidate commit must be strictly valid 40/64 hex and match actual git HEAD
|
||||
candidate_commit = data.get("candidate_commit", data.get("candidate_head"))
|
||||
if not candidate_commit or not isinstance(candidate_commit, str):
|
||||
print(f"ERROR: Missing candidate_commit in evidence index: {candidate_commit!r}", file=sys.stderr)
|
||||
return False
|
||||
|
||||
candidate_commit_norm = candidate_commit.strip().lower()
|
||||
if not HEX_COMMIT_PATTERN.match(candidate_commit_norm):
|
||||
print(f"ERROR: candidate_commit must be a valid 40 or 64 character hex SHA, got: {candidate_commit!r}", file=sys.stderr)
|
||||
return False
|
||||
|
||||
if set(candidate_commit_norm) <= {"0"} or set(candidate_commit_norm) <= {"f"}:
|
||||
print(f"ERROR: candidate_commit is a dummy placeholder hash: {candidate_commit!r}", file=sys.stderr)
|
||||
return False
|
||||
|
||||
actual_head = get_actual_git_head()
|
||||
if not actual_head:
|
||||
print("ERROR: Unable to resolve verified actual candidate git HEAD from environment (CANDIDATE_COMMIT/TARGET_HEAD) or git repository", file=sys.stderr)
|
||||
return False
|
||||
|
||||
if candidate_commit_norm != actual_head:
|
||||
print(f"ERROR: Candidate commit mismatch: index specifies {candidate_commit_norm!r}, but verified actual candidate git HEAD is {actual_head!r}", file=sys.stderr)
|
||||
return False
|
||||
|
||||
# Scope source manifest verification: all REQUIRED_SCOPE_FILES must be present in source_hashes
|
||||
sources = data.get("source_hashes")
|
||||
if not isinstance(sources, dict) or not sources:
|
||||
print("ERROR: 'source_hashes' dictionary is required in evidence index", file=sys.stderr)
|
||||
return False
|
||||
|
||||
missing_scope_sources = [f for f in REQUIRED_SCOPE_FILES if f not in sources]
|
||||
if missing_scope_sources:
|
||||
print(f"ERROR: 'source_hashes' omits required scope files: {missing_scope_sources}", file=sys.stderr)
|
||||
return False
|
||||
|
||||
for rel_path, expected_hash in sources.items():
|
||||
p = Path(rel_path)
|
||||
if not p.is_file():
|
||||
print(f"ERROR: Required source file does not exist on disk: {rel_path}", file=sys.stderr)
|
||||
return False
|
||||
|
||||
if not isinstance(expected_hash, str) or not HEX64_PATTERN.match(expected_hash) or expected_hash == "0" * 64:
|
||||
print(f"ERROR: Invalid or dummy SHA256 format for {rel_path}: {expected_hash!r}", file=sys.stderr)
|
||||
return False
|
||||
|
||||
actual_hash = compute_sha256(p)
|
||||
if actual_hash != expected_hash:
|
||||
print(f"ERROR: Source hash mismatch for {rel_path}: expected {expected_hash}, got {actual_hash}", file=sys.stderr)
|
||||
return False
|
||||
|
||||
# Requirement B: Artifacts are non-optional and strictly validated
|
||||
artifacts = data.get("artifacts")
|
||||
if not isinstance(artifacts, dict) or not artifacts:
|
||||
print("ERROR: 'artifacts' must be a non-empty JSON object mapping artifact IDs to artifact details", file=sys.stderr)
|
||||
return False
|
||||
|
||||
evidence_dir = index_path.parent
|
||||
validated_artifacts = {}
|
||||
|
||||
for art_id, art_info in artifacts.items():
|
||||
if not isinstance(art_info, dict):
|
||||
print(f"ERROR: Artifact '{art_id}' must be a dictionary", file=sys.stderr)
|
||||
return False
|
||||
|
||||
rel_art_path = art_info.get("path")
|
||||
if not rel_art_path or not isinstance(rel_art_path, str):
|
||||
print(f"ERROR: Artifact '{art_id}' missing valid 'path'", file=sys.stderr)
|
||||
return False
|
||||
|
||||
if ".." in rel_art_path or os.path.isabs(rel_art_path):
|
||||
print(f"ERROR: Artifact '{art_id}' path traversal or absolute path forbidden: {rel_art_path}", file=sys.stderr)
|
||||
return False
|
||||
|
||||
art_file = evidence_dir / rel_art_path
|
||||
if not art_file.is_file():
|
||||
art_file = Path(rel_art_path)
|
||||
if not art_file.is_file():
|
||||
print(f"ERROR: Referenced artifact file missing on disk: {rel_art_path}", file=sys.stderr)
|
||||
return False
|
||||
|
||||
if art_file.stat().st_size == 0:
|
||||
print(f"ERROR: Artifact file is empty: {rel_art_path}", file=sys.stderr)
|
||||
return False
|
||||
|
||||
expected_art_hash = art_info.get("sha256")
|
||||
if not expected_art_hash or not isinstance(expected_art_hash, str) or not HEX64_PATTERN.match(expected_art_hash) or expected_art_hash == "0" * 64:
|
||||
print(f"ERROR: Invalid or dummy SHA256 for artifact '{art_id}': {expected_art_hash!r}", file=sys.stderr)
|
||||
return False
|
||||
|
||||
actual_art_hash = compute_sha256(art_file)
|
||||
if actual_art_hash != expected_art_hash:
|
||||
print(f"ERROR: SHA256 mismatch for artifact '{art_id}': expected {expected_art_hash}, got {actual_art_hash}", file=sys.stderr)
|
||||
return False
|
||||
|
||||
art_type = art_info.get("type")
|
||||
if not art_type or not isinstance(art_type, str):
|
||||
print(f"ERROR: Artifact '{art_id}' missing required 'type'", file=sys.stderr)
|
||||
return False
|
||||
|
||||
validated_artifacts[art_id] = {
|
||||
"file": art_file,
|
||||
"type": art_type,
|
||||
"info": art_info,
|
||||
}
|
||||
|
||||
# Requirement C: OS Proof, PID validation, and binding to actual execution receipt
|
||||
os_proof = data.get("os_environment")
|
||||
if not isinstance(os_proof, dict) or not os_proof:
|
||||
print("ERROR: 'os_environment' is required and cannot be omitted or empty", file=sys.stderr)
|
||||
return False
|
||||
|
||||
pid = os_proof.get("pid")
|
||||
if isinstance(pid, bool) or not isinstance(pid, int):
|
||||
print(f"ERROR: 'pid' must be a valid integer, not boolean or other type: {pid!r}", file=sys.stderr)
|
||||
return False
|
||||
|
||||
if pid <= 1 or pid > MAX_VALID_PID or pid == 999999999:
|
||||
print(f"ERROR: Invalid, dummy, or init/launchd PID: {pid}", file=sys.stderr)
|
||||
return False
|
||||
|
||||
platform_str = os_proof.get("platform")
|
||||
if not platform_str or not isinstance(platform_str, str):
|
||||
print("ERROR: Missing or invalid OS platform string in os_environment", file=sys.stderr)
|
||||
return False
|
||||
|
||||
window_size = os_proof.get("window_size")
|
||||
if not isinstance(window_size, (list, tuple)) or len(window_size) != 2:
|
||||
print(f"ERROR: Missing or invalid window_size in os_environment: {window_size!r}", file=sys.stderr)
|
||||
return False
|
||||
|
||||
w, h = window_size
|
||||
if isinstance(w, bool) or isinstance(h, bool) or not isinstance(w, int) or not isinstance(h, int) or w <= 0 or h <= 0:
|
||||
print(f"ERROR: Window dimensions must be positive integers: {window_size!r}", file=sys.stderr)
|
||||
return False
|
||||
|
||||
receipt_art_id = os_proof.get("receipt_artifact_id")
|
||||
if not receipt_art_id or receipt_art_id not in validated_artifacts:
|
||||
print(f"ERROR: os_environment lacks verified 'receipt_artifact_id' linking to an artifact: {receipt_art_id!r}", file=sys.stderr)
|
||||
return False
|
||||
|
||||
receipt_art = validated_artifacts[receipt_art_id]
|
||||
try:
|
||||
receipt_data = json.loads(receipt_art["file"].read_text(encoding="utf-8"))
|
||||
except Exception as e:
|
||||
print(f"ERROR: Failed to parse execution receipt artifact JSON: {e}", file=sys.stderr)
|
||||
return False
|
||||
|
||||
receipt_pid = receipt_data.get("pid")
|
||||
if receipt_pid != pid:
|
||||
print(f"ERROR: OS environment PID {pid} does not match receipt artifact PID {receipt_pid}", file=sys.stderr)
|
||||
return False
|
||||
|
||||
receipt_ws = receipt_data.get("window_size")
|
||||
if receipt_ws != window_size:
|
||||
print(f"ERROR: OS environment window_size {window_size!r} does not match receipt artifact window_size {receipt_ws!r}", file=sys.stderr)
|
||||
return False
|
||||
|
||||
# Optional OS input event verification
|
||||
os_input_ref = data.get("os_input")
|
||||
if os_input_ref:
|
||||
if isinstance(os_input_ref, str) and os_input_ref in validated_artifacts:
|
||||
try:
|
||||
inp_data = json.loads(validated_artifacts[os_input_ref]["file"].read_text(encoding="utf-8"))
|
||||
evs = inp_data.get("events")
|
||||
if not isinstance(evs, list) or not evs:
|
||||
print("ERROR: OS input artifact missing non-empty 'events' list", file=sys.stderr)
|
||||
return False
|
||||
for ev in evs:
|
||||
if not isinstance(ev, dict) or not ev.get("action") or not ev.get("monotonic_ns"):
|
||||
print("ERROR: OS input event missing required fields (action, monotonic_ns)", file=sys.stderr)
|
||||
return False
|
||||
except Exception as e:
|
||||
print(f"ERROR: Failed to validate os_input artifact: {e}", file=sys.stderr)
|
||||
return False
|
||||
|
||||
# Requirement D: Conditions and distinct artifact content verification
|
||||
conditions = data.get("conditions")
|
||||
if not isinstance(conditions, dict):
|
||||
print("ERROR: 'conditions' must be a JSON object mapping condition ID to detailed result object", file=sys.stderr)
|
||||
return False
|
||||
|
||||
expected_set = set(REQUIRED_CONDITIONS)
|
||||
actual_set = set(conditions.keys())
|
||||
|
||||
missing = expected_set - actual_set
|
||||
if missing:
|
||||
print(f"ERROR: Missing required conditions in evidence index: {sorted(missing)}", file=sys.stderr)
|
||||
return False
|
||||
|
||||
invented = actual_set - expected_set
|
||||
if invented:
|
||||
print(f"ERROR: Unknown invented conditions present in evidence index: {sorted(invented)}", file=sys.stderr)
|
||||
return False
|
||||
|
||||
condition_to_artifacts = {}
|
||||
for cond in REQUIRED_CONDITIONS:
|
||||
cond_data = conditions[cond]
|
||||
if not isinstance(cond_data, dict):
|
||||
print(f"ERROR: Condition '{cond}' must be a structured JSON object with evidence details, not bare boolean or primitive", file=sys.stderr)
|
||||
return False
|
||||
|
||||
passed_val = cond_data.get("passed")
|
||||
if isinstance(passed_val, bool):
|
||||
if passed_val is not True:
|
||||
print(f"ERROR: Condition '{cond}' explicitly marked not passed", file=sys.stderr)
|
||||
return False
|
||||
else:
|
||||
print(f"ERROR: Condition '{cond}' missing strict boolean 'passed': true (value={passed_val!r})", file=sys.stderr)
|
||||
return False
|
||||
|
||||
cond_art_ids = cond_data.get("artifact_ids")
|
||||
if not isinstance(cond_art_ids, list) or not cond_art_ids:
|
||||
print(f"ERROR: Condition '{cond}' has no referenced 'artifact_ids'; claims without evidence are strictly rejected", file=sys.stderr)
|
||||
return False
|
||||
|
||||
for aid in cond_art_ids:
|
||||
if aid not in validated_artifacts:
|
||||
print(f"ERROR: Condition '{cond}' references unvalidated or missing artifact ID: {aid!r}", file=sys.stderr)
|
||||
return False
|
||||
|
||||
# Validate substantive details
|
||||
details = cond_data.get("details", cond_data.get("evidence"))
|
||||
if not details or not isinstance(details, str) or len(details.strip()) < 10:
|
||||
print(f"ERROR: Condition '{cond}' lacks substantive verification details", file=sys.stderr)
|
||||
return False
|
||||
|
||||
condition_to_artifacts[cond] = cond_art_ids
|
||||
|
||||
# Validate content inside the referenced artifacts for this condition
|
||||
content_verified = False
|
||||
last_err = "No artifact content checked"
|
||||
for aid in cond_art_ids:
|
||||
art = validated_artifacts[aid]
|
||||
try:
|
||||
art_content = json.loads(art["file"].read_text(encoding="utf-8"))
|
||||
except Exception:
|
||||
art_content = {}
|
||||
ok, err_msg = _validate_condition_artifact_content(
|
||||
cond,
|
||||
art_content,
|
||||
art["type"],
|
||||
evidence_dir,
|
||||
data,
|
||||
validated_artifacts,
|
||||
)
|
||||
if ok:
|
||||
content_verified = True
|
||||
break
|
||||
else:
|
||||
last_err = err_msg
|
||||
|
||||
if not content_verified:
|
||||
print(f"ERROR: Condition '{cond}' artifact content verification failed: {last_err}", file=sys.stderr)
|
||||
return False
|
||||
|
||||
# Reject self-declaration where conditions share a single generic artifact
|
||||
unique_referenced_artifacts = set()
|
||||
for aids in condition_to_artifacts.values():
|
||||
unique_referenced_artifacts.update(aids)
|
||||
|
||||
if len(unique_referenced_artifacts) < len(REQUIRED_CONDITIONS):
|
||||
print(f"ERROR: All 8 conditions require distinct evidence artifacts; found only {len(unique_referenced_artifacts)} unique artifacts across {len(REQUIRED_CONDITIONS)} conditions", file=sys.stderr)
|
||||
return False
|
||||
|
||||
print("SUCCESS: All 8 required conditions, candidate version, scope manifest, and OS execution artifacts strictly verified.")
|
||||
return True
|
||||
|
||||
|
||||
def main() -> int:
|
||||
parser = argparse.ArgumentParser(description="Check P24-02 Operations Evidence")
|
||||
parser.add_argument("--verify-only", action="store_true", help="Strict verification of existing evidence index only")
|
||||
parser.add_argument("--index", type=str, help="Path to evidence index.json", default=None)
|
||||
args = parser.parse_args()
|
||||
|
||||
index_file = find_index_file(args.index)
|
||||
if not index_file:
|
||||
print("ERROR: Could not locate p24-operations-evidence index.json.", file=sys.stderr)
|
||||
print("Ensure BUILD_OUTPUT_DIR is set or provide --index <path>.", file=sys.stderr)
|
||||
return 1
|
||||
|
||||
if not verify_evidence(index_file):
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
||||
@@ -1,10 +1,17 @@
|
||||
{
|
||||
"schema_version": 1,
|
||||
"suite_policies": {
|
||||
"tests/ui/test_operations_notification.gd": {
|
||||
"source_sha256": "9c26386c529b8c8135639e8d0f0ed390da7139d64ff1e268975b05948cab9147",
|
||||
"ordinary_cleanup_prepared": true,
|
||||
"ordinary_control_labels": ["single"],
|
||||
"tests/s4/test_original_relationship_model.gd": {
|
||||
"source_sha256": "ad509f5fb67ab91e1d1d99a08af51e4695e411b9a2541ea63ee22b1555cb0924",
|
||||
"ordinary_cleanup_prepared": false,
|
||||
"ordinary_control_labels": [],
|
||||
"old_bounded_teardown": false,
|
||||
"new_audio_QA": false
|
||||
},
|
||||
"tests/s4/test_original_relationship_runtime.gd": {
|
||||
"source_sha256": "374f3d31a65d2f2b62dfef29721c8c838575b856f4fa5a0bca31c6ba4c7e09dd",
|
||||
"ordinary_cleanup_prepared": false,
|
||||
"ordinary_control_labels": [],
|
||||
"old_bounded_teardown": false,
|
||||
"new_audio_QA": false
|
||||
},
|
||||
|
||||
@@ -67,10 +67,7 @@ def fresh_environment(base): return {k:v for k,v in base.items() if not k.starts
|
||||
def phase_policy(test, source, policies):
|
||||
value = policies.get(test, {'ordinary_cleanup_prepared':False,'ordinary_control_labels':[],
|
||||
'old_bounded_teardown':False,'new_audio_QA':False})
|
||||
if test in policies:
|
||||
expected = value.get('source_sha256')
|
||||
if expected and expected != 'pending':
|
||||
require(expected == sha(source), 'suite proof/IO policy source SHA changed')
|
||||
if test in policies: require(value['source_sha256'] == sha(source), 'suite proof/IO policy source SHA changed')
|
||||
return dict(value, path=test, source_sha256=sha(source), candidate_source_sha256=sha(source))
|
||||
def dependency_paths(test, refs):
|
||||
"""Reviewed literal GDScript dependencies, including relative inherited QA."""
|
||||
|
||||
@@ -0,0 +1,565 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Root-owned narrow P18 collection using the unchanged guarded phase protocol."""
|
||||
import argparse
|
||||
import hashlib
|
||||
import json
|
||||
import os
|
||||
import re
|
||||
import stat
|
||||
from pathlib import Path
|
||||
import shutil
|
||||
import sys
|
||||
import uuid
|
||||
|
||||
sys.dont_write_bytecode = True
|
||||
import run_all_tests as shared
|
||||
|
||||
ROSTER = [
|
||||
'tests/s4/test_original_relationship_model.gd',
|
||||
'tests/s4/test_original_relationship_runtime.gd',
|
||||
'tests/s4/test_relationship_event_service.gd',
|
||||
'tests/s4/test_runtime_relationship_events.gd',
|
||||
'tests/s6/test_runtime_snapshot_serialization.gd',
|
||||
'tests/s6/test_runtime_save_lifecycle.gd',
|
||||
'tests/ui/test_staff_management.gd',
|
||||
]
|
||||
|
||||
|
||||
def collect(args, root, out, refs, markers, contracts, policy, contract_path, contract_sha, parse_paths):
|
||||
source_bytes = sum(pin['bytes'] for pin in refs.values())
|
||||
free = shutil.disk_usage(out.parent).free
|
||||
needed = source_bytes + shared.MIN_SPACE
|
||||
shared.require(free >= needed, 'fresh source and phase disk admission')
|
||||
outer = shared.module('p18_owned_outer', shared.SUPPORT / 'owned_outer.py')
|
||||
shared.require(not outer.native.helper['live_engines'](), 'another Godot owns CPU')
|
||||
engine = shutil.which('godot')
|
||||
shared.require(engine and Path(engine).is_file(), 'native launcher exists')
|
||||
engine = str(Path(engine).resolve())
|
||||
out.mkdir(parents=True, exist_ok=False)
|
||||
stage = out / 'stage'
|
||||
stage.mkdir()
|
||||
(out / 'starters').mkdir()
|
||||
(out / 'bootstrap').mkdir()
|
||||
for name, pin in shared.read(shared.SUPPORT / 'bootstrap-scripts.json').items():
|
||||
data = pin['text'].encode('utf-8')
|
||||
shared.require(hashlib.sha256(data).hexdigest() == pin['sha256'], 'unchanged external bootstrap bytes')
|
||||
(out / 'bootstrap' / name).write_bytes(data)
|
||||
protected = shared.default_player(root)
|
||||
expected = {name: {'bytes': pin['bytes'], 'sha256': pin['sha256']} for name, pin in refs.items()}
|
||||
selected = {'root_before': refs, 'map': {name: pin['sha256'] for name, pin in refs.items()}, 'timeout': args.timeout}
|
||||
for name, pin in refs.items():
|
||||
target = stage / name
|
||||
target.parent.mkdir(parents=True, exist_ok=True)
|
||||
shared.copy_source(Path(pin['path']), target)
|
||||
shared.require(shared.inventory(stage, stage=True) == expected, 'complete private source copy')
|
||||
public = (stage / 'project.godot').read_bytes()
|
||||
shared.write(out / 'parse-paths.json', parse_paths)
|
||||
run_id = uuid.uuid4().hex
|
||||
shared.write(out / 'runner-input.json', dict(protocol='guarded-p18-v2', run_id=run_id,
|
||||
owner_runner_pid=os.getpid(), project_root=str(root), stage=str(stage), roster=ROSTER,
|
||||
selected_source_map=selected['map'], marker_contract_sha256=contract_sha,
|
||||
runner_sha256=shared.sha(Path(__file__)), shared_runner_sha256=shared.sha(shared.HERE / 'run_all_tests.py'),
|
||||
marker_module_sha256=shared.sha(shared.HERE / 'strict_test_markers.py'),
|
||||
engine=engine, engine_sha256=shared.sha(engine), default_player_before=protected,
|
||||
formal_acceptance=False, original_unit_complete=False))
|
||||
shared.write(out / 'source-start.json', refs)
|
||||
diagnostics = shared.module('p18_diagnostics', shared.SUPPORT / 'diagnostic_gate.py')
|
||||
owners = shared.module('p18_owners', shared.SUPPORT / 'ordinary_proof_gate.py')
|
||||
audio = shared.module('p18_audio', shared.SUPPORT / 'audio_evidence_gate.py')
|
||||
phases, rows, previous = [], [], {}
|
||||
error = None
|
||||
try:
|
||||
for phase, test in [('import', None), ('parse', None)] + [(str(i).zfill(3), name) for i, name in enumerate(ROSTER)]:
|
||||
shared.require(shared.sha(contract_path) == contract_sha, 'marker contract unchanged')
|
||||
row = shared.execute_phase(engine, stage, out, phase, test, selected, expected, previous,
|
||||
policy, contracts, parse_paths, public, protected, root, outer, markers, diagnostics, owners, audio)
|
||||
archive_profiles(out, row)
|
||||
phases.append(row)
|
||||
if test:
|
||||
row.update(sequence=len(rows), godot=engine)
|
||||
rows.append(row)
|
||||
(out / 'all-tests.json').write_text(json.dumps(rows, ensure_ascii=False, indent=2) + '\n')
|
||||
print(('PASS ' if row['passed'] else 'FAIL ') + test, flush=True)
|
||||
shared.require(row['passed'], 'first failed phase stops without retry: ' + phase)
|
||||
except BaseException as caught:
|
||||
error = type(caught).__name__ + ': ' + str(caught)
|
||||
finally:
|
||||
cleanup, cleanup_errors = outer.finish_captured(outer.OWNED)
|
||||
guard_errors = []
|
||||
try:
|
||||
shared.require(shared.source_refs(root) == refs, 'whole source unchanged')
|
||||
shared.require(shared.sha(contract_path) == contract_sha, 'marker contract unchanged at end')
|
||||
shared.require(shared.default_player(root) == protected, 'default profile untouched')
|
||||
shared.require(shared.inventory(stage, stage=True) == dict(expected, **previous), 'whole stage exact')
|
||||
except BaseException as caught:
|
||||
guard_errors.append(type(caught).__name__ + ': ' + str(caught))
|
||||
ended = bool(outer.OWNED) and all(row['engine_ended'] is True for row in cleanup)
|
||||
passed = error is None and not cleanup_errors and not guard_errors and ended and len(phases) == len(ROSTER) + 2 and all(row['passed'] for row in phases)
|
||||
context = shared.totals(rows, ROSTER)
|
||||
shared.write(out / 'runner-ended.json', dict(context, protocol='guarded-p18-v2', run_id=run_id,
|
||||
owner_runner_pid=os.getpid(), passed=passed, engine_ended=ended,
|
||||
actual_captured_PIDs=[process.pid for process in outer.OWNED], final_owned_cleanup=cleanup,
|
||||
cleanup_errors=cleanup_errors, guard_errors=guard_errors, error=error, phases=phases,
|
||||
all_tests_sha256=shared.sha(out / 'all-tests.json') if (out / 'all-tests.json').exists() else None,
|
||||
default_player_after=shared.default_player(root), formal_acceptance=False,
|
||||
original_unit_complete=False, independent_review='pending', native_Windows='pending'))
|
||||
if passed:
|
||||
seal(out, refs, engine, contract_sha)
|
||||
# Root also exercises precisely the verifier that ordinary Runner uses.
|
||||
verify(out, refs, markers, contracts, policy, contract_sha, parse_paths)
|
||||
print(json.dumps(dict(context, passed=passed, error=error, cleanup_errors=cleanup_errors, guard_errors=guard_errors)), flush=True)
|
||||
return 0 if passed else 1
|
||||
|
||||
|
||||
|
||||
# Receipt file names are always relative; absolute paths in native receipts are
|
||||
# historical identity strings only and are never opened by the verifier.
|
||||
def require(ok, reason):
|
||||
shared.require(ok, reason)
|
||||
|
||||
|
||||
def digest(value):
|
||||
return hashlib.sha256(json.dumps(value, sort_keys=True, separators=(',', ':'),
|
||||
ensure_ascii=False).encode()).hexdigest()
|
||||
|
||||
|
||||
def content_map(refs):
|
||||
return {name: {'bytes': pin['bytes'], 'sha256': pin['sha256']}
|
||||
for name, pin in refs.items()}
|
||||
|
||||
|
||||
def plain_path(path):
|
||||
path = Path(path)
|
||||
require('..' not in path.parts, 'parent traversal refused')
|
||||
absolute = Path(os.path.abspath(path))
|
||||
for part in [absolute, *absolute.parents]:
|
||||
require(not part.is_symlink(), 'symlink path refused: ' + str(part))
|
||||
return absolute
|
||||
|
||||
|
||||
def confined(out, name):
|
||||
require(type(name) is str and name and '\\' not in name, 'ordinary relative evidence name')
|
||||
path = Path(name)
|
||||
require(not path.is_absolute() and '..' not in path.parts
|
||||
and path.as_posix() == name and name != '.', 'evidence path escape or alias')
|
||||
result = plain_path(out / path)
|
||||
require(result.is_relative_to(out), 'evidence confined to output')
|
||||
return result
|
||||
|
||||
|
||||
def inventory(out):
|
||||
result = {}
|
||||
require(out.is_dir(), 'output directory required')
|
||||
for directory, dirs, files in os.walk(out, followlinks=False):
|
||||
for name in dirs + files:
|
||||
p = Path(directory) / name
|
||||
mode = p.lstat().st_mode
|
||||
require(stat.S_ISREG(mode) or stat.S_ISDIR(mode), 'nonordinary evidence refused')
|
||||
if stat.S_ISREG(mode):
|
||||
require(p.stat().st_nlink == 1, 'hardlinked evidence refused')
|
||||
result[p.relative_to(out).as_posix()] = {
|
||||
'bytes': p.stat().st_size, 'sha256': shared.sha(p)}
|
||||
return result
|
||||
|
||||
|
||||
def unique_object(pairs):
|
||||
result = {}
|
||||
for key, value in pairs:
|
||||
require(key not in result, 'duplicate JSON key')
|
||||
result[key] = value
|
||||
return result
|
||||
|
||||
|
||||
def read_json(path):
|
||||
return json.loads(path.read_text(encoding='utf-8'), object_pairs_hook=unique_object,
|
||||
parse_constant=lambda token: require(False, 'nonfinite JSON ' + token))
|
||||
|
||||
|
||||
def archive_profiles(out, row):
|
||||
for label in ('startup', 'runtime'):
|
||||
value = row.get('whole_' + label + '_profile_after')
|
||||
if value is None:
|
||||
continue
|
||||
dest = out / 'profiles' / row['phase'] / label
|
||||
dest.mkdir(parents=True, exist_ok=False)
|
||||
source = plain_path(value['path'])
|
||||
require(shared.inventory(source) == value['files'], 'whole owned profile before archive')
|
||||
for name in value['files']:
|
||||
target = confined(out, str((dest / name).relative_to(out)))
|
||||
target.parent.mkdir(parents=True, exist_ok=True)
|
||||
shutil.copyfile(source / name, target)
|
||||
require(shared.inventory(dest) == value['files'] == shared.inventory(source),
|
||||
'whole owned profile archive exact')
|
||||
|
||||
|
||||
def seal(out, refs, engine, contract_sha):
|
||||
# Last file written: an interrupted collection has no complete receipt.
|
||||
shutil.copyfile(engine, out / 'engine.bin')
|
||||
require(shared.sha(out / 'engine.bin') == shared.sha(engine), 'engine archive exact')
|
||||
source = content_map(refs)
|
||||
shared.write(out / 'receipt.json', {
|
||||
'schema': 'guarded-p18-v2', 'source_map': source,
|
||||
'source_map_sha256': digest(source),
|
||||
'project_settings_sha256': source['project.godot']['sha256'],
|
||||
'marker_contract_sha256': contract_sha,
|
||||
'engine_sha256': shared.sha(engine),
|
||||
'files': inventory(out),
|
||||
})
|
||||
|
||||
|
||||
def cleanup_gate(value):
|
||||
require(value['owned_child_created'] is True and value['engine_ended'] is True
|
||||
and value['actual_process_exit_code'] == 0 and value['errors'] == [],
|
||||
'successful actual owned cleanup')
|
||||
attempts = value['attempts']
|
||||
require(1 <= len(attempts) <= 3, 'bounded cleanup attempts')
|
||||
for index, row in enumerate(attempts):
|
||||
require(row['attempt'] == index + 1 and row['errors'] == []
|
||||
and row['wait_timeout_seconds'] == 5 and row['wait_completed'] is True
|
||||
and row['wait_returned_code'] == 0 and row['poll_after'] == 0,
|
||||
'complete bounded owned wait')
|
||||
|
||||
|
||||
def outer_cleanup(rows, pids):
|
||||
require([r['pid'] for r in rows] == pids, 'exact captured cleanup PID order')
|
||||
for row in rows:
|
||||
require(row['engine_ended'] is True and row['outer_cleanup_errors'] == []
|
||||
and row['foreign_process_or_group_signals'] == 0
|
||||
and row['outer_maximum_helper_invocations'] == 3
|
||||
and row['helper_maximum_waits'] == 3 and row['per_wait_timeout_seconds'] == 5,
|
||||
'unchanged outer cleanup contract')
|
||||
cleanup_gate(row['cleanup'])
|
||||
|
||||
|
||||
def verify(out, refs, markers, contracts, policy, contract_sha, parse_paths):
|
||||
receipt_path = confined(out, 'receipt.json')
|
||||
require(receipt_path.is_file(), 'regular final receipt required')
|
||||
manifest = read_json(receipt_path)
|
||||
require(manifest['schema'] == 'guarded-p18-v2', 'current receipt schema required')
|
||||
files = manifest['files']
|
||||
require(type(files) is dict and files, 'complete raw manifest')
|
||||
for name, pin in files.items():
|
||||
p = confined(out, name)
|
||||
require(p.is_file() and set(pin) == {'bytes', 'sha256'}
|
||||
and type(pin['bytes']) is int and pin['bytes'] >= 0
|
||||
and re.fullmatch('[0-9a-f]{64}', pin['sha256']) is not None,
|
||||
'ordinary artifact pin')
|
||||
actual = inventory(out)
|
||||
receipt_pin = actual.pop('receipt.json')
|
||||
require(actual == files, 'complete raw file set and SHA-256 equality')
|
||||
source = content_map(refs)
|
||||
require(manifest['source_map'] == source and manifest['source_map_sha256'] == digest(source),
|
||||
'current whole source content map independent of checkout path')
|
||||
require(manifest['project_settings_sha256'] == source['project.godot']['sha256']
|
||||
and manifest['marker_contract_sha256'] == contract_sha, 'current project/marker pins')
|
||||
|
||||
def read(name):
|
||||
require(name in files, 'required raw file missing: ' + name)
|
||||
return read_json(confined(out, name))
|
||||
|
||||
def text(name):
|
||||
require(name in files, 'required raw transport missing: ' + name)
|
||||
return confined(out, name).read_text(encoding='utf-8')
|
||||
|
||||
start, end = read('runner-input.json'), read('runner-ended.json')
|
||||
require(start['protocol'] == end['protocol'] == 'guarded-p18-v2'
|
||||
and start['run_id'] == end['run_id']
|
||||
and re.fullmatch('[0-9a-f]{32}', start['run_id']) is not None,
|
||||
'same current run')
|
||||
require(type(start['owner_runner_pid']) is int and start['owner_runner_pid'] > 0
|
||||
and start['owner_runner_pid'] == end['owner_runner_pid'], 'same collector owner')
|
||||
require(start['roster'] == ROSTER and len(set(ROSTER)) == 7, 'exact seven unique tests')
|
||||
require(start['selected_source_map'] == {n: p['sha256'] for n, p in source.items()}
|
||||
and content_map(read('source-start.json')) == source, 'whole selected source pins')
|
||||
for field, name in [('runner_sha256', 'tools/run_p18_relationship_tests.py'),
|
||||
('shared_runner_sha256', 'tools/run_all_tests.py'),
|
||||
('marker_module_sha256', 'tools/strict_test_markers.py')]:
|
||||
require(start[field] == source[name]['sha256'], 'current collector/shared/marker pin')
|
||||
require(start['marker_contract_sha256'] == contract_sha, 'marker contract pin')
|
||||
# Resolve only the locally configured launcher, never the receipt's engine path.
|
||||
engine = shutil.which('godot')
|
||||
require(engine and shared.sha(engine) == start['engine_sha256']
|
||||
== manifest['engine_sha256'] == files['engine.bin']['sha256'],
|
||||
'current native engine and retained bytes pinned')
|
||||
require(read('parse-paths.json') == parse_paths and len(parse_paths) == 308,
|
||||
'all 308 exact source parse paths')
|
||||
require(end['passed'] is True and end['engine_ended'] is True and end['error'] is None
|
||||
and end['cleanup_errors'] == [] and end['guard_errors'] == [],
|
||||
'finished successful collection without guard/cleanup error')
|
||||
for receipt in (start, end):
|
||||
require(receipt['formal_acceptance'] is False and receipt['original_unit_complete'] is False,
|
||||
'backend evidence never completes original unit')
|
||||
before = start['default_player_before']
|
||||
require(before == end['default_player_after'] and before['logs_and_locks_included'] is True
|
||||
and type(before['existed']) is bool and type(before['files']) is dict,
|
||||
'complete default player before/after equality')
|
||||
for name, pin in before['files'].items():
|
||||
confined(out, name) # Validate the inventory name; never open the player.
|
||||
require(set(pin) == {'bytes', 'sha256'} and type(pin['bytes']) is int
|
||||
and pin['bytes'] >= 0 and re.fullmatch('[0-9a-f]{64}', pin['sha256']),
|
||||
'whole default player file pin')
|
||||
require(before['existed'] or before['files'] == {}, 'absent player has no files')
|
||||
|
||||
native = shared.module('p18_verify_native', shared.SUPPORT / 'owned_diagnostic_process.py')
|
||||
diagnostics = shared.module('p18_verify_diagnostics', shared.SUPPORT / 'diagnostic_gate.py')
|
||||
owners = shared.module('p18_verify_owners', shared.SUPPORT / 'ordinary_proof_gate.py')
|
||||
# Helpers are loaded for their pure gates only. No run/probe/cleanup is called.
|
||||
origin = Path(start['stage']).parent
|
||||
require(Path(start['stage']) == origin / 'stage' and origin.is_absolute()
|
||||
and '..' not in origin.parts, 'original output identity')
|
||||
|
||||
def relocated(value):
|
||||
if isinstance(value, dict):
|
||||
return {relocated(k): relocated(v) for k, v in value.items()}
|
||||
if isinstance(value, list):
|
||||
return [relocated(v) for v in value]
|
||||
if isinstance(value, str) and value.startswith(str(origin) + '/'):
|
||||
return str(confined(out, value[len(str(origin)) + 1:]))
|
||||
return value
|
||||
|
||||
def proof_read(path):
|
||||
path = plain_path(path)
|
||||
require(path.is_relative_to(out), 'proof path stays in output')
|
||||
return relocated(read(path.relative_to(out).as_posix()))
|
||||
|
||||
owners.read = proof_read
|
||||
phases = end['phases']
|
||||
require(len(phases) == 9, 'exact nine phases')
|
||||
tests = read('all-tests.json')
|
||||
require(len(tests) == 7 and end['all_tests_sha256'] == files['all-tests.json']['sha256'],
|
||||
'complete test rows')
|
||||
pids = []
|
||||
for index, (phase, test) in enumerate([('import', None), ('parse', None)]
|
||||
+ [(str(i).zfill(3), n) for i, n in enumerate(ROSTER)]):
|
||||
row = read(phase + '-receipt.json')
|
||||
expected_row = dict(row)
|
||||
if test:
|
||||
expected_row.update(sequence=index - 2, godot=start['engine'])
|
||||
require(tests[index - 2] == expected_row, 'test row matches raw phase receipt')
|
||||
require(phases[index] == expected_row and row['phase'] == phase and row['test'] == test
|
||||
and row['passed'] is True and row['failed'] is False
|
||||
and row['validation_error'] is None and not row.get('guard_error')
|
||||
and row['default_player_entire_profile_unchanged'] is True,
|
||||
'exact successful phase')
|
||||
pid = row['actual_pid']
|
||||
require(type(pid) is int and pid > 0 and pid not in pids, 'nine distinct actual PIDs')
|
||||
pids.append(pid)
|
||||
process = read(phase + '/process.json')
|
||||
require(process == row['native_process'] and process['pid'] == pid
|
||||
and process['owned_child_process_helper_sha256'] == native.HELPER_SHA
|
||||
== source['tools/regression/p09_owned_engine_process.py']['sha256'],
|
||||
'actual phase/process/helper agreement')
|
||||
stdout, stderr, logger = (text(phase + '/' + n) for n in
|
||||
('stdout.log', 'stderr.log', 'engine-native.log'))
|
||||
raw = stdout + stderr
|
||||
require(text(row['log']) == raw and row['log_sha256'] == files[row['log']]['sha256'],
|
||||
'literal complete raw stream')
|
||||
require(process['stdout_sha256'] == files[phase + '/stdout.log']['sha256']
|
||||
and process['stderr_sha256'] == files[phase + '/stderr.log']['sha256'],
|
||||
'process transport SHA')
|
||||
require(row['raw_native_log'] == dict(files[phase + '/engine-native.log'],
|
||||
path=str(origin / phase / 'engine-native.log')), 'native logger pin')
|
||||
review = diagnostics.review_streams(native, {
|
||||
'stdout': stdout, 'stderr': stderr, 'native_file': logger}, test)
|
||||
require(row['finite_original_diagnostic_review'] == review
|
||||
and diagnostics.diagnostic_result_gate(process, review)
|
||||
and shared.process_gate(process, review['allowed_e31_error_lines']),
|
||||
'strict diagnostics/process gates')
|
||||
require(native.native_diagnostics(stdout, stderr, row['command'])
|
||||
== process['strict_native_diagnostics'], 'raw banner/diagnostics recomputed')
|
||||
command = [start['engine'], '--headless', '--path', start['stage']]
|
||||
if phase == 'import':
|
||||
command += ['--editor', '--import', '--quit', '--verbose']
|
||||
else:
|
||||
script = ('bootstrap/parse_full_dependencies.gd' if phase == 'parse'
|
||||
else 'starters/' + phase + '.gd')
|
||||
command += ['--script', str(origin / script), '--verbose']
|
||||
require(row['starter_sha256'] == files[script]['sha256'], 'exact starter pin')
|
||||
if test:
|
||||
expected_starter = ('extends ' + json.dumps('res://' + test) + '\nconst Guard := preload('
|
||||
+ json.dumps(str(origin / 'bootstrap/profile_guard.gd'))
|
||||
+ ')\nfunc _initialize() -> void:\n\tif not Guard.activate():\n\t\tquit(97)\n\t\treturn\n\tsuper._initialize()\n')
|
||||
require(text(script) == expected_starter, 'unchanged guarded starter bytes')
|
||||
command += ['--log-file', str(origin / phase / 'engine-native.log')]
|
||||
require(row['command'] == process['argv'] == command, 'exact native argv/logger')
|
||||
for filename, field, event in [('started.json', 'actual_start_binding', 'ENGINE_STARTED'),
|
||||
('ended.json', 'actual_end_binding', 'ENGINE_ENDED')]:
|
||||
binding = read(phase + '/' + filename)
|
||||
require(binding == process[field] and binding['event'] == event
|
||||
and binding['actual_pid'] == binding['pid'] == pid
|
||||
and binding['owner_pid'] == start['owner_runner_pid']
|
||||
and binding['command'] == binding['argv'] == command, 'actual START/END ownership')
|
||||
binding = process['actual_start_binding']
|
||||
identity = binding['current_process_identity']
|
||||
if identity is None:
|
||||
require(binding['tracked_child_ended_before_initial_probe'] is True, 'early ended tracked child')
|
||||
else:
|
||||
require(binding['live_identity_exact'] is True and identity == {
|
||||
'pid': pid, 'ppid': start['owner_runner_pid'], 'pgid': pid, 'args': ' '.join(command)},
|
||||
'recorded live child PID/PPID/PGID/argv')
|
||||
finish = process['actual_end_binding']
|
||||
require(finish['engine_ended'] is True and finish['timed_out'] is False
|
||||
and finish['lifecycle_error'] is None and finish['exit_code'] == 0
|
||||
and finish['actual_process_exit_code'] == 0
|
||||
and finish['start_receipt_written'] is True
|
||||
and finish['monotonic_ns'] >= binding['monotonic_ns'], 'complete native END')
|
||||
cleanup = read(phase + '/adapter-owned-cleanup.json')
|
||||
require(cleanup == process['adapter_owned_cleanup'], 'raw adapter cleanup')
|
||||
cleanup_gate(cleanup)
|
||||
capture = row['outer_actual_capture']
|
||||
require(read(phase + '/outer-owned-finally.json') == {
|
||||
k: v for k, v in capture.items()
|
||||
if k not in ('outer_receipt_written', 'outer_receipt_error', 'passed')},
|
||||
'whole raw outer receipt')
|
||||
require(capture['actual_captured_pids'] == [pid] and capture['passed'] is True
|
||||
and capture['all_captured_ended'] is True and capture['adapter_exception'] is None
|
||||
and capture['outer_cleanup_errors'] == [] and capture['outer_receipt_error'] is None
|
||||
and capture['outer_receipt_written'] is True
|
||||
and capture['all_cleanup_before_outer_receipt'] is True
|
||||
and capture['foreign_process_or_group_signals'] == 0
|
||||
and row['engine_ended'] is True and row['exit_code'] == 0, 'owned outer capture')
|
||||
outer_cleanup(capture['cleanup'], [pid])
|
||||
startup = read(phase + '-startup-profile-before.json')
|
||||
require(startup == {'path': row['whole_startup_profile_after']['path'], 'existed': False,
|
||||
'files': {}, 'before_native_spawn': True}, 'fresh startup profile')
|
||||
require(row['whole_startup_profile_after']['fresh_before_engine'] is True,
|
||||
'startup fresh before engine')
|
||||
name = row['profile_startup_name']
|
||||
require(re.fullmatch('TheTree-PCK-tests-[0-9a-f]{32}-standard-startup-' + phase, name)
|
||||
and Path(startup['path']).name == name and row['private_project_fields'] == 2
|
||||
and row['private_project_sha256'] == hashlib.sha256(shared.private_project(
|
||||
(shared.HERE.parent / 'project.godot').read_bytes(), name)).hexdigest(),
|
||||
'exact two-field startup isolation')
|
||||
for label in ('startup', 'runtime'):
|
||||
if label == 'runtime' and phase == 'import':
|
||||
continue
|
||||
whole = row['whole_' + label + '_profile_after']
|
||||
archive = confined(out, 'profiles/' + phase + '/' + label)
|
||||
require(archive.is_dir() and shared.inventory(archive)
|
||||
== whole['files'], 'complete retained private profile')
|
||||
if phase != 'import':
|
||||
guard = read(phase + '-profile.json')
|
||||
runtime = Path(row['whole_runtime_profile_after']['path'])
|
||||
name = guard['custom_user_dir_name']
|
||||
require(re.fullmatch('TheTree-PCK-tests-[0-9a-f]{32}-standard-runtime-' + phase, name)
|
||||
and runtime.name == name and guard['verified'] is True
|
||||
and guard['conditions'] == [True] * 5 and guard['conditions_checked'] == 5
|
||||
and guard['fresh_before_parent_initialize'] is True
|
||||
and guard['profile_writes_before_guard'] == 0
|
||||
and guard['actual_user_data_dir'] == guard['expected_user_data_dir'] == str(runtime)
|
||||
and guard['globalized_probe'] == str(runtime / 'guard-probe')
|
||||
and guard['project_settings_persisted'] is False, 'all unchanged Guard conditions')
|
||||
require(row['actual_private_profile'] == {
|
||||
'report': guard, 'report_sha256': files[phase + '-profile.json']['sha256'],
|
||||
'whole_files': row['whole_runtime_profile_after']['files']}, 'whole raw Guard report')
|
||||
require(row['controlled_environment'] == {
|
||||
'THE_TREE_PACK_PROFILE_NAME': name, 'THE_TREE_PACK_PROFILE_EXPECTED': str(runtime),
|
||||
'THE_TREE_PACK_PROFILE_REPORT': str(origin / (phase + '-profile.json')),
|
||||
'THE_TREE_FULL_PARSE_PATHS': str(origin / 'parse-paths.json'),
|
||||
**({'THE_TREE_AUDIO_TEARDOWN_PROOF_DIR': str(origin / (phase + '-teardown/owned-audio')),
|
||||
'THE_TREE_AUDIO_FIXTURE_CONTROL_PROOF': str(origin / (phase + '-teardown/control.json'))}
|
||||
if test and policy['suite_policies'].get(test, {}).get('ordinary_cleanup_prepared') else {})},
|
||||
'exact controlled Guard/proof environment')
|
||||
else:
|
||||
require(row['controlled_environment'] == {}, 'fresh import environment')
|
||||
if phase == 'parse':
|
||||
require(re.findall(r'(?m)^FULL_DEPENDENCY_PARSE checks=([0-9]+) failures=([0-9]+)\n', raw)
|
||||
== [('308', '0')] and row['actual_parse_checks'] == 308, 'unique all-script parse marker')
|
||||
if test:
|
||||
parsed = markers.parse_raw(test, raw, contracts, source[test]['sha256'])
|
||||
require(parsed['passed'] and row['completion'] == parsed
|
||||
and row['reported_checks'] == parsed['checks']
|
||||
and row['reported_failures'] == parsed['failures']
|
||||
and row['completion_marker'] == parsed['marker'] and row['collector_errors'] == [],
|
||||
'source-pinned raw completion marker')
|
||||
require(row['source_sha256'] == row['source_sha256_end'] == source[test]['sha256'],
|
||||
'exact test source before/after')
|
||||
p = shared.phase_policy(test, Path(refs[test]['path']), policy['suite_policies'])
|
||||
require(row['policy'] == p, 'current exact suite policy')
|
||||
if p['ordinary_cleanup_prepared']:
|
||||
proof = owners.ordinary_gate(confined(out, phase + '-teardown'), pid, out,
|
||||
p['ordinary_control_labels'])
|
||||
require(proof == relocated(row['ordinary_owner_pairs']), 'full ordinary/audio ownership proof')
|
||||
require(row['generated_reports'] == {}, 'fixed narrow roster has no generated source reports')
|
||||
require(end['actual_captured_PIDs'] == pids, 'all nine captured engines')
|
||||
outer_cleanup(end['final_owned_cleanup'], pids)
|
||||
require(all(end[k] == v for k, v in shared.totals(tests, ROSTER).items()), 'recomputed exact totals')
|
||||
require(shared.inventory(confined(out, 'stage'), stage=True) == source, 'entire retained source/settings exact')
|
||||
for name, pin in shared.read(shared.SUPPORT / 'bootstrap-scripts.json').items():
|
||||
require(text('bootstrap/' + name).encode() == pin['text'].encode()
|
||||
and files['bootstrap/' + name]['sha256'] == pin['sha256'], 'unchanged bootstrap/Guard pins')
|
||||
require(inventory(out) == dict(files, **{'receipt.json': receipt_pin}),
|
||||
'whole raw evidence unchanged during verification')
|
||||
require(content_map(shared.source_refs(shared.HERE.parent)) == source,
|
||||
'whole current source unchanged during verification')
|
||||
print(json.dumps({'verified': True, 'actual_suites': 7, 'parse_checks': 308,
|
||||
'actual_checks': end['actual_all_roster_checks'], 'engines_started': 0,
|
||||
'formal_acceptance': False, 'original_unit_complete': False}))
|
||||
return 0
|
||||
|
||||
|
||||
def main(argv=None):
|
||||
argv = list(sys.argv[1:] if argv is None else argv)
|
||||
# No argparse abbreviation, repeated flags, = aliases or positional tokens.
|
||||
parser = argparse.ArgumentParser(description=__doc__, allow_abbrev=False)
|
||||
parser.add_argument('--output', required=True)
|
||||
modes = parser.add_mutually_exclusive_group()
|
||||
modes.add_argument('--collect', action='store_true', help='Root only; fresh native collection')
|
||||
modes.add_argument('--prepare-only', action='store_true')
|
||||
seen = set()
|
||||
i = 0
|
||||
while i < len(argv):
|
||||
flag = argv[i]
|
||||
require(flag in ('--output', '--collect', '--prepare-only', '--help')
|
||||
and flag not in seen, 'unknown, duplicate or malformed flag')
|
||||
seen.add(flag)
|
||||
if flag == '--output':
|
||||
i += 1
|
||||
require(i < len(argv) and argv[i] and not argv[i].startswith('--'), 'output value required')
|
||||
i += 1
|
||||
args = parser.parse_args(argv)
|
||||
args.timeout = 1200
|
||||
root = shared.HERE.parent
|
||||
out = plain_path(args.output)
|
||||
refs = shared.source_refs(root)
|
||||
require(set(ROSTER).issubset(shared.roster(root)), 'normal discovery includes narrow roster')
|
||||
markers = shared.module('p18_exact_markers', shared.HERE / 'strict_test_markers.py')
|
||||
contract_path = root / 'docs/plans/original-completion-2026-10-02/execution/completion_marker_contracts.json'
|
||||
contract_sha = shared.sha(contract_path)
|
||||
contracts = markers.load_contracts(contract_path)
|
||||
require(all(name in contracts for name in ROSTER), 'complete marker roster')
|
||||
policy = shared.read(shared.SUPPORT / 'suite-policy.json')
|
||||
shared.policy_coverage(ROSTER, refs, policy)
|
||||
for test in ROSTER:
|
||||
shared.phase_policy(test, Path(refs[test]['path']), policy['suite_policies'])
|
||||
for test in ROSTER[:2]:
|
||||
require(contracts[test]['source_sha256_at_schema_audit'] == refs[test]['sha256'],
|
||||
'new strict source-hashed marker')
|
||||
parse_paths = ['res://' + name for name in sorted(refs) if name.endswith('.gd')]
|
||||
require(len(parse_paths) == 308, 'exact expected parse count')
|
||||
if args.prepare_only:
|
||||
ancestor = out.parent
|
||||
while not ancestor.exists():
|
||||
ancestor = ancestor.parent
|
||||
free = shutil.disk_usage(ancestor).free
|
||||
size = sum(p['bytes'] for p in refs.values())
|
||||
print(json.dumps({'roster': ROSTER, 'source_files': len(refs), 'source_bytes': size,
|
||||
'free_bytes': free, 'conservative_required_bytes': size + shared.MIN_SPACE,
|
||||
'capacity_available': free >= size + shared.MIN_SPACE, 'parse_paths': 308,
|
||||
'future_native_phases': 9, 'actual_checks': None, 'engines': 0, 'stages': 0,
|
||||
'formal_acceptance': False}))
|
||||
return 0
|
||||
if args.collect:
|
||||
require(not out.exists() and out.parent.is_dir(), 'fresh output with existing parent required')
|
||||
require(not out.is_relative_to(root), 'private collection outside source tree')
|
||||
return collect(args, root, out, refs, markers, contracts, policy,
|
||||
contract_path, contract_sha, parse_paths)
|
||||
return verify(out, refs, markers, contracts, policy, contract_sha, parse_paths)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
try:
|
||||
raise SystemExit(main())
|
||||
except (AssertionError, OSError, ValueError, KeyError, TypeError) as error:
|
||||
print(type(error).__name__ + ': ' + str(error), file=sys.stderr)
|
||||
raise SystemExit(1)
|
||||
Reference in New Issue
Block a user