Compare commits

..
25 changed files with 6461 additions and 118 deletions
@@ -3707,7 +3707,7 @@
"template": "P23 life observation: <checks> checks, <failures> failures",
"required": true,
"fixed_check_count_used": false,
"source_sha256_at_schema_audit": "cc7049e1c3919585caeefd1747be12fbf3fa52141fcdb980929c8a16fd7e2ee1",
"source_sha256_at_schema_audit": "750254af7d4b8b00508e25d1ef744837d3a7d14ddebe12398e8014bf5e8c68e8",
"authority": {
"path": "docs/spec/acceptance/P23-03.json",
"scope": "component and read-only observation only; native unexecuted; whole unit blocked"
@@ -0,0 +1,7 @@
{
"action": "request-repair",
"task_id": "P23-03",
"reason": "Same-task repair for P23-03. Keep submitted 336a8cd and all earlier work, and keep every failure record (R10 B: 484 checks / 11 failures; validate 4958d8f55b6b458694bf158769ce3bff). Root cause, confirmed in the code: in tests/fixtures/p23-03/observation.gd, prepare() at lines 48-77 adds up only the registered construction_cost of the builds, including B's EV, to set a common diagnostic budget. Lines 93-99 then hire 5 candidates (staff_akane/gina/chika/iris/juno) and buy 40 RAW_FOOD without including either cost in that budget. Construction uses up all of B's cash, so all 5 hires fail with VALIDATION_FAILED (available 0) and the purchase fails with INSUFFICIENT_FUNDS. A succeeds. This is an omission in the fixture's budget, not a gap in production values.\n\nRepair, inside allowed paths only (tests/fixtures/p23-03/**, tools/check_p23_life_observation_evidence.py, tools/test_p23_life_observation_evidence.py, docs/plans/.../execution/p23-03/** metadata):\n(1) In prepare(), raise the common A/B diagnostic `needed` by:\n- the actual signing_cost of each of the 5 candidates, read at runtime from the registered candidate definitions (the catalog's signing_cost field, scripts/data/mvp_content_catalog.gd:323);\n- the gold cost of buying 40 RAW_FOOD, taken from the existing quote path (SupplyCatalog unit_price via PurchaseQuoteV2.make / the supply_management_service quote). Use effective_total if the actual quote applies a modifier.\nRead these values from the runtime registry/quote at the time they are needed. Do not hard-code numbers, add a margin, change default resources, or change product/runtime data. Record each cost source (definition/candidate/item id with its value), the totals, and the resulting deltas in the budget record. A and B must get the same deltas. The improvement EV cost stays in both budgets, as it is now.\n(2) Have the fixture check the receipt of each setup command (build, set_facility_conditions, hire, assignment, purchase, kitchen production) and expect() it to succeed, so a failed setup step shows up as a named failure and is not silently skipped.\n(3) Keep everything else the same: the common A/B inputs, the declared demand/arrival cohort, the native comparison's 48-demand, the 7 conditions and 6 categories, staff/goods coverage, normal OS plus distinct-PID load, full177, the independent Opus review, integration/final, 30/88 with no partial credit, the OS child timeout of 3600, worker/native 900 and the null cap.\n(4) Add a cheap local Python check, in the checker or its test, that statically or via the recorded budget confirms every planned spend (construction, signing, purchase) is counted in needed/deltas. Include a negative test for a missing spend category, so this mistake is caught before an expensive OS replay.\n(5) Update the p23-03 execution metadata to describe the finding and the repair honestly.\n\nThe worker runs only Python syntax checks and the checker's local tests, then makes a genuine submit. No Godot, native, OS or full regression runs, and Root evidence is expected to be missing at submission. Afterwards Root runs the exact final proof on the frozen source, reusing only evidence whose applicability matches. No new UI, product/runtime changes, broad hardening, billing or permission changes.",
"codex_model": "gpt-6.1-sol",
"codex_model_reason": "The repair is small and well understood: one fixture function needs signing and purchase costs added from existing catalog fields and the quote API, plus receipt assertions and a local Python preflight with a negative test. The root cause is already confirmed and nothing here needs new design or deep cross-system reasoning, so the default Sol is enough on quality and cheaper and faster than Astra."
}
@@ -0,0 +1,7 @@
{
"action": "run",
"task_id": "P23-03",
"reason": "The Runner shows P23-03 in repair_ready with 19 repairs, and the owner has dispatched the recorded R10 budget repair decision. run is a valid action and it is the next step, so this is not a repeat of a completed transition. The run keeps the R10 direction exactly as narrow as recorded and starts from the clean submitted base 336a8cd0b30db1add11869ebceab847db693f531. The worker stays inside the task contract's allowed_paths. It may only run local Python checks: syntax, the checker, and the checker's negative tests. It does not run Godot, native, OS, or full regression; Root runs those only after a genuine submission. The worker must say that Root evidence is missing at submission rather than mark anything PASS. Root's capacity recovery runs separately and must finish before proof replay; Root does not edit source. This run does not change the spec, the acceptance denominator, the budget or caps, or approval, and it does not touch main integration. Independent Opus review and Root validation are still required before acceptance.",
"codex_model": "gpt-6-astra",
"codex_model_reason": "I chose gpt-6-astra over the default because the difficulty justifies it. (1) The frozen spec's worker_instructions name one Codex Astra worker, and the recorded commander direction (run 83e836e2...) set codex_model gpt-6-astra. Changing the model during a narrow repair would break the recorded direction. (2) There have been 19 repair cycles, which shows the remaining defects are subtle consistency problems across the observation report, the strict checker that recomputes fields, the evidence manifests, and the same-demand layout A/B budget and seed setup. These need careful reasoning across files more than speed. (3) The worker only runs local Python, so per-run usage is bounded. A stronger model that gets it right in one pass should cost less overall than more failed cycles on the default model."
}
@@ -0,0 +1,45 @@
# R10 diagnostic budget repair submission
Status: submitted for Root verification; no acceptance credit claimed.
Contract base: `860136f7099f5e3aee99da5798a627a77f2d8eea`.
Starting submitted source: `336a8cd0b30db1add11869ebceab847db693f531`.
The mirrored OPUS_R10_BUDGET_REPAIR_DIRECTION.json and
ROOT_OS_R10_BUDGET_FINDING.json resolve the input gap recorded in
R10_CONTEXT_GAP.md. That historical note and all copied evidence are retained.
The failed R10 B run remains 484 checks / 11 failures, validate
`4958d8f55b6b458694bf158769ce3bff`; it provides no acceptance credit.
The observation fixture counted construction only. Its common A/B budget now
also counts all five planned candidates' registered catalog signing_cost and
the 40 RAW_FOOD purchase. The shared assignment list and purchase quantity
feed both budgeting and actual setup commands. PurchaseQuoteV2.make reads the
current SupplyCatalog unit_price; the service's eligibility branch selects
base_total or effective_total. The live supply preview is recorded and checked
against that budget immediately before purchase. No margin or production
value is added. Both budgets still include B's improvement construction.
The budget record retains construction rows and adds construction totals,
candidate sources/costs and signing total, item/unit price/quote/purchase total,
needed, initial resources and deltas.
Every setup operation already passed through command(), which asserts its
CommandResult.is_success() and records its receipt. Failure names now include
the payload, distinguishing individual builds, hires and assignments. This
continues to cover conditions, purchases and kitchen production without skips.
A cheap checker preflight verifies all three spend categories enter needed
before deltas and that the setup shares its assignment/quantity plan. Local
negative tests remove each spend increment and delta coverage. These are
static checks, not runtime evidence or acceptance assertions.
Worker validation: 51 local Python checker tests passed; Python syntax checks
passed. No Godot, native, OS, full regression, Runner operation, git write,
production checkout access or additional agent was used.
Root evidence for this repaired source is missing at submission, as expected.
Root must freeze the source and perform the exact native and normal OS A/B
proof, distinct-PID load, mandatory full177 regression, independent Opus review,
integration/final and ledger. Reuse requires matching applicability. The native
48-demand, observation cohort, seven conditions/six categories, staff/goods
coverage, 30/88 with no partial credit, OS child timeout 3600, worker/native
900 and null cap are unchanged.
@@ -0,0 +1,45 @@
# R10 repair context gap
Status: blocked on missing recorded R10 decision, not on missing Root proof.
The read-only HEAD check returned the requested submitted starting point
`336a8cd0b30db1add11869ebceab847db693f531`. The contract base remains
`860136f7099f5e3aee99da5798a627a77f2d8eea`. The initial worktree contained an
untracked `tools/__pycache__/`; it was preserved.
The supplied run direction requires keeping the recorded R10 budget repair
exactly narrow, but does not include that decision's concrete repair instructions
or location. The available `OPUS_CONCRETE_IMPLEMENTATION_DIRECTION.json` is the
initial recipe (run `83e836e232c74975aaf51f4fab5a1af9`), not the R10 decision.
No R10 decision was found in this checkout's P23 execution materials or fixtures;
`.review-material` is absent. A targeted JSON/Markdown search for R10 budget
direction in the sibling P23 runtime directory found no match. Access to the
normal production checkout's P23 execution directory and sibling validation
checkouts returned `Operation not permitted`; no access workaround was attempted.
Static context inspected before considering source edits:
- `API_AND_STATE_MAP.md` describes deterministic initialization and public
arrival/build commands. Current `simulation_runtime.gd:203` still accepts the
explicit seed, and `game_state.gd:20` resets resources to defaults.
- `layout_comparison.gd:21` declares the budget as `GameState.reset`; its run
resets state before initialization and records the initial snapshot before
issuing layout-specific build commands.
- `observation.gd:49` onward derives a common diagnostic construction budget
from registered definition costs, including the declared B improvement, and
issues `change_resources` before building. This is a separate observation path.
- `check_p23_life_observation_evidence.py:1212` requires equality of A/B initial
snapshots. These observations do not establish which precise repair R10
authorized, or justify inventing budget/seed policy.
Required continuation input: the complete recorded R10 budget repair decision
and its referenced failure evidence, mirrored into readable task materials (or
provided directly), including any prescribed budget/seed and checker changes.
No specification, acceptance, budget, production, fixture, checker, renderer,
or policy change was inferred. Only this context-gap note was added.
No tests were run: there is no source repair to validate. No Godot, native, OS,
full regression, Runner operation, git write, integration, or additional agent
was used. Root exact-candidate native/OS/resume/full-regression evidence and
independent Opus review remain missing and required; no PASS or acceptance
credit is claimed. Root capacity recovery remains separate.
@@ -0,0 +1,443 @@
# P23-03 repair inspection
## Repair 26 — submitted for Root validation; no acceptance credit
This section supersedes the status below. Preserved the five premodified files,
both R13 fixtures, all 86 existing tests, and every historical section. Historical
49 and the twelve false R13 judgments are unchanged. Seven conditions, six
categories and 30/88 are unchanged. No Runtime, gameplay, save, economy, mana,
asset or UI-entry source was changed.
Implemented the remaining local work:
- Both independent packers now rebuild vertical components from fitted feet and
pose cores after every scale reduction. Scale ceilings decrease monotonically,
so termination has a finite measure and no iteration-limit exemption. Stable
components use the existing ordered forward/backward fitting and p=1 retained
member aggregation. A positive separates a previously intersecting component
at p=2; retaining the stale component would incorrectly reduce it to p=1.
- Whole-state fixtures cover queue lanes plus work staff, queue precedence and
order, the actual R13 cafeteria/access-cell geometry, carried and treated
patients, occupied rest facilities, queued staff, passenger/floor coexistence
on FRONT/BACK, and independently calculated no-fit aggregates. Negatives
include stale groups, pose/feet, carrier-relative positions, category/region/
transit spoofing, missing identities and displaced aggregation badges.
- Cabin candidates no longer silently truncate after two seat rows. Additional
identities reuse the existing two-row anchor pattern and participate in the
same independent fit/no-fit decision. The synthetic saturation configuration
retains every boarded identity in member lists; it changes no definition.
- OS and offline callers use the shared hash-bound drawing_context loader.
Tests cover valid context, absent fields/objects, malformed raw/rest context,
report binding and object hash mismatches. Frame tests include valid transit
and occupied-rest authority, missing/malformed rest authority, and conservative
rejection of overlap without raw context. No flags grant exemptions.
- GDScript component fixture now includes four occupants, scale-driven regroup,
and actual _fit_life_actors aggregation with nine drawn and ten retained IDs,
badge text and position. This fixture has NOT been executed by Godot.
Source/consumer audit:
- _build_life_observation calls fitting before publishing; _draw_life_overlay
consumes fitted floor/passenger rows and the aggregation badge at/text.
_draw_observed_actor consumes at/scale/mode/frame/flip. Logical cell, preferred
center and state remain separate. Existing click handling selects world
facilities/construction/stairs; there is no actor hit-test to relocate.
- passive_observation.draw_rectangles and Python drawing_rectangle_rows consume
fitted actor extents and actual aggregation badge coordinates. frame_rows
carries all member identities and drawn_keys into review metadata. Whole typed
diagnostic captures preserve the same report; compare_actor_geometry rebuilds
classification, bounds, fit and aggregation independently. compare_rest invokes
complete geometry for occupied resting facilities. compare_motion binds the
actual published report/history, not unfitted preferred positions.
- inspect_offline_mirror and inspect_os_requests both pass drawing_context's
hash-bound state/rest objects to frame_rows. inspect_stream separately runs
rest, cabin, motion and complete geometry checks. Missing objects raise and
cannot become a successful exemption. Unit tests exercise this shared loader;
no real OS/offline evidence was rerun or relabeled.
- strict_test_markers.load_contracts rejects duplicate suite rows. The existing
single P23 row already declares the exact two source print sites' template
`P23 life observation: <checks> checks, <failures> failures`. parse_raw obtains
counts only from actual logs; source_sha256_at_schema_audit is historical
metadata, not a current-source acceptance bypass. No marker-contract append
is required, no suite-policy row was added, and no marker was fabricated.
Root's source map must bind the final modified fixture and all changed files.
Local verification: 87, 91, 93, 95, 97, 98 and 99 tests passed as work progressed;
the final rerun passed **99 tests in 0.213s**, exit 0. The original expected R13 row11/29 rejection
is retained. Python compile checks for checker, tests and runner passed without
bytecode output. git diff --check passed. No tests were deleted or weakened.
Read-only discovery encountered inaccessible sibling worktrees and nonexistent
BUILD_OUTPUT_DIR shorthand; the actual allocated build directory supplied both
R13 direction files. A shell glob lookup had no match; no source was lost.
Root native/OS evidence, the 177-test full regression and independent Opus
all-condition review remain missing, as expected for worker submission.
Submission is not acceptance and earns no unit credit. No Godot, native/OS,
full regression, Runner, provider, git write or agent was run.
## Repair 25 continuation — current status: blocked, implementation incomplete
This section supersedes the status of the historical sections below. There is
no specification, permission, or floor-interpretation gap. The remaining blocker
is unfinished implementation and verification, not missing Root evidence alone.
All 809 pre-existing added lines were preserved and extended. No candidate is
claimed implemented or ready for acceptance. Seven conditions, six categories,
and 30/88 remain exact; historical 49 is preserved without relabeling.
Read before editing: AGENTS.md, Phase 0 API_AND_STATE_MAP, recorded concrete
direction, both authoritative R13 geometry/region directions, renderer,
checker/tests, diagnostic/passive collectors, Runtime initialize/spawn/save/load
entry points, enums, marker parser and existing contract. No new assets or
Runtime/gameplay/save/UI-entry changes.
Changes in this continuation:
- Drawing-row validation accepts the existing raw-state/rest-audit context and
invokes complete geometry classification and fitting. OS frames pass the
hash-bound stream objects; offline image review loads the matching writer
capture and checks its report binding before passing the same objects.
- Track validation checks the raw actor endpoint, source-valid adjacent origin,
finite nonfuture times and boolean pause. A drawing's region/in_transit flags
cannot grant an exemption. Without raw context the old conservative check
remains, and frame output explicitly says `absent: fail closed, no transit
exemptions`. Historical images have not been rerun or relabeled.
- Rest selection still independently validates routes, costs, locks and
eligibility. For actual occupied rest facilities its geometry now runs through
complete cross-kind fitting, including queue precedence and independently
reconstructed aggregation identities/no-fit, instead of requiring every
rest-slot identity to have an unshifted drawing row.
- Added the actual +m badge to Python and GDScript image-audit rectangle lists;
frame metadata retains all aggregate members and drawn keys. This additional
diagnostic row type does not change the six acceptance categories.
- Added full state-to-geometry positives for actual track interpolation,
staff/guest mixed packing on FRONT/BACK, fractional low-world-pixel scale and
saturated aggregation with all identities retained. Added track/time/pause,
forged-region/out-of-cell, aggregate identity loss and badge omission checks.
R13 row11/29 remains an expected FAIL. Existing tests were not removed.
Precise outstanding TODOs before an implemented submission:
1. Complete full state-to-geometry positives for queue lane + work staff,
passenger + floor, carried/resting/treated staff and cabin aggregation.
Exercise compare_rest with an actual occupied facility, legitimate no-fit
aggregate and queued staff; its new integration lacks those full fixtures.
2. Complete full semantic negatives for queue precedence/order and forcing the
receiving R13 guest back into its access cell. Existing primitive receiving
fixture tests and overlay negatives are retained but are not substitutes for
every required state-to-geometry case.
3. Audit and implement regrouping after scale changes in BOTH packers. They
currently form vertical groups before fitting; fitted feet/cores can change
vertical intersections. Do not claim the required regrouping positive passes.
Confirm carrier-relative pose/feet, cabin member coverage, and badge placement
through the required semantic cases before declaring the renderer finished.
4. Add full frame/offline/OS-context unit cases (including rest authority and
malformed/missing stream context). Standalone/full transit paths have tests;
production caller wiring was read but no OS/offline evidence run occurred.
5. Finish the GDScript UI fixture and source-authority integration audit. Existing
four-occupant UI preparation is retained and unexecuted. Marker contracts and
suite policies are unchanged; do not append a duplicate suite row or fabricate
an acceptance marker. If an authority append is necessary, only the single
strict contract-permitted entry is authorized.
Local checks actually executed:
- Checker unit command `PYTHONDONTWRITEBYTECODE=1 python3
tools/test_p23_life_observation_evidence.py`: 78 tests OK (0.104s), 80 OK
(0.112s), 83 OK (0.134s), 85 OK (0.112s), then **86 OK (0.124s)**.
No checker unit failure occurred in this continuation.
- No-bytecode `compile(Path(p).read_bytes(), p, "exec")` syntax check for
checker, checker tests and Root runner: all three OK, exit 0.
- Read-only `git diff --check`: exit 0, no output.
- One shell heredoc edit attempt failed before execution (`can't create temp
file for here document: operation not permitted`); applied the intended edit
with apply_patch afterward. One read-only search named a nonexistent
`tools/regression/suite_policy.py`; read the actual JSON policy and runner
directly. These were tool/read failures, not test passes.
No Godot/native/OS, full regression, Runner, provider, git write, integration or
other agent was run. Root's **new native/OS evidence**, the **177-test full
regression**, and the **independent Opus all-condition review** are still missing.
Those expected later proofs alone are not the reason for this blocked status.
## Repair 24 continuation — current status: blocked, implementation incomplete
The floor/anchored-region interpretation is RESOLVED. No clarification or
permission is requested. This status is an incomplete implementation, not an
external specification blocker and not a submitted candidate. Preserve this
worktree and every earlier uncommitted change. Historical sections below are
retained as history, not current interpretations.
Read the current renderer, RoomPresentation, the recorded concrete direction,
both R13 direction files, Phase 0 API map, Runtime initialization/spawn/formal
save/load sources, and cleaning pose dependencies. No domain inputs or assets
were changed. Seven conditions, six categories and 30/88 remain exact.
Implemented preparation in this continuation:
- Added per-actor cell/track, lane, facility, work-column and carried-patient
bounds, inset by world pixel; added original logical cell to drawing rows.
Staff queue placement now precedes the special staff anchors.
- Added a cross-kind vertical grouping and forward/backward interval packer,
integer scale trials and deterministic retained-member aggregation with a
readable +m badge. Cabin rows participate. Preferred centers and pose fields
remain separate from fitted drawing coordinates. This GDScript has NOT been
executed and is not established as native-correct.
- Added independent Python interval fitting and replaced original-scale
assertions with reconstructed centers, bounds, poses, fitted rows and
aggregation comparison. Queue and room reports are cross-checked before
geometry classification; boarded keys are rebuilt from EV reports.
- Added tests for the 56px four-mover case (all p=2), mixed actor kinds,
saturation with all identities retained, individual intervals, and R13's
receiving cafeteria guest outside its unchanged access cell. Added a full
synthetic state-to-geometry four-mover case and mutations for cell, state,
scale, position, missing/duplicate actors and unnecessary aggregation.
- Added the four-occupant GDScript component fixture. It is NOT native evidence.
Known remaining implementation work (must be resolved before submission):
1. The full geometry entry point passes independently derived transit keys to
pairwise checking, but standalone drawing-row/offline checks still use the
conservative default with no transit exemptions. Reconcile those paths
using authoritative inputs; never trust an in_transit/region flag.
2. Existing compare_rest still expects each visible slot in actor_drawings and
its original rest center. Reconcile legitimate aggregation and the new
staff queue precedence without bypassing the independent no-fit check.
3. Finish full classification tests for queue/work mixed groups, queue
precedence/order, spoofed category, forced access-cell receiving position,
carried/resting/treated staff, passengers and FRONT/BACK. Existing primitive
packing positives are not a substitute for these full semantic cases.
4. Audit pose/feet and regrouping after scale changes, low-world-pixel views,
carried patients and cabin aggregation; validate the actual GDScript and
report consumers through Root only after worker readiness. No new native
correctness or complete collision-removal claim is made here.
Checks actually executed in this continuation, all local:
- `PYTHONDONTWRITEBYTECODE=1 python3 tools/test_p23_life_observation_evidence.py`:
71 tests OK (0.093s), 76 tests OK (0.102s), then **78 tests OK (0.111s)**.
Existing R13 row11/29 remains an expected rejection. No unit test failure
occurred during this continuation; earlier failures remain recorded below.
- No-bytecode `compile(Path(p).read_bytes(), p, "exec")` for checker,
checker tests and Root runner: all three syntax checks OK, exit 0.
- One dependency lookup used the wrong cleaning-bridge directory and returned
an rg missing-file error; located and read the actual source under
scripts/environment. This was a read failure, not a passing test.
No Godot/native/OS, full regression, Runner, provider, git write or agent was
run. Root's **new native/OS evidence**, the **177-test full regression**, and
the **independent Opus all-condition review** are still missing. Historical
49 remains preserved and is not relabeled. No partial acceptance is claimed.
The inspection below is retained history. The repair 24 section above records
the current status; the former full-box impossibility argument is superseded.
Scope: the seven immutable acceptance conditions and existing allowed paths.
Validation: local Python syntax and checker unit tests only; no Godot execution.
Read the immutable acceptance spec, recorded concrete implementation direction,
existing Phase 0 API map, renderer, actor art, and independent checker.
The R13 provider stdout, command, and prompt SHA256 values match 01-actual.json.
The actual structured review contains 8 frames and 132 rows. Its summary's
168-row claim is not used to replace the structured rows. False judgments remain
false. The reader-request-0003 whole screenshot confirms overlapping actors and
obscured traffic presentation. Historical runtime evidence is unchanged.
Root native/OS evidence for a new candidate, the 177-test full regression, and
independent Opus all-condition review remain required and are not worker tests.
## Status: blocked; partial independent checker preparation only
The renderer repair and traffic geometry/layer audit are **not implemented**.
No claim of submission readiness or acceptance is made. No renderer, Runtime,
policy, immutable spec, source authority pin, or historical evidence was changed.
### Placement specification gap and concrete failing evidence
In the original `os-pair/A/reader-request-0003/request.json`, SHA256
`7dc3ee0bcc428e9d103726ee2448c767f1dd4107f9490833dc860c0b5140068c`,
the decoded report contains guests `os-p23-012` through `os-p23-015`, all
`MOVING`, logical cell `[1,1,0]`, with no service or queue request. Their
tracks' `from` and `cell` are both `[1,1,0]`. The current cell is 64x96 pixels
(`traffic` row 40's inset rect is `[709,390,60,92]`). Each actor's current
draw/report footprint is 48x54 pixels: the 16x18 PixelPeople grid at scale 3.
The four rectangles require area 10368, while the cell has area 6144.
Consequently offsets alone, preserving those sizes and containing all four
rectangles in that cell, cannot satisfy the requested nonoverlap invariant.
This is already present in the supplied evidence, not a hypothetical load.
Source references: `world_preview.gd::_cell_dimensions`, `_actor_drawing`,
`_tracked_actor_position`; checker `drawing_rectangle_rows` and
`compare_actor_geometry`; `pixel_people.gd`'s 16x18 drawing grid.
The direction specifies offsets inside room/cell art, containment consistent
with logical cell/state, retained motion, and no visual redesign. It does not
resolve what presentation change is permitted when existing footprints cannot
fit. Shrinking actors or expanding the permitted projection area could solve
this capacity issue, but neither is silently treated here as authorized by an
offset repair. This is a question about the admissible presentation, not a
claim that every possible rendering solution is impossible.
Minimal proposal for the owner: specify whether deterministic scale reduction
within the original logical cell is permitted (including the required readable
minimum and behavior when it still cannot fit), or define an allowed room/lane
projection for these non-queued moving actors. No Runtime capacity change,
actor omission, or acceptance waiver is proposed. Retain all seven conditions.
### Independent work preserved
Added `validate_actor_nonoverlap` to both the semantic geometry path and offline
drawing-row gate. It recomputes full footprints from raw `at`/`scale`, includes
cabin passengers, rejects duplicate identities and invalid numeric geometry,
and does not use eligibility labels or asserted booleans. Edge contact is
allowed; positive-area overlap is rejected with actor identities.
Five added unit tests cover edge contact, overlap despite forged verdicts and
off-screen labels, cabin/floor overlap, invalid footprints, and the actual R13
false row 11 against staff row 29. The small historical-negative fixture copies
only the needed raw drawing inputs and preserves `[11,false,false,false]` with
request/manifest hashes. Its inputs were checked against the original typed
report. The original review files and all their rows remain untouched.
The original manifest hash matches
`53aa8e2f12e5d0a089529457fcd55ee1ba0600e8dffff2225bb8b057d007fe1a`;
all crops in that manifest pass SHA verification. Opened the whole decoded image
and crops 11, 29, 40 directly; crops 11 and 29 show the same covered figure.
Still missing: collision-free renderer placement, draw-consumed band rectangle,
actual layer/geometry audits, and the requested additional cell/state, band,
layer, and stale-frame negatives. Passing these local tests does not resolve
those missing deliverables.
### Local checks actually run
Before edits:
`PYTHONDONTWRITEBYTECODE=1 python3 tools/test_p23_life_observation_evidence.py`
returned exit 0, `Ran 51 tests in 0.142s`, `OK`.
After edits the same command returned exit 0,
`Ran 56 tests in 0.093s`, `OK`.
Syntax command (no bytecode output):
```
python3 -c 'from pathlib import Path; files=["tools/check_p23_life_observation_evidence.py","tools/test_p23_life_observation_evidence.py","tools/run_p23_life_observation.py"]; [(compile(Path(p).read_bytes(),p,"exec"),print("syntax OK:",p)) for p in files]'
```
Exit 0; printed `syntax OK:` for each of those three files.
`git diff --check` returned exit 0 with no output (read-only check).
No Godot, native/OS, full regression, provider, Runner, git write, or agent
execution occurred. The initial shell heredoc attempt failed before execution
because the shell could not create its temporary file; subsequent inspection
used `python3 -c`.
## Recorded geometry direction continuation — blocked pending placement clarification
Read the complete `BUILD_OUTPUT_DIR/negative-image-review-r13/
OPUS_GEOMETRY_RESOLUTION_DIRECTION.json`, the owner run direction, the current
PixelPeople and WorldPreview sources, RoomPresentation slots, the existing
Phase 0 audit and the actual initialize/spawn/save/load API sources. The spec
still matches its contracted **stripped-text** SHA256. No spec, Runtime, save,
asset, UI entry, gameplay value, authority entry or suite policy was changed.
### Implemented independent preparation
- Replaced the full-box overlap invariant with identity cores. The table is
pinned to PixelPeople SHA256
`a171703083aa2d00f8be2b63e1daef9c41717c8fe59d8056878bc4b7df1e0b0c`.
Upright walking/carry-walking phases 2 and 6 shift the core up one grid unit.
Standard-room sleep phases 2, 3 and 4 extend its top from y=11 to y=10,
keeping the bottom at y=16, as required by the actual breathing marks.
Flips use the actual 16-grid mirror. Missing pose inputs now fail closed.
- Preserved the edge, forged-verdict, cabin, invalid-geometry and R13 tests.
Edge coordinates now use 6x12 core extents instead of the rejected 16x18
full-box extents; the deliberate overlap moves from [15,17] to [5,11].
Added a passing full-box-overlap/disjoint-core case and bob, breathing,
flip, missing-pose, duplicate, forged-transit and source-pin tests.
R13 row11/29 still fails: both recomputed cores are [669,520,18,36].
The fixture's newly required mode/frame/flip values were copied from the
original request and checked against it. False judgments remain false.
- Added the LifeOverlay Node2D between InactiveLayerRooms and LayerLens,
connected its draw signal, and queued its redraw from the parent draw.
The overlay draws traffic first, then cabin passengers and floor actors.
Existing inactive-art alpha remains 0.22. Actor rows and animation inputs
are unchanged. The report records observation/consumed serials, actual
child indices and the passes executed in the callback.
- Added the prescribed band rectangle at cell_bottom - 2*world_pixel,
with existing thickness clamp, colour thresholds and 0.90 opacity.
The blocked X is contained in the band pass. `compare_traffic` independently
recomputes both cell and band rectangles from typed state. Overlay checks
reject stale serial, reversed passes, child-order errors, a core covered
by the band, and forged band geometry. Source wiring/order is also checked,
so valid report flags do not excuse the tested reversed source callback.
FRONT/BACK local synthetic checks and GDScript serial/order assertions were
added. GDScript was **not executed**.
### Exact outstanding interpretation
Placement rule 1 gives service/rest/treatment anchors a facility region, while
rule 2 says a floor actor must *also* remain in its own logical cell. It is
unclear whether “floor actor” excludes these facility-anchored actors or means
every non-passenger. This is consequential in the actual R13 request, not only
in a fabricated layout:
- `guest-auto-00000044` receives `service_00000009` at cafeteria
`facility_00000003`. Its unchanged logical cell is [5,0,0]. The recorded
traffic inset [965,486,60,92] reconstructs cell [963,484,64,96].
The facility rect is [1027,388,256,192], and its four-pixel inset starts at
x=1031. There is no common x interval with the logical cell ending x=1027.
- `guest-auto-00000019` receives `service_00000002` at standard room
`facility_00000007`, rect [131,292,128,96]. Its logical access cell [-6,2,0]
reconstructs to [259,292,64,96]. The facility inset ends x=255; again there
is no common x interval. Its room pose is standard_room_sleep.
`r13_service_region_gap.json` preserves the needed original report fields,
with source request SHA256
`7dc3ee0bcc428e9d103726ee2448c767f1dd4107f9490833dc860c0b5140068c`.
Direct comparison verified every copied guest, traffic and room rectangle.
A diagnostic unit test demonstrates the empty intersection for both examples.
These extracted fields are not substituted for whole typed acceptance evidence.
This does **not** establish that the new specification is impossible: rule 7
allows aggregation when p=1 cannot fit. If floor means all non-passengers, these
otherwise roomy facilities must aggregate their service guests with zero drawn
members. If floor means unanchored actors, those guests can be packed and drawn
in their facility region. The initial commentary's “constraint conflict” is
therefore narrowed to this interpretation question. No cell restriction was
silently removed and no zero-drawn service aggregation was silently adopted.
An asynchronous question asks the owner to select the intended interpretation.
### Remaining implementation and evidence
Ordered placement, scale fitting, no-fit aggregation, queue-order preservation,
carrier-relative fitted placement, transit recomputation/exemptions and their
checker integration remain unimplemented. The checker remains conservative:
an asserted in_transit flag never bypasses overlap, but the required genuine
transit exception is not implemented. The existing geometry checker still
expects original actor positions/scales. The four-occupant GDScript fixture,
positive packing cases (staff/guest, passenger/floor, queue, saturation and
carried patient), and the new containment/aggregation/queue-order negatives
remain outstanding. The partial renderer changes are not a submitted candidate
and are not claimed to solve R13 actor collisions. All existing tests remain.
Still missing: Root **new native/OS evidence**, the **177-test full regression**,
and **independent Opus all-condition review** for the final candidate.
Historical 49 is preserved and is not relabeled or credited to these edits.
Seven immutable conditions and all6/30/88 remain exact, without partial credit.
### Checks actually run in this continuation
- `PYTHONDONTWRITEBYTECODE=1 python3 tools/test_p23_life_observation_evidence.py`:
first core run: 63 tests, 7 failures and 1 error because older synthetic
reports omitted pose fields. Updated those fixtures with explicit poses;
63 tests then passed (0.089s), followed by 64 (0.094s) after the bounds
diagnostic. First overlay run: 71 tests, 1 error because the older spatial
fixture lacked the new band rectangle. Updated that fixture with explicit
band geometry and consumed-frame fields. Final run: **71 tests, OK, 0.081s**.
- The existing no-bytecode `compile(Path(p).read_bytes(), p, "exec")` syntax
check passed for checker, checker tests and Root runner script (exit 0).
- Direct Python read-only comparisons verified both extracted R13 fixtures
against the original SHA-bound request and verified the immutable spec pin.
- A shell heredoc read attempt failed before execution with “can't create
temp file”; inspection continued with `python3 -c`.
No Godot, native/OS, full regression, Runner, nested provider, git write or
other-agent execution occurred. Only allowed files were edited. The worktree's
previous uncommitted work was retained and extended.
@@ -0,0 +1,86 @@
# Repair28 continuation / repair29 source handback
Record: SOURCE-READY, source-only submission for P23-03. This is not acceptance.
The preserved repair28 implementation is unchanged by this continuation. Only the
existing P23 marker source audit SHA and this new note are changed in repair29.
Older notes, raw receipts and failure history remain unchanged.
## Input and preserved-state verification
Read all six Root inputs in full from the explicitly supplied
`.runtime/P23-03/build/audit-support/root-repair29-input/` directory outside W.
Each byte count and SHA256 matches MANIFEST.json. Its authoritative patch is
64,737 bytes (SHA256 6b0a2a236a08f1c473850c06f7a761d1f0f8f4749db271771550d409d46e37b0),
despite the older instruction's 384318-byte description. No input is missing.
Before editing, all eight W file lengths and SHA256 values matched
PRESERVED_MANIFEST.json; `git diff --binary` equalled PRESERVED_DIFF.patch byte
for byte. The untracked r15 fixture was separately verified by its manifest SHA.
## A–E disposition and source map
| Item | Existing implementation / disposition |
| --- | --- |
| A1–A2 | scenes/main/world_preview.gd:1057 expands stops by reported shaft width; :1076 stops outward lanes at the footprint; :1094 retains member/visible/overflow accounting and badge offset. tools/check_p23_life_observation_evidence.py:965 independently reconstructs queues. |
| A3 | scripts/ui/room_presentation.gd:77 supplies count, operation, doors and phase text; scenes/main/world_preview.gd:1224 draws existing PixelArt cabin/gate and badge on LifeOverlay; :811 draws cabins above inactive-layer context. |
| A4 | scenes/main/world_preview.gd:640 collects opaque obstacles, :674 subtracts rectangles, :831 draws every traffic row including fully covered rows beneath opaque later cabins/badges. No density row is discarded. |
| A5 | scenes/main/world_preview.gd:564 deep-copies the consumed model, including shaft_footprint (:1097), badge_rect (:1286), traffic_obstacles (:649), segment_rects (:665). |
| B(a–d) | tests/ui/test_p23_life_observation.gd:32 covers width-2, overflow, empty cabin, both layers, operation/doors/phase and traffic geometry. tools/test_p23_life_observation_evidence.py:40 adds meaningful R15 intrusion/traffic and typed-state negatives. tests/fixtures/p23-03/passive_observation.gd:194 uses the reproducible badge rectangle. |
| C1–C2 | tools/check_p23_life_observation_evidence.py:1840 validates external S/M/T/Q, allowed changes, deterministic merge tree, S-only/M-only blobs and complete T source/settings/input/QA bindings; :1799 and :1821 enforce the structural marker join retaining M/P18. tools/run_p23_life_observation.py:245 consumes external roles; :334 records v2 evidence. tools/test_p23_life_observation_evidence.py:135 covers composition negatives. |
| C2(vi), C3 | tools/check_p23_life_observation_evidence.py:2108 refuses v1 history as current evidence; :1986 allows one screenshot only for screenshot requests, retaining real-input pairs. Existing staff, OS receipt, distinct-PID resume and image gates remain. Root owns final full regression and independent review. |
| D | The earlier assertion that kitchen full177 was consistent is withdrawn: p04-final-product-full-r01 failed the relationships-v2 kitchen envelope (legacy/version/original_relationships added; threshold_candidates/next_candidate_sequence missing). Old 177 gives no T credit. No kitchen source or overlay was changed. ACTUAL_SUPPORT_COMPLETED.json records approved QA3a9c support integration 5041b88bdf25d0deaf3cb335be981896522c4880 (reported main tree df9b2851edaa7d02a55b834328cf9e9a9bb7203a). Root must bind the actual later M and its kitchen QA blob to T; neither 9b nor any old full result is fixed as authority. The four D05 choices are not worker blockers. |
| E; repair29(b–c) | This note supplies the continuation handback and structured SOURCE-READY record. |
| repair29(a), step 4 | completion_marker_contracts.json:3710 now pins the actual final GDScript test SHA. Only that existing row's audit SHA changes; template, required flag, authority scope and every other row remain intact. |
No concrete remaining A–C source omission was identified in this bounded check;
therefore no code or test was changed and no new negative test was needed.
## R15 negative fixture provenance
tests/fixtures/p23-03/repair28_r15_negative.json is an extraction of historical
local-coordinate fields, not a raw receipt. It identifies source 9a26f9a,
manifest a25e15f00d09acb16b05e180a6263c3771c84449bd6e0c99b6968fd739727bd2,
request 7099ca03da3cef5819e7965f6fdea8777b9995a9e12806e870e844ec2b02b9a5,
R15 os-pair/A/reader-request-0003/request.json and negative rows 6/17.
Tests calculate counterfactual geometry only in memory. This extraction and all
synthetic projections grant no S/T execution or OS credit and do not relabel raw history.
## Frozen changed-source SHA256
| Path | SHA256 |
| --- | --- |
| scenes/main/world_preview.gd | 6c43e19fbce8ff5c442017ab22443f39f65f356c308ee895355cd7678d307f33 |
| scripts/ui/room_presentation.gd | 2eda851534777575298ea005e2e6d0ee90785a81357d5b9c34cfb95f615a8181 |
| tests/fixtures/p23-03/passive_observation.gd | 812c2a3b399b079333e4eae0fbf78946f1c39041e6859e65f8bc7c44aaad6bfc |
| tests/fixtures/p23-03/repair28_r15_negative.json | 8525cdfbc504583778624ab103efb4642374715be73187e97bdbf18d180a1616 |
| tests/ui/test_p23_life_observation.gd | 610ff2f33ec0e42bdca55d692e640c9bd8fe9244b9b49b0263419b1998ff9e9e |
| tools/check_p23_life_observation_evidence.py | 767f3452cd9f0671e25bfda113153b0b1471fcbfdfa7aba6133f991a61cf306d |
| tools/run_p23_life_observation.py | 1fa85aa53886887f9611997194240bf6e112f831e8f36ea3aff982d12538bdec |
| tools/test_p23_life_observation_evidence.py | 4a52215b125f3445abde9992ee69ad9b09fc114977e359b52f190c966e6d3c39 |
## Verification and pending Root evidence
ROOT_LOCAL_TEST_RESULT.json is authoritative: `python3 -B
tools/test_p23_life_observation_evidence.py`, exit 0, **123 tests, 0 failures**,
0.267 seconds. The earlier worker count of 121 is superseded. These unchanged
tests were not rerun in repair29; no Python source changed, so no syntax rerun
was needed. Manifest/hash/diff comparisons via `python3 -B -c` exited 0.
`git diff --check` exited 0. Final `python3 -B -c` hash/byte comparison exited 0:
all eight preserved sources remain unchanged, and the marker file differs from
HEAD by exactly the one authorized SHA replacement. Marker file SHA256 is
4dbba39cad454d02a004ee3d000457c3e13f7fc017dcfdb847aca7b192a8e30b.
The P23 marker entry SHA256 is
f83f022c44db6f89fc18d634f7ec9ce54b56450299c0e30fb1275cd2b88b6b39
(UTF-8 JSON, sorted keys, compact separators, ensure_ascii=False).
Initial shell attempts failed before validation: heredoc temporary-file creation
was denied (exit 1); `python` was unavailable (exit 127). The successful checks
used `python3 -B -c` without temporary files.
Still missing and explicitly Root's work: exact-source native/component and
impact evidence, same-demand A/B, normal OS on both layouts across all six
categories and FRONT/BACK/pan/zoom, formal save and distinct-PID normal load,
actual CUA receipts and independent bound-frame image judgments, one mandatory
full regression on T, and independent Opus all-condition review. Root binds
S/M/T/Q after submission and performs normal integration/final gates. No worker
engine, OS, Runner, Git write, main operation or subagent was used. Seven
conditions, six categories, 30/88 denominator, formal13, max repairs null and
all counters/caps remain unchanged. No acceptance verdict is issued.
@@ -0,0 +1,26 @@
# Repair 28: traffic projection checker
Scope: checker, its Python tests, one minimal decoded fixture and this note. Renderer, Runtime, save paths and controller unchanged. No git writes, Godot/native/OS, Runner or full regression operations.
## Separate routing and defect records
- Normal negative validate 97b6cdf9 failed because the current index was absent. Historical 49 was preserved by canonical rename retaining index SHA c0cc9e…. That missing-current-proof result is not evidence of this static defect.
- Independent readiness 887f9684 (READINESS_19FC3F5_ACTUAL.json) identifies the actual checker overconstraint. ROOT_19FC3F5_BAND_MISMATCH_REPRO.json and OPUS_19FC3F5_BAND_SCOPE_DIRECTION.json describe its repro and authorized scope.
All seven repair27 input files were read/decoded directly and their byte counts and SHA256 checked against MANIFEST.json (original paths retained in fixture provenance). The original frame-180 landing densities remain zero. The new 45 KB fixture contains only the unchanged decoded fields used by overlay validation: report frame/source metadata, actor drawings, cabins, traffic and camera/elevator track fields; raw world bounds, elevators and staff tasks. It is an extraction, not a raw receipt. No unused megabytes of state, rest or motion were copied. The positive test is explicitly COUNTERFACTUAL: only its in-memory report densities at (0,1,0) and (1,1,0) become 1, covering guests 018/019. It grants no engine/OS acceptance.
## Correction and caller audit
compare_traffic passes its actual snapshot into validate_life_overlay(report, root=ROOT, snapshot=None). inspect_stream already binds that state to its raw object and invokes compare_traffic; native layout and OS writer/reader stream validation therefore receive raw authority. The controller run_p23_life_observation.py has no direct validate_life_overlay/compare_traffic caller. Offline/OS drawing paths already use drawing_context to bind report/state/rest and retain compare_rest, compare_cabin_geometry and compare_actor_geometry. No new drawing gate was added there. Existing direct unit callers without state remain fail closed.
Cabin exemptions apply only to passenger entries belonging to that same raw shaft; cabin geometry reuses compare_cabin_geometry. A floor entry cannot inherit a passenger exemption by copying its key. Carried exemptions require actual active rescue transport binding and reuse compare_actor_geometry for original binding, track and raised-region fitting, excluding boarded/queue placements. Existing rest-authority checks remain unchanged. Missing-carrier KeyError remains deferred and fails closed.
Serial, consumed serial, reported passes, source child/pass order, source connection/parent restrictions, band rectangle and same-report checks remain unchanged. Floor cores keep the same strict intersection predicate. Every intersecting actor contributes a clipped horizontal interval. Sorted interval union must leave a nonzero uncovered span; no ratio or threshold was introduced.
## Local verification
- Python 3 -B compile() of both changed Python files: passed without writing bytecode.
- Entire checker suite: 108 tests passed (all 99 existing plus 9 new); original R13 row11/29 negative retained. New tests cover counterfactual cabin success, occupied and blocked full union occlusion, spoofed cabin rectangle/membership, absent raw state, floor copy of cabin key, missing carrier binding, and carried binding/track/position mutations. Existing reversed report/source pass tests remain.
- git diff --check: passed.
Root native/component, A/B on both layouts, normal OS, one full177 and independent Opus all-condition pixel review are expected after submission and do not block worker submission. No such unexecuted checks are claimed passed. Registered timeout 900 s, seven conditions, six categories, 30/88 and formal credit 0 remain unchanged.
@@ -0,0 +1,90 @@
# Repair 35 — source submission
Scope: P23-03 cabin-intrusion presentation repair only. Source input is
`93248f4d79a3be71d7a1ac0592e9219d405cd6b7`; recorded tested Q is
`428f653cdac375c1d4589e6c2d6138e914acf9da`. No Runtime, demand, assets,
acceptance, policy, process ownership or timeout changes.
## Exact inputs and Phase 0
First read the repair35 `EXACT_INPUTS.json` under
`/Users/korizatou114/Projects/TheTree-managed-worktrees/p23-03-code/.runtime/P23-03/build/audit-support/cabin-repair35-exact-inputs/`.
Read its complete supplied `original_full_request.txt`, `actual_Opus_repair.json`
and `actual_Opus_run.json`; all three supplied SHA256 pins match. Provenance-only
source locations were not needed. Read the sibling actual-worker preflight.
Read the SHA-verified preserved all87 probe
`audit-support/cabin-repair34-exact-inputs/CURRENT932_ALL_CABIN_INTRUSION_PROBE.json`
under the same BUILD (SHA256
`da395d697e0ec1bd2fb805757aa320314bbc840260f6062d12ecf5d859ceebd0`).
Read all 87 complete collision rows and all their whole SHA-verified typed
state/report objects: 19 distinct stream/state/report pairs, 31 distinct objects.
Also decoded all referenced objects in all 161 current stream captures and read
every file in the supplied r16 stage (1962 files, including the actual Q sources).
No required evidence was truncated, compressed, relabelled or edited.
Used that preserved evidence to apply the new candidate-region rule: 70 rows
select a corridor landing and 17 require identity aggregation because no lane is
available. All 87 candidate regions intersect a cabin; outside-class rows: zero.
This is static application to old negative evidence, not new rendered proof.
The existing `API_AND_STATE_MAP.md` remains the deterministic-demand/save-load
audit. Directly checked current GuestRuntime enum (`MOVING` = 3, lines 6–19),
WorldService `get_occupant`/`get_entity_cells`/`is_walkable` (194/204/228), and
ElevatorService's copied public report (345). These read-only APIs supply the
same queue lane topology and full-width shaft geometry; no new API is needed.
Current complete dependency SHA256:
| Source | SHA256 |
| --- | --- |
| scripts/world/world_service.gd | add67a0799f961a7dce1d382ea6dac67022fbd013f8c4c6b11321df96f37944a |
| scripts/transport/elevator_service.gd | cea09dd9204551c26b31b30cd3aa847cc77e3b75fdac31662b9694a95fb3580c |
| scripts/guest/guest_runtime.gd | 57ba99e5d977b5302987f4359a19056f1ab09c8fb7e4762ee8d79cbb9316741a |
The immutable spec matches `8568457d…a9c89f` using the existing checker's
`read_text().strip()` hash convention. Original acceptance and recorded complete
Opus repair/run directions remain authoritative.
## Six pose classes
| Case | Product, world_preview.gd | Independent checker |
| --- | --- | --- |
| (a) MOVING/idle footprint actor | 1608 candidate region, 1651 cabin rule, 1743 center before fitting | 1532 candidate region, 1577 cabin rule, 1584 center before jitter |
| (b) Lift-to-corridor walking transit | 1555 merged track bounds, 1565 landing becomes non-transit | 1532 merged track bounds, 1458 landing becomes non-transit |
| (c) Carrier and raised patient | 1624 recursively relocated carrier region, then minus 12p | 1556 recursively relocated carrier region, then minus 12p; 1612 center |
| (d) Fractional cabin crossing adjacent floor | 1565 positive-area intersection with actual cabin rect | 1458 intersection after independent cabin/badge validation at 1505 |
| (e) No corridor lane | 1590 landing badge anchor, 1759 aggregation with every identity | 1482 landing badge anchor, 1703 identity aggregation |
| (f) Queue plus relocated actor | 1602 prefer unreserved lane, otherwise existing packing | 1487 reservation choice, 1712 existing packing |
Room slots, queue placement/overflow, cabin/passenger geometry and overlay order
are retained. The new landing centers preserve original jitter; carried patients
use the relocated carrier before the 12p raise. No-lane actors share a counted
aggregation at the floor's landing badge anchor, retaining key/id/state/cell/mode.
Report-only region/boarded assertions cannot authorize a position.
`validate_cabin_intrusion`, `validate_actor_nonoverlap`, `actor_track_transit`
are byte-identical to the supplied Q checker; `PIXEL_PEOPLE_CORE_SHA256` is
unchanged. The existing P23-03 marker source-audit SHA alone was updated; all
other marker rows and suite-policy are preserved.
`run_p23_life_observation.py:315` inspects both completed headless layout streams
inside the existing exception/receipt/cleanup path, before OS collection.
Failure therefore prevents OS collection. This is staging, not OS evidence.
## Verification and remaining Root work
- `py_compile` passes for the runner, checker and checker tests.
- The full Python checker test file passes: 142 tests, including the seven new
tests covering (a)–(f), old in-cabin positions, tampered flags, missing actors,
missing aggregation identities, combined no-lane identities and unwarranted
relocation. Existing 135 tests are retained.
- Native assertions were extended at `tests/ui/test_p23_life_observation.gd:56`
for same-floor and fractional moving cabins on both layers; not executed here.
- No Godot, native/OS collection, full regression, Git writes, Runner operations
or subagents were run. Root native/OS evidence is missing.
Root staging remains: affected native/UI test; typed headless A/B with early
strict inspection and new-output intrusion probe requiring zero; then current
S/M/T/Q OS r17; then one final full 179 and independent review. Keep all r16
negative inputs and the all87 probe versioned. Seven conditions,
30/88/formal-13 and no partial credit remain unchanged.
@@ -0,0 +1,69 @@
# Repair36 worker submission
Scope: world_preview observation labels, independent checker, Python/GD controls.
No Runtime, service, data, art, policy, original negative, or acceptance changes.
Input authority: registered BUILD `audit-support/badge-repair36-exact-inputs/EXACT_INPUTS.json`, source 26f60095; original paths are provenance identifiers.
The resolver places fixed cabin rectangles/badges first, then business, supply,
landing, aggregation in array order. A positive-area collision advances to the
first blocking rectangle's right edge and repeats. With finite rectangles of
positive width this always terminates on the anchor row; the specified upper
and lower fallback rows are therefore unreachable. No margin, pixel threshold,
clipping, truncation, member alteration, or new viewport rule is introduced.
Original anchors and ordered blocker identities are retained in deep-copy reports.
Traffic obstacles use the resolved positions; actor placement/traffic subtraction
and cabin/transit guards retain their existing implementations.
The checker separately projects anchors back into the original report shape for
existing raw-state queue/business/aggregation recomputation. It independently
replays label geometry and validates reported positions and blocker identities.
All label pairs must have zero positive-area intersection. Both production image
review consumers require explicit indexed `judgments`; the legacy `rows` helper
interface remains available for unchanged historical unit controls only. Compact
bits are never accepted for new image-review evidence.
## Static all40 comparison
Inputs: all40 original manifests plus their unchanged original requests in
`p23-normal-os-26f-r17`, read only. This is a counterfactual static projection,
not a new rendered screenshot or native/OS acceptance.
Original manifest label pairs: exactly one intersection, B/writer-request-0021,
rows 5 (queue) and 26 (aggregation). Resolved labels: zero intersections in all
40 frames, including fixed cabin labels. Thirty frames have no movement.
The following is the complete movement list in local canvas coordinates:
| Frame | Label | Original | Resolved | displaced_by |
| --- | --- | --- | --- | --- |
| A/reader-request-0003 | landing/0 | 563,468 | 755,468 | cabin/0/rect |
| A/writer-request-0014 | landing/0 | 563,468 | 845,468 | cabin/0/badge |
| A/writer-request-0021 | landing/0 | 563,468 | 875,468 | cabin/0/badge |
| A/writer-request-0025 | landing/0 | 563,468 | 855,468 | cabin/0/badge |
| A/writer-request-0030 | landing/0 | 563,468 | 755,468 | cabin/0/rect |
| B/reader-request-0003 | landing/1 | 819,468 | 1111,468 | cabin/0/badge, cabin/1/badge |
| B/writer-request-0014 | landing/0 | 563,468 | 1101,468 | cabin/0/badge, cabin/1/badge |
| B/writer-request-0014 | landing/1 | 819,468 | 1217,468 | cabin/1/badge, landing/0 |
| B/writer-request-0021 | landing/0 | 563,468 | 755,468 | cabin/0/rect |
| B/writer-request-0021 | landing/1 | 819,468 | 1011,468 | cabin/1/rect |
| B/writer-request-0021 | aggregation/0 | 563,372 | 825,372 | landing/2, cabin/0/badge |
| B/writer-request-0025 | landing/1 | 819,468 | 1111,468 | cabin/0/badge, cabin/1/badge |
| B/writer-request-0030 | landing/1 | 819,468 | 1111,468 | cabin/0/badge, cabin/1/badge |
The affected queue anchor remains local [563,372], corresponding to original
manifest screenshot [642,469]. Its five members remain hidden and its complete
label remains unchanged. The historical reviewer index24/text26 disagreement
and all prior negatives remain untouched; no staff defect or acceptance credit
is inferred.
## Validation boundary
Worker runs Python syntax/local semantic tests only. GD controls are added but
not executed here. Root still must replay currentbad, run localized/native,
new normal OS A/B with indexed independent image review, then one full regression
and formal review/integration/ledger in the recorded order. No formal acceptance,
original88 credit, Windows, held-gesture, performance, or asset credit is claimed.
Local result: Python AST syntax PASS; 146 Python tests PASS (142 retained plus
four focused controls). All 142 pre-existing test method ASTs match HEAD exactly.
`git diff --check` PASS. Only the existing P23 GD marker source SHA was refreshed;
no marker requirements or policies changed. No Godot/native/OS/full was run.
@@ -0,0 +1,21 @@
# Repair37 portable recorded negative fixture
Candidate starts at `059c2f743be655c11627a2b19d8eab9f86a000a6` under the unchanged P23-03 contract. No Git write or Runner operation was performed.
`tests/fixtures/p23-03/recorded-badge-negative.json.gz` is copied byte-for-byte from Root's `.runtime/P23-03/build/audit-support/badge-repair37-portable-fixture/PROPOSED_PORTABLE_FIXTURE.json.gz` in the parent worktree directory. SHA256: `17b1596fb1dca0436cd656ac21a9dc754c75b4485335a0aebe533f70e1c1b5ac`; gzip length 83,518 bytes; decompressed length 3,490,211 bytes. Repeated decompression yields identical bytes.
The bundle records observed source `26f60095bff015efbf7d7cf89b5b0bbab1fec31e`, observed tested commit `dfe0dc44b0b88ace598c1b8bd05283c6084cb081`, and original PID 87103. These are preserved negative-input provenance, not acceptance evidence for 059 or this candidate. Original relative paths below are relative to the preserved `p23-normal-os-26f-r17` evidence root:
| Payload | Original relative path | Bytes | SHA256 |
| --- | --- | ---: | --- |
| request | `os-pair/B/writer-request-0021/request.json` | 655285 | `f9cd2d5ff9dd63d9cf7ae4a295ccef8eea16f75ac784696dc40906703731e1d8` |
| state | `os-pair/B/writer-stream/objects/724d8fe362ba3e05eddd83c4b7c54da101899df6cd91ae88250feea3d4feff82.json` | 1867011 | `724d8fe362ba3e05eddd83c4b7c54da101899df6cd91ae88250feea3d4feff82` |
| manifest | `os-pair/B/writer-request-0021/review-image-0/manifest.json` | 75726 | `a98782ec1263aba400d542862dd084d2f1dd4cf7a0851cf7f0679867e545a338` |
The loader verifies all three payload lengths and hashes on every call. Request uses JSON, report and state use the existing typed decoder; state retains the whole-Dictionary check. There is no runtime lookup, fallback, cache, extraction, or skip.
Local validation: all 146 Python tests pass; AST audit against 059c2f7 confirms 145 test methods are source-byte and AST identical, and the remaining method is AST identical after replacing only the manifest assignment value with the same fixed placeholder. Python syntax compilation passes. A fresh isolated copy of Git-tracked candidate files plus the fixture, without `.runtime`, passes Repair36LabelTests 4/4. Separate corrupt-payload and missing-fixture controls fail with fatal errors. No extra fixture is retained.
Frozen whole-file SHA256 values remain unchanged: renderer `4bc49a19a38b9c3b4d6bfc243ddf46f1f25469a8273adb5e812911ef9424a1f2`; checker `e41479ae51bccdfab3f31bd348794b441c2f341179bbe33222e2aacdf88f987f`.
Native and OS checks are still pending. Root's final local run on the new tested commit, raw geometry/native checks, new normal OS run, every indexed-image review, mandatory full 179, formal all 7, integration and ledger remain pending. No Godot or full suite was run by this worker.
@@ -0,0 +1,335 @@
{
"candidate": "336a8cd0b30db1add11869ebceab847db693f531",
"r10_path": "/Users/korizatou114/Projects/とりにく工房ゲーム制作部/artifacts/original-completion-2026-10-02/p23-03-native-os-atomic-336a8cd-r10",
"terminal_error": "AssertionError: native OS collection failed: AssertionError: ordinary native OS exit0",
"cleanup_errors": [],
"A_writer_pid": 56892,
"A_reader_pid": 60176,
"B_writer_pid": 61335,
"B_reader": "not run; B writer failed",
"all_conditions_accepted": false,
"formal_credit": 0,
"confirmed_failure": "B construction-only diagnostic budget leaves zero cash; 5 hires and raw-food purchase rejected. Do not change production values or weaken conditions.",
"actual_command_objects": {
"A": [
{
"object_sha256": "0d360907ad9289b7db5bc759a220cf274184f18cff3fe98c912941fed22fb1a9",
"decoded": {
"command": "hire_staff_candidate",
"payload": {
"candidate_id": "staff_akane"
},
"result": {
"code": "OK",
"command_id": 24,
"target_id": "",
"message": "",
"resolution_hints": [],
"details": {
"candidate_id": "staff_akane",
"staff_id": "staff_akane",
"role_id": "receptionist",
"daily_wage": 120,
"employment_kind": "FREE_HIRE",
"signing_cost": 180,
"shift_id": "shift_00000001_d00000",
"player_cash": 1320
},
"is_replay": false
},
"minute": 910
}
},
{
"object_sha256": "6dfd11522dee4b5ac9e1eefad4c2a27f01265cd46f1bb3e364665a85cd78769a",
"decoded": {
"command": "hire_staff_candidate",
"payload": {
"candidate_id": "staff_gina"
},
"result": {
"code": "OK",
"command_id": 26,
"target_id": "",
"message": "",
"resolution_hints": [],
"details": {
"candidate_id": "staff_gina",
"staff_id": "staff_gina",
"role_id": "porter",
"daily_wage": 110,
"employment_kind": "FREE_HIRE",
"signing_cost": 150,
"shift_id": "shift_00000003_d00000",
"player_cash": 1170
},
"is_replay": false
},
"minute": 910
}
},
{
"object_sha256": "e87798f0030e97a630c76ed3ad9ecdc4e032a090efc5fbb4a39ac606857828dd",
"decoded": {
"command": "hire_staff_candidate",
"payload": {
"candidate_id": "staff_chika"
},
"result": {
"code": "OK",
"command_id": 28,
"target_id": "",
"message": "",
"resolution_hints": [],
"details": {
"candidate_id": "staff_chika",
"staff_id": "staff_chika",
"role_id": "cook",
"daily_wage": 145,
"employment_kind": "FREE_HIRE",
"signing_cost": 250,
"shift_id": "shift_00000005_d00000",
"player_cash": 920
},
"is_replay": false
},
"minute": 910
}
},
{
"object_sha256": "00c167c28d271fbe133642650ab17b1240e73abd1d5fbb1bcea683f62e603c26",
"decoded": {
"command": "hire_staff_candidate",
"payload": {
"candidate_id": "staff_iris"
},
"result": {
"code": "OK",
"command_id": 30,
"target_id": "",
"message": "",
"resolution_hints": [],
"details": {
"candidate_id": "staff_iris",
"staff_id": "staff_iris",
"role_id": "attendant",
"daily_wage": 130,
"employment_kind": "FREE_HIRE",
"signing_cost": 210,
"shift_id": "shift_00000007_d00000",
"player_cash": 710
},
"is_replay": false
},
"minute": 910
}
},
{
"object_sha256": "969d0116e1bcc57e28019273e401ff1bbed54ca5ab22455d677889e2375f45f5",
"decoded": {
"command": "hire_staff_candidate",
"payload": {
"candidate_id": "staff_juno"
},
"result": {
"code": "OK",
"command_id": 32,
"target_id": "",
"message": "",
"resolution_hints": [],
"details": {
"candidate_id": "staff_juno",
"staff_id": "staff_juno",
"role_id": "attendant",
"daily_wage": 140,
"employment_kind": "FREE_HIRE",
"signing_cost": 240,
"shift_id": "shift_00000009_d00000",
"player_cash": 470
},
"is_replay": false
},
"minute": 910
}
},
{
"object_sha256": "092af99c4a2f84786641430e6c1cebce62f813b69dbac5d5ac397a3017fe6a84",
"decoded": {
"command": "purchase_supplies",
"payload": {
"warehouse_id": "facility_00000004",
"item_id": "ingredient/raw_food",
"quantity": 40
},
"result": {
"code": "OK",
"command_id": 34,
"target_id": "",
"message": "",
"resolution_hints": [],
"details": {
"ok": true,
"reason": "",
"total_cost": 120,
"cash_after": 350,
"quantity_after": 40,
"max_quantity": 100,
"warehouse_id": "facility_00000004",
"item_id": "ingredient/raw_food",
"quantity": 40,
"transaction_id": "ledger_00000060"
},
"is_replay": false
},
"minute": 910
}
}
],
"B": [
{
"object_sha256": "bcb27db495ae9e94a20578e1aadcb64e0fa316bb1d4a6e954e581f4bdb34b296",
"decoded": {
"command": "hire_staff_candidate",
"payload": {
"candidate_id": "staff_akane"
},
"result": {
"code": "VALIDATION_FAILED",
"command_id": 25,
"target_id": "",
"message": "An account does not permit a negative balance.",
"resolution_hints": [],
"details": {
"account_id": "PLAYER_CASH",
"available": 0,
"resulting_balance": -180
},
"is_replay": false
},
"minute": 910
}
},
{
"object_sha256": "81f9484c3fcce64e084a7e2ead8bf84dd8c56e144860624845eccb8c4218417a",
"decoded": {
"command": "hire_staff_candidate",
"payload": {
"candidate_id": "staff_gina"
},
"result": {
"code": "VALIDATION_FAILED",
"command_id": 27,
"target_id": "",
"message": "An account does not permit a negative balance.",
"resolution_hints": [],
"details": {
"account_id": "PLAYER_CASH",
"available": 0,
"resulting_balance": -150
},
"is_replay": false
},
"minute": 910
}
},
{
"object_sha256": "16f4a094baa4204d4e254b6d52d824f32aa33e914e6bc1698aa933a8fa51207a",
"decoded": {
"command": "hire_staff_candidate",
"payload": {
"candidate_id": "staff_chika"
},
"result": {
"code": "VALIDATION_FAILED",
"command_id": 29,
"target_id": "",
"message": "An account does not permit a negative balance.",
"resolution_hints": [],
"details": {
"account_id": "PLAYER_CASH",
"available": 0,
"resulting_balance": -250
},
"is_replay": false
},
"minute": 910
}
},
{
"object_sha256": "303e545649bf1c84c736293a6e1b54491befbc376b9a051d3f3c75659e2b147e",
"decoded": {
"command": "hire_staff_candidate",
"payload": {
"candidate_id": "staff_iris"
},
"result": {
"code": "VALIDATION_FAILED",
"command_id": 31,
"target_id": "",
"message": "An account does not permit a negative balance.",
"resolution_hints": [],
"details": {
"account_id": "PLAYER_CASH",
"available": 0,
"resulting_balance": -210
},
"is_replay": false
},
"minute": 910
}
},
{
"object_sha256": "de1717d64250c9ae721fc38230d185b0621a066e01890f9fb4020b4c7e36e7c0",
"decoded": {
"command": "hire_staff_candidate",
"payload": {
"candidate_id": "staff_juno"
},
"result": {
"code": "VALIDATION_FAILED",
"command_id": 33,
"target_id": "",
"message": "An account does not permit a negative balance.",
"resolution_hints": [],
"details": {
"account_id": "PLAYER_CASH",
"available": 0,
"resulting_balance": -240
},
"is_replay": false
},
"minute": 910
}
},
{
"object_sha256": "c257c14418959e558b88d4f47591c14726fff4763a30177275d8725cb6639b9f",
"decoded": {
"command": "purchase_supplies",
"payload": {
"warehouse_id": "facility_00000004",
"item_id": "ingredient/raw_food",
"quantity": 40
},
"result": {
"code": "VALIDATION_FAILED",
"command_id": 35,
"target_id": "",
"message": "Supply command rejected: INSUFFICIENT_FUNDS",
"resolution_hints": [],
"details": {
"ok": false,
"reason": "INSUFFICIENT_FUNDS",
"total_cost": 120,
"cash_after": -120,
"quantity_after": 40,
"max_quantity": 0
},
"is_replay": false
},
"minute": 910
}
}
]
},
"next": "Actual Opus diagnosis and narrow same-task repair before full regression"
}
+419 -39
View File
@@ -79,6 +79,8 @@ var _queue_hidden: Dictionary = {}
var _landing_badges: Array[Dictionary] = []
var _transport_report: Dictionary = {}
var _life_observation: Dictionary = {}
var _life_overlay: Node2D
var _life_observation_serial := 0
var _dragging := false
var _drag_button := MOUSE_BUTTON_NONE
@@ -104,6 +106,10 @@ func _ready() -> void:
_inactive_layer_art = InactiveLayerRooms.new()
_inactive_layer_art.name = "InactiveLayerRooms"
add_child(_inactive_layer_art)
_life_overlay = Node2D.new()
_life_overlay.name = "LifeOverlay"
_life_overlay.draw.connect(_draw_life_overlay)
add_child(_life_overlay)
_layer_lens = ColorRect.new()
_layer_lens.name = "LayerLens"
_layer_lens.mouse_filter = Control.MOUSE_FILTER_IGNORE
@@ -513,6 +519,8 @@ func _draw() -> void:
func _draw_contents() -> void:
_life_observation = {}
if _life_overlay != null:
_life_overlay.queue_redraw()
if _inactive_layer_art != null:
_inactive_layer_art.visible = false
_draw_background()
@@ -524,6 +532,9 @@ func _draw_contents() -> void:
if map_rect.size == Vector2.ZERO:
return
_life_observation = _build_life_observation()
_life_observation_serial += 1
_life_observation[&"observation_serial"] = _life_observation_serial
_life_observation[&"overlay_consumed_serial"] = -1
_room_presentations = _life_observation[&"rooms"]
_carried_patients = _life_observation[&"carried_patients"]
_treated_patients = _life_observation[&"treated_patients"]
@@ -538,13 +549,9 @@ func _draw_contents() -> void:
_draw_world_cells(bounds, map_rect)
_draw_world_entity_icons()
_draw_legacy_stairs()
_draw_elevators()
_draw_other_layer()
_draw_congestion_overlay(bounds)
_draw_life_badges()
_draw_construction_labels()
_draw_facility_labels()
_draw_actors()
_draw_excavation_jobs()
_draw_build_preview()
_draw_excavation_preview()
@@ -599,7 +606,8 @@ func _build_life_observation() -> Dictionary:
model[&"guests"] = guests
model[&"staff"] = staff
model[&"tasks"] = tasks
var bridge: Variant = _service(&"supply_logistics_bridge")
_fit_life_actors(model)
var bridge: Variant = _service(&"supply_logistics")
var goods: Dictionary = bridge.get_report() if bridge != null else {&"requests": [], &"deliveries": []}
model[&"goods"] = goods
var badges: Array[Dictionary] = []
@@ -629,6 +637,15 @@ func _build_life_observation() -> Dictionary:
&"at": rect.position + Vector2(2, 16), &"requests": requests,
&"text": RoomPresentation.supply_label(requests)})
model[&"badges"] = badges
_resolve_observation_labels(model)
var obstacles: Array[Rect2] = []
for cabin: Dictionary in model[&"cabins"]:
obstacles.append(cabin[&"rect"])
obstacles.append(cabin[&"badge_rect"])
for collection: Array in [badges, model[&"landing_badges"], model.get(&"actor_aggregations", [])]:
for badge: Dictionary in collection:
obstacles.append(_readable_badge_rect(badge[&"at"], badge[&"text"]))
model[&"traffic_obstacles"] = obstacles
var traffic: Array[Dictionary] = []
var path: Variant = _service(&"path_service")
var bounds := _world_bounds()
@@ -638,14 +655,79 @@ func _build_life_observation() -> Dictionary:
var cell := Vector3i(x, y, layer_mode)
var row: Dictionary = path.get_cell_traffic(cell)
if not row.is_empty():
traffic.append({&"cell": cell, &"traffic": row, &"rect": get_cell_rect(cell).grow(-2.0)})
var cell_rect := get_cell_rect(cell)
var rect := cell_rect.grow(-2.0)
var world_pixel := _cell_dimensions().x / 16.0
var thickness := clampf(rect.size.y * 0.16, 2.0, 5.0)
var band := Rect2(Vector2(rect.position.x + rect.size.x * 0.12,
cell_rect.end.y - 2 * world_pixel - thickness * 0.5),
Vector2(rect.size.x * 0.76, thickness))
traffic.append({&"cell": cell, &"traffic": row, &"rect": rect, &"band_rect": band,
&"segment_rects": _traffic_segments(band, rect, obstacles)})
model[&"traffic"] = traffic
return model
func _draw_life_badges() -> void:
## Subtract opaque observation regions, retaining a visible density mark even
## when the ordinary floor band is completely behind a moving cabin.
func _traffic_segments(band: Rect2, cell: Rect2, obstacles: Array[Rect2]) -> Array[Rect2]:
for y: float in [band.position.y, cell.position.y, cell.end.y - band.size.y]:
var pieces: Array[Rect2] = [Rect2(Vector2(band.position.x, y), band.size)]
for obstacle: Rect2 in obstacles:
var remaining: Array[Rect2] = []
for piece: Rect2 in pieces:
var cut := piece.intersection(obstacle)
if not cut.has_area():
remaining.append(piece)
continue
for part: Rect2 in [Rect2(piece.position, Vector2(piece.size.x, cut.position.y-piece.position.y)),
Rect2(Vector2(piece.position.x, cut.end.y), Vector2(piece.size.x, piece.end.y-cut.end.y)),
Rect2(Vector2(piece.position.x, cut.position.y), Vector2(cut.position.x-piece.position.x, cut.size.y)),
Rect2(Vector2(cut.end.x, cut.position.y), Vector2(piece.end.x-cut.end.x, cut.size.y))]:
if part.has_area():
remaining.append(part)
pieces = remaining
if not pieces.is_empty():
return pieces
return []
func _resolve_observation_labels(model: Dictionary) -> void:
var placed: Array[Dictionary] = []
for i: int in model[&"cabins"].size():
var cabin: Dictionary = model[&"cabins"][i]
placed.append({&"id": "cabin/%d/rect" % i, &"rect": cabin[&"rect"]})
placed.append({&"id": "cabin/%d/badge" % i, &"rect": cabin[&"badge_rect"]})
for kind: String in ["business", "supply", "landing", "aggregation"]:
var collection: Array = model[&"badges"] if kind in ["business", "supply"] else model[&"landing_badges"] if kind == "landing" else model.get(&"actor_aggregations", [])
for i: int in collection.size():
var badge: Dictionary = collection[i]
if kind in ["business", "supply"] and badge[&"kind"] != kind:
continue
var anchor: Vector2 = badge[&"at"]
var at := anchor
var displaced_by: Array[String] = []
# Each collision advances to an existing right edge. Positive widths
# guarantee termination; touching edges are allowed.
while true:
var blocker: Dictionary = {}
for previous: Dictionary in placed:
if _readable_badge_rect(at, badge[&"text"]).intersection(previous[&"rect"]).has_area():
blocker = previous
break
if blocker.is_empty():
break
displaced_by.append(blocker[&"id"])
at.x = (blocker[&"rect"] as Rect2).end.x
badge[&"anchor"] = anchor
badge[&"at"] = at
badge[&"displaced_by"] = displaced_by.duplicate(true)
placed.append({&"id": "%s/%d" % [kind, i], &"rect": _readable_badge_rect(at, badge[&"text"])})
func _draw_life_badges(canvas: CanvasItem) -> void:
for badge: Dictionary in _life_observation.get(&"badges", []):
_draw_readable_badge(badge[&"at"], badge[&"text"])
_draw_readable_badge(badge[&"at"], badge[&"text"], canvas)
func _draw_background() -> void:
@@ -758,9 +840,29 @@ func _draw_leaf_cluster(center: Vector2, p: float, variation: int) -> void:
draw_rect(Rect2(c+offset,Vector2(3+i%2,2)*p),Color("95ad69") if i%3==0 else Color("648957"))
func _draw_congestion_overlay(_bounds: Dictionary) -> void:
func _draw_life_overlay() -> void:
if _life_observation.is_empty():
return
# These are actual child indices and the passes executed by this callback.
_life_observation[&"overlay_child_indices"] = [_inactive_layer_art.get_index(), _life_overlay.get_index(), _layer_lens.get_index()]
_life_observation[&"overlay_passes"] = []
_life_observation[&"overlay_passes"].append(&"traffic")
_draw_congestion_overlay(_life_overlay)
_life_observation[&"overlay_passes"].append(&"cabins")
_draw_elevators(_life_overlay)
_draw_life_badges(_life_overlay)
_life_observation[&"overlay_passes"].append(&"actors")
for cabin: Dictionary in _life_observation.get(&"cabins", []):
for actor: Dictionary in cabin[&"passengers"]:
_draw_observed_actor(actor, _life_overlay)
_draw_actors(_life_overlay)
for badge: Dictionary in _life_observation.get(&"actor_aggregations", []):
_draw_readable_badge(badge[&"at"], badge[&"text"], _life_overlay)
_life_observation[&"overlay_consumed_serial"] = _life_observation[&"observation_serial"]
func _draw_congestion_overlay(canvas: CanvasItem) -> void:
for row: Dictionary in _life_observation.get(&"traffic", []):
var rect: Rect2 = row[&"rect"]
var traffic: Dictionary = row[&"traffic"]
var density := int(traffic[&"current_density"])
var blocked := bool(traffic[&"temporary_block"])
@@ -768,13 +870,13 @@ func _draw_congestion_overlay(_bounds: Dictionary) -> void:
continue
var ratio := float(density) / maxi(int(traffic[&"base_capacity"]), 1)
var color := Color("e34332") if blocked or ratio > 1.0 else Color("e3a62f") if ratio >= 0.65 else Color("55c96b")
var center := rect.get_center()
draw_line(Vector2(rect.position.x + rect.size.x * 0.12, center.y),
Vector2(rect.end.x - rect.size.x * 0.12, center.y),
Color(color, 0.90 if show_grid else 0.28), clampf(rect.size.y * 0.16, 2.0, 5.0))
if blocked:
draw_line(rect.position, rect.end, Color(color, 0.90 if show_grid else 0.28), 2.0)
draw_line(Vector2(rect.end.x, rect.position.y), Vector2(rect.position.x, rect.end.y), Color(color, 0.90 if show_grid else 0.28), 2.0)
# At overview zoom a whole cell can be covered by opaque badges. Still
# submit its density band, beneath those later draws, and report no visible
# fragments. No traffic cell or raw density row is dropped.
if row[&"segment_rects"].is_empty():
canvas.draw_rect(row[&"band_rect"], Color(color, 0.90))
for segment: Rect2 in row[&"segment_rects"]:
canvas.draw_rect(segment, Color(color, 0.90))
## Visual-only level comes from the existing live FacilityInstance, not the
@@ -887,13 +989,20 @@ func _draw_world_entity_icons() -> void:
draw_rect(rect.grow(-p),Color("f5d582"),false,2*p)
func _draw_readable_badge(at: Vector2, text: String) -> void:
var width := ThemeDB.fallback_font.get_string_size(text, HORIZONTAL_ALIGNMENT_LEFT, -1, 10).x+6
var rect := Rect2(at, Vector2(width, 14))
func _readable_badge_rect(at: Vector2, text: String) -> Rect2:
# A conservative em-width box makes geometry independently reproducible.
# Text still uses the existing fallback font and size.
return Rect2(at, Vector2(text.length() * 10 + 6, 14))
func _draw_readable_badge(at: Vector2, text: String, canvas: CanvasItem = null) -> void:
if canvas == null:
canvas = self
var rect := _readable_badge_rect(at, text)
if not rect.intersects(Rect2(Vector2.ZERO, size)):
return
draw_rect(rect, Color("34413b", 0.94))
draw_string(ThemeDB.fallback_font, at+Vector2(3, 11), text, HORIZONTAL_ALIGNMENT_LEFT, -1, 10, Color("fff2ce"))
canvas.draw_rect(rect, Color("34413b"))
canvas.draw_string(ThemeDB.fallback_font, at+Vector2(3, 11), text, HORIZONTAL_ALIGNMENT_LEFT, -1, 10, Color("fff2ce"))
func _prepare_room_presentations() -> void:
@@ -982,7 +1091,8 @@ func _observe_queues() -> Dictionary:
var lift_cells: Dictionary = {}
for shaft: Dictionary in _transport_report.get(&"shafts", []):
for stop: Vector3i in _cells_from_serialized(shaft.get(&"stops", [])):
lift_cells[stop] = true
for offset: int in range(maxi(int(shaft.get(&"width", 2)), 1)):
lift_cells[stop + Vector3i(offset, 0, 0)] = true
var reserved: Dictionary = {}
var cells: Array = groups.keys()
cells.sort_custom(func(a: Vector3i, b: Vector3i) -> bool: return a.y < b.y or (a.y == b.y and a.x < b.x))
@@ -997,6 +1107,8 @@ func _observe_queues() -> Dictionary:
var next := cell + Vector3i(direction*distance, 0, 0)
if world == null or not world.is_walkable(next):
break
if lift_cells.has(next):
break
var occupant: StringName = world.get_occupant(next)
var facility: Variant = facilities.get_instance(occupant) if facilities != null else null
if facility != null and facility.definition_id not in [&"guest_corridor", &"service_corridor"]:
@@ -1016,7 +1128,7 @@ func _observe_queues() -> Dictionary:
var text := RoomPresentation.queue_label(members.size(), members.size()-index)
_landing_badges.append({&"at": get_cell_rect(cell).position + Vector2(-80 if lift_cells.has(cell) else 0, -16), &"text": text, &"cell": cell, &"members": members.duplicate(), &"visible_count": index, &"overflow": members.size()-index})
return {&"queue_positions": _queue_positions, &"queue_hidden": _queue_hidden, &"landing_badges": _landing_badges, &"elevators": _transport_report}
return {&"queue_positions": _queue_positions, &"queue_hidden": _queue_hidden, &"landing_badges": _landing_badges, &"elevators": _transport_report, &"shaft_footprint": lift_cells.keys()}
func _add_queue_member(groups: Dictionary, key: String, cell: Vector3i) -> void:
@@ -1143,15 +1255,13 @@ func _draw_facility_labels() -> void:
draw_string(ThemeDB.fallback_font,at+Vector2(4,12),label,HORIZONTAL_ALIGNMENT_CENTER,label_width-8,font_size,Color("f0e2b9"))
func _draw_elevators() -> void:
func _draw_elevators(canvas: CanvasItem) -> void:
for row: Dictionary in _life_observation.get(&"cabins", []):
PixelArt.elevator_cabin(self, row[&"rect"], row[&"pixel"], layer_mode == LayerMode.BACK, row[&"operational"])
for actor: Dictionary in row[&"passengers"]:
_draw_observed_actor(actor)
PixelArt.elevator_gate(self, row[&"rect"], row[&"pixel"], row[&"doors_open"])
_draw_readable_badge(row[&"badge_at"], row[&"badge"])
PixelArt.elevator_cabin(canvas, row[&"rect"], row[&"pixel"], layer_mode == LayerMode.BACK, row[&"operational"])
PixelArt.elevator_gate(canvas, row[&"rect"], row[&"pixel"], row[&"doors_open"])
_draw_readable_badge(row[&"badge_at"], row[&"badge"], canvas)
for badge: Dictionary in _life_observation.get(&"landing_badges", []):
_draw_readable_badge(badge[&"at"], badge[&"text"])
_draw_readable_badge(badge[&"at"], badge[&"text"], canvas)
func _observe_elevators(observation: Dictionary) -> Array[Dictionary]:
@@ -1188,8 +1298,7 @@ func _observe_elevators(observation: Dictionary) -> Array[Dictionary]:
var doors_open := operational and phase in [&"IDLE", &"BOARDING", &"ALIGHTING"]
var passengers_drawn: Array[Dictionary] = []
var seat_columns := maxi(int((cabin.size.x / p - 4.0) / 8.0), 1)
var visible_count := mini(passengers.size(), seat_columns*2)
for index: int in range(visible_count):
for index: int in range(passengers.size()):
var actor_key := _elevator_actor_key(String(passengers[index]))
var is_staff := actor_key.begins_with("staff/")
var person: Variant = null
@@ -1200,13 +1309,15 @@ func _observe_elevators(observation: Dictionary) -> Array[Dictionary]:
var carrying := is_staff and person != null and not String(person.carried_inventory_id).is_empty()
var state := int(person.state) if person != null else 0
var x := cabin.position.x + (2.0 + (index % seat_columns + 0.5)*8.0)*p
var feet := cabin.end.y - (2.0 + int(index / seat_columns)*9.0)*p
var feet := cabin.end.y - (2.0 + (int(index / seat_columns) % 2)*9.0)*p
var center := Vector2(x, feet+3*p-_cell_dimensions().y*0.5)
passengers_drawn.append(_actor_drawing(center,actor_key,is_staff,state,false,carrying,&"",true,observation))
cabins.append({&"shaft_id": shaft_id, &"rect": cabin, &"pixel": p,
&"operational": operational, &"doors_open": doors_open,
&"phase": phase, &"passenger_count": passengers.size(),
&"passengers": passengers_drawn,
&"badge_at": Vector2(cabin.position.x, cabin.position.y-14),
&"badge_rect": _readable_badge_rect(Vector2(cabin.position.x, cabin.position.y-14), RoomPresentation.elevator_label(shaft)),
&"badge": RoomPresentation.elevator_label(shaft)})
for shaft_id: Variant in _elevator_tracks.keys():
@@ -1240,9 +1351,9 @@ func _tracked_elevator_floor(shaft_id: StringName, current_floor: float, observa
return lerpf(float(track[&"from"]),current_floor,t)
func _draw_actors() -> void:
func _draw_actors(canvas: CanvasItem = null) -> void:
for row: Dictionary in _life_observation.get(&"actor_drawings", []):
_draw_observed_actor(row)
_draw_observed_actor(row, canvas)
func _observe_actors(observation: Dictionary) -> Array[Dictionary]:
@@ -1291,6 +1402,9 @@ func _observe_actors(observation: Dictionary) -> Array[Dictionary]:
continue
var position := _tracked_actor_position(key,staff.current_cell,observation)
if staff.current_cell.z==layer_mode:
if _queue_positions.has(key):
rows.append(_actor_drawing(_queue_positions[key],key,true,int(staff.state),false,not String(staff.carried_inventory_id).is_empty(),_staff_work_animation(staff),false,observation))
continue
if _carried_patients.has(staff.staff_id):
var carrier: Variant = staff_service.get_staff(_carried_patients[staff.staff_id])
if carrier != null:
@@ -1412,11 +1526,13 @@ func _draw_pixel_actor(center: Vector2, key: String, staff: bool, state: int, re
_draw_observed_actor(_actor_drawing(center, key, staff, state, receiving, carrying, activity, riding))
func _draw_observed_actor(row: Dictionary) -> void:
func _draw_observed_actor(row: Dictionary, canvas: CanvasItem = null) -> void:
if canvas == null:
canvas = self
var at: Vector2 = row[&"at"]
var p: float = row[&"scale"]
draw_rect(Rect2(at + Vector2(5, 17) * p, Vector2(8, 1) * p), Color("303c40", 0.2))
People.draw(self, at, p, row[&"mode"], row[&"frame"], row[&"variant"], row[&"staff"], row[&"flip"])
canvas.draw_rect(Rect2(at + Vector2(5, 17) * p, Vector2(8, 1) * p), Color("303c40", 0.2))
People.draw(canvas, at, p, row[&"mode"], row[&"frame"], row[&"variant"], row[&"staff"], row[&"flip"])
func _actor_drawing(center: Vector2, key: String, staff: bool, state: int, receiving: bool, carrying: bool, activity: StringName = &"", riding := false, observation: Dictionary = {}) -> Dictionary:
@@ -1454,6 +1570,270 @@ func _actor_drawing(center: Vector2, key: String, staff: bool, state: int, recei
&"riding": riding, &"flip": float(track.get(&"direction", 1.0)) < 0.0}
## Identity cores are tied to the unchanged PixelPeople poses, not sprite boxes.
func _life_core(row: Dictionary) -> Rect2:
var phase := int(row[&"frame"]) % 8
var core := Rect2(6, 1, 6, 12)
if row[&"mode"] in [&"sleep", &"collapsed", &"standard_room_sleep"]:
core = Rect2(2, 11, 13, 5)
if row[&"mode"] == &"standard_room_sleep" and phase in [2, 3, 4]:
core.position.y -= 1
core.size.y += 1
elif row[&"mode"] in [&"walk", &"carry_walk"] and phase in [2, 6]:
core.position.y -= 1
if row[&"flip"]:
core.position.x = 16-core.end.x
return Rect2(row[&"at"]+core.position*row[&"scale"], core.size*row[&"scale"])
func _life_track_region(key: String, cell: Vector3i, model: Dictionary) -> Dictionary:
var track: Dictionary = model[&"actor_tracks"].get(key, {})
var transit: bool = not model[&"paused"] and track.get(&"from", cell) != cell and _animation_time-float(track.get(&"at", 0.0)) < 0.42
var rect := get_cell_rect(cell)
if transit:
rect = rect.merge(get_cell_rect(track[&"from"]))
return {&"bounds": rect, &"transit": transit}
## Keep non-passengers on a real corridor landing when a cabin crosses their pose.
func _life_landing_region(region: Dictionary, cell: Vector3i, model: Dictionary) -> Dictionary:
var blocked := false
for cabin: Dictionary in model[&"cabins"]:
if (region[&"bounds"] as Rect2).intersects(cabin[&"rect"]):
blocked = true
break
if not blocked:
return region
var world: Variant = _service(&"world_service")
var facilities: Variant = _service(&"facility_service")
var footprint: Array = model[&"shaft_footprint"]
var origins: Array = footprint.filter(func(c: Vector3i) -> bool: return c.y == cell.y and c.z == cell.z)
origins.sort_custom(func(a: Vector3i, b: Vector3i) -> bool: return absi(a.x-cell.x) < absi(b.x-cell.x) or (absi(a.x-cell.x) == absi(b.x-cell.x) and a.x < b.x))
var lane: Array[Vector3i] = []
for origin: Vector3i in origins:
for direction: int in [-1, 1]:
for distance: int in range(1, 9):
var target := origin + Vector3i(direction*distance, 0, 0)
if world == null or footprint.has(target) or not world.is_walkable(target):
break
var facility: Variant = facilities.get_instance(world.get_occupant(target)) if facilities != null else null
if facility != null and facility.definition_id not in [&"guest_corridor", &"service_corridor"]:
break
if not lane.has(target):
lane.append(target)
lane.sort_custom(func(a: Vector3i, b: Vector3i) -> bool: return absi(a.x-cell.x) < absi(b.x-cell.x) or (absi(a.x-cell.x) == absi(b.x-cell.x) and a.x < b.x))
if lane.is_empty():
var anchor := get_cell_rect(cell).position+Vector2(-80, -16)
var nearest := INF
for badge: Dictionary in model[&"landing_badges"]:
var landing: Vector3i = badge[&"cell"]
if landing.y == cell.y and landing.z == cell.z and absf(landing.x-cell.x) < nearest:
nearest = absf(landing.x-cell.x)
anchor = badge[&"at"]
return {&"bounds": region[&"bounds"], &"transit": false, &"no_lane": true, &"badge_at": anchor}
var selected: Vector3i = lane[0]
for target: Vector3i in lane:
if not model[&"queue_positions"].values().has(cell_to_canvas(target)):
selected = target
break
return {&"bounds": get_cell_rect(selected), &"transit": false, &"center": cell_to_canvas(selected)}
func _life_actor_region(row: Dictionary, person: Dictionary, model: Dictionary) -> Dictionary:
var key: String = row[&"key"]
var cell: Vector3i = person[&"cell"]
var result := _life_track_region(key, cell, model)
var p := _cell_dimensions().x/16.0
var world: Variant = _service(&"world_service")
var facility_id: StringName = &""
if model[&"queue_positions"].has(key):
result = {&"bounds": Rect2(model[&"queue_positions"][key]-_cell_dimensions()*0.5, _cell_dimensions()), &"transit": false}
elif not row[&"staff"]:
if not String(person[&"service"]).is_empty():
var room: Dictionary = model[&"rooms"].get(person[&"target"], {})
if (room.get(&"people", []) as Array).has(person[&"id"]):
facility_id = person[&"target"]
else:
var id: StringName = person[&"id"]
if model[&"carried_patients"].has(id):
for carrier: Dictionary in model[&"staff"]:
if carrier[&"id"] == model[&"carried_patients"][id]:
result = _life_actor_region({&"key": "staff/"+String(carrier[&"id"]), &"staff": true}, carrier, model)
var rect: Rect2 = result[&"bounds"]
rect = rect.grow(p)
rect.position.y -= 12*p
result[&"bounds"] = rect
if result.has(&"center"):
result[&"center"] -= Vector2(0, 12*p)
elif model[&"resting_staff"].has(id):
facility_id = model[&"resting_staff"][id]
elif model[&"treated_patients"].has(id):
facility_id = model[&"treated_patients"][id]
elif person[&"state"] in ["WORKING", "AVAILABLE"] and world != null:
var cells: Array[Vector3i] = world.get_entity_cells(person[&"facility"])
var room: Dictionary = model[&"rooms"].get(person[&"facility"], {})
var slot := (room.get(&"staff", []) as Array).find(id)
var rect := _cell_bounds_rect(cells)
var columns := maxi(int(rect.size.x/(16*p)), 1)
if cells.has(cell) and slot >= 0 and slot < columns and rect.size.y >= 40*p:
result = {&"bounds": Rect2(rect.position+Vector2(slot*rect.size.x/columns, 0), Vector2(rect.size.x/columns, rect.size.y)), &"transit": false}
if not facility_id.is_empty() and world != null:
var cells: Array[Vector3i] = world.get_entity_cells(facility_id)
if not cells.is_empty():
result = {&"bounds": _cell_bounds_rect(cells), &"transit": false}
if not model[&"queue_positions"].has(key) and not result.has(&"center") and not result.get(&"no_lane", false):
result = _life_landing_region(result, cell, model)
result[&"bounds"] = (result[&"bounds"] as Rect2).grow(-p)
return result
func _life_scaled(row: Dictionary, scale: float) -> Dictionary:
var result := row.duplicate(true)
result[&"scale"] = scale
result[&"at"] = (row[&"center"]+Vector2(-8*scale, _cell_dimensions().y*0.5-3*_cell_dimensions().x/16.0-17*scale)).round()
return result
## Forward/backward packing keeps each member's own interval. No relocation.
func _life_pack(group: Array, scale: float) -> Array:
var trial: Array = []
var right := -INF
for member: Dictionary in group:
var row := _life_scaled(member[&"row"], minf(scale, member[&"row"][&"scale"]))
var core := _life_core(row)
var bounds: Rect2 = member[&"bounds"]
var x := maxf(maxf(core.position.x, bounds.position.x), right)
row[&"at"].x += x-core.position.x
right = x+core.size.x
trial.append(row)
var left := INF
for i: int in range(trial.size()-1, -1, -1):
var row: Dictionary = trial[i]
var core := _life_core(row)
var bounds: Rect2 = group[i][&"bounds"]
var x := minf(core.position.x, minf(bounds.end.x, left)-core.size.x)
row[&"at"].x += x-core.position.x
left = x
if x < bounds.position.x or core.position.y < bounds.position.y or core.end.y > bounds.end.y:
return []
return trial
## Rebuild vertical components at every fitted scale. Ceilings only decrease;
## once none decreases, the feet/cores and therefore the partition are fixed.
func _life_fitted_groups(members: Array) -> Array:
var groups: Array = []
while true:
for member: Dictionary in members:
member[&"row"].merge(_life_scaled(member[&"row"], member[&"row"][&"scale"]), true)
members.sort_custom(func(a: Dictionary, b: Dictionary) -> bool:
var ay := _life_core(a[&"row"]).position.y
var by := _life_core(b[&"row"]).position.y
return ay < by or (ay == by and a[&"row"][&"key"] < b[&"row"][&"key"]))
groups = []
var bottom := -INF
for member: Dictionary in members:
var core := _life_core(member[&"row"])
if groups.is_empty() or core.position.y >= bottom:
groups.append([])
bottom = core.end.y
else:
bottom = maxf(bottom, core.end.y)
groups.back().append(member)
var reduced := false
for group: Array in groups:
group.sort_custom(func(a: Dictionary, b: Dictionary) -> bool: return a[&"row"][&"center"].x < b[&"row"][&"center"].x or (a[&"row"][&"center"].x == b[&"row"][&"center"].x and a[&"row"][&"key"] < b[&"row"][&"key"]))
var ceiling := 1.0
for member: Dictionary in group:
ceiling = maxf(ceiling, member[&"row"][&"scale"])
if _life_pack(group, ceiling).is_empty() and ceiling > 1:
for member: Dictionary in group:
var scale := minf(member[&"row"][&"scale"], maxf(1, int(ceiling)-1))
member[&"row"].merge(_life_scaled(member[&"row"], scale), true)
reduced = true
if not reduced:
return groups
return groups
func _fit_life_actors(model: Dictionary) -> void:
var people: Dictionary = {}
for person: Dictionary in model[&"guests"]:
people["guest/"+String(person[&"id"])] = person
for person: Dictionary in model[&"staff"]:
people["staff/"+String(person[&"id"])] = person
var members: Array = []
var stranded: Array = []
var all_rows: Array = model[&"actor_drawings"].duplicate()
var passenger_bounds: Dictionary = {}
for cabin: Dictionary in model[&"cabins"]:
for row: Dictionary in cabin[&"passengers"]:
all_rows.append(row)
passenger_bounds[row[&"key"]] = (cabin[&"rect"] as Rect2).grow(-_cell_dimensions().x/16.0)
for row: Dictionary in all_rows:
var person: Dictionary = people[row[&"key"]]
row[&"cell"] = person[&"cell"]
var region := _life_actor_region(row, person, model) if not row[&"riding"] else {&"bounds": passenger_bounds[row[&"key"]], &"transit": false}
if region.has(&"center"):
var jitter := Vector2.ZERO
if not model[&"carried_patients"].has(person[&"id"]):
var track: Dictionary = model[&"actor_tracks"][row[&"key"]]
var t := 1.0 if model[&"paused"] else clampf((_animation_time-float(track[&"at"]))/0.42, 0, 1)
jitter = row[&"center"]-cell_to_canvas(track[&"from"]).lerp(cell_to_canvas(person[&"cell"]), t)
row[&"center"] = region[&"center"]+jitter
row.merge(_life_scaled(row, row[&"scale"]), true)
region[&"row"] = row
if region.get(&"no_lane", false):
stranded.append(region)
elif not region[&"transit"]:
members.append(region)
var groups := _life_fitted_groups(members)
model[&"actor_aggregations"] = []
var hidden: Dictionary = {}
for member: Dictionary in stranded:
var row: Dictionary = member[&"row"]
hidden[row[&"key"]] = true
var aggregate: Dictionary = {}
for existing: Dictionary in model[&"actor_aggregations"]:
if existing[&"at"] == member[&"badge_at"]:
aggregate = existing
break
if aggregate.is_empty():
aggregate = {&"members": [], &"drawn_keys": [], &"at": member[&"badge_at"], &"text": ""}
model[&"actor_aggregations"].append(aggregate)
aggregate[&"members"].append({&"key": row[&"key"], &"id": people[row[&"key"]][&"id"], &"state": row[&"state"], &"cell": row[&"cell"], &"mode": row[&"mode"]})
aggregate[&"text"] = "+%d" % aggregate[&"members"].size()
for group: Array in groups:
group.sort_custom(func(a: Dictionary, b: Dictionary) -> bool: return a[&"row"][&"center"].x < b[&"row"][&"center"].x or (a[&"row"][&"center"].x == b[&"row"][&"center"].x and a[&"row"][&"key"] < b[&"row"][&"key"]))
var base := 1.0
for member: Dictionary in group:
base = maxf(base, member[&"row"][&"scale"])
var fitted := _life_pack(group, base)
var retained: Array = group
if fitted.is_empty():
retained = []
var identities: Array = []
var drawn: Array = []
for member: Dictionary in group:
var row: Dictionary = member[&"row"]
identities.append({&"key": row[&"key"], &"id": people[row[&"key"]][&"id"], &"state": row[&"state"], &"cell": row[&"cell"], &"mode": row[&"mode"]})
var attempt := retained.duplicate()
attempt.append(member)
var packed := _life_pack(attempt, 1)
if not packed.is_empty():
retained = attempt
fitted = packed
drawn.append(row[&"key"])
else:
hidden[row[&"key"]] = true
model[&"actor_aggregations"].append({&"members": identities, &"drawn_keys": drawn, &"at": (group[0][&"bounds"] as Rect2).position, &"text": "+%d" % (group.size()-retained.size())})
for i: int in fitted.size():
retained[i][&"row"].merge(fitted[i], true)
model[&"actor_drawings"] = model[&"actor_drawings"].filter(func(row: Dictionary) -> bool: return not hidden.has(row[&"key"]))
for cabin: Dictionary in model[&"cabins"]:
cabin[&"passengers"] = cabin[&"passengers"].filter(func(row: Dictionary) -> bool: return not hidden.has(row[&"key"]))
func _draw_excavation_jobs() -> void:
var excavation: Variant = _service(&"excavation_service")
if excavation == null or not excavation.has_method(&"get_jobs"):
+5 -1
View File
@@ -82,7 +82,11 @@ static func elevator_label(shaft: Dictionary) -> String:
value = "満員 " + value
if not bool(shaft[&"operational"]):
value = "停止 " + value
return value
else:
value = "運転 " + value
var phase := String(shaft.get(&"phase", &"IDLE"))
var doors_open := bool(shaft[&"operational"]) and phase in ["IDLE", "BOARDING", "ALIGHTING"]
return value + (" 開 " if doors_open else " 閉 ") + phase
static func supply_label(requests: Array[Dictionary]) -> String:
+35 -6
View File
@@ -2,6 +2,7 @@ extends "res://tests/fixtures/p08-03/placement.gd"
## Real Runtime commands; inherited formal codec/save-operation helpers unchanged.
const Stream := preload("res://tests/fixtures/p23-03/diagnostic_stream.gd")
const Comparison := preload("res://tests/fixtures/p23-03/layout_comparison.gd")
const PurchaseQuoteV2 := preload("res://scripts/supply/supply_purchase_quote_v2.gd")
var stream: RefCounted
var layout := "A"
var facility_ids: Dictionary = {}
@@ -28,7 +29,7 @@ func setup() -> void:
func command(id: StringName, payload: Dictionary) -> bool:
var result: CommandResult = runtime.submit_command(id, payload)
expect(result.is_success(), String(id) + ": " + str(result.code))
expect(result.is_success(), String(id) + " " + str(payload) + ": " + str(result.code))
expect(stream.record("command", {&"command": id, &"payload": payload,
&"result": result.to_dictionary(), &"minute": clock.absolute_minute}), "record public command")
return result.is_success()
@@ -46,7 +47,7 @@ func observe_progress() -> void:
pass
func prepare() -> void:
# Both layouts receive the same definition-derived diagnostic construction budget.
# Both layouts receive the same runtime-derived budget for all setup spends.
# Cafeteria/kitchen move together to x=6, leaving x=4..5 for the declared B EV.
var builds: Array = [[&"reception", Vector3i(-8, 0, 0)],
[&"cafeteria", Vector3i(6, 0, 0)], [&"warehouse", Vector3i(-8, 0, 1)],
@@ -59,6 +60,9 @@ func prepare() -> void:
var improvement: Dictionary = Comparison.new().declaration()[&"improvement"]
var budget_builds := builds.duplicate(true)
budget_builds.append([improvement[&"definition_id"], improvement[&"origin"]])
var assignments: Array = [[&"staff_akane", &"reception"], [&"staff_gina", &"warehouse"],
[&"staff_chika", &"kitchen"], [&"staff_iris", &"cafeteria"], [&"staff_juno", &"cafeteria"]]
var purchase_quantity := 40
var needed := {&"gold": 0, &"materials": 0}
var costs: Array = []
for row: Array in budget_builds:
@@ -66,13 +70,36 @@ func prepare() -> void:
costs.append({&"definition": row[0], &"cost": definition.construction_cost.duplicate(true)})
for key: StringName in needed:
needed[key] += int(definition.construction_cost.get(key, 0))
var construction_total := needed.duplicate(true)
var signing_costs: Array = []
var signing_total := 0
for assignment: Array in assignments:
var candidate: Dictionary = runtime.mvp_content_catalog.get_recruitment_entry(assignment[0])
expect(candidate.has(&"signing_cost"), "registered signing cost " + String(assignment[0]))
var signing_cost := int(candidate[&"signing_cost"])
signing_costs.append({&"candidate_id": assignment[0], &"signing_cost": signing_cost,
&"source": "MvpContentCatalog.get_recruitment_entry.signing_cost"})
signing_total += signing_cost
needed[&"gold"] += signing_total
# Before warehouse construction, use the purchase service's catalog/quote
# branch. Check this total against its live preview immediately before buying.
var item := SupplyCatalog.get_item(SupplyCatalog.RAW_FOOD)
var purchase_quote := PurchaseQuoteV2.make(SupplyCatalog.RAW_FOOD, purchase_quantity, int(item[&"unit_price"]))
expect(not purchase_quote.is_empty(), "registered raw-food purchase quote")
var purchase_total := int(purchase_quote[&"effective_total"] if PurchaseQuoteV2.eligible(runtime) else purchase_quote[&"base_total"])
needed[&"gold"] += purchase_total
var purchase_cost := {&"item_id": SupplyCatalog.RAW_FOOD, &"quantity": purchase_quantity,
&"unit_price": item[&"unit_price"], &"quote": purchase_quote, &"total_cost": purchase_total,
&"source": "SupplyCatalog.unit_price / PurchaseQuoteV2.make; preview_purchase eligibility"}
var state: Variant = tree.root.get_node("GameState")
var deltas := {}
for key: StringName in needed:
if needed[key] > state.get_resource(key):
deltas[key] = needed[key] - state.get_resource(key)
budget = {"setup": "diagnostic", "costs": costs, "needed": needed,
"initial": state.resources.duplicate(true), "deltas": deltas}
"initial": state.resources.duplicate(true), "deltas": deltas,
"construction_total": construction_total, "signing_costs": signing_costs,
"signing_total": signing_total, "purchase_cost": purchase_cost}
if not deltas.is_empty(): command(&"change_resources", {&"deltas": deltas})
expect(stream.record("budget", budget), "common diagnostic budget")
if layout == "B": builds.append([improvement[&"definition_id"], improvement[&"origin"]])
@@ -90,13 +117,15 @@ func prepare() -> void:
facility_ids[facility.definition_id] = facility.instance_id
command(&"set_facility_conditions", {&"facility_id": facility_ids[&"cafeteria"],
&"conditions": {&"related_facility_id": facility_ids[&"kitchen"]}})
for assignment: Array in [[&"staff_akane", &"reception"], [&"staff_gina", &"warehouse"],
[&"staff_chika", &"kitchen"], [&"staff_iris", &"cafeteria"], [&"staff_juno", &"cafeteria"]]:
for assignment: Array in assignments:
command(&"hire_staff_candidate", {&"candidate_id": assignment[0]})
command(&"set_staff_work_assignment", {&"staff_id": assignment[0],
&"facility_id": facility_ids[assignment[1]], &"template_id": &"DAY"})
var actual_quote: Dictionary = runtime.preview_supply_purchase(facility_ids[&"warehouse"], SupplyCatalog.RAW_FOOD, purchase_quantity)
expect(int(actual_quote[&"total_cost"]) == purchase_total, "budget matches actual purchase quote")
expect(stream.record("setup-purchase-quote", actual_quote), "record actual setup purchase quote")
command(&"purchase_supplies", {&"warehouse_id": facility_ids[&"warehouse"],
&"item_id": SupplyCatalog.RAW_FOOD, &"quantity": 40})
&"item_id": SupplyCatalog.RAW_FOOD, &"quantity": purchase_quantity})
command(&"set_kitchen_production", {&"facility_id": facility_ids[&"kitchen"],
&"enabled": true, &"target_stock": 8})
# The OS observation uses the already declared transport cohort, plus
+4 -1
View File
@@ -166,6 +166,9 @@ func draw_rectangles(report: Dictionary, view: WorldPreview) -> Dictionary:
var rest := actor_rectangle(actor)
rest["category"] = "rest"
rows.append(rest)
for index: int in range(report.get(&"actor_aggregations", []).size()):
var badge: Dictionary = report[&"actor_aggregations"][index]
rows.append(badge_rectangle("aggregation", str(index), badge[&"at"], badge[&"text"]))
for index: int in range(report.get(&"badges", []).size()):
var badge: Dictionary = report[&"badges"][index]
rows.append(badge_rectangle("goods" if badge[&"kind"] == &"supply" else "business", str(index), badge[&"at"], badge[&"text"]))
@@ -190,7 +193,7 @@ func draw_rectangles(report: Dictionary, view: WorldPreview) -> Dictionary:
func badge_rectangle(category: String, id: String, at: Vector2, text: String) -> Dictionary:
var width := ThemeDB.fallback_font.get_string_size(text, HORIZONTAL_ALIGNMENT_LEFT, -1, 10).x + 6
return {"category": category, "id": id, "rect": Rect2(at, Vector2(width, 14)),
return {"category": category, "id": id, "rect": Rect2(at, Vector2(text.length() * 10 + 6, 14)),
"text": text, "font_width": width - 6, "style_source": "scenes/main/world_preview.gd"}
func actor_rectangle(actor: Dictionary) -> Dictionary:
+15
View File
@@ -0,0 +1,15 @@
{
"purpose": "Historical negative only; not fresh acceptance evidence",
"source_request": "os-pair/A/reader-request-0003/request.json",
"source_request_sha256": "7dc3ee0bcc428e9d103726ee2448c767f1dd4107f9490833dc860c0b5140068c",
"manifest_sha256": "53aa8e2f12e5d0a089529457fcd55ee1ba0600e8dffff2225bb8b057d007fe1a",
"independent_judgment": [11, false, false, false],
"source_rows": [11, 29],
"report_inputs": {
"actor_drawings": [
{"key": "guest/guest-auto-00000041", "at": [651.0, 517.0], "scale": 3.0, "mode": "wait", "frame": 12, "flip": false},
{"key": "staff/staff_gina", "at": [651.0, 517.0], "scale": 3.0, "mode": "idle", "frame": 3, "flip": false}
],
"cabins": []
}
}
+17
View File
@@ -0,0 +1,17 @@
{
"purpose": "Historical diagnostic input for placement-rule clarification; not fresh acceptance evidence",
"source_request": "os-pair/A/reader-request-0003/request.json",
"source_request_sha256": "7dc3ee0bcc428e9d103726ee2448c767f1dd4107f9490833dc860c0b5140068c",
"guests": [
{"id": "guest-auto-00000044", "state": "RECEIVING_SERVICE", "cell": [5, 0, 0], "target": "facility_00000003", "service": "service_00000009", "queue": ""},
{"id": "guest-auto-00000019", "state": "RECEIVING_SERVICE", "cell": [-6, 2, 0], "target": "facility_00000007", "service": "service_00000002", "queue": ""}
],
"room_rects": {
"facility_00000003": [1027.0, 388.0, 256.0, 192.0],
"facility_00000007": [131.0, 292.0, 128.0, 96.0]
},
"traffic": [
{"cell": [5, 0, 0], "traffic": {"base_capacity": 4, "current_density": 6, "dynamic_cost": 0, "temporary_block": false}, "rect": [965.0, 486.0, 60.0, 92.0]},
{"cell": [-6, 2, 0], "traffic": {"base_capacity": 4, "current_density": 3, "dynamic_cost": 0, "temporary_block": false}, "rect": [261.0, 294.0, 60.0, 92.0]}
]
}
Binary file not shown.
File diff suppressed because it is too large Load Diff
+14
View File
@@ -0,0 +1,14 @@
{
"applicability": "Historical negative only. Distilled local-coordinate fields; never S/T execution proof.",
"source_commit": "9a26f9ab8c6691ba3cbe32ac4bc4525f4a9c7106",
"manifest_sha256": "a25e15f00d09acb16b05e180a6263c3771c84449bd6e0c99b6968fd739727bd2",
"request_sha256": "7099ca03da3cef5819e7965f6fdea8777b9995a9e12806e870e844ec2b02b9a5",
"request_relative_to_R15": "os-pair/A/reader-request-0003/request.json",
"actual_negative_rows": [6, 17],
"cabin_rect": [659, 463, 96, 76],
"passenger_count": 0,
"actor": {"key": "guest/os-p23-024", "center": [739, 532], "at": [715, 517], "scale": 3, "mode": "wait", "frame": 6, "flip": false},
"traffic": {"cell": [0, 1, 0], "rect": [645, 390, 60, 92], "band_rect": [652.2, 473.5, 45.6, 5], "traffic": {"base_capacity": 4, "current_density": 16, "dynamic_cost": 0, "temporary_block": false}},
"queue_badge": {"at": [563, 468], "text": "待ち27人(他18人)"},
"note": "Raw R15 maps/receipts remain unchanged. New geometry tests calculate a counterfactual projection in memory only."
}
+178
View File
@@ -5,9 +5,126 @@ const Stream := preload("res://tests/fixtures/p23-03/diagnostic_stream.gd")
var checks := 0
var failures := 0
class QueueWorld extends RefCounted:
var revision := 0
func get_bounds() -> Dictionary:
return {&"min_x": -1, &"max_x": 2, &"min_y": 0, &"max_y": 1}
func is_walkable(cell: Vector3i) -> bool:
return cell.y >= 0 and cell.y <= 1 and cell.x >= -1 and cell.x <= 2
func get_occupant(_cell: Vector3i) -> StringName:
return &""
class QueueLift extends RefCounted:
var layer := 0
var visual_floor := 0.3
func get_report() -> Dictionary:
var trips: Array = []
for i: int in 3:
trips.append({&"state": PathService.ELEVATOR_REQUEST_QUEUED, &"from": Vector3i(0,0,layer),
&"actor_id": "guest:q%d" % i, &"enqueued_at": i})
return {&"shafts": [{&"shaft_id": &"wide", &"stops": [Vector3i(0,0,layer), Vector3i(0,1,layer)],
&"width": 2, &"capacity": 4, &"boarded": [], &"visual_floor": visual_floor,
&"operational": true, &"phase": &"PICKUP"}], &"trips": trips}
class QueueRuntime extends RefCounted:
var world_service := QueueWorld.new()
var elevators := QueueLift.new()
func repair28_geometry() -> void:
var view := WorldPreview.new()
view.size = Vector2(408,332)
var fixture := QueueRuntime.new()
view._runtime = fixture
root.add_child(view)
for layer: int in [0,1]:
view.layer_mode = layer as WorldPreview.LayerMode
fixture.elevators.layer = layer
var model: Dictionary = view._observe_queues()
expect(model[&"shaft_footprint"].has(Vector3i(1,0,layer)), "width-2 interior belongs to shaft")
expect(model[&"queue_positions"].size() == 1 and model[&"queue_hidden"].size() == 2, "shaft stops outward lane and retains overflow")
var badge: Dictionary = model[&"landing_badges"][0]
expect(badge[&"members"].size() == badge[&"visible_count"] + badge[&"overflow"], "no queue member lost")
model.merge({&"boarded": {}, &"elevator_tracks": {}, &"paused": true})
var cabins: Array[Dictionary] = view._observe_elevators(model)
expect(cabins.size() == 1, "active-layer cabin remains visible")
for at: Vector2 in model[&"queue_positions"].values():
for cell: Vector3i in model[&"shaft_footprint"]:
expect(not view.get_cell_rect(cell).has_point(at), "queue anchor outside full footprint")
expect(not cabins[0][&"rect"].has_point(at), "queue anchor outside empty cabin")
expect(cabins[0][&"passenger_count"] == 0 and cabins[0][&"passengers"].is_empty(), "empty cabin has no passenger")
expect(cabins[0][&"operational"] and not cabins[0][&"doors_open"] and cabins[0][&"phase"] == &"PICKUP", "typed moving cabin state")
for floor: float in [0.0, 0.8]:
fixture.elevators.visual_floor = floor
var pose_model: Dictionary = view._observe_queues()
var cell := Vector3i(0, 0 if floor == 0 else 1, layer)
var key := "guest/landing"
var person := {&"id": &"landing", &"cell": cell, &"service": &"", &"target": &""}
pose_model.merge({&"boarded": {}, &"elevator_tracks": {}, &"paused": true,
&"actor_tracks": {key: {&"cell": cell, &"from": cell, &"at": 0.0, &"direction": 1.0}},
&"rooms": {}, &"guests": [person], &"staff": [], &"carried_patients": {},
&"resting_staff": {}, &"treated_patients": {}})
pose_model[&"cabins"] = view._observe_elevators(pose_model)
var row: Dictionary = view._actor_drawing(view.cell_to_canvas(cell), key, false,
GuestRuntime.State.MOVING, false, false, &"", false, pose_model)
var region: Dictionary = view._life_actor_region(row, person, pose_model)
expect(region.has(&"center") and not region[&"transit"], "same-floor and fractional cabin use landing region")
expect(not (region[&"bounds"] as Rect2).intersects(pose_model[&"cabins"][0][&"rect"]), "landing bounds outside cabin")
pose_model[&"actor_drawings"] = [row]
view._fit_life_actors(pose_model)
expect(pose_model[&"actor_drawings"].size() == 1 and pose_model[&"actor_aggregations"].is_empty(), "landing actor retained")
expect(not view._life_core(row).intersects(pose_model[&"cabins"][0][&"rect"]), "fitted non-passenger core outside cabin")
expect(row[&"cell"] == cell and not row[&"riding"] and row[&"state"] == GuestRuntime.State.MOVING, "landing placement preserves actual state")
fixture.elevators.visual_floor = 0.3
for operational: bool in [true,false]:
for phase: StringName in [&"IDLE", &"BOARDING", &"PICKUP"]:
var shaft: Dictionary = fixture.elevators.get_report()[&"shafts"][0]
shaft[&"operational"] = operational
shaft[&"phase"] = phase
var text := Presentation.elevator_label(shaft)
expect(text.contains("0/4人") and text.contains(String(phase)), "count and phase visible")
expect(text.begins_with("運転" if operational else "停止"), "operation visible beyond lamp")
expect(text.contains(" 開 " if operational and phase != &"PICKUP" else " 閉 "), "doors visible beyond lamp")
var obstacles: Array[Rect2] = [Rect2(20,0,20,90), Rect2(45,80,20,14)]
var segments := view._traffic_segments(Rect2(10,85,60,5), Rect2(0,0,80,96), obstacles)
var area := 0.0
for segment: Rect2 in segments:
area += segment.get_area()
for obstacle: Rect2 in obstacles:
expect(not segment.intersects(obstacle), "traffic never crosses cabin or badge")
expect(is_equal_approx(area, 100.0), "traffic preserves all uncovered area")
var covering: Array[Rect2] = [Rect2(0,80,80,16)]
var fallback := view._traffic_segments(Rect2(10,85,60,5), Rect2(0,0,80,96), covering)
expect(fallback.size() == 1 and fallback[0] == Rect2(10,0,60,5), "shaft-column density remains visible")
view.free()
func _initialize() -> void:
call_deferred("run")
func repair36_labels() -> void:
var view := WorldPreview.new()
var members: Array[String] = ["guest/a", "guest/b", "guest/c"]
var identities: Array[Dictionary] = []
for key: String in members:
identities.append({&"key": key, &"id": key.trim_prefix("guest/"), &"state": 0, &"cell": Vector3i.ZERO, &"mode": &"idle"})
var queue := {&"at": Vector2(40,40), &"text": "待ち3人(他3人)", &"cell": Vector3i.ZERO, &"members": members.duplicate(), &"visible_count": 0, &"overflow": members.size()}
var aggregate := {&"at": queue[&"at"], &"text": "+3", &"members": identities.duplicate(true), &"drawn_keys": []}
var model := {&"cabins": [], &"badges": [], &"landing_badges": [queue], &"actor_aggregations": [aggregate]}
var blocked := Rect2(100,100,20,20)
model[&"cabins"] = [{&"rect": blocked, &"badge_at": Vector2(200,200), &"badge": "EV", &"badge_rect": view._readable_badge_rect(Vector2(200,200), "EV")}]
model[&"shaft_footprint"] = []
var region: Dictionary = view._life_landing_region({&"bounds": blocked, &"transit": false}, Vector3i.ZERO, model)
expect(region.get(&"no_lane", false) and region[&"badge_at"] == queue[&"at"], "lane-less stranded actor uses hidden queue anchor")
view._resolve_observation_labels(model)
expect(not view._readable_badge_rect(queue[&"at"], queue[&"text"]).intersection(view._readable_badge_rect(aggregate[&"at"], aggregate[&"text"])).has_area(), "hidden queue and stranded aggregate labels do not overlap")
expect(queue[&"text"] == "待ち3人(他3人)" and aggregate[&"text"] == "+3", "complete counts remain readable")
expect(queue[&"members"] == members and aggregate[&"members"] == identities and aggregate[&"drawn_keys"].is_empty(), "label placement preserves member identities and visibility")
expect(queue[&"at"] == queue[&"anchor"] and aggregate[&"anchor"] == queue[&"anchor"], "uncontested queue keeps anchor and stranded anchor remains recorded")
var solitary := {&"at": Vector2(400,400), &"text": "+1"}
model[&"actor_aggregations"] = [solitary]
view._resolve_observation_labels(model)
expect(solitary[&"at"] == solitary[&"anchor"] and solitary[&"displaced_by"].is_empty(), "uncontested label stays at anchor")
view.free()
func expect(value: bool, message: String) -> void:
checks += 1
if not value:
@@ -25,6 +142,8 @@ func run() -> void:
return
var clock: Variant = root.get_node("GameClock")
clock.set_paused(true)
repair28_geometry()
repair36_labels()
# Isolated real typed components test state labels, without claiming gameplay.
var labels: Dictionary = {}
for state: int in FacilityInstance.State.values():
@@ -56,6 +175,61 @@ func run() -> void:
view.size = Vector2(1440, 810)
view.set_runtime(runtime)
root.add_child(view)
# R13's four same-cell MOVING guests. Component fixture only, no Runtime edit.
var crowd: Array = []
var offsets := [0, 16, -16, 8]
for i: int in 4:
crowd.append({&"row": {&"key": "guest/os-p23-%03d" % (12+i),
&"center": Vector2(108+offsets[i], 118-4*(i%2)),
&"at": Vector2(84+offsets[i], 103-4*(i%2)), &"scale": 3.0,
&"mode": &"idle", &"frame": 0, &"flip": false,
&"state": GuestRuntime.State.MOVING, &"cell": Vector3i(1,1,0)},
&"bounds": Rect2(80,74,56,88), &"transit": false})
crowd.sort_custom(func(a: Dictionary, b: Dictionary) -> bool: return a[&"row"][&"center"].x < b[&"row"][&"center"].x)
# _life_pack uses the view's cell dimensions for the unchanged feet formula.
# The x-capacity assertion is independent of the current default world size.
expect(view._life_pack(crowd, 3).is_empty(), "four cores cannot fit 72px in 56px")
var saved_size := view.size
var saved_zoom := view.zoom_level
var dim: Vector2 = view._cell_dimensions()
view.zoom_level *= 64.0/dim.x
var fitted: Array = view._life_pack(crowd, 2)
expect(fitted.size() == 4, "all four R13 occupants fit at p=2")
for row: Dictionary in fitted:
expect(row[&"scale"] == 2.0 and row[&"cell"] == Vector3i(1,1,0), "fitting preserves cell and uses p=2")
var regroup: Array = crowd.slice(0, 2).duplicate(true)
for i: int in 2:
regroup[i][&"row"][&"center"] = Vector2(108, 118+26*i)
regroup[i][&"bounds"] = Rect2(80,74,20,130)
var regrouped: Array = view._life_fitted_groups(regroup)
expect(regrouped.size() == 2, "scale change splits vertical component")
for group: Array in regrouped:
expect(group.size() == 1 and group[0][&"row"][&"scale"] == 2.0, "regroup avoids stale p=1 fit")
var saturated: Array = []
for i: int in 10:
var member: Dictionary = crowd[0].duplicate(true)
member[&"row"][&"key"] = "guest/saturation-%02d" % i
member[&"row"][&"center"] = Vector2(108,118)
saturated.append(member)
var saturated_groups: Array = view._life_fitted_groups(saturated)
expect(saturated_groups.size() == 1, "saturation keeps one vertical component")
expect(view._life_pack(saturated_groups[0], 1).is_empty(), "ten cores cannot fit 60px in 56px")
expect(view._life_pack(saturated_groups[0].slice(0,9), 1).size() == 9, "nine cores fit without losing identities")
var aggregate_model := {&"guests": [], &"staff": [], &"actor_drawings": [], &"cabins": []}
var aggregate_rows: Array = []
for member: Dictionary in saturated:
var row: Dictionary = member[&"row"].duplicate(true)
row[&"riding"] = true
aggregate_rows.append(row)
aggregate_model[&"guests"].append({&"id": String(row[&"key"]).trim_prefix("guest/"), &"cell": Vector3i(1,1,0)})
aggregate_model[&"cabins"].append({&"rect": Rect2(76,70,64,96), &"passengers": aggregate_rows})
view._fit_life_actors(aggregate_model)
expect(aggregate_model[&"cabins"][0][&"passengers"].size() == 9, "aggregation draws all nine fitting members")
var aggregate: Dictionary = aggregate_model[&"actor_aggregations"][0]
expect(aggregate[&"members"].size() == 10 and aggregate[&"drawn_keys"].size() == 9, "aggregation retains every identity")
expect(aggregate[&"text"] == "+1" and aggregate[&"at"] == Vector2(80,74), "actual aggregation badge position and text")
view.zoom_level = saved_zoom
view.size = saved_size
var before: PackedByteArray = var_to_bytes(runtime.create_snapshot())
var tracks: PackedByteArray = var_to_bytes([view._actor_tracks, view._elevator_tracks])
var model := view._build_life_observation()
@@ -67,6 +241,10 @@ func run() -> void:
await process_frame
var report := view.get_life_observation_report()
expect(not report.is_empty(), "actual drawing published an observation")
expect(report.get(&"observation_serial", -1) == report.get(&"overlay_consumed_serial", -2), "LifeOverlay consumed this observation")
expect(report.get(&"overlay_passes", []) == [&"traffic", &"cabins", &"actors"], "traffic drawn before cabins and actors")
var indices: Array = report.get(&"overlay_child_indices", [])
expect(indices.size() == 3 and indices[0] < indices[1] and indices[1] < indices[2], "LifeOverlay above inactive art and below lens")
# The getter exposes the last actual draw and must not create another model.
var original: PackedByteArray = var_to_bytes(report)
if report.has(&"traffic"):
File diff suppressed because it is too large Load Diff
+11 -3
View File
@@ -20,7 +20,7 @@ CONDITIONS = ('room_occupancy_and_operation', 'queues_and_overflow',
'elevator_state_and_passengers', 'staff_state_and_jobs',
'supplies_and_carried_goods', 'same_demand_route_improvement',
'normal_os_and_distinct_pid_resume')
OS_CHILD_TIMEOUT_SECONDS = 900
OS_CHILD_TIMEOUT_SECONDS = 3600
RECORDER = 'tests/fixtures/p23-03/passive_os_recorder.gd'
def collect_screenshots(out, pair, role):
@@ -235,12 +235,15 @@ def collect(args):
raise ValueError('evidence output must be outside the frozen source checkout')
r = module('p23_standard_runner', root/'tools/run_all_tests.py')
commit = subprocess.check_output(['git', '-C', str(root), 'rev-parse', 'HEAD'], text=True).strip()
r.require(commit == args.commit, 'actual final submitted commit required')
r.require(commit == args.commit, 'actual tested commit Q required')
r.require(not subprocess.check_output(['git','-C',str(root),'status','--porcelain'], text=True), 'frozen clean worktree required')
r.require(not out.exists(), 'fresh output; never overwrite earlier proof')
refs = r.source_refs(root)
checker = module('p23_initial_inputs', root/'tools/check_p23_life_observation_evidence.py')
inputs_before = checker.input_map(root)
root_roles = checker.strict_json(args.root_composition.read_bytes())
composition = checker.verify_composition(root, root_roles,
{name: pin['sha256'] for name, pin in refs.items()}, inputs_before)
outer = r.module('p23_owned_outer', r.SUPPORT/'owned_outer.py')
r.require(not outer.native.helper['live_engines'](), 'one native engine')
engine = shutil.which(args.godot)
@@ -308,6 +311,8 @@ def collect(args):
os.environ.update(P23_LAYOUT=layout, P23_OUTPUT=str(directory))
phase('layout-'+layout.lower(), 'tests/ui/test_p23_life_observation.gd')
cases.append({'directory':directory.name, 'phase':phases[-1], 'files':r.inventory(directory)})
for layout in ('A', 'B'):
checker.inspect_stream(out/('layout-'+layout), root)
if args.input_mode == 'native_os':
os_phases = collect_os(r, root, out, stage, engine, commit, refs, protected, outer)
checker = module('p23_os_input_map', root/'tools/check_p23_life_observation_evidence.py')
@@ -328,7 +333,8 @@ def collect(args):
r.write(out/'runner-ended.json', {'error':error, 'cleanup':cleanup, 'cleanup_errors':cleanup_errors,
'phases':phases, 'formal_acceptance':False, 'native_Windows':'pending'})
checker = module('p23_observation_checker', root/'tools/check_p23_life_observation_evidence.py')
r.write(out/'index.json', {'schema':'p23-life-observation-v1', 'commit':commit,
r.write(out/'index.json', {'schema':'p23-life-observation-v2', 'commit':commit,
'composition':composition,
'source_map':selected['map'], 'input_map':inputs_before,
'provenance':checker.input_provenance(root),
'marker_contract_sha256':r.sha(root/CONTRACT),
@@ -345,6 +351,8 @@ def main(argv=None):
parser.add_argument('--project-root', type=absolute, required=True)
parser.add_argument('--output', type=absolute, required=True)
parser.add_argument('--commit', required=True)
parser.add_argument('--root-composition', type=absolute, required=True,
help='Root external S/M/T/Q and complete tested-tree blob bindings')
parser.add_argument('--godot', default='godot')
parser.add_argument('--input-mode', choices=('handler', 'native_os'), default='handler')
parser.add_argument('--collect', action='store_true', required=True)
File diff suppressed because it is too large Load Diff